]> code.delx.au - pulseaudio/log
pulseaudio
13 years agobuild-sys: simplify things for building on fedora
Lennart Poettering [Fri, 26 Nov 2010 01:08:21 +0000 (02:08 +0100)]
build-sys: simplify things for building on fedora

13 years agoi18n: update POTFILES.in
Lennart Poettering [Fri, 26 Nov 2010 00:58:46 +0000 (01:58 +0100)]
i18n: update POTFILES.in

13 years agobuild-sys: bump soname
Lennart Poettering [Fri, 26 Nov 2010 00:38:43 +0000 (01:38 +0100)]
build-sys: bump soname

13 years agobuild-sys: Link lirc libraries in right order
Jyri Sarha [Fri, 26 Nov 2010 16:38:27 +0000 (18:38 +0200)]
build-sys: Link lirc libraries in right order

Wrong order of libraries causes libtool to link primarily from lirc
library location and not from $(libdir) location in install
phase. This is a problem if you have an older version pulseaudio libs
installed under same directory as liblirc and you are building a
newer version with some other directory prefix.

13 years agobuild-sys: Link binaries linking libpulsecommon to libpulse too
Jyri Sarha [Fri, 26 Nov 2010 16:38:26 +0000 (18:38 +0200)]
build-sys: Link binaries linking libpulsecommon to libpulse too

Build fails if a symbol is removed from from libpulsecommon. Linking
explicitly to libpulse fixes the problem.

13 years agobuild-sys: Link binaries linking libpulse to libpulsecommon too
Jyri Sarha [Fri, 26 Nov 2010 16:38:25 +0000 (18:38 +0200)]
build-sys: Link binaries linking libpulse to libpulsecommon too

Build appeared to fails when a new function is added to
libpulsecommon. This is because build uses libpulsecommon that is
installed into system instead of the one that is being built. Explicit
linking to libpulsecommon fixes the problem.

13 years agocore: Add name to flist struct for more informative log messages
Jyri Sarha [Fri, 26 Nov 2010 16:38:24 +0000 (18:38 +0200)]
core: Add name to flist struct for more informative log messages

PA_STATIC_FLIST_DECLARE macro sets the flist name automatically.

13 years agocore: Lower "flist is full" log message level to debug and ratelimit it
Jyri Sarha [Fri, 26 Nov 2010 16:38:23 +0000 (18:38 +0200)]
core: Lower "flist is full" log message level to debug and ratelimit it

13 years agovolume: Add explicit checks for ARMv6 instructions
Arun Raghavan [Fri, 26 Nov 2010 06:25:57 +0000 (11:55 +0530)]
volume: Add explicit checks for ARMv6 instructions

This ensures that the build does not fail if the ssat and pkhbt
instructions are not available (armv5te and below).

Fixes: http://www.pulseaudio.org/ticket/790
13 years agoversion: Drop the micro version number
Colin Guthrie [Sun, 28 Nov 2010 14:27:08 +0000 (14:27 +0000)]
version: Drop the micro version number

As per discussions with Lennart, we will be moving to a two-component version
number scheme when the next release is made from git master branch.

This means we will be dropping the micro version component (although
for compatibility, it will remain defined as 0 in version.h).

For more information, please see the announcement here:
 http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/7921

13 years agomodule-bonjour-publish: don't include avahi headers
Daniel Mack [Fri, 19 Nov 2010 02:30:55 +0000 (18:30 -0800)]
module-bonjour-publish: don't include avahi headers

The avahi layer won't work on OSX and is unnecessary, too.

13 years agoalsa-source: fix enum types
Lennart Poettering [Thu, 25 Nov 2010 03:34:04 +0000 (04:34 +0100)]
alsa-source: fix enum types

13 years agoalsa-mixer: make a few strings translatable
Lennart Poettering [Thu, 25 Nov 2010 03:03:56 +0000 (04:03 +0100)]
alsa-mixer: make a few strings translatable

Original patch contributed by 'kelemeng'

http://pulseaudio.org/ticket/843

13 years agopulse: make sure legacy_dir is not static
Jan Kratochvil [Thu, 25 Nov 2010 02:49:27 +0000 (03:49 +0100)]
pulse: make sure legacy_dir is not static

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>
13 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< --

13 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.

13 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>
13 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

13 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

13 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.

13 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>
13 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>
13 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.

13 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

13 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.

13 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.

13 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)

13 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.

13 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.

13 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

13 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>
13 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>
13 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>
13 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>
13 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>
13 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).

13 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.

13 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.

13 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.

13 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).

13 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>
13 years agoMerge remote branch 'vudentz2/master'
Colin Guthrie [Wed, 13 Oct 2010 08:21:01 +0000 (09:21 +0100)]
Merge remote branch 'vudentz2/master'

13 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.

13 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

13 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.

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

13 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.

13 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.

13 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.

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

13 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.

13 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.

13 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.

13 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

13 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.

13 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.

13 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.

13 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.

13 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.

13 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

13 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

13 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.

13 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

13 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.

13 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.

13 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().

13 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

13 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.

13 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

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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).

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

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

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.

13 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.