Commit graph

6191 commits

Author SHA1 Message Date
Peter Meerwald
ddd7a91f5d format: Add description for format.h 2011-12-12 23:57:50 +00:00
Peter Meerwald
6e7e5d6fa0 format: Add periods to fix brief documentation for pa_format_info_is_pcm() 2011-12-12 22:47:52 +00:00
Peter Meerwald
66b2755361 format: Fix unknown doxygen command \second 2011-12-12 22:46:22 +00:00
Peter Meerwald
564997e487 def: Document that pa_buffer_attr.maxlength is in bytes.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42919
2011-12-12 22:39:58 +00:00
Peter Meerwald
d735857942 stream: Fix comments 2011-12-12 22:39:52 +00:00
Peter Meerwald
c6b95d5235 pstream: Fix spelling of 'receive'.
These functions are not exported in the map file and thus do
not form part of the API and can be corrected without any problem.
2011-12-12 22:36:39 +00:00
Tanu Kaskinen
ba33ae4790 alsa-mixer: Remove unused pa_alsa_path_set_probe() declaration. 2011-12-05 20:42:44 +02:00
David Henningsson
0ef3456f68 device-port: Add a property list to ports.
They're not used for anything yet, but hopefully soon they'll be.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-12-02 18:41:57 +02:00
David Henningsson
1623859d1b pactl: Show port availability
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-12-02 18:21:36 +02:00
David Henningsson
c1f3f7709f 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>
2011-12-02 17:51:11 +02:00
David Henningsson
426daaf6bb 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>
2011-12-01 21:49:17 +02:00
David Henningsson
078a39af88 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>
2011-11-30 12:02:03 +00:00
Peter Meerwald
8fc8d3d586 echo-cancel: Fix memory leak in test program
memory for pa_echo_canceller is allocated in init_common() a second time,
hence the allocated memory in main() is leaked
2011-11-29 10:08:04 +05:30
Maarten Bosmans
75c2f4d09e resampler: Some minor tweaks
that were forgotten in the previous peaks resampler commits.
2011-11-28 11:08:05 +00:00
Arun Raghavan
23fb081795 echo-cancel: Fix warning for undefined HAVE_WEBRTC 2011-11-28 15:16:55 +05:30
Maarten Bosmans
0d4ca279b2 tests: Don't link tests that only use public api to libpulsecommon 2011-11-27 16:54:30 +00:00
Maarten Bosmans
40e35efbce resamplers: Improve performance of peaks resampler
This is mainly achieved by special-casing the common 1ch float case,
which is used by applications such as pavucontrol.
2011-11-27 16:25:04 +00:00
Maarten Bosmans
115d903ab7 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.
2011-11-27 16:25:04 +00:00
Maarten Bosmans
ae179d7321 shm: Use a goto rather than early return for consistency.
This is functionally the same but is easier to understand.
2011-11-27 16:25:04 +00:00
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