profile/ivi/pulseaudio-panda.git
13 years agoHandle 'Internal Mic 1' as an 'Input Source'
Daniel T Chen [Thu, 25 Nov 2010 14:54:07 +0000 (09:54 -0500)]
Handle 'Internal Mic 1' as an 'Input Source'

BugLink: https://launchpad.net/bugs/680810
Some laptops have 'Internal Mic 1' exposed as an 'Input Source', e.g., Dell
XPSM 1530, so handle these, too.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
13 years agoAdd "Rear Mic" to alsa mixer paths.
David Henningsson [Fri, 19 Nov 2010 09:41:46 +0000 (10:41 +0100)]
Add "Rear Mic" to alsa mixer paths.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
14 years agoalsa: Print dB values in addition to percentages in debug messages.
Tanu Kaskinen [Thu, 18 Nov 2010 16:12:51 +0000 (18:12 +0200)]
alsa: Print dB values in addition to percentages in debug messages.

How about this? There are a couple of bugs in sink_write_volume_cb,
by the way. Another patch will be sent once this dB value printing
patch is accepted.
-- 8< --

14 years agoalsa: Sprinkle some PA_UNLIKELYs around error checks
Arun Raghavan [Thu, 18 Nov 2010 04:32:10 +0000 (10:02 +0530)]
alsa: Sprinkle some PA_UNLIKELYs around error checks

This just adds a few PA_UNLIKELY macros around some error paths in
frequently called code.

14 years agoman: Remove repeated lines
Wanming.Zhang@tieto.com [Thu, 18 Nov 2010 02:17:36 +0000 (04:17 +0200)]
man: Remove repeated lines

From 3c18dbe5889816792db27c9a7253a83687d68ee9 Mon Sep 17 00:00:00 2001
From: Zhang Wanming <wanming.zhang@tieto.com>
Date: Thu, 18 Nov 2010 10:03:39 +0800
Subject: [PATCH] man: Remove repeated lines

Signed-off-by: Zhang Wanming <wanming.zhang@tieto.com>
14 years agocombine: Only check if the sink is h/w etc. in automatic mode
Colin Guthrie [Wed, 17 Nov 2010 23:43:36 +0000 (23:43 +0000)]
combine: Only check if the sink is h/w etc. in automatic mode

14 years agoupnp: Implement the MediaServer2 D-Bus interface
Stephen Moehle [Sun, 14 Nov 2010 20:31:15 +0000 (12:31 -0800)]
upnp: Implement the MediaServer2 D-Bus interface

This allows PulseAudio to work with versions of Rygel 0.7.1 and higher
which only support MediaServer2:
 http://live.gnome.org/Rygel/MediaServer2Spec

14 years agocore: New LIFO style flist implementation v2.2
Jyri Sarha [Mon, 30 Nov 2009 14:55:27 +0000 (16:55 +0200)]
core: New LIFO style flist implementation v2.2

The old free list implementation used objects in FIFO style. This is
bad because it tries keep all the objects ever used alive and in
memory. This minimizes the changes that an allocated object is already
in cache. When there is shortage of physical memory this may also
increase change that newly allocated object is swapped out. LIFO
(e.g. stack) style free list should help these issues. Like the old
one the new implementation is also lock free. This version (v2.1) of
the patch has a potential weakness fixed. The previous version (2.0)
did segfault when popping from empty flist, this does not.

14 years agocombine: Handle reappearing slave sinks in non-automatic mode.
Antti-Ville Jansson [Fri, 12 Nov 2010 07:52:48 +0000 (09:52 +0200)]
combine: Handle reappearing slave sinks in non-automatic mode.

Earlier, if slave sinks were unlinked in non-automatic mode, their
re-appearance was disregarded. Now they are added back to the list of outputs.

Signed-off-by: Antti-Ville Jansson <antti-ville.jansson@digia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
14 years agoalsa: remove redundant call to snd_pcm_nonblock()
Pierre-Louis Bossart [Thu, 11 Nov 2010 16:19:25 +0000 (10:19 -0600)]
alsa: remove redundant call to snd_pcm_nonblock()

The PCM handle is already opened with the SND_PCM_NONBLOCK flag.
This additional call is useless.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
14 years agocore: make use of dbus_message_iter_append_fixed_array
Luiz Augusto von Dentz [Wed, 20 Oct 2010 11:04:38 +0000 (14:04 +0300)]
core: make use of dbus_message_iter_append_fixed_array

dbus_message_iter_append_fixed_array does appends a block of fixed-length
values to an array.

14 years agobluetooth: make use of dbus-util helper functions
Luiz Augusto von Dentz [Wed, 20 Oct 2010 10:50:40 +0000 (13:50 +0300)]
bluetooth: make use of dbus-util helper functions

14 years agodbus: Fix log message after volume changes.
Colin Guthrie [Tue, 19 Oct 2010 08:53:45 +0000 (09:53 +0100)]
dbus: Fix log message after volume changes.

14 years agovolume: Fix incorrect usage of PA_VOLUME_IS_VALID
Arun Raghavan [Tue, 19 Oct 2010 07:33:48 +0000 (13:03 +0530)]
volume: Fix incorrect usage of PA_VOLUME_IS_VALID

The commit that introduced this macro was incorrect in some places. This
patch fixes these. Thanks to Pierre-Louis Bossart for pointing this out.

14 years agolog: Totally trivial spelling 'correction' (for en-US)
Colin Guthrie [Sun, 17 Oct 2010 20:05:39 +0000 (21:05 +0100)]
log: Totally trivial spelling 'correction' (for en-US)

14 years agoman: Clarify wording in volume sync documentation.
Paul Menzel [Sun, 17 Oct 2010 17:28:27 +0000 (19:28 +0200)]
man: Clarify wording in volume sync documentation.

14 years agointended-roles: Mark devices with a form factor of 'headset' as being appropriate...
Colin Guthrie [Sat, 16 Oct 2010 11:26:32 +0000 (12:26 +0100)]
intended-roles: Mark devices with a form factor of 'headset' as being appropriate for 'phone' streams

This was a result a report by Patrick Ben Koetter relating to his
Logitech Wireless Headset.

14 years agoalsa-mixer: add profile for Native Instruments Korecontroller
Daniel Mack [Fri, 15 Oct 2010 16:18:43 +0000 (18:18 +0200)]
alsa-mixer: add profile for Native Instruments Korecontroller

14 years agoman: sync_volume parameters to manual page
Jyri Sarha [Fri, 15 Oct 2010 10:05:18 +0000 (13:05 +0300)]
man: sync_volume parameters to manual page

Some wording teaks by Colin Guthrie and others.

Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
14 years agodaemon-conf: Add sync volume parameters to daemon-conf
Jyri Sarha [Fri, 15 Oct 2010 10:05:17 +0000 (13:05 +0300)]
daemon-conf: Add sync volume parameters to daemon-conf

Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
14 years agoudev-detect: Add sync_volume parameter
Jyri Sarha [Fri, 15 Oct 2010 10:05:16 +0000 (13:05 +0300)]
udev-detect: Add sync_volume parameter

Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
14 years agoalsa: Take syncronized HW volume infra into use for alsa-sink
Jyri Sarha [Fri, 15 Oct 2010 10:05:15 +0000 (13:05 +0300)]
alsa: Take syncronized HW volume infra into use for alsa-sink

Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
14 years agocore: Add infrastructure for synchronizing HW and SW volume changes
Jyri Sarha [Fri, 15 Oct 2010 10:05:14 +0000 (13:05 +0300)]
core: Add infrastructure for synchronizing HW and SW volume changes

To make concurrent use of SW and HW volume glitchles their application
needs to be synchronized. For accurate synchronization the HW volume
needs to be applied in IO thread. This patch adds infrastructure to
delay the applying of HW volume to match with SW volume timing. To
avoid synchronization problems this patch moves many of the volume and
mute related functions from main thread to IO thread. All these
changes become active only if the sync volume flag for a sink has been
set. So, for this patch to have any effect it needs to be taken into
use by sink implementor.

Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
14 years agovolume: Decrease PA_VOLUME_MAX to be < 2^31
Arun Raghavan [Sat, 9 Oct 2010 17:59:51 +0000 (23:29 +0530)]
volume: Decrease PA_VOLUME_MAX to be < 2^31

This decrease PA_VOLUME_MAX to be less than 2^31. We want to do this in
order to simplify signed arithmetic when applying software volume
scaling (since the volume can now always be safely treated as a signed
number).

14 years agopactl: Validate volume before setting
Arun Raghavan [Sat, 9 Oct 2010 17:41:26 +0000 (23:11 +0530)]
pactl: Validate volume before setting

This makes sure that a valid volume is provided before setting on
sink/sink-input/source.

14 years agocli: Validate volume before setting
Arun Raghavan [Sat, 9 Oct 2010 17:40:00 +0000 (23:10 +0530)]
cli: Validate volume before setting

This causes an error to be generated if an invalid volume is provided to
commands that set sink/sink-input/source volume.

14 years agovolume: Clamp volume to PA_VOLUME_MAX
Arun Raghavan [Sat, 9 Oct 2010 10:08:43 +0000 (15:38 +0530)]
volume: Clamp volume to PA_VOLUME_MAX

This ensures that we always clamp the volume to PA_VOLUME_MAX. While
this currently has no effect, it will be required for making sure we
don't exceed PA_VOLUME_MAX when its value changes in the future.

14 years agovolume: Use a macro to check if a volume is valid
Arun Raghavan [Sat, 9 Oct 2010 17:00:20 +0000 (22:30 +0530)]
volume: Use a macro to check if a volume is valid

This adds a PA_VOLUME_IS_VALID() macro for checking if a given
pa_volume_t is valid. This makes changes to the volume ranges simpler
(just change PA_VOLUME_MAX, for example, without needing to modify any
other code).

14 years agoSSE/MMX/ARM: Fix high frequency noise with unusual number of channels
David Henningsson [Fri, 8 Oct 2010 16:47:00 +0000 (18:47 +0200)]
SSE/MMX/ARM: Fix high frequency noise with unusual number of channels

In the assembly optimized versions of SSE, a noise could occur when the
number of channels were 3,5,6 or 7. For MMX and ARM, this could occur
when the number of channels were 3.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
14 years agoMerge remote branch 'vudentz2/master'
Colin Guthrie [Wed, 13 Oct 2010 08:21:01 +0000 (09:21 +0100)]
Merge remote branch 'vudentz2/master'

14 years agodoxygen: Add 'See also' linking to the overview page
David Fries [Sun, 3 Oct 2010 18:41:27 +0000 (13:41 -0500)]
doxygen: Add 'See also' linking to the overview page

A good many of the header files are broken into a function
reference page and an overview page.  These changes add
a direct link from each function reference page to their
overview page if one exists.

14 years agodoxygen: Documentation improvements
David Fries [Wed, 13 Oct 2010 01:05:47 +0000 (20:05 -0500)]
doxygen: Documentation improvements

stream.h, simple.h
The words drain and flush are a little ambiguous, make it explicit as
to what happens to any existing audio.

*mainloop.h
reword *_free and *_get_api for grammar

14 years agodoxygen: Fix the "all" comments regarding volume helper functions.
David Fries [Tue, 12 Oct 2010 23:22:27 +0000 (18:22 -0500)]
doxygen: Fix the "all" comments regarding volume helper functions.

Mostly change "Set the volume of all channels" to
"Set the volume of the first n channels" as the first is incorrect,
it doesn't set all the channels and doesn't explain what n was for.

14 years agodoxygen: Fix documentation typos
David Fries [Sat, 18 Sep 2010 14:07:15 +0000 (09:07 -0500)]
doxygen: Fix documentation typos

14 years agobluetooth: Add support for Media API
Luiz Augusto von Dentz [Thu, 7 Oct 2010 14:22:41 +0000 (17:22 +0300)]
bluetooth: Add support for Media API

Make use of D-Bus to transfer file descriptors.

14 years agointrospect: Include whether a stream is corked in the info callback.
Colin Guthrie [Mon, 4 Oct 2010 10:48:43 +0000 (11:48 +0100)]
introspect: Include whether a stream is corked in the info callback.

14 years agoaugment-properties: Fix debug messages and statement bracketing.
Colin Guthrie [Wed, 6 Oct 2010 08:16:16 +0000 (09:16 +0100)]
augment-properties: Fix debug messages and statement bracketing.

14 years agosink-input: Fix comment
Colin Guthrie [Fri, 1 Oct 2010 00:32:37 +0000 (01:32 +0100)]
sink-input: Fix comment

14 years agosuspend: Do not assert when checking for device suspended status and a stream is...
Colin Guthrie [Fri, 1 Oct 2010 00:26:43 +0000 (01:26 +0100)]
suspend: Do not assert when checking for device suspended status and a stream is not linked.

When looping through the streams on a given device checking to see if the
stream is 'active' there should be no assert if the stream is not linked, it
should simply be ignored.

This assert can be hit if a sink and a sink input are both created and setup
but the final put calls are left to the end as is done in module-ladspa-sink.

While the order of the calls in module-ladspa-sink could be altered, we should
deal gracefully with the way it is now and not complain about ending up
in this state.

A trigger case was trivial:
 1. Load a ladspa-sink.
 2. Play a stream and move it to it.
 3. Unload the module, then reload it.
 4. Due to module-stream-restore and module-suspend-on-idle, the hook callbacks
    will ultimately hit this assert.

Thanks to Kim Therkelsen for highlighting this issue.

14 years agodevice-manager: Ensure that sinks/sources populate the device manager lists in order...
Colin Guthrie [Fri, 4 Jun 2010 08:36:57 +0000 (09:36 +0100)]
device-manager: Ensure that sinks/sources populate the device manager lists in order of their priority.

Currently the order of the sinks is simply that of their position in the idxset which is certainly
not what the user would want.

14 years agoaugment-properties: Search for .desktop files in subfolders too.
Colin Guthrie [Sun, 31 Jan 2010 16:35:41 +0000 (16:35 +0000)]
augment-properties: Search for .desktop files in subfolders too.

14 years agobuild: Copy orc dist files to the correct directory
Arun Raghavan [Wed, 29 Sep 2010 15:26:48 +0000 (20:56 +0530)]
build: Copy orc dist files to the correct directory

14 years agoecho-cancel: Use S16NE for adrian module
Arun Raghavan [Mon, 27 Sep 2010 11:27:01 +0000 (16:57 +0530)]
echo-cancel: Use S16NE for adrian module

This forces us to get native-endian samples in the adrian module so that
we can rely on the existing endianness conversion mechanisms instead of
doing it in the module.

14 years agoecho-cancel: Ensure correct handling of endianness
Arun Raghavan [Thu, 23 Sep 2010 12:16:00 +0000 (17:46 +0530)]
echo-cancel: Ensure correct handling of endianness

The adrian module was using home-brewed endianness conversion instead of
the appropriate mactos, and speex assumed a little-endian host. This
fixes both of these.

14 years agoecho-cancel: orc-ify some bits for optimisation
Arun Raghavan [Mon, 13 Sep 2010 13:11:30 +0000 (18:41 +0530)]
echo-cancel: orc-ify some bits for optimisation

This uses Orc to optimise an inner loop in the core NLMS function of the
Adrian echo canceller.

14 years agoecho-cancel: Add SSE optimisation to the adrian module
Arun Raghavan [Tue, 21 Sep 2010 15:12:32 +0000 (20:42 +0530)]
echo-cancel: Add SSE optimisation to the adrian module

Optimises the core inner-product function, which takes the most CPU. The
SSE-optimised bits of the adrian echo canceller only if the CPU that PA
is running on actually supports SSE.

14 years agocpu: Add CPU information to pa_core
Arun Raghavan [Tue, 14 Sep 2010 09:51:49 +0000 (15:21 +0530)]
cpu: Add CPU information to pa_core

This retains CPU information (processor type and supported features) in
pa_core, so that this information can be used by modules at init time to
figure out what optimisations may be used.

14 years agobuild: Fix make distcheck
Arun Raghavan [Thu, 23 Sep 2010 11:46:41 +0000 (17:16 +0530)]
build: Fix make distcheck

src/utils/qpaeq was not being dist'ed

14 years agoecho-cancel: Fix out-of-tree build
Arun Raghavan [Mon, 20 Sep 2010 08:37:44 +0000 (14:07 +0530)]
echo-cancel: Fix out-of-tree build

14 years agox11: Use the default screen for X11 properties.
Colin Guthrie [Sat, 18 Sep 2010 10:12:56 +0000 (11:12 +0100)]
x11: Use the default screen for X11 properties.

This commit restores the functionality originally included in 65e807
by Leszek Koltunski.

14 years agoxcb: xcb_get_setup() can return 0, so make sure we check it before using
Colin Guthrie [Sat, 18 Sep 2010 09:37:11 +0000 (10:37 +0100)]
xcb: xcb_get_setup() can return 0, so make sure we check it before using

14 years agoxcb: Ensure the XCB connection is valid before using it.
Colin Guthrie [Sat, 18 Sep 2010 09:35:38 +0000 (10:35 +0100)]
xcb: Ensure the XCB connection is valid before using it.

14 years agox11: Partially convert to XCB.
Colin Guthrie [Sat, 29 May 2010 18:33:54 +0000 (19:33 +0100)]
x11: Partially convert to XCB.

This commit mostly converts the X11 handling to XCB. There are still
some uses of XLib to deal with the X11 session handling modules, however all
client-side code should now be free of XLib and thus this should fix Bug #799

Note that this removes the screen-based changes by Leszek Koltunski
in 65e80, however this will be restored in due course.

14 years agoalsa: Only set the 'first' flag to false when we actually call snd_pcm_start()
Colin Guthrie [Tue, 14 Sep 2010 18:44:57 +0000 (19:44 +0100)]
alsa: Only set the 'first' flag to false when we actually call snd_pcm_start()

Previously, if work_done was false, we could conceivably not call snd_pcm_start().

14 years agoalsa: Set the rewind safeguard proportionally to sample spec
Colin Guthrie [Sat, 4 Sep 2010 10:58:05 +0000 (11:58 +0100)]
alsa: Set the rewind safeguard proportionally to sample spec

Currently when rewinding alsa, a fixed value of 256 bytes is used,
which represents 1.33ms @ 48kHz (2ch, 16bit). This is typically fine
and due to DMA constraints we would not want to rewind less than this.

However with more demanding sample specs, (e.g. 8ch 192kHz 32bit)
256 bytes is likely not sufficient, so calculate what 1.33ms would
be and use which ever value is bigger.

Discussed with David Henningsson and Pierre-Louis Bossart here:
 http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/7286

14 years agoalsa-mixer: add profile for Traktor Kontrol S4
Daniel Mack [Sat, 11 Sep 2010 02:06:00 +0000 (10:06 +0800)]
alsa-mixer: add profile for Traktor Kontrol S4

This new audio interface from Native Instruments has 2 stereo channels
for both input and output direction. This patch adds mappings for them.

14 years agoecho-cancel: Fix make distcheck
Rico Tzschichholz [Fri, 10 Sep 2010 10:56:40 +0000 (12:56 +0200)]
echo-cancel: Fix make distcheck

Add missing files to module_echo_cancel_la_SOURCES
Add Adrian license file to EXTRA_DIST

14 years agoecho-cancel: pause timer when echo canceling is off
Wim Taymans [Thu, 9 Sep 2010 14:20:20 +0000 (16:20 +0200)]
echo-cancel: pause timer when echo canceling is off

While the sink or source is in the suspended state, disable the timer
callback because we are not doing any echo canceling then.

14 years agoecho-cancel: improve accuracy
Wim Taymans [Thu, 9 Sep 2010 10:39:15 +0000 (12:39 +0200)]
echo-cancel: improve accuracy

Make the echo canceler drift up to 1ms now that things are more accurate.
Add 10 samples of headroom to allow for timing inaccuracies.

14 years agoalsa: make defines for smoother configuration
Wim Taymans [Thu, 9 Sep 2010 10:29:59 +0000 (12:29 +0200)]
alsa: make defines for smoother configuration

Make new defines for the smoother window size and adjust time constants instead
of reusing some unrelated constant.

Increase the smoother window size even more because the bigger it is, the
better. Since we have a 200ms max update interval and the max smoother history
is 64 entries, 10seconds is a good default.

Decrease the smoother adjust time to 1 second. The previous value of 4 seconds
was too much to adapt quickly after a resume.

14 years agoecho-cancel: rework alignment code
Wim Taymans [Wed, 8 Sep 2010 16:49:48 +0000 (18:49 +0200)]
echo-cancel: rework alignment code

Rework the code to align capture and playback samples so that we can keep more
accurate timings.

14 years agoalsa: work around slightly broken _delay implementations
Wim Taymans [Wed, 8 Sep 2010 11:26:39 +0000 (13:26 +0200)]
alsa: work around slightly broken _delay implementations

Use snd_pcm_avail_delay() in pa_alsa_safe_delay() so that we can check the delay
value against the avail value and patch it up when it looks invalid. Only do
this for capture.

14 years agoalsa-time-test: make test usable for capture too
Wim Taymans [Mon, 6 Sep 2010 15:48:56 +0000 (17:48 +0200)]
alsa-time-test: make test usable for capture too

Extend the test to also work for capture devices.

14 years agoalsa-source: refactor smoother and device start
Wim Taymans [Mon, 6 Sep 2010 13:26:19 +0000 (15:26 +0200)]
alsa-source: refactor smoother and device start

Move the code to start the capture and the smoother closer together to improve
smoother accuracy.
Rework things to look more like the alsa sink where the device is started in
only one place.

14 years agosmoother: avoid losing precision
Wim Taymans [Mon, 6 Sep 2010 13:22:26 +0000 (15:22 +0200)]
smoother: avoid losing precision

Avoid losing precision by subtracting uint64 values before converting them to
doubles.

14 years agoecho-cancel: Mark immutable parameters as const in vfunc
Arun Raghavan [Tue, 7 Sep 2010 09:37:39 +0000 (15:07 +0530)]
echo-cancel: Mark immutable parameters as const in vfunc

Marks the recording and playback streams as const in the
pa_echo_canceller->run method for clarity.

14 years agoecho-cancel: Make blocksize a module-wide parameter
Arun Raghavan [Tue, 7 Sep 2010 09:25:38 +0000 (14:55 +0530)]
echo-cancel: Make blocksize a module-wide parameter

Since all algorithms will need to specify a block size (the amount of
data to be processed together), we make this a common parameter and have
the implementation set it at initialisation time.

14 years agoecho-cancel: Allow selection of AEC method using modargs
Arun Raghavan [Tue, 7 Sep 2010 08:32:32 +0000 (14:02 +0530)]
echo-cancel: Allow selection of AEC method using modargs

This adds an "aec_method" module argument to allow us to select the AEC
implementation to use.

14 years agoecho-cancel: Add alternative echo-cancellation implementation
Arun Raghavan [Tue, 7 Sep 2010 08:13:58 +0000 (13:43 +0530)]
echo-cancel: Add alternative echo-cancellation implementation

This adds Andre Adrian's AEC implementation from his intercom project
(http://andreadrian.de/intercom/) as an alternative to the speex echo
cancellation routines. Since the implementation was in C++ and not in
the form of a library, I have converted the code to C and made a local
copy of the implementation.

The implementation actually works on floating point data, so we can
tweak it to work with both integer and floating point samples (currently
we just use S16LE).

14 years agoecho-cancel: Let AEC module determine source/sink spec
Arun Raghavan [Mon, 6 Sep 2010 16:53:51 +0000 (22:23 +0530)]
echo-cancel: Let AEC module determine source/sink spec

Since the source and sink specification will need to be determined by
the AEC algorithm (can it handle multi-channel audio, does it work with
a fixed sample rate, etc.), we negotiate these using inout parameters at
initialisation time.

There is opportunity to make the sink-handling more elegant. Since the
sink data isn't used for playback (just processing), we could pass
through the data as-is and resample to the required spec before using in
the cancellation algorithm. This isn't too important immediately, but
would be nice to have.

14 years agoecho-cancel: Pass arguments to the specific canceller module
Arun Raghavan [Mon, 6 Sep 2010 15:54:55 +0000 (21:24 +0530)]
echo-cancel: Pass arguments to the specific canceller module

This allows us to tweak module parameters for whichever AEC module is
chosen.

14 years agoecho-cancel: Split out speex code from the core module
Arun Raghavan [Mon, 6 Sep 2010 10:21:20 +0000 (15:51 +0530)]
echo-cancel: Split out speex code from the core module

This splits out the echo-cancelling core from the PA-specific bits to
allow us to plug in other echo-cancellation engines.

14 years agoecho-cancel: Move the module into it's own directory
Arun Raghavan [Mon, 6 Sep 2010 08:09:25 +0000 (13:39 +0530)]
echo-cancel: Move the module into it's own directory

This will make splitting out the canceller parts cleaner.

14 years agocli: Allow .include on directories as well as files.
Colin Guthrie [Sat, 4 Sep 2010 16:07:23 +0000 (17:07 +0100)]
cli: Allow .include on directories as well as files.

When .including a directory, all files with the extension '.pa'
in that folder will be parsed in alphabetical order.

14 years agoalsa: increase the smoother window
Wim Taymans [Fri, 3 Sep 2010 14:47:44 +0000 (16:47 +0200)]
alsa: increase the smoother window

40ms for the smoother window is too small. Increase the size to 4 seconds, like
we do for the sinks.

14 years agoecho-cancel: keep frame_size a power of 2
Wim Taymans [Tue, 31 Aug 2010 16:04:33 +0000 (18:04 +0200)]
echo-cancel: keep frame_size a power of 2

The speex echo canceler prefers a power of 2 for the frame size. Round down the
ideal frame_size to the nearest power of two. This makes sure we don't create
more than the requested frame_size_ms latency while still providing a power of 2
to the speex echo canceller.

14 years agoecho-cancel: improve debug
Wim Taymans [Tue, 24 Aug 2010 11:29:18 +0000 (13:29 +0200)]
echo-cancel: improve debug

14 years agoecho-cancel: tweak the resync code a little
Wim Taymans [Tue, 24 Aug 2010 09:46:18 +0000 (11:46 +0200)]
echo-cancel: tweak the resync code a little

Try to keep the drift between source and sink within 4ms now that we have more
accurate timings.
Don't force a resync on latency changes but let the drift code handle it.

14 years agoecho-cancel: use the phone media role
Wim Taymans [Tue, 24 Aug 2010 09:22:20 +0000 (11:22 +0200)]
echo-cancel: use the phone media role

Tag the source and sink with the phone media roles so that they automatially
connect to phone streams such as Empathy when using the intended-rols module.

14 years agoalsa-sink/source: Use the "namereg_fail" module argument.
Tanu Kaskinen [Mon, 30 Aug 2010 15:34:41 +0000 (18:34 +0300)]
alsa-sink/source: Use the "namereg_fail" module argument.

This allows the name registry to mangle the names of auto-detected sinks and
sources to be unique, which makes it possible to load multiple identical sound
cards using module-udev-detect.

At least for now the module argument can only be passed through
module-alsa-card.

14 years agoalsa-sink: Get rid of a compiler warning regarding rewind_safeguard type.
Tanu Kaskinen [Tue, 24 Aug 2010 14:47:25 +0000 (17:47 +0300)]
alsa-sink: Get rid of a compiler warning regarding rewind_safeguard type.

GCC gave a warning, because the pointer given to pa_modargs_get_value_u32() had
type size_t instead of uint32_t.

14 years agomodule-udev-detect: When loading module-alsa-card, use namereg_fail=false.
Tanu Kaskinen [Tue, 24 Aug 2010 15:17:19 +0000 (18:17 +0300)]
module-udev-detect: When loading module-alsa-card, use namereg_fail=false.

14 years agomodule-alsa-card: New argument: namereg_fail.
Tanu Kaskinen [Tue, 24 Aug 2010 14:33:58 +0000 (17:33 +0300)]
module-alsa-card: New argument: namereg_fail.

This is added so that module-udev-detect can load multiple module-alsa-card
instances with the same card name - forcing namereg_fail to false allows the
name registry to mangle the card names to be unique.

14 years agoecho-cancel: take into account snapshot delay
Wim Taymans [Mon, 23 Aug 2010 15:47:03 +0000 (17:47 +0200)]
echo-cancel: take into account snapshot delay

Take into account the delay between taking the snapshot from the source and the
sink. Improves the quality of the timings.

14 years agomake echo-cancel module that exposes a new sink and source
Wim Taymans [Mon, 23 Aug 2010 14:38:47 +0000 (16:38 +0200)]
make echo-cancel module that exposes a new sink and source

Make a new echo-cancel module that exposes a new sink and source. All data sent
to the sink is matched against the data captured from the source and
echo-canceled using the speex echo canceler.

14 years agoalsa: resume smoother after unsuspend
Wim Taymans [Mon, 23 Aug 2010 09:59:13 +0000 (11:59 +0200)]
alsa: resume smoother after unsuspend

The smoother is paused when the device is suspended but never resumed on
unsuspend. Pass the paused = FALSE flag to the pa_smoother_reset() call to make
it unpause when unsuspending. This patch improves source timings quite a bit.

14 years agocore: New function: pa_module_update_proplist().
Tanu Kaskinen [Fri, 13 Aug 2010 10:25:41 +0000 (13:25 +0300)]
core: New function: pa_module_update_proplist().

14 years agoloopback: Make stream names and roles configurable.
Tanu Kaskinen [Thu, 1 Jul 2010 12:49:38 +0000 (15:49 +0300)]
loopback: Make stream names and roles configurable.

14 years agoAC3 passthrough support
Pierre-Louis Bossart [Fri, 16 Jul 2010 21:46:28 +0000 (16:46 -0500)]
AC3 passthrough support

Second version after Tanu's feedback

TODO:
    - notify client that volume control is disabled
    - change sink rate in passthrough mode if needed
    - automatic detection of passthrough mode instead of hard
    coded profile names

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
14 years agodbusiface-core: Track sinks and sources using synchronous hooks instead of asynchrono...
Tanu Kaskinen [Mon, 2 Aug 2010 11:12:26 +0000 (14:12 +0300)]
dbusiface-core: Track sinks and sources using synchronous hooks instead of asynchronous subscription events.

Using the subscription events caused an assertion crash sometimes when a sink
was removed and a new sink was created (i.e. card profile change) and a stream
was moved from the removed sink to the new sink. The stream dbus object's
subscription callback got a change event before the core dbus object's
subscription callback got the sink remove/creation events. The stream's
subscription callback then queried the core for the object path of the new
sink, and since the core was not yet aware of the new sink, an assertion was
hit in pa_dbusiface_device_get_path().

Now that the core uses synchronous hooks to keep the sink and source lists up
to date, this particular problem can't occur anymore.

14 years agoudev: fix hex decoding
Lennart Poettering [Sun, 18 Jul 2010 23:27:15 +0000 (01:27 +0200)]
udev: fix hex decoding

14 years agoalsa: add missing iec958 files from previous commit
Pierre-Louis Bossart [Wed, 14 Jul 2010 16:34:45 +0000 (11:34 -0500)]
alsa: add missing iec958 files from previous commit

14 years agoalsa: fix mixer profiles, add passthrough config
Pierre-Louis Bossart [Mon, 12 Jul 2010 17:24:22 +0000 (12:24 -0500)]
alsa: fix mixer profiles, add passthrough config

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
14 years agoalsa: disable rewinds when using ALSA plugins
Pierre-Louis Bossart [Tue, 13 Jul 2010 20:27:40 +0000 (15:27 -0500)]
alsa: disable rewinds when using ALSA plugins

This is required to when playing on a52: device, rewind is broken
in those plugins.
Credits to Michael Rans <mcarans@yahoo.co.uk> for finding this
workaround, and Tanu Kaskinen <tanuk@iki.fi> for providing
valuable feedback.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
14 years agoalsa: Fix assertion on mmap_write (triggered via a52 plugin)
Colin Guthrie [Sun, 6 Jun 2010 20:19:34 +0000 (21:19 +0100)]
alsa: Fix assertion on mmap_write (triggered via a52 plugin)

14 years agoMerge remote branch 'tanuk2/fixes'
Colin Guthrie [Sat, 5 Jun 2010 17:21:31 +0000 (18:21 +0100)]
Merge remote branch 'tanuk2/fixes'

14 years agomodules/coreaudio: replace deprecated functions
Daniel Mack [Fri, 19 Mar 2010 16:32:21 +0000 (17:32 +0100)]
modules/coreaudio: replace deprecated functions

All API calls are now consolidated in AudioObject* calls, the old model
has been deprecated in 10.6. Follow that change.

14 years agodbus: Stop polling every 10 seconds to check whether all clients are still alive.
Tanu Kaskinen [Thu, 29 Apr 2010 12:06:44 +0000 (15:06 +0300)]
dbus: Stop polling every 10 seconds to check whether all clients are still alive.

Instead, watch for org.freedesktop.DBus.Disconnected signals.

14 years agostream-restore: When changing restore entries with D-Bus, apply the changes immediately.
Tanu Kaskinen [Thu, 15 Apr 2010 10:11:57 +0000 (13:11 +0300)]
stream-restore: When changing restore entries with D-Bus, apply the changes immediately.

14 years agodbus: Fix slightly messed up assertions.
Tanu Kaskinen [Tue, 6 Apr 2010 09:19:46 +0000 (12:19 +0300)]
dbus: Fix slightly messed up assertions.