Commit graph

6311 commits

Author SHA1 Message Date
David Henningsson
793f46320e introspect: Expose port info per card to clients
For volume control UIs to be able to show ports in inactive profiles,
expose all ports together with the card info. This includes updating
the protocol and the client API to show the connection between ports
and for which profiles the ports are relevant.

Update protocol to 26.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-03-11 12:23:46 +05:30
David Henningsson
752ae7285e conf: Load switch-on-port-available module by default
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-03-11 12:23:46 +05:30
David Henningsson
d1ce4c0aea Add a new module switch-on-port-available that acts on port changes
This module tries to switch to a port when availability changes to
"YES", and tries to switch away when availability changes to "NO".

Once there is a priority list infrastructure in place and ready,
this functionality might be redundant, but this will do as an
interim solution.
2012-03-11 12:23:46 +05:30
David Henningsson
56018683b1 alsa: Add port information to HDMI profiles
For Nvidia and Intel, support probing of up to four HDMI devices.
Also add port information to all HDMI profiles.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-03-11 12:23:46 +05:30
David Henningsson
dedf1340c6 alsa: Jack detection kcontrol implementation
Support the new jack detection interface implemented in Linux 3.3
(and Ubuntu's 3.2 kernel).

Jacks are probed and detected using the snd_hctl_* commands, which
means we need to listen to them using fdlists. As this detection
needs to be active even if there is currently no sink for the jack,
so this polling is done on the card level.

Also add configuration support in paths, like this:
[Jack Headphone]
required-any = any

...where 'Jack Headphone' should match 'Headphone Jack' as given by
ALSA (as seen in e g 'amixer controls').
"Required", "required-any" and "required-absent" is supported. Using
required-any, one can have several ports even though there is no
other indication in the mixer that this path exists.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-03-11 12:23:46 +05:30
Tanu Kaskinen
74e01ad616 i18n: Fix POTFILES. 2012-03-10 12:54:29 +02:00
Tanu Kaskinen
24ff719675 build-sys: Remove the public API stuff from libpulsecommon.
That stuff is already in libpulse, so those files got
compiled twice.
2012-03-09 09:20:47 +02:00
Tanu Kaskinen
d6755696b4 proplist: Match pa_proplist_copy argument name between header and implementation. 2012-03-09 09:20:47 +02:00
Tanu Kaskinen
6f9e651e4e proplist: Constify the pa_proplist_copy and _update input pointers. 2012-03-09 09:09:59 +02:00
Niels Ole Salscheider
6a9caff9dd Add module-virtual-surround-sink.
It provides a virtual surround sound effect.

v2: Normalize hrir to avoid clipping, some cleanups
v3: use fabs, not abs
v4: implement changes proposed by Tanu Kaskinen
v5: likewise
v6: use channel map from hrir file
v7: remove hrir_ss and hrir_map form userdata
v8: update naming of sink
2012-03-09 07:20:13 +02:00
Tanu Kaskinen
25c73a00c4 flist: Make name non-const to avoid casting with pa_xfree(). 2012-03-07 09:39:18 +02:00
David Henningsson
641103314a flist: Avoid the ABA problem
Our flist implementation suffers from the ABA problem
(see http://en.wikipedia.org/wiki/ABA_problem), causing PulseAudio
to crash very rarely, usually inside memblock operations.
By turning stored pointers into stored table indices, we have some
extra bits that we can use to store tag bits, which is a known
workaround for the ABA problem.

Buglink: https://bugs.launchpad.net/bugs/924416
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-03-07 09:34:56 +02:00
Tanu Kaskinen
66f04c3bdc dbus: Use correct free function. 2012-03-06 08:41:10 +02:00
Arun Raghavan
a0706e7c84 format: Allow format->sample spec conversion for compressed formats
This allows clients to get a "fake" sample space for compressed formats
that we can support. This should make size/time conversion for things
like calculating buffer attributes simpler.
2012-03-05 20:30:33 +05:30
Arun Raghavan
8baf8e90c2 format: Add API to query a property's type
Since a given property can be single-valued, an array or (in the case of
ints) a range, clients need an API to figure out what type of value a
property holds. This adds such an API. The actual property type
enumeration is kept in the PA_PROP_* namespace and not the
PA_FORMAT_INFO* namespace so that it can later be reused for properties
generically if required.
2012-03-05 20:00:31 +05:30
Arun Raghavan
8f850403c0 format: Trivial reorganisation
Moves all the property setters together
2012-03-05 20:00:31 +05:30
Arun Raghavan
d9cdaffefe format: Update map-file
Adding property getters manually for now.
2012-03-05 20:00:31 +05:30
Arun Raghavan
59af940dd5 format: Add more property getters
This adds integer range/array and string array property getters to the
pa_format_info API. Corresponding tests added as well to ensure the code
is valgrind-clean.

The corresponding functions are added to map-file manually for now.
2012-03-05 20:00:31 +05:30
Arun Raghavan
c60f698f1e format: Expose pa_format_info<->pa_sample_spec conversion functions
These utility functions could be handy to clients.
pa_format_info_to_sample_spec_fake() isn't made public, but the return
value is changed to keep in sync with pa_format_info_to_sample_spec().
2012-03-05 20:00:31 +05:30
Arun Raghavan
63429b67c7 format: Don't assert on errors in getters
This makes handling errors in getter functions more graceful, rather
than triggering warnings/asserts. Better to be less trigger-happy about
these things since this is now public-facing API.
2012-03-05 20:00:31 +05:30
Arun Raghavan
6f20d39a1c format: Export pa_format_info int and string property getters
We currently only have setters and clients need to be able to query
these values as well. The return types for these functions needed to be
changed to int since this is public API now.
2012-03-05 20:00:31 +05:30
Colin Guthrie
3927b4b607 bluetooth: Run update-sbc
This is primarily for the bluez commit 03bb9d3 by Siamashka Siamashka
which fixes a compilation error with gcc 4.7
2012-02-24 21:22:41 +00:00
Alexander E. Patrakov
0b421f0d93 alsa: add DTS profile
Hi. Could you please apply the attached trivial patch so that I could drop
the corresponding instructions from dcaenc's README file in the future? It
adds a profile for on-the-fly DTS encoding, similar to the existing AC3
profile.

--
Alexander E. Patrakov
>From 22310a1c28385acc7ce883e020b9eb2e5b0813b7 Mon Sep 17 00:00:00 2001
From: "Alexander E. Patrakov" <patrakov@gmail.com>
Date: Sun, 12 Feb 2012 17:19:48 +0600
Subject: [PATCH] alsa: add DTS profile

This requires dcaenc from http://aepatrakov.narod.ru/dcaenc/
2012-02-21 08:52:13 +05:30
Luiz Augusto von Dentz
014511310a bluetooth: Fix calling many times Audio.GetProperties for the same device
Audio.GetProperties is been called for as many times as there are UUIDs
instead of just once when the UUIDs are discovered.
2012-02-21 08:36:21 +05:30
Arun Raghavan
d9cd26f676 build: Fix out-of-tree build
Previous commits broke the out-of-tree build on padsp.
2012-02-20 19:23:47 +05:30
Sjoerd Simons
5710d6deeb .gitignore: Add padsp to gitignore 2012-02-20 14:39:52 +05:30
Sjoerd Simons
9087f1f6ac build: Force order of library installation
libtools causing relinking on installation, to make this succeed
libpulsecommon needs to be installed before the other libraries and the
padsp libraries needs to be installed afterwards.

Unfortunately autotools doesn't consider dependencies when running the
install target, thus we have to enforce the ordering ourselves
2012-02-20 14:39:52 +05:30
Michael Biebl
a96390d865 padsp: Move the padsp helper lib into a private library
libpulsedsp is only used as a LD_PRELOAD library
for the padsp wrapper. So no need to have it in
a public library
2012-02-20 14:39:52 +05:30
Michael Biebl
cea6e16516 build: Move libpulsecommon into $pkglib
libpulsecommon is a private library only for use within pulseaudio, so
lets move it into a private directory

[ed: from discussion on IRC, while it looks redundant to have modules in
lib/pulse-$VER and private libraries in $pkglibdir, this is actually
desirable. For example, a multi-architecture libpulse would have a
$pkgdir per architecture (/usr/lib/<arch>/pulseaudio) whereas you'd
still want the server-specific modules in /usr/lib/pulse...) -- Arun]
2012-02-20 14:37:33 +05:30
David Henningsson
811235d14c tunnel: fixup create_record_stream
The tunnel source has been broken since protocol v22 (PA 1.0),
and connecting fails with a protocol error. Fix.

BugLink: https://bugs.launchpad.net/bugs/923661
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-02-20 14:29:15 +05:30
David Henningsson
9a2faad820 PROTOCOL: Fix documentation for version 22
Fix the documentation: the protocol file was not reflecting the code
properly for version 22.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-02-20 14:29:15 +05:30
David Henningsson
13a84d0747 alsa-mixer: Don't use dangling pointers as port hashmap keys
If alsa settings/options were used, the string to construct the
name was freed, leading to dangling pointers to strings inside
the hashmap.

BugLink: https://bugs.launchpad.net/bugs/932804
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-02-19 22:45:41 +05:30
Maarten Lankhorst
e91e78bb54 pulse: Fix old bug in stream_free
Signed-off-by: Maarten Lankhorst<m.b.lankhorst@gmail.com>
2012-02-19 19:02:08 +02:00
Colin Guthrie
aed3b6f9df cli: Ensure source output volumes are printed via cli interface (pacmd ls) 2012-02-14 11:40:14 +00:00
Arun Raghavan
e8594e4b8e pacmd: Fix compiler warning
We were comparing an int with a size_t.
2012-02-12 23:15:59 +05:30
Tanu Kaskinen
df0e46065c man: Document the local-server-type daemon.conf option. 2012-02-12 17:32:50 +02:00
Tanu Kaskinen
9c84f1274e virtual-sink: Remove irrelevant comment.
The comment is inherited from module-ladspa-sink. It
doesn't make sense in module-virtual-sink.
2012-02-12 16:23:17 +02:00
Peter Meerwald
d103f3a97a core: svolume tests should generate realistic random volume data
assuming RAND_MAX is around 1<<31, rand() >> 1 generates large numbers as
random volume data; these likely causes saturated sample values after
applying the volume function -- not a good test
2012-02-10 17:21:31 +05:30
Peter Meerwald
ee3e93c841 core: whitespace typo 2012-02-10 17:21:31 +05:30
Peter Meerwald
db8fa449e4 alsa: fix comment 2012-02-10 17:21:31 +05:30
David Henningsson
2ce7d38005 sample-util: Fix "Darth Vader" panning bug
For muted channels, we forgot to increment a pointer, so if one
channel was muted but not the other, sound became distorted in a
Darth Vader like way. To test the difference, start two input
streams and pan one of them hard left (or right).

And hey, if you didn't think it sounded like Darth Vader, it's
your imagination that's broken, not mine! ;-)

BugLink: https://bugs.launchpad.net/bugs/928757
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-02-10 15:06:35 +05:30
Arun Raghavan
0521db6cf7 sink-input,source-output: Handle devices going away in unlink hooks
If a *_UNLINK_POST hook causes a sink-input/source-output's sink/source
to go away, the subsequent attempt to update the sink/source status will
cause an assert. We deal with this by checking the sink/source status
before trying to update it.
2012-02-09 16:55:48 +05:30
Arun Raghavan
89a49d9611 loopback: Trivial whitespace fix 2012-02-07 14:03:47 +05:30
Frédéric Dalleau
d0f1a3a770 loopback: Fix crash when moving sink-input fails 2012-02-07 14:03:28 +05:30
Arun Raghavan
9eabf7a0cf format: Add "since 1.0" documentation tags where they were missing 2012-02-07 13:07:01 +05:30
David Henningsson
91b2500597 alsa-mixer: Take override-maps into account in subset elimination
The practical problem is that some users were left with only one
"LFE on Mono" port, as analog-output was considered a subset of
analog-output-lfe-on-mono. Which was not what they wanted.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=40910
BugLink: https://bugs.launchpad.net/bugs/922656
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-02-02 12:41:51 +00:00
David Henningsson
43a705ae18 alsa-mixer: Make sure unsupported paths are removed after probing
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-01-30 11:17:08 +00:00
Maarten Lankhorst
2c652b43f9 loopback: Fix crashes
Flush the message queue before tearing down, and dest==NULL is valid in case moving failed.

With this my module-loopback finally no longer causes frequent crashes.
2012-01-30 11:17:08 +00:00
Colin Guthrie
11cde92fda i18n: Run make update-po 2012-01-30 11:17:08 +00:00
Colin Guthrie
0e1f1d6444 i18n: Do not translate strings that cannot have any sensible translations. 2012-01-30 11:17:07 +00:00