Arun Raghavan [Mon, 19 Dec 2011 04:50:30 +0000 (10:20 +0530)]
build-sys: Fix po/ build with --disable-nls
We can't call IT_PROG_INTLTOOL because it requires intltool even with
--disable-nls, but it provides USE_NLS which is required for the po/
build. This might take a while to get fixed upstream, so working around
this in our build system for now.
Arun Raghavan [Mon, 19 Dec 2011 04:46:05 +0000 (10:16 +0530)]
build-sys: Fix map-file check
configure doesn't provide an abs_top_srcdir early enough, so we just use
srcdir for that. There was also a problem with the path we were setting
in VERSIONING_LDFLAGS that is fixed now.
Make assembly syntax compatible to the X32 toolchain and fix the
following kind of compilations errors with X32 gcc.
| pulsecore/svolume_mmx.c: Assembler messages:
| pulsecore/svolume_mmx.c:107: Error: `(%esi,%rdi,4)' is not a valid base/index expression
| pulsecore/svolume_mmx.c:135: Error: `(%esi,%rdi,4)' is not a valid base/index expression
| pulsecore/svolume_mmx.c:161: Error: `(%esi,%rdi,4)' is not a valid base/index expression
| pulsecore/svolume_mmx.c:162: Error: `8(%esi,%rdi,4)' is not a valid base/index expression
| pulsecore/svolume_mmx.c:180: Error: `(%esi,%rdi,4)' is not a valid base/index expression
| pulsecore/svolume_mmx.c:210: Error: `(%esi,%rdi,4)' is not a valid base/index expression
| pulsecore/svolume_mmx.c:244: Error: `(%esi,%rdi,4)' is not a valid base/index expression
| pulsecore/svolume_mmx.c:245: Error: `8(%esi,%rdi,4)' is not a valid base/index expression
| make[3]: *** [libpulsecore_1.1_la-svolume_mmx.lo] Error 1
Originally these assembly lines were written for x86_64 ABI, now they
are also compatible with X32 ABI [3][4].
The patch was submitted to the OpenEmbedded-Core list [1][2].
Arun Raghavan [Wed, 14 Dec 2011 15:18:12 +0000 (20:48 +0530)]
protocol-native: Fix 'auth-group-enabled' modarg
This is actually implemented in module-protocol-stub as
'auth-group-enable'. An unfortunate typo because the other argument is
spelt as 'enabled', but it's better to be slightly inconsistent than to
change the public interface.
Peter Meerwald [Sun, 11 Dec 2011 15:07:42 +0000 (16:07 +0100)]
echo-cance: Make Adrian canceller optional
makes the Adrian echo canceller implementation optional at compile time
this patch supersedes an earlier patch proposal and addresses the following
comments:
* separate patch from speex dependency rework (Arun)
* check that at least one EC implementation is available (Arun)
* properly align yes/no in configure summary for Adrian (Frederic)
Peter Meerwald [Sun, 11 Dec 2011 15:07:41 +0000 (16:07 +0100)]
build-sys: Make speex library optional
make speex library dependency optional, this affects the resampler
and the echo canceller module
this patch supersedes an earlier patch proposal and addresses the following
comments:
* fix order of pa_echo_canceller_method_t enum and ec_table (Frederic)
* the default resampler is speex if available as before, otherwise ffmpeg (Arun)
* does not touch the Adrian EC implementation (see separate patch) (Arun)
David Henningsson [Fri, 2 Dec 2011 09:20:23 +0000 (10:20 +0100)]
Fixup a few things in the new path probing
* If mapping_probe_paths() fails to open the mixer, all paths are now
removed from the mapping's path sets.
* pa_path_set.probed isn't really used for anything (removed).
* If profile probing is configured to be skipped, mapping_paths_probe()
should still be called.
Thanks to Tanu for spotting.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Fri, 25 Nov 2011 14:17:16 +0000 (15:17 +0100)]
alsa: add card ports and path probe cache
To be able to add ports to all profiles, we need to probe all
profiles at startup. To speed this up, we now have a cache of
probes paths which is owned by the profile set. Since paths
are now owned by the profile set, the path set must now have
a hashmap of paths instead of a linked list.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Wed, 30 Nov 2011 11:51:06 +0000 (12:51 +0100)]
alsa: Ignore the virtual "thinkpad-acpi" card
The thinkpad ACPI driver sometimes creates a virtual sound card,
which at best exposes a volume control. Save some startup time, and
unnecessary error messages in the log, by ignoring it.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Maarten Bosmans [Wed, 2 Nov 2011 20:54:16 +0000 (21:54 +0100)]
resamplers: Rework the peaks resampler
The algorithm had been implemented the same way as the trivial resampler. But
an important difference between the two is that the trivial resampler can write
an output as soon as the first corresponding input sample is seen, whereas the
peaks resampler must have read all input samples before writing an output
sample.
With this rework, the peaks resampler now outputs samples correctly when the
input data is spanning multiple memblocks.
Maarten Bosmans [Tue, 22 Nov 2011 15:09:18 +0000 (16:09 +0100)]
pulsecore: Hardcode FRAME_SIZE_MAX_ALLOW
Instead of using PA_SCACHE_ENTRY_SIZE_MAX, the size for FRAME_SIZE_MAX_ALLOW is
set directly to the same value. This removes the need for the core-scache.h
include, which caused an unwanted dependency of libpulsecommon on libpulsecore.
Colin Guthrie [Sun, 27 Nov 2011 14:19:57 +0000 (14:19 +0000)]
pulsecore: Fix issue with circuilar definitions.
Without this fix, errors about previous definitions are generated in
numerous locations.
Example of error:
CC libpulsecore_1.98_la-auth-cookie.lo
In file included from ../../src/pulsecore/source.h:46:0,
from ../../src/pulsecore/sink.h:40,
from ../../src/pulsecore/core.h:50,
from ../../src/pulsecore/shared.h:25,
from ../../src/pulsecore/auth-cookie.c:33:
../../src/pulsecore/device-port.h:40:24: error: redefinition of typedef
'pa_core'
../../src/pulsecore/core.h:29:24: note: previous declaration of
'pa_core' was here
make[3]: *** [libpulsecore_1.98_la-auth-cookie.lo] Error 1
Overall it would be nicer if we could avoid this kind of fix, but it
would require further reorganisation that I'm not prepared to undertake
right now.
David Henningsson [Fri, 25 Nov 2011 14:17:14 +0000 (15:17 +0100)]
Notify port available status changes, and update protocol version
The recommended way of setting available status is to call
pa_device_port_set_available, which will send a subscription event
to the relevant card. It will also fire a hook.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
David Henningsson [Fri, 25 Nov 2011 14:17:12 +0000 (15:17 +0100)]
Turn device ports into reference counted objects
Since both cards and sinks can hold references to a port, it makes
sense to reference count them. Although no current implementation
actually has sinks with ports but without a card, it felt wrong
to make it harder to make such an implementation in the future.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Arun Raghavan [Thu, 17 Nov 2011 14:31:59 +0000 (20:01 +0530)]
filters: Handle echo-cancel streams better
This makes handling of echo-cancel streams (and potentially other
filters that need to work with multiple streams) cleaner. We do this by
adding the ability to apply filter on a group of streams rather than
always treating streams individually.
This is required, for example, when changing the input source for an
echo-cancel source output. When this happens, we want to change the
module-echo-cancel instance to actually cancel between the new source
and old sink.
To do this when one stream in a group moves, we create a new filter
instance between the current master sink/source pair and move the
relevant streams to the virtual sink/source from this new instance.
Arun Raghavan [Wed, 23 Nov 2011 10:56:40 +0000 (16:26 +0530)]
proplist: Add internal API to get stream group
This moves out code from module-stream-restore and makes an internal API
out of it to get a "stream group" for a given sink input or source output.
This is factored out for reuse in module-filter-*.
The stream group basically provides some means of attaching a logical
identification to the stream (by role, application id, etc.).
Arun Raghavan [Wed, 23 Nov 2011 11:16:12 +0000 (16:46 +0530)]
filters: Fix the master source/sink when autoloaded
When autoloaded, it is expected that module-filter-apply (or whatever is
loading us) will take care of applying the filter on the correct
sink/source master. Instead of adding complexity by tracking what is
currently being filtered, we just disallow filtering anything except the
original master sink/source and let module-filter-apply or whatever is
loading us deal with dynamic sink/source changes.
Arun Raghavan [Tue, 22 Nov 2011 07:54:22 +0000 (13:24 +0530)]
echo-cancel: Use more human-friendly descriptions
This makes what devices are being cancelled clearer in the UI (at the
cost of being somewhat less clear when multiple devices of the same name
are plugged, but at least that's a much smaller set than everyone).
Maarten Bosmans [Thu, 13 Oct 2011 18:54:17 +0000 (20:54 +0200)]
rtpoll: Update comment
to reflect changes made in 32e2cd6d3216f780c4cffed0f8eb3c30f2c8d732
core: get rid of rt sig/timer handling since modern Linux' ppoll() is finally fixed for granularity
Antti-Ville Jansson [Fri, 11 Nov 2011 14:22:24 +0000 (16:22 +0200)]
stream: Fix upload samples' cleanup
In pa_create_stream_callback, a stream is inserted into
s->context->record_streams only if it's a record stream. Otherwise it's
inserted into s->context->playback_streams. However, in stream_unlink the
stream is removed from s->context->playback_streams only if it's a playback
stream and otherwise it's removed from s->context->record_streams.
Thus, if the stream is an upload stream, we first insert it into
s->context->playback_streams in pa_create_stream_callback and then try to
remove it unsuccessfully from s->context->record_streams in stream_unlink. This
means that we are leaking hashmap entries until the context is freed,
constantly consuming more memory with applications that upload and unload a
large number of samples through one context.
Of course, this begs the question whether upload streams even belong in either
of those hashmaps. I don't want to mess around with the code too much at this
point though, so this patch should be a sufficient improvement.
Arun Raghavan [Fri, 4 Nov 2011 10:47:26 +0000 (16:17 +0530)]
echo-cancel: Add infrastructure for cancellers to do AGC
This adds some infrastructure for canceller implementations to also
perform acoustic gain control. Cancellers now have a couple of new API
calls that allow them to get/set capture volume.
This is made slightly complex by the fact that cancellation happens in
thread context while most volume mangling needs to be done in main
context. To deal with this, while getting the volume we save source
volume updates as they are propagated to thread context and use this
cached value for queries. To set the volume, we send an async message to
main context and let that set the source volume.
Arun Raghavan [Mon, 7 Nov 2011 09:31:25 +0000 (15:01 +0530)]
sink,source: Allow sample rate switching with corked streams
This updates corked streams' resamplers when switching sample rates on a
sink/source, which means the restriction of allowing sample rate updates
only when no streams are attached to a sink/source is now relaxed to
preventing updates only when there is a running stream attached.