Commit graph

5663 commits

Author SHA1 Message Date
Maarten Bosmans
53695b83dc Get rid of some unused-function compiler warnings 2011-03-02 14:52:46 +00:00
Arun Raghavan
3f6eb652cb introspect: Client-side implementation for has_volume/read_only_volume
This completes the client-side changes to the protocol extension
introduced by commit 99ddca89cd
2011-03-02 11:17:32 +00:00
Colin Guthrie
0d1e53e30a x11: Make pax11publish -r remove PULSE_SESSION_ID
This is not set by pax11publish, but module-x11-publish does so this tool
should tidy that up. It is only removed when passing -r and is
ignored when actually setting up it's own properties from the conf
files/guesswork.
2011-03-01 18:15:28 +00:00
Maarten Bosmans
38d0f4d15f Include <time.h> where necessary 2011-03-01 18:06:28 +01:00
Colin Guthrie
f834150ace Merge remote-tracking branch 'arun/no-ramping' 2011-02-28 19:39:10 +00:00
David Henningsson
7b366a52c3 alsa-mixer: Add support for "Line Boost" element
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-02-28 13:30:51 +00:00
Arun Raghavan
aa78853d72 Remove remaining ramping/envelope references
(part of a patch series removing all ramping code)
2011-02-28 17:13:13 +05:30
Arun Raghavan
50e289d52a Revert "Add new subsystem for applying envelopes (such as volume ramps) to audio signals"
This reverts commit 95a98fe6f2.

Conflicts:

	src/Makefile.am
	src/pulsecore/envelope.c
	src/pulsecore/envelope.h
	src/tests/envelope-test.c

(part of a patch series removing all ramping code)
2011-02-28 17:13:13 +05:30
Arun Raghavan
79616c012e Revert "Add volume ramping feature - envelop fix"
This reverts commit 8eaa40b6f4.

Conflicts:

	src/pulsecore/envelope.c

(part of a patch series removing all ramping code)
2011-02-28 17:13:13 +05:30
Arun Raghavan
8401572fd5 Revert "Add volume ramping feature - sink-input modification"
This reverts commit 5318eb35ef.

Conflicts:

	src/pulsecore/sink-input.c

(part of a patch series removing all ramping code)
2011-02-28 17:13:13 +05:30
Arun Raghavan
241dd91583 Revert "Add volume ramping feature - sink modification"
This reverts commit 897ef86b7f.

Conflicts:

	src/pulsecore/sink.c

(part of a patch series removing all ramping code)
2011-02-28 17:12:25 +05:30
Arun Raghavan
4cf12b91a4 Revert "ramping: minor cleanups"
This reverts commit f202af17b7.

(part of a patch series removing all ramping code)
2011-02-28 17:11:31 +05:30
Arun Raghavan
8745eccb45 Revert "core: volume ramping fix"
This reverts commit aa9348441d.

(part of a patch series removing all ramping code)
2011-02-28 17:11:31 +05:30
Tanu Kaskinen
bed4b73cfe Add src/*-symdef.h to .gitignore.
Also remove src/module/.gitignore as this is no longer needed
as pointed out by Arun Raghavan
2011-02-28 09:56:08 +00:00
Tanu Kaskinen
59f2b4436a sink: Add casts to some printf arguments to get rid of compiler warnings. 2011-02-28 09:56:08 +00:00
Tanu Kaskinen
0d8bbaf40d sink: Don't send unnecessary PA_SINK_MESSAGE_SET_SHARED_VOLUME messages.
If send_msg is false, the message will be sent by the caller.
2011-02-28 09:55:01 +00:00
Tanu Kaskinen
6bd34156b1 virtual-sink: Fix a crash when moving the sink to a new master right after setup.
If the virtual sink is moved to a new master right after it has been created,
then the virtual sink input's memblockq can be rewound to a negative read
index. The data written prior to the move starts from index zero, so after the
rewind there's a bit of silence. If the memblockq doesn't have a silence
memchunk set, then pa_memblockq_peek() will return zero in such case, and the
returned memchunk's memblock pointer will be NULL.

That scenario wasn't taken into account in the implementation of
sink_input_pop_cb. Setting a silence memchunk for the memblockq solves this
problem, because pa_memblock_peek() will now return a valid memblock if the
read index happens to point to a hole in the memblockq.

I believe this isn't the best possible solution, though. It doesn't really make
sense to rewind the sink input's memblockq beyond index 0 in the first place,
because now when the stream starts to play to the new master sink, there's some
unnecessary silence before the actual data starts. This is a small problem,
though, and I don't grok the rewinding system well enough to know how to fix
this issue properly.

I went through all files that call pa_memblockq_peek() to see if there are more
similar bugs. play-memblockq.c was the only one that looked to me like it might
be broken in the same way. I didn't try reproducing the bug with
play-memblockq.c, though, so I just added a FIXME comment there.
2011-02-26 10:40:06 +00:00
Tanu Kaskinen
b3644c1bcd virtual-sink/source: Remove an unused variable. 2011-02-26 10:39:53 +00:00
Tanu Kaskinen
1fda23c02c virtual-sink/source: Use a more descriptive stream name. 2011-02-26 10:39:38 +00:00
Tanu Kaskinen
d2d36beb80 virtual-sink: Add a modarg for forcing flat volume. 2011-02-26 10:38:28 +00:00
Tanu Kaskinen
8702d15d03 virtual-sink: Add a modarg for enabling volume sharing. 2011-02-26 10:38:15 +00:00
Tanu Kaskinen
c9c88fb8dc Implement the "volume sharing" feature.
When we have a filter sink that does some processing, currently the
benefits of the flat volume feature are not really available. That's
because if you have a music player that is connected to the filter sink,
the hardware sink doesn't have any idea of the music player's stream
volume.

This problem is solved by this "volume sharing" feature. The volume
sharing feature works so that the filter sinks that want to avoid the
previously described problem declare that they don't want to have
independent volume, but they follow the master sink volume instead.
The PA_SINK_SHARE_VOLUME_WITH_MASTER sink flag is used for that
declaration. Then the volume logic is changed so that the hardware
sink calculates its real volume using also the streams connected to the
filter sink in addition to the streams that are connected directly to
the hardware sink. Basically we're trying to create an illusion that
from volume point of view all streams are connected directly to the
hardware sink.

For that illusion to work, the volumes of the filter sinks and their
virtual streams have to be managed carefully according to a set of
rules:

If a filter sink follows the hardware sink volume, then the filter sink's
 * reference_volume always equals the hw sink's reference_volume
 * real_volume always equals the hw sink's real_volume
 * soft_volume is always 0dB (ie. no soft volume)

If a filter sink doesn't follow the hardware sink volume, then the filter
sink's
 * reference_volume can be whatever (completely independent from the hw sink)
 * real_volume always equals reference_volume
 * soft_volume always equals real_volume (and reference_volume)

If a filter sink follows the hardware sink volume, and the hardware sink
supports flat volume, then the filter sink's virtual stream's
 * volume always equals the hw sink's real_volume
 * reference_ratio is calculated normally from the stream volume and the hw
   sink's reference_volume
 * real_ratio always equals 0dB (follows from the first point)
 * soft_volume always equals volume_factor (follows from the previous point)

If a filter sink follows the hardware sink volume, and the hardware sink
doesn't support flat volume, then the filter sink's virtual stream's
 * volume is always 0dB
 * reference_ratio is always 0dB
 * real_ratio is always 0dB
 * soft_volume always equals volume_factor

If a filter sink doesn't follow the hardware sink volume, then the filter
sink's virtual stream is handled as a regular stream.

Since the volumes of the virtual streams are controlled by a set of rules,
the user is not allowed to change the virtual streams' volumes. It would
probably also make sense to forbid changing the filter sinks' volume, but
that's not strictly necessary, and currently changing a filter sink's volume
changes actually the hardware sink's volume, and from there it propagates to
all filter sinks ("funny" effects are expected when adjusting a single
channel in cases where all sinks don't have the same channel maps).

This patch is based on the work of Marc-André Lureau, who did the
initial implementation for Pulseaudio 0.9.15.
2011-02-26 10:37:20 +00:00
David Henningsson
dbdb4607b0 alsa-mixer: Make sure capture source and input source use right path
Make sure that mic and line (with common names) use the specific
path instead of the analog-input one.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-02-25 15:55:55 +00:00
David Henningsson
65317c8241 alsa-mixer: Fixup "Mic"/"Line"/"analog-input" paths to work with the new paths
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-02-25 15:55:39 +00:00
David Henningsson
3618268757 alsa-mixer: Add new paths for Internal Mic, Front Mic, Rear Mic and Dock Mic
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-02-25 15:54:59 +00:00
David Henningsson
ade0a6f884 alsa-mixer: always round towards 0 dB
Always round towards 0 dB. Also add a few debug comments to aid
troubleshooting.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-02-25 15:54:48 +00:00
David Henningsson
b0f72311cf alsa-mixer: add required-any and required-* for enum options
Now you can add required-any to elements in a path and the path
will be valid as long as at least one of the elements are present.
Also you can have required, required-any and required-absent in
element options, causing a path to be unsupported if an option is
(not) present (simplified example: to skip line in path if
"Capture source" doesn't have a "Line In" option).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-02-25 15:48:11 +00:00
David Henningsson
0ce3017b74 alsa-mixer: Add a few well-known descriptions
Add front mic, rear mic, and docking line-in. These are likely to be
present on modern hda chips, for reference see
linux-2.6/sound/pci/hda/hda_codec.c:hda_get_input_pin_label

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-02-25 15:47:56 +00:00
Tanu Kaskinen
624152dac3 alsa-card: Add a new modarg "profile_set" for giving the card a custom profile set configuration file. 2011-02-25 15:44:57 +00:00
Tanu Kaskinen
46359043c4 alsa-mixer: Fix path set building when using the element-output or element-input mapping options in profile set configuration.
When creating synthesized paths, pa_alsa_path_set_new() created duplicate
elements for each path, and one of the duplicate elements would be marked as
required absent. That made path probing fail. While debugging this, I noticed
also that pa_alsa_path_synthesize() didn't initialize p->last_element properly.
2011-02-25 15:44:44 +00:00
Colin Guthrie
3153b60a62 core: Add a new hook PA_CORE_HOOK_CARD_PROFILE_CHANGED
This will allow modules to know when a card profile has changed
and take appropriate action. This might prove useful when developing
UCM so that the appropriate verb can be set.
2011-02-25 11:28:01 +00:00
Kim Therkelsen
9379d4015c core: Added new hooks: PA_CORE_HOOK_SOURCE_PORT_CHANGED and PA_CORE_HOOK_SINK_PORT_CHANGED
This allows modules to know when certain ports are changed.
This will allow e.g. a filter module (or LADSAP) to only load
when a certain port is used on the device (e.g. to only filter
headphones and not normal speakers).

(Comment from Colin Guthrie: This may also have use in UCM)
2011-02-25 10:04:07 +00:00
Kim Therkelsen
6bd32ee2d9 Support for multichannel DSP processing in module-ladspa-sink 2011-02-25 09:55:31 +00:00
Colin Guthrie
a3dbdb0446 Merge remote-tracking branch 'mkbosmans/mingw32-build' 2011-02-25 09:24:07 +00:00
Edward Rudd
f51889c6f6 sconv_sse: Exclude SSE optimizations for Mac OS X
At least on 32bit compiles, there are not enough registers.
2011-02-22 21:33:44 +00:00
Edward Rudd
ee4a33b586 solaris: update call of pa_thread_new to new prototype 2011-02-22 21:32:53 +00:00
Edward Rudd
03c4fd5c4c coreaudio: Fix call to pa_thread_new 2011-02-22 21:32:09 +00:00
Tanu Kaskinen
99ddca89cd Allow read-only or non-existing sink input volume.
There are two known cases where read-only or non-existing sink input volume is
relevant: passthrough streams and the planned volume sharing logic.
Passthrough streams don't have volume at all, and the volume sharing logic
requires read-only sink input volume. This commit is primarily working towards
the volume sharing feature, but support for non-existing sink input volume is
also added, because it is so closely related to read-only volume.

Some unrelated refactoring in iface-stream.c creeped into this commit too (new
function: stream_to_string()).
2011-02-22 20:12:31 +00:00
Tanu Kaskinen
fa12d2a8a8 dbusiface-stream: Send the Device property in the GetAll handler. 2011-02-22 20:10:17 +00:00
Tanu Kaskinen
969c7c80fe core: Link virtual sinks and sources to their streams.
This change doesn't add any functionality in itself, but it will be useful in
the future for operating on chains of sinks or sources that are piggy-backing
on each other.

For example, the PA_PROP_DEVICE_MASTER_DEVICE property could
be handled in the core so that each virtual device doesn't have to maintain it
separately. By using the origin_sink and destination_source pointers the core
is able to see at stream creation time that the stream is created by a virtual
device, and then update that device's property list using the name of the
master device that the stream is being connected to. The same thing can be done
also when the stream is being moved from a device to another, in which case the
_MASTER_DEVICE property needs updating.
2011-02-22 10:10:48 +00:00
Paul Menzel
1f848f82c4 build-sys: Correct typos in configure
s/Console Kit/ConsoleKit/ [1]
s/DBUS/D-Bus/ [2]

Plus some spelling fixes and context in warning sometimes shown to user

[1] http://www.freedesktop.org/wiki/Software/ConsoleKit
[2] http://www.freedesktop.org/wiki/Software/dbus
2011-02-22 10:07:47 +00:00
Henning Heinold
d90be03474 src/Makefile.am: add missing space to fix build using uClibc
Using uClibc

	AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS)

is not empty because `$(INTLLIBS)` is set to `-lintl`. This uncovered a missing space in commit ef0cc745 which resulted in the following build error.

	[…]
		CC     libbluetooth_ipc_la-ipc.lo
	modules/bluetooth/ipc.c: In function 'bt_audio_service_open':
	modules/bluetooth/ipc.c:65:26: warning: dereferencing type-punned pointer might break strict-aliasing rules [-Wstrict-aliasing]
	modules/bluetooth/ipc.c: In function 'bt_audio_service_get_data_fd':
	modules/bluetooth/ipc.c:110:13: warning: cast increases required alignment of target type [-Wcast-align]
	modules/bluetooth/ipc.c:110:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
	make[3]: *** No rule to make target `-lintl', needed by `libbluetooth-ipc.la'.  Stop.
	make[3]: Leaving directory `/oe/build-minimal-uclibc/minimal-uclibc-dev/work/armv7a-oe-linux-uclibceabi/pulseaudio-0.9.22-r11.0+gitr0+051d82133f0ae6a57bf66fd200bc8e3591a7d5ca/git/src'
	make[2]: *** [all] Error 2
	make[2]: Leaving directory `/oe/build-minimal-uclibc/minimal-uclibc-dev/work/armv7a-oe-linux-uclibceabi/pulseaudio-0.9.22-r11.0+gitr0+051d82133f0ae6a57bf66fd200bc8e3591a7d5ca/git/src'
	make[1]: *** [all-recursive] Error 1
	make[1]: Leaving directory `/oe/build-minimal-uclibc/minimal-uclibc-dev/work/armv7a-oe-linux-uclibceabi/pulseaudio-0.9.22-r11.0+gitr0+051d82133f0ae6a57bf66fd200bc8e3591a7d5ca/git'
	make: *** [all] Error 2

This patch is taken from OpenEmbedded where it has been present since 2009 for PulseAudio 0.9.15 and greater [1].

[1] http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=ef0cc74567b3bb98378c17f6a523bf18ba132ed7
[2] http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=7c33f2e906a20e139d53b4f2d8fbc2773a4725b3

Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
CC: Henning Heinold <heinold@inf.fu-berlin.de>
2011-02-22 09:59:42 +00:00
Vincent Becker
bada9040dd Correct wav file creation for 24/32 and 24 bits sample formats HSD=3669357 2011-02-22 09:55:58 +00:00
Kurt Taylor
b7779ecce0 PulseAudio: added IT block to fix thumb conditional instruction build error messages
See: http://pulseaudio.org/ticket/914

Tweaked-By: Arun Raghavan <arun.raghavan@collabora.co.uk>
2011-02-21 10:15:41 +00:00
Maarten Bosmans
821562b9bc Use pa_read, pa_write and pa_poll instead of system functions 2011-02-17 12:02:31 +01:00
Maarten Bosmans
30c7c95184 tests/rtstutter: Use pa_rtclock 2011-02-17 12:02:31 +01:00
Maarten Bosmans
aebf66bef6 Use pa_* instead of generic functions to improve portability 2011-02-17 12:02:31 +01:00
Maarten Bosmans
f2a9fd779e Give module-waveout a configure switch
- Also disable the scary DBus and udev warnings when building for win32
 - and only install some dbus/x11 specific files when appropriate
2011-02-17 12:02:31 +01:00
Maarten Bosmans
110b14ec21 module-waveout: Adapted to updated API
Waveout sink works again, Wavein source still needs some work.
2011-02-17 12:02:31 +01:00
Maarten Bosmans
5205e6a85a win32: Implement pa_random 2011-02-17 12:02:31 +01:00