Commit graph

6066 commits

Author SHA1 Message Date
Colin Guthrie
43f8feb449 build-sys: bump soname 2011-10-20 14:12:05 +01:00
Colin Guthrie
2fde64c786 conf: Use .nofail when loading module-jackdbus-detect
When starting via a console login, PA will likely not have a session DBus
to play with. As there is no X11 environment, libdbus will be unable
to launch a session DBus for us and thus the module will fail to load
which in turn prevents PA from loading.

If the user subsequently logs into X11 this it will still not be possible
to load the module as the server will be ignorant of the X11 and DBus
environment variables so a longer term solution for handling this should
be found.
2011-10-20 14:12:05 +01:00
Tanu Kaskinen
22e63b9edf daemon: Don't treat it as a fatal error if we can't connect to the session bus
http://lists.freedesktop.org/archives/pulseaudio-discuss/2011-June/010276.html
2011-10-20 13:35:34 +01:00
Arun Raghavan
610d63e3f4 solaris: Use real_volume for set/get volume
This got missed when other bits were updated. Patch submitted by
Brian Cameron <brian.cameron@oracle.com>.
2011-10-20 15:09:35 +05:30
Arun Raghavan
a40a2af9ae native: Fix Solaris build
tcpwrappers has some Solaris-specific quirks that need to be dealt with.
Patch submitted by Brian Cameron <brian.cameron@oracle.com>.
2011-10-20 15:09:35 +05:30
Colin Guthrie
a4425135a5 Update LICENSE.
Some of the license wording was less than clear. Try to clarify the
different GPL 'downgrade' scenarios but also be generic to ensure that
those packagers where GPL is a problem check thoroughly before they ship.

Inspired by comments from Brian Cameron @ Oracle via fdo#41822
2011-10-20 10:05:16 +01:00
Daniel Mack
06698e0699 osx: module_bonjour_publish needs to be linked against libprotocol-native.la 2011-10-19 23:55:58 +01:00
Colin Guthrie
743a4d00de build-sys: Provide a simple CMake Config setup (similar to pkgconfig)
I'd rather not have to do this, as I don't really see the point in
duplicating what is done in pkgconfig, but this is likely the
easiest way to avoid nasty hacks.
2011-10-19 23:49:36 +01:00
David Henningsson
c505053452 Fix deferred volume not being applied if sink is closed
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-10-17 09:51:45 +05:30
Arun Raghavan
b1dabfb95d build-sys: Drop libsamplerate from pulsecommon deps
This was erroneously added in:

    commit d766b38e1b
    build: Remove unnecessary flags in AM_CFLAGS
2011-10-17 09:46:46 +05:30
Arun Raghavan
93f55a42f9 filter-apply: Move sink/source unlink callbacks before m-s-r
module-stream-restore and modile-filter-apply can get into an infinite
loop if m-s-r is called before m-f-a (m-s-r rescues a stream and
attaches it to a sink/source, which then triggers m-f-a to move it back
to the filter sink/source, and so on). The purpose of the m-f-a hooks is
to beat m-s-r, so moving them to be run first.
2011-10-17 09:46:40 +05:30
Maarten Bosmans
6bf048995f tests: Fix calculation of memblock size in resampler-test
And remove useless volume scaling.
2011-10-12 11:13:43 +05:30
Arun Raghavan
7b13a79959 echo-cancel: Close debug files on module unload 2011-10-11 20:19:10 +05:30
Arun Raghavan
8a5e6e8356 echo-cancel: Don't crash if adjust_time = 0 2011-10-10 13:35:57 +05:30
David Henningsson
346fd7066c source-output: Do not use unset channel map in pa_source_output_new
This problem was found when tracing down a crash coming from the
esound protocol, which does not set a channel map.

BugLink: http://bugs.launchpad.net/bugs/864071
Signed-off-by: David Henningsson <david.henningsson@canonical.com>

N.B.: As Colin notes, this is because commit 117c7145 was incomplete
("format: Fix channel map handling")
2011-10-08 15:17:49 +05:30
David Henningsson
17875ecd5c module-jackdbus-detect: Avoid double-free of modargs
If module-jackdbus-detect failed in the later part of initialization,
the ma variable was freed twice.

BugLink: http://bugs.launchpad.net/bugs/867444
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-10-08 15:17:42 +05:30
Arun Raghavan
2c30c0751f alsa: Make mixer error handling more robust still
Instead of relying on the snd_mixer_* functions failing, we check for
POLLERR and POLLNVAL first. After this, any errors in handling the mixer
events are deemed fatal (that is we cause the ALSA source/sink thread to
terminate).

The case where POLLERR is set but POLLNVAL is not does not actually
occur, but we're making this a soft failure (stop polling the mixer, but
don't kill the I/O thread). If other conditions where POLLERR occurs
turn up, we need to handle them explicitly.

Thanks to Linus Torvalds for helping get this right.
2011-10-08 15:17:35 +05:30
Maarten Bosmans
8754e0c779 doc: Add some more doxygen tags to existing comments 2011-10-08 15:17:23 +05:30
Arun Raghavan
c055c55fbc echo-cancel: Fail if loaded between a sink and its monitor
Loading between a sink and its monitor causes a deadlock (while sending
messages for latency snapshots). It isn't a case that has any real
conceivable use, so let's just disallow it.
2011-10-08 15:17:15 +05:30
Arun Raghavan
867170afa7 alsa: Better error handling in mixer rtpoll callback
This improves the error handling in the mixer rtpoll callback. It avoids
a crash if an error occurs (the rtpoll_item is freed but still
referenced), and specifically makes sure we don't continue trying to
poll the device if the card is disconnected.
2011-10-08 15:16:59 +05:30
Arun Raghavan
4e5943b6ba alsa: Give compressed formats preference over PCM
This makes set_formats() put PCM formats lower down the list than
compressed formats since we negotiate by picking the first format in
this list that is also in the client-provided list of possible formats
during sink input creation.

This will be incorrect if we ever decide to do encoding in PA (for
things like AC3/DTS encoding for multichannel output over S/PDIF).
2011-10-08 15:16:51 +05:30
Maarten Bosmans
d71a291721 Make pulse build with clang again
The casts are not supported there.
2011-10-08 15:16:41 +05:30
Sudarshan Bisht
87f70c6a1d null-sink: Set latency range at the time of initialization of module.
At the time of module initialization latency range is being set so that the null-sink
would be aware of its limitations with latencies.
2011-10-08 15:16:18 +05:30
Daniel Mack
37e76bd36f osx: don't build the once-test binary on OS X
This patch was already added earlier with commit ID 2f86ba4f, but the
changes got reverted by commit 3adc43b ("win32: Make once-test work").

However, this still doesn't work on OSX as here, pthread is in general
available, but the barrier APIs aren't.
2011-10-08 15:15:49 +05:30
Tanu Kaskinen
411af6b61a sink: Move updating the requested latency after the rewind request when finishing a stream move. 2011-10-08 15:14:30 +05:30
Colin Guthrie
f425519443 libpulse: Always return a three part version number in API calls.
For both the headers and the library we should provide clean, three part
strings as this has been what we've previously done in the past
and some external systems apparently rely on this format. While it's not
something we've officially commented on before, there is no real advantage
to us to change it so let's not try to tidy things up too much
considering some third party apps (e.g. Skype) seem to dislike a two
part version string.
2011-10-08 14:59:16 +05:30
Arun Raghavan
4150c5aece sink,source: Avoid unnecessary call to pa_rtclock_now()
pa_{sink,source}_volume_change_apply were being called by the ALSA I/O
thread on every iteration, causing a pa_rtclock_now() call, which can
sometimes be heavy. We avoid this call by making sure there actually are
changes to apply before proceeding into the function.

While we're at it, also dropping a redundant check on s->write_volume.
2011-10-08 14:59:11 +05:30
Arun Raghavan
4c117b2ae1 extended: Fix doxygen comment style typos
Thanks to Rémi Denis-Courmont for pointing this out on IRC.
2011-10-08 14:58:56 +05:30
Colin Guthrie
093d2d6bb5 build-sys: bump soname 2011-09-27 08:56:06 +01:00
Colin Guthrie
002726436b build-sys: Switch to the tar-ustar format (as per a lot of GNOME stuff for 3.2) and distribute .xz files.
We will drop .gz support after 1.0
2011-09-27 08:55:17 +01:00
David Henningsson
0cebb630da Fix crash in threaded message queues
Once in a million or so, this typo causes a crash when two threads
simultaneously try to call "pa_asynqmsgq_write_poll".

BugLink: http://bugs.launchpad.net/bugs/853560
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-09-25 13:44:34 +01:00
David Henningsson
165bd13d9e dbus: Don't crash if the module does not load
If module-dbus-protocol fails to start, pa__done is still called,
which falsified the assumption that u->connections was always set.

BugLink: http://bugs.launchpad.net/bugs/855729
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-09-22 23:15:18 +05:30
Arun Raghavan
cae3235369 sink,source: Handle missing in the shared volume case
This makes sure that when we're traversing the device chain for sources
and sinks with shared volume, we handle the case that a sink-input or
source-output of one of these might be unlinked (while unloading a
module, for example).
2011-09-21 23:00:02 +05:30
Colin Guthrie
fde703be75 build-sys: bump soname 2011-09-15 11:30:47 +01:00
David Henningsson
766dbc6838 conf: Make sure module-dbus-protocol is loaded after module-default-device-restore
module-dbus-protocol gets the default sink, which sets the default sink
if not already set. This is turn makes module-default-device-restore do
nothing.
To solve the problem, make sure module-default-device-restore is loaded
before module-dbus-protocol and not the other way around.

BugLink: http://bugs.launchpad.net/bugs/843780
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-09-15 06:40:18 +05:30
David Henningsson
f8624a7876 sink,source: Avoid crash by not updating volume on shutdown
Sometimes the ALSA mixer can be modified during a point at shutdown
which causes a race condition trying to update the volume of an
unlinked sink.

Includes typo fix by our Chief Typo Spotter, Colin, and a clarifying
comment by me.

BugLink: http://bugs.launchpad.net/bugs/841968
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-09-14 15:47:17 +05:30
Arun Raghavan
38be4a2d44 echo-cancel: Use volume sharing by default
Uses the shared volume infrastructure by default with an option to
fallback on the old pretend-volume-sharing-that-kind-of-works if someone
wants it that way.

Users who keep left != right (or any sort of unbalanced channel volumes)
will likely want to disable shared volumes since it will cause their
master sink/source volume to be balanced.

This really isn't a very pleasant scenario since users would need to
manually set up echo cancellation in their config for this (until we
have a way to store module configuration). That said, the majority case
benefits from the volume sharing, so let's not wait for the
configuration infrastructure to be ready to use this.
2011-09-14 14:15:01 +05:30
Arun Raghavan
ec099f9306 equalizer: Use volume sharing by default
Uses the shared volume infrastructure by default with an option to
fallback on the old pretend-volume-sharing-that-kind-of-works if someone
wants it that way.
2011-09-14 14:15:01 +05:30
Arun Raghavan
baccd26b6a virtual: Make volume sharing on by default
People who use this code (i.e. mostly filters) would presumably want
volume sharing on by default.
2011-09-14 14:15:01 +05:30
Arun Raghavan
2ef7bc6a80 volume: Handle varying channel count for shared volumes
This handles the case where a virtual sink/source and it's master have
different channel counts. The solution is not ideal because if the
former has fewer channels and the master has channel volumes that are
not all at the same level, it will lose this information and have all
channels at the same level.

This is not just a theoretical problem, since module-echo-cancel
prefers a mono virtual source/sink and will usually be sitting on top of
a stereo ALSA source/sink.

That said, I don't really see a good solution to this problem, so the
idea is to make volume sharing optional (on by default) in
module-echo-cancel, so that the few people who care can then disable it
if they so desire.
2011-09-14 14:15:01 +05:30
Arun Raghavan
a9c85074cb def: Hide server-side sink/source flags
This makes sure that sink/source flags that are used on the server side
only are not leaked to clients.
2011-09-14 14:02:12 +05:30
Arun Raghavan
ec4f256493 stream: Relax assert for extended API
For some reason this assert wasn't triggered earlier -- we shouldn't be
looking at the stream sample_spec if the formats API is used.
2011-09-14 13:55:58 +05:30
Antonio Ospite
3cae4a0606 doc: Add info about running pulseaudio from the build dir 2011-09-14 09:23:41 +01:00
Colin Guthrie
ba2ad514c2 doc: Update README with fresh links. 2011-09-14 09:23:38 +01:00
David Henningsson
f0ad6fd413 raop: Don't crash if fd is not open when trying to close it
BugLink: http://bugs.launchpad.net/bugs/845286
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-09-14 09:23:38 +01:00
Colin Guthrie
aa3142ab20 volume: Rename 'sync volume' to 'deferred volume'.
This just covers Lennart's concern over the terminology used.

The majority of this change is simply the following command:
 grep -rli sync[-_]volume . | xargs sed -i 's/sync_volume/deferred_volume/g;s/PA_SINK_SYNC_VOLUME/PA_SINK_DEFERRED_VOLUME/g;s/PA_SOURCE_SYNC_VOLUME/PA_SOURCE_DEFERRED_VOLUME/g;s/sync-volume/deferred-volume/g'

Some minor tweaks were added on top to tidy up formatting and
a couple of phrases were clarified too.
2011-09-13 21:15:49 +01:00
Colin Guthrie
83577aa373 build-sys: Oops forgot to add the Kinect profile to the build system. 2011-09-09 19:55:09 +01:00
Colin Guthrie
27343ed79a raop: Properly deal with the name coming from the device.
We need to properly quote our proplist arguments passed to the module.
2011-09-09 19:51:02 +01:00
Colin Guthrie
3542112888 modargs: Ensure modargs can be accessed in their raw form.
When dealing with proplists passed as modargs, we need the unescaped form
in order to properly deal with quotes (ticks + double quotes). As the previous
code always called pa_unescape() before adding it into the modarg hashmap, this
was impossible.

This modification simply stores two proplists. If the unescaped value
is different from the raw value, we also keep the raw form.

When parsing proplist arguments, we use this raw form and do the unescaping
ourselves when processing it.

This changes the current behaviour which required you to double escape
proplists arguments. This double escape mechanism did allow you to mix
and match what types of quotes you used to delimit the individial
proplist values, but it made the actual data much harder to pass in.

This approach has the drawback that you cannot mix and match the quotes
you use, but this is a very minor issue and IMO pales in comparison to
the general clarity gained.

See the discussion on the mailing list for more background:
 http://lists.freedesktop.org/archives/pulseaudio-discuss/2011-September/011220.html
2011-09-09 19:50:49 +01:00
Antonio Ospite
e93b32744c alsa-mixer: Add support for the Microsoft Kinect Sensor device
The Kinect shows up as a UAC device after the firmware has been loaded,
but in order to be detected by pulseaudio a 4-channels input only
mapping is needed. Provide a new profile for that and set it with a udev
rule.

fdo#39664
2011-09-09 19:48:03 +01:00