platform/upstream/pulseaudio.git
13 years agoalsa: fix list of sampling rates
Pierre-Louis Bossart [Mon, 17 Oct 2011 19:43:50 +0000 (14:43 -0500)]
alsa: fix list of sampling rates

add all standard audio rates

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
13 years agoalsa: Probe sink/source sample rates
Arun Raghavan [Mon, 17 Oct 2011 17:16:06 +0000 (22:46 +0530)]
alsa: Probe sink/source sample rates

This probes sink and source sample rates and uses this information to
validate rate changes and check incoming passthrough formats.

13 years agoalsa: Remove unused variable
Arun Raghavan [Mon, 17 Oct 2011 15:46:23 +0000 (21:16 +0530)]
alsa: Remove unused variable

13 years agosink,source: Handle equal default and alternate sample rates
Arun Raghavan [Mon, 17 Oct 2011 14:33:52 +0000 (20:03 +0530)]
sink,source: Handle equal default and alternate sample rates

13 years agosink,source: Add the ability to disable alternat sample rate switching
Arun Raghavan [Mon, 17 Oct 2011 14:31:03 +0000 (20:01 +0530)]
sink,source: Add the ability to disable alternat sample rate switching

Setting the alternate sample rate to 0 in config disables this feature.

13 years agosource: Bring rate update code in sync with sink code
Arun Raghavan [Mon, 10 Oct 2011 19:17:56 +0000 (00:47 +0530)]
source: Bring rate update code in sync with sink code

Basically adds code to handle passthrough sources. This isn't a tested
path at the moment, but in the future, when we do wish to support these,
it'll save us the trouble of having to sync all the code again.

13 years agoalsa: support for alternate sampling rate
Pierre-Louis Bossart [Tue, 2 Aug 2011 23:37:29 +0000 (18:37 -0500)]
alsa: support for alternate sampling rate

This is where the actual changes happen.
Some additional checks would be required to make sure the
rate is actually supported
Tested with both PCM and passthrough streams

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
13 years agosink,source: support for rate update
Pierre-Louis Bossart [Tue, 2 Aug 2011 23:37:28 +0000 (18:37 -0500)]
sink,source: support for rate update

Avoid resampling or use integer resampling when supported by the
sinks/sources

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
13 years agocore: infrastructure for alternate sampling rate
Pierre-Louis Bossart [Tue, 2 Aug 2011 23:37:27 +0000 (18:37 -0500)]
core: infrastructure for alternate sampling rate

New parameter to avoid resampling. BIG power savings here...

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
13 years agobuild-sys: Minor CXXFLAGS fix
Arun Raghavan [Mon, 17 Oct 2011 11:39:24 +0000 (17:09 +0530)]
build-sys: Minor CXXFLAGS fix

Set it on echo-cancel-test only if webrtc support is enabled.

13 years agoecho-cancel: Add the WebRTC echo canceller
Arun Raghavan [Mon, 19 Sep 2011 08:11:13 +0000 (13:41 +0530)]
echo-cancel: Add the WebRTC echo canceller

This adds the WebRTC echo canceller as another module-echo-cancel
backend. We're exposing both the full echo canceller as well as the
mobile echo control version as modargs.

Pending items:

1. The mobile canceller doesn't seem to work at the moment.

2. We still need to add bits to hook in drift compensation (to support
   sink and source from different devices).

The most controversial part of this patch would probably be the
mandatory build-time dependency on a C++ compiler. If the optional
--enable-webrtc-aec is set, then there's also a dependency on libstdc++.

13 years agomacro: typedef pa_bool_t to bool instead of _Bool
Arun Raghavan [Mon, 19 Sep 2011 08:08:03 +0000 (13:38 +0530)]
macro: typedef pa_bool_t to bool instead of _Bool

They're functionally equivalent, and the former lets the header be
included in C++ as well.

13 years agoecho-cancel: Simplify checking if AEC is active
Arun Raghavan [Mon, 17 Oct 2011 10:25:51 +0000 (15:55 +0530)]
echo-cancel: Simplify checking if AEC is active

This removes the active_mask bits and just check source and sink states
directly.

13 years agoalsa: New modarg "paths_dir" for module-alsa-card
Tanu Kaskinen [Thu, 6 Oct 2011 20:09:15 +0000 (23:09 +0300)]
alsa: New modarg "paths_dir" for module-alsa-card

The new module argument can be used to provide a custom
directory for loading alsa path configuration files. This is
useful for testing: no need to be root to create test
configuration files.

13 years agoFix deferred volume not being applied if sink is closed
David Henningsson [Thu, 13 Oct 2011 15:30:39 +0000 (17:30 +0200)]
Fix deferred volume not being applied if sink is closed

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
13 years agobuild-sys: Drop libsamplerate from pulsecommon deps
Arun Raghavan [Mon, 17 Oct 2011 04:12:25 +0000 (09:42 +0530)]
build-sys: Drop libsamplerate from pulsecommon deps

This was erroneously added in:

    commit d766b38e1ba5d483ad7eec105860e9b9f7f55702
    build: Remove unnecessary flags in AM_CFLAGS

13 years agofilter-apply: Move sink/source unlink callbacks before m-s-r
Arun Raghavan [Wed, 12 Oct 2011 12:14:30 +0000 (17:44 +0530)]
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.

13 years agoqpaeq: Make it python3 and python2 compatible
Maarten Bosmans [Mon, 10 Oct 2011 10:28:22 +0000 (12:28 +0200)]
qpaeq: Make it python3 and python2 compatible

13 years agoecho-cancel: Don't process if sink is unconnected
Arun Raghavan [Wed, 12 Oct 2011 07:34:57 +0000 (13:04 +0530)]
echo-cancel: Don't process if sink is unconnected

If there's no playback data, there's no point in actually processing the
capture data.

13 years agotests: Fix calculation of memblock size in resampler-test
Maarten Bosmans [Wed, 12 Oct 2011 05:35:14 +0000 (07:35 +0200)]
tests: Fix calculation of memblock size in resampler-test

And remove useless volume scaling.

13 years agodaemon: Don't treat it as a fatal error if we can't connect to the session bus
Tanu Kaskinen [Thu, 6 Oct 2011 20:28:37 +0000 (23:28 +0300)]
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

13 years agopacat: Fail early if the media name cannot be set
Maarten Bosmans [Mon, 10 Oct 2011 07:27:17 +0000 (09:27 +0200)]
pacat: Fail early if the media name cannot be set

Otherwise you get an "invalid argument" error from pa_stream_new later.

13 years agoDo something sensible when compiled without iconv support
Maarten Bosmans [Mon, 10 Oct 2011 07:27:16 +0000 (09:27 +0200)]
Do something sensible when compiled without iconv support

Without this fix, pacat won't start up, because it is unable to set the stream name.

13 years agoecho-cancel: Close debug files on module unload
Arun Raghavan [Mon, 10 Oct 2011 16:47:55 +0000 (22:17 +0530)]
echo-cancel: Close debug files on module unload

13 years agonamereg: Don't set default sink/source on get()
Arun Raghavan [Wed, 28 Sep 2011 08:58:32 +0000 (14:28 +0530)]
namereg: Don't set default sink/source on get()

This removes the nasty side-effect that a call to
pa_namereg_get_default_{source,sink}() will also *set* the default
source/sink.

This is a more complete fix for commit 766dbc68 ("conf: Make sure
module-dbus-protocol is loaded after module-default-device-restore")

https://bugs.freedesktop.org/show_bug.cgi?id=40897

13 years agoecho-cancel: Drop sink/source samples before processing begins
Arun Raghavan [Wed, 5 Oct 2011 07:43:38 +0000 (13:13 +0530)]
echo-cancel: Drop sink/source samples before processing begins

This moves the bits that skip source/sink samples for resync from inside
the processing loop to just before. The actual effect should be the
the same.

13 years agoecho-cancel: Skip processing till there's enough data
Arun Raghavan [Wed, 5 Oct 2011 06:59:10 +0000 (12:29 +0530)]
echo-cancel: Skip processing till there's enough data

This makes sure that we only perform any processing (resync or actual
cancellation) after the source provides enough data to actuall run the
canceller.

13 years agoecho-cancel: Skip canceller when no source outputs are connected
Arun Raghavan [Thu, 29 Sep 2011 07:19:11 +0000 (12:49 +0530)]
echo-cancel: Skip canceller when no source outputs are connected

When a source-output isn't connected to our virtual source, we skip echo
cancellation altogether. This makes sense in general, and makes sure
that we don't end up adjusting for delay/drift when nothing is
connected. This should make convergence faster when the canceller
actually starts being used.

13 years agoecho-cancel: Increase threshold for resyncing, make it configurable
Arun Raghavan [Wed, 5 Oct 2011 08:11:43 +0000 (13:41 +0530)]
echo-cancel: Increase threshold for resyncing, make it configurable

This increase the threshold for difference between the playback and
capture stream before samples are dropped from 1ms to 5ms (the
cancellers are generally robust to this much and higher). Also, we make
this a module parameter to allow easier experimentation with different
values.

13 years agoecho-cancel: Don't crash if adjust_time = 0
Arun Raghavan [Thu, 6 Oct 2011 09:06:50 +0000 (14:36 +0530)]
echo-cancel: Don't crash if adjust_time = 0

13 years agoecho-cancel: Remove redundant variable
Arun Raghavan [Thu, 29 Sep 2011 04:47:37 +0000 (10:17 +0530)]
echo-cancel: Remove redundant variable

13 years agoecho-cancel: Add a standalone test program
Arun Raghavan [Mon, 26 Sep 2011 16:00:49 +0000 (21:30 +0530)]
echo-cancel: Add a standalone test program

This is useful to test the canceller implementation on data from disk
rather than testing live. Handy for comparing implementations reliably.

13 years agoalsa: reset watermark to initial values on resume
Pierre-Louis Bossart [Fri, 7 Oct 2011 23:12:32 +0000 (18:12 -0500)]
alsa: reset watermark to initial values on resume

Watermark level and latency values are not restored when
resuming, the values used prior to suspending are reused.
This leads to side effects when underruns happen and buffer
sizes are updated, PulseAudio can never meet lower latency
requirements.

Solution: keep track of watermark and latency values on sink or
source creation, and reapply them on resume to start with
a clean slate.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
13 years agosource-output: Do not use unset channel map in pa_source_output_new
David Henningsson [Wed, 5 Oct 2011 09:15:53 +0000 (11:15 +0200)]
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")

13 years agomodule-jackdbus-detect: Avoid double-free of modargs
David Henningsson [Wed, 5 Oct 2011 08:28:50 +0000 (10:28 +0200)]
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>
13 years agoalsa: Make mixer error handling more robust still
Arun Raghavan [Tue, 4 Oct 2011 19:28:52 +0000 (00:58 +0530)]
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.

13 years agodoc: Add some more doxygen tags to existing comments
Maarten Bosmans [Mon, 3 Oct 2011 18:09:06 +0000 (20:09 +0200)]
doc: Add some more doxygen tags to existing comments

13 years agoecho-cancel: Fail if loaded between a sink and its monitor
Arun Raghavan [Tue, 4 Oct 2011 08:36:26 +0000 (14:06 +0530)]
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.

13 years agoalsa: Better error handling in mixer rtpoll callback
Arun Raghavan [Tue, 4 Oct 2011 04:59:03 +0000 (10:29 +0530)]
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.

13 years agoalsa: Give compressed formats preference over PCM
Arun Raghavan [Tue, 4 Oct 2011 05:35:59 +0000 (11:05 +0530)]
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).

13 years agoMake pulse build with clang again
Maarten Bosmans [Wed, 28 Sep 2011 07:50:26 +0000 (09:50 +0200)]
Make pulse build with clang again

The casts are not supported there.

13 years agonull-sink: Set latency range at the time of initialization of module.
Sudarshan Bisht [Fri, 30 Sep 2011 09:49:54 +0000 (12:49 +0300)]
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.

13 years agoosx: don't build the once-test binary on OS X
Daniel Mack [Thu, 29 Sep 2011 11:25:12 +0000 (13:25 +0200)]
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.

13 years agodoc: Add an example stream-restore fallback table file.
Tanu Kaskinen [Fri, 30 Sep 2011 14:09:29 +0000 (17:09 +0300)]
doc: Add an example stream-restore fallback table file.

13 years agostream-restore: Support a simple fallback volume table
Marc-André Lureau [Sat, 1 Oct 2011 11:16:35 +0000 (12:16 +0100)]
stream-restore: Support a simple fallback volume table

The purpose of this patch is to make it possible to configure stream volumes
before pulseaudio is run for the first time. This is useful, for example, in
embedded products where the default volumes have to be sensible already in
the first boot.

13 years agomemblockq: Improve debuggability by storing a name and a sample spec.
Tanu Kaskinen [Thu, 29 Sep 2011 15:54:03 +0000 (18:54 +0300)]
memblockq: Improve debuggability by storing a name and a sample spec.

These are not used for anything at this point, but this
makes it easy to add ad-hoc debug prints that show the
memblockq name and to convert between bytes and usecs.

13 years agosink: Add some comments about the rewind handling during stream moves.
Tanu Kaskinen [Thu, 29 Sep 2011 15:54:02 +0000 (18:54 +0300)]
sink: Add some comments about the rewind handling during stream moves.

13 years agosink: Move updating the requested latency after the rewind request when finishing...
Tanu Kaskinen [Thu, 29 Sep 2011 15:54:01 +0000 (18:54 +0300)]
sink: Move updating the requested latency after the rewind request when finishing a stream move.

13 years agolibpulse: Always return a three part version number in API calls.
Colin Guthrie [Sat, 1 Oct 2011 11:03:44 +0000 (12:03 +0100)]
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.

13 years agosink,source: Avoid unnecessary call to pa_rtclock_now()
Arun Raghavan [Tue, 27 Sep 2011 16:22:24 +0000 (21:52 +0530)]
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.

13 years agoextended: Fix doxygen comment style typos v1.98-dev
Arun Raghavan [Tue, 27 Sep 2011 13:27:48 +0000 (18:57 +0530)]
extended: Fix doxygen comment style typos

Thanks to Rémi Denis-Courmont for pointing this out on IRC.

13 years agobuild-sys: bump soname v1.0
Colin Guthrie [Tue, 27 Sep 2011 07:56:06 +0000 (08:56 +0100)]
build-sys: bump soname

13 years agobuild-sys: Switch to the tar-ustar format (as per a lot of GNOME stuff for 3.2) and...
Colin Guthrie [Tue, 27 Sep 2011 07:55:11 +0000 (08:55 +0100)]
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

13 years agoFix crash in threaded message queues
David Henningsson [Sun, 25 Sep 2011 09:07:47 +0000 (11:07 +0200)]
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>
13 years agodbus: Don't crash if the module does not load
David Henningsson [Thu, 22 Sep 2011 11:57:56 +0000 (13:57 +0200)]
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>
13 years agosink,source: Handle missing in the shared volume case
Arun Raghavan [Tue, 20 Sep 2011 11:35:22 +0000 (17:05 +0530)]
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).

13 years agobuild-sys: bump soname v0.99.4
Colin Guthrie [Thu, 15 Sep 2011 10:30:47 +0000 (11:30 +0100)]
build-sys: bump soname

13 years agoconf: Make sure module-dbus-protocol is loaded after module-default-device-restore
David Henningsson [Wed, 14 Sep 2011 12:55:07 +0000 (14:55 +0200)]
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>
13 years agosink,source: Avoid crash by not updating volume on shutdown
David Henningsson [Mon, 12 Sep 2011 10:57:20 +0000 (12:57 +0200)]
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>
13 years agoecho-cancel: Use volume sharing by default
Arun Raghavan [Wed, 14 Sep 2011 07:52:15 +0000 (13:22 +0530)]
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.

13 years agoequalizer: Use volume sharing by default
Arun Raghavan [Wed, 14 Sep 2011 07:50:59 +0000 (13:20 +0530)]
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.

13 years agovirtual: Make volume sharing on by default
Arun Raghavan [Wed, 14 Sep 2011 07:48:48 +0000 (13:18 +0530)]
virtual: Make volume sharing on by default

People who use this code (i.e. mostly filters) would presumably want
volume sharing on by default.

13 years agovolume: Handle varying channel count for shared volumes
Arun Raghavan [Wed, 14 Sep 2011 07:40:52 +0000 (13:10 +0530)]
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.

13 years agodef: Hide server-side sink/source flags
Arun Raghavan [Wed, 14 Sep 2011 01:54:19 +0000 (07:24 +0530)]
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.

13 years agostream: Relax assert for extended API
Arun Raghavan [Wed, 14 Sep 2011 03:02:40 +0000 (08:32 +0530)]
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.

13 years agodoc: Add info about running pulseaudio from the build dir
Antonio Ospite [Fri, 9 Sep 2011 10:17:19 +0000 (12:17 +0200)]
doc: Add info about running pulseaudio from the build dir

13 years agodoc: Update README with fresh links.
Colin Guthrie [Wed, 14 Sep 2011 08:19:08 +0000 (09:19 +0100)]
doc: Update README with fresh links.

13 years agoraop: Don't crash if fd is not open when trying to close it
David Henningsson [Mon, 12 Sep 2011 09:23:57 +0000 (11:23 +0200)]
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>
13 years agovolume: Rename 'sync volume' to 'deferred volume'.
Colin Guthrie [Tue, 13 Sep 2011 20:15:49 +0000 (21:15 +0100)]
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.

13 years agobuild-sys: Oops forgot to add the Kinect profile to the build system.
Colin Guthrie [Fri, 9 Sep 2011 18:55:09 +0000 (19:55 +0100)]
build-sys: Oops forgot to add the Kinect profile to the build system.

13 years agoraop: Properly deal with the name coming from the device.
Colin Guthrie [Tue, 6 Sep 2011 10:45:24 +0000 (11:45 +0100)]
raop: Properly deal with the name coming from the device.

We need to properly quote our proplist arguments passed to the module.

13 years agomodargs: Ensure modargs can be accessed in their raw form.
Colin Guthrie [Tue, 6 Sep 2011 10:35:33 +0000 (11:35 +0100)]
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

13 years agoalsa-mixer: Add support for the Microsoft Kinect Sensor device
Antonio Ospite [Fri, 9 Sep 2011 10:05:29 +0000 (12:05 +0200)]
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

13 years agomodule-suspend-on-idle: Move vacuum code to core
Maarten Bosmans [Thu, 8 Sep 2011 13:12:00 +0000 (15:12 +0200)]
module-suspend-on-idle: Move vacuum code to core

pa_core_maybe_vacuum now vacuums if there are either no streams or all devices are suspended.
The mempool_vacuum argument to module-suspend-on-idle is gone and defaults to true now.

13 years agoalsa: Tidy up argument descriptions
Colin Guthrie [Wed, 7 Sep 2011 20:11:58 +0000 (21:11 +0100)]
alsa: Tidy up argument descriptions

13 years agobluetooth: Bump DBus version to 1.3.0 and drop conditional code.
Colin Guthrie [Wed, 7 Sep 2011 19:19:44 +0000 (20:19 +0100)]
bluetooth: Bump DBus version to 1.3.0 and drop conditional code.

We used to support older DBus versions but 1.3.0 is two years old
now and by requiring it we cut down of deviated code paths at
runtime and thus have less support issues.

fdo#40635

13 years agoloopback: New modargs: sink_input_properties and source_output_properties.
Tanu Kaskinen [Tue, 6 Sep 2011 17:33:42 +0000 (20:33 +0300)]
loopback: New modargs: sink_input_properties and source_output_properties.

The new modargs replace sink_input_name, sink_input_role,
source_output_name and source_output_role.

13 years agoraop: Use the port supplied by avahi when connecting to RAOP devices.
Colin Guthrie [Mon, 5 Sep 2011 21:19:41 +0000 (22:19 +0100)]
raop: Use the port supplied by avahi when connecting to RAOP devices.

The Apple TV for example uses a non-default port, but we previously ignored
this. We now correctly parse the server string but in so doing, we end up
parsing the address twice. As we need a pure IP/hostname of the device itself
to use in our requests, this is somewhat unavoidable.

Sadly there are still other problems with Apple TVs, but this is still
one step closer.

Fixes part of #950

13 years agodevice-restore: Fix use-after-free error.
Colin Guthrie [Mon, 5 Sep 2011 19:29:36 +0000 (20:29 +0100)]
device-restore: Fix use-after-free error.

13 years agoformats: Export more functions needed for a clean build.
Colin Guthrie [Sun, 4 Sep 2011 19:05:14 +0000 (21:05 +0200)]
formats: Export more functions needed for a clean build.

All of these functions are not actually defined in format.h
(they are defined in internal.h) and thus should really be
included only in libpulsecommon and implemented in a separate
source file.

However if that approach was taken, and these functions were
included in libpulsecommon, then they would have a link time
dependancy on libpulse (as these four functions use other
pa_format_info_* functions). As the opposite is already true
(libpulse depends on libpulsecommon), this is not possible as
it creates a circular dependancy.

Thus the only option is to just to include these four functions
in the map-file, but not actually export any public headers for
them. Of course users could use this implementation by defining
them in their own headers, but the only practical problem
with this approach is naming conflicts which is unlikely to happen.

fdo#40616

13 years agoformats: The format code should be in libpulse, not libpulsecommon
Colin Guthrie [Sun, 4 Sep 2011 18:40:21 +0000 (20:40 +0200)]
formats: The format code should be in libpulse, not libpulsecommon

Without this change any applications calling e.g. pa_format_info_new()
and friends will be explicitly linked against libpulsecommon-$MAJORMINOR.so
which is something we specifically avoid as it may contain ABI/API unstable
functions.

Also ensure we export pa_format_info_from_string() for external use.

fdo#40616

13 years agostream-restore: Add proper data validity checks to the legacy database entry read.
Colin Guthrie [Sun, 4 Sep 2011 10:54:41 +0000 (12:54 +0200)]
stream-restore: Add proper data validity checks to the legacy database entry read.

13 years agostream-restore: Add in some variable sets that were missing from 9ffa93.
Colin Guthrie [Sun, 4 Sep 2011 10:28:07 +0000 (12:28 +0200)]
stream-restore: Add in some variable sets that were missing from 9ffa93.

This broke the conversion of the stream-restore database from
previous versions.

13 years agodevice-restore: Simplify the migration of data to per-port keys.
Colin Guthrie [Fri, 2 Sep 2011 11:51:26 +0000 (12:51 +0100)]
device-restore: Simplify the migration of data to per-port keys.

Rather than write all the keys out for each port, simply write a 'null'
port entry and modify the read code to 'fallback' to this when it cannot
find a key. This is needed as the code used when writing the key may not
actually have the sink ports available at the time it uses them,
and thus can cause a segv. This approach adds some degree of overhead
but it's relatively minimal and it can be mitigated by compiling
without support for legacy database formats if so desired.

Thanks to David Henningsson for pointing out the problem.

13 years agoMake gcc --std=c99 happy
Maarten Bosmans [Fri, 2 Sep 2011 12:11:52 +0000 (14:11 +0200)]
Make gcc --std=c99 happy

We're now more or less C99 compliant

13 years agoSquash the last gcc warnings
Maarten Bosmans [Fri, 2 Sep 2011 12:11:51 +0000 (14:11 +0200)]
Squash the last gcc warnings

13 years agomodule-equalizer-sink: Use correct limit in loop
Maarten Bosmans [Fri, 2 Sep 2011 12:11:50 +0000 (14:11 +0200)]
module-equalizer-sink: Use correct limit in loop

13 years agobluetooth/sbc: Use __asm__ keyword
Maarten Bosmans [Fri, 2 Sep 2011 12:11:49 +0000 (14:11 +0200)]
bluetooth/sbc: Use __asm__ keyword

13 years agomodule-equalizer-sink: Use = in initialising variables
Maarten Bosmans [Fri, 2 Sep 2011 08:33:59 +0000 (10:33 +0200)]
module-equalizer-sink: Use = in initialising variables

This makes the compiler in C99 mode happy

13 years agomodule-equalizer-sink: Use %z for printf of size_t variables
Maarten Bosmans [Fri, 2 Sep 2011 08:33:58 +0000 (10:33 +0200)]
module-equalizer-sink: Use %z for printf of size_t variables

13 years agoalsa-mixer: Set "Front" control to 0 dB on headphone path
David Henningsson [Mon, 4 Jul 2011 08:12:17 +0000 (10:12 +0200)]
alsa-mixer: Set "Front" control to 0 dB on headphone path

I've seen more than one system where the volume control named
"Front" is a part of audio path for headphones. This is somewhat
of a compromise: While we don't merge it into the path, as that
would be regressing machines where "Front" isn't a part of the
audio path, it would still enable sound on these machines.

BugLink: http://bugs.launchpad.net/bugs/804178
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
13 years agomodule-switch-on-connect: Don't switch unlinked sink input and source outputs
David Henningsson [Wed, 31 Aug 2011 12:37:05 +0000 (14:37 +0200)]
module-switch-on-connect: Don't switch unlinked sink input and source outputs

Unlinked streams can not be moved, so don't try.

BugLink: http://bugs.launchpad.net/bugs/837386
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
13 years agovala: Add has_type_id=false to all enums, structs and classes
Arun Raghavan [Wed, 31 Aug 2011 05:51:57 +0000 (11:21 +0530)]
vala: Add has_type_id=false to all enums, structs and classes

Since none of our types is derived from GType, explicitly signal this.
The default value for this attribute changed at some point, breaking our
bindings.

13 years agobuild-sys: bump soname v0.99.3
Colin Guthrie [Mon, 29 Aug 2011 17:07:02 +0000 (18:07 +0100)]
build-sys: bump soname

13 years agoequalizer: Comment out unused function
Arun Raghavan [Mon, 29 Aug 2011 16:44:04 +0000 (22:14 +0530)]
equalizer: Comment out unused function

Gets rid of a compiler warning

13 years agoecho-cancel: Get rid of annoying compiler warnings
Arun Raghavan [Mon, 29 Aug 2011 16:43:44 +0000 (22:13 +0530)]
echo-cancel: Get rid of annoying compiler warnings

13 years agoecho-cancel: Don't allow streams to attach while unloading
Arun Raghavan [Mon, 29 Aug 2011 12:17:39 +0000 (17:47 +0530)]
echo-cancel: Don't allow streams to attach while unloading

When unloading, some module may end up trin to move a sink-input or
source-output back onto our virtual sink/source, causing an infinite
loop of us moving the stream away and having it moved back.

We prevent this from happening by preventing any stream from being
attached during unload.

13 years agoecho-cancel: Make save_aec modarg a bool instead of an int
Arun Raghavan [Mon, 29 Aug 2011 12:17:27 +0000 (17:47 +0530)]
echo-cancel: Make save_aec modarg a bool instead of an int

13 years agopacat: make pacat respond to cork/uncork events
Lu Guanqun [Tue, 23 Aug 2011 06:18:22 +0000 (14:18 +0800)]
pacat: make pacat respond to cork/uncork events

Pacat remembers the number of cork requests, and then cork/uncork the stream
accordingly.

With this change, it makes below test script work correctly:

pacat -p --property=media.role="music" <long-sound> &
sleep 2
pacat -p --property=media.role="phone" <short-sound>
wait

Initial idea by Lu Guanqun, but modified by Colin Guthrie (so blame
me if it's broken)

13 years agoSet better priorities on input paths
David Henningsson [Fri, 26 Aug 2011 12:04:18 +0000 (14:04 +0200)]
Set better priorities on input paths

The priorities should be set in the approximately likeliness that someone
would like to use them. This is hard to guess of course, but this is
a better guess compared to the existing configuration.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>