Commit graph

6372 commits

Author SHA1 Message Date
Maarten Bosmans
e8028304b3 win32: Avoid some compiler warnings when cross-compiling for mingw32
Autoconf documentation says that AC_FUNC_SELECT_ARGTYPES shouldn't be used anyway.
2011-11-27 16:24:48 +00:00
Colin Guthrie
5958208c26 device-port: Remove redundant include after the better circular dep fix. 2011-11-27 15:44:23 +00:00
Colin Guthrie
8969bccdd9 x11: Drop unneeded 'struct' and use the typedef directly. 2011-11-27 15:42:52 +00:00
Maarten Bosmans
cbb3a8a61c Use simple free function in pa_queue_free 2011-11-27 15:42:52 +00:00
Maarten Bosmans
e45b02de55 Use simple free function in pa_dynarray_free 2011-11-27 15:42:52 +00:00
Tanu Kaskinen
46920bab16 device-port: Fix the circular dependency problem more cleanly.
Declaring structs before including anything ensures that the
structs are available for everybody in case of circular includes.
2011-11-27 17:22:42 +02:00
Mikel Astiz
e199077eca bluetooth: Fix property reply handling for hfgw 2011-11-27 14:54:01 +00:00
Maarten Bosmans
8539fe9765 resamplers: Optimize trivial resampler
This improves the performance of a typical s16 2ch resampling by 88%.
2011-11-27 14:54:01 +00:00
Maarten Bosmans
61890ae20d resamplers: Use better variable name in trivial resampler 2011-11-27 14:54:01 +00:00
Maarten Bosmans
3e4513290a build-sys: Disable fastpath asserts by default 2011-11-27 14:54:01 +00:00
Maarten Bosmans
761fbee663 resamplers: Use fastpath assert in trivial resampler
When the assert is disabled, the trivial resampler gets a 35% performance boost.
2011-11-27 14:54:01 +00:00
Maarten Bosmans
5aedb9b7d3 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.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41539
2011-11-27 14:54:01 +00:00
Maarten Bosmans
ba2dee08ba Update LICENSE
Mention gdbm, lirc and fftw there.
2011-11-27 14:54:01 +00:00
Colin Guthrie
c95650b929 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.
2011-11-27 14:54:01 +00:00
David Henningsson
7e5a741dd1 cli: Show card ports and jack detection status
Expose the new stuff through pacmd.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-11-26 16:58:37 +02:00
David Henningsson
47f28a5843 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>
2011-11-26 16:58:37 +02:00
David Henningsson
0dced7f275 Cards now has ports directly, and device port has list of profiles
This forms the base for being able to expose all ports of all
profiles (even inactive ones) to clients.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-11-26 16:46:42 +02:00
David Henningsson
d9685ec85d 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>
2011-11-26 16:46:42 +02:00
David Henningsson
961ec210a6 Introduce "available" concept for ports, and communicate that to clients. Bump protocol version to 24.
Note: There is still no notification when status availability changes.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-11-26 13:47:33 +02:00
Arun Raghavan
fabb28f935 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.
2011-11-24 13:03:26 +05:30
Arun Raghavan
1798c653db 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.).
2011-11-24 13:03:26 +05:30
Arun Raghavan
c30a68ebbd filters: Allow a filter to have both sink and source
This sets the base for better representing module-echo-cancel. This
patch itself should change no behaviour -- it only makes way for other
changes.
2011-11-24 12:35:48 +05:30
Arun Raghavan
aaf0f5bd6e 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.
2011-11-24 12:35:48 +05:30
Arun Raghavan
ac3d66f978 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).
2011-11-23 12:00:29 +05:30
Arun Raghavan
4b7b244564 echo-cancel: Use speex by default if webrtc isn't available
Thanks to Peter Meerwald <pmeerw@pmeerw.net> for pointing this out.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42925
2011-11-15 12:51:32 +05:30
Arun Raghavan
42881d2770 core: Look up /etc/machine-id if D-Bus machine-id is not found
It appears that this is currently the fallback for early boot and other
such cases where /var might not be available. Relevant upstream commit:

http://cgit.freedesktop.org/dbus/dbus/commit/?id=66e52541d5bdd4927a5c702963749760643313f4

Thanks to Samuli Suominen <ssuominen@gentoo.org> for pointing this out
in https://bugs.gentoo.org/show_bug.cgi?id=390287
2011-11-15 12:51:31 +05:30
Maarten Bosmans
c2976b1f87 oss: Use log2 function from core-util instead of own implementation 2011-11-14 11:08:04 +05:30
Maarten Bosmans
93f46b92c7 Squash unused variable compiler warning 2011-11-14 11:08:04 +05:30
Maarten Bosmans
df5483f614 Remove vector.h and vector-test
This code was never used and vectorization is handled by Orc anyway.
2011-11-14 11:08:04 +05:30
Maarten Bosmans
ebd6aa594e build-sys: Remove time-smoother and shm from libpulsecore
As they are already included in libpulsecommon.
2011-11-14 11:08:04 +05:30
Maarten Bosmans
bcee830007 rtpoll: Update comment
to reflect changes made in
32e2cd6d32
core: get rid of rt sig/timer handling since modern Linux' ppoll() is finally fixed for granularity
2011-11-14 10:54:18 +05:30
Antti-Ville Jansson
7d05ac606b 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.
2011-11-14 10:54:18 +05:30
Arun Raghavan
d320ae029b alsa: Minor debug code cleanup
Remove a trap on underrun and uncomment a couple of useful debug prints
(still enabled only when DEBUG_TIMING is defined).
2011-11-14 10:54:18 +05:30
Arun Raghavan
7a237e6210 tests: Add playback tests to check-daemon
Adds the standard/extended API playback tests to the check-daemon set.
2011-11-10 13:24:07 +05:30
Arun Raghavan
efbfe5fecb core: Make debugging a bit simpler
This takes out a bunch of commented debug prints and puts them in
defines. Makes it easier to turn them all on/off at a single point.
2011-11-10 12:43:09 +05:30
Maarten Bosmans
80cfa050db tests: Add a target for running manual tests
This adds a check-daemon make target which requires a running PulseAudio
server to test against.
2011-11-08 00:09:34 +05:30
Arun Raghavan
cc89b4aff1 echo-cancel: Make WebRTC the default canceller
Works pretty well, and isn't a CPU hog, so let's use it!
2011-11-07 19:36:23 +05:30
Arun Raghavan
c3d714693c echo-cancel: Turn WebRTC analog gain control on by default
Seems to be pretty well-behaved.
2011-11-07 19:36:08 +05:30
Arun Raghavan
fb02d50fe3 echo-cancel: Hook up WebRTC analog gain control 2011-11-07 17:37:50 +05:30
Arun Raghavan
3d2f2424eb 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.
2011-11-07 17:37:50 +05:30
Arun Raghavan
a813e85503 sink,source: Update sample rate if possible on stream uncork
If a stream is being uncorked and no other stream is running, we try to
update the sink/source sample rate to match it and avoid resampling.
2011-11-07 15:38:31 +05:30
Arun Raghavan
993d73d330 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.
2011-11-07 15:38:30 +05:30
Arun Raghavan
8616f82a67 sink-input,source-output: Add an update_rate() function
This factors out the resampler updating code from finish_move() and
makes a separate function for use from other points.
2011-11-07 15:38:30 +05:30
Arun Raghavan
75573435a0 sink,source: Fix corked stream handling in update_rate()
This fixes the conditional that checks for corked streams and prevents
rate updates.
2011-11-07 11:31:42 +05:30
Arun Raghavan
0a238f69ad cli: Add a dump-volumes command
The purpose of this command is to print all the internal volume
variables for sinks/sources and all corresponding
sink-inputs/source-outputs  to make debugging and reasoning about
volume-related issues easier.
2011-11-04 15:32:13 +05:30
Arun Raghavan
0d13f6ebd2 echo-cancel: Fix webrtc gain control initialisation 2011-11-04 15:25:33 +05:30
Lars R. Damerow
1e6eda8eda alsa: fixed_latency_range modarg for module-alsa-card 2011-11-03 21:31:48 +01:00
Lars R. Damerow
c07c4b353d alsa: fixed latency range handling for udev-detect 2011-11-03 21:31:27 +01:00
Lars R. Damerow
7a387fed36 alsa: support fixed latency range in alsa modules
This adds a boolean module parameter to disable automatic dynamic
latency readjustments on underruns, but leaves automatic dynamic
watermark readjustments untouched.
2011-11-03 21:17:54 +01:00
Frédéric Dalleau
6124bf8951 bluetooth: Remove match for org.bluez.MediaTransport.PropertyChanged 2011-11-03 00:29:00 +05:30