]> code.delx.au - pulseaudio/log
pulseaudio
12 years agoman: Document the cli inteface a little.
Colin Guthrie [Thu, 5 Apr 2012 10:41:18 +0000 (11:41 +0100)]
man: Document the cli inteface a little.

This just documents the cli interface syntax. Mostly a lift from
http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/CLI
with some minor editing and bringing up to date.

Also document a few undocumented commands.

Shuffle around the order in 'pacmd help' output to match the order
in the new docs for consistency.

https://bugs.freedesktop.org/show_bug.cgi?id=45029

12 years agoalsa-sink/source: Really set volumes on port change
David Henningsson [Tue, 3 Apr 2012 19:35:07 +0000 (21:35 +0200)]
alsa-sink/source: Really set volumes on port change

If deferred volumes were activated, set_volume does not really set
the volume, and is probably only meant to be called from the main
thread.
As we're currently really setting the port and the mute here (i e
modifying ALSA), we should really modify the volume as well.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agomodule-loopback: Reset process_msg callbacks in teardown
David Henningsson [Tue, 3 Apr 2012 16:56:21 +0000 (18:56 +0200)]
module-loopback: Reset process_msg callbacks in teardown

Make sure we can't be called into by remaining references to
sink-inputs and source-outputs after we have unloaded, as
that will likely lead to segfaults.

Thanks to Tanu for providing valuable input on this patch.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoloopback: Fix crash on error during init
Frédéric Dalleau [Mon, 2 Apr 2012 09:16:03 +0000 (11:16 +0200)]
loopback: Fix crash on error during init

If an error during pa__init() causes a jump to fail: u->asyncmsgq is not
initialized.

12 years agodbus: Add assertions to get rid of warnings from Coverity.
Tanu Kaskinen [Wed, 28 Mar 2012 11:47:20 +0000 (14:47 +0300)]
dbus: Add assertions to get rid of warnings from Coverity.

Coverity thinks that expected_method_sig can be NULL when
it's dereferenced by pa_streq(). Adding assertions doesn't
hurt here (in my opinion), and that should get rid of the
warnings.

12 years agodevice-manager: Add an assertion to get rid of a warning from Coverity.
Tanu Kaskinen [Wed, 28 Mar 2012 09:27:26 +0000 (12:27 +0300)]
device-manager: Add an assertion to get rid of a warning from Coverity.

Coverity thinks that device_name can be NULL when it's
dereferenced by strcmp. Adding an assertion doesn't hurt
here (in my opinion), and that should get rid of the
warning.

12 years agodbus: Add an assertion to get rid of a warning from Coverity.
Tanu Kaskinen [Mon, 26 Mar 2012 11:52:27 +0000 (14:52 +0300)]
dbus: Add an assertion to get rid of a warning from Coverity.

Coverity thinks that sample can be NULL when it's
dereferenced after this line. Adding an assertion doesn't
hurt here (in my opinion), and that should get rid of the
warning.

12 years agoalsa: Fix SND_MIXER_SCHN_LAST related stuff.
Tanu Kaskinen [Mon, 26 Mar 2012 11:35:30 +0000 (14:35 +0300)]
alsa: Fix SND_MIXER_SCHN_LAST related stuff.

Valid channel id range is from 0 to SND_MIXER_SCHN_LAST,
inclusive, so the size of the masks array in pa_alsa_element
has to be SND_MIXER_SCHN_LAST + 1. Similar "too small"
arrays were also in alsa-sink's and alsa-source's userdata,
but actually those arrays were not used at all so they were
removed.

element_is_subset() in alsa-mixer.c skipped the last channel
id when iterating the element masks array; that's now fixed
as well.

Thanks to David Henningsson for spotting the too small
arrays in alsa-sink and alsa-source and the
element_is_subset() problem.

12 years agodevice-manager: Fix a memory leak.
Tanu Kaskinen [Fri, 23 Mar 2012 09:36:39 +0000 (11:36 +0200)]
device-manager: Fix a memory leak.

12 years agosample-util: Remove redundant check from pa_volume_memchunk.
Tanu Kaskinen [Fri, 23 Mar 2012 09:01:22 +0000 (11:01 +0200)]
sample-util: Remove redundant check from pa_volume_memchunk.

Add also an assertion for the sample spec validity. The
existing code already does crash in case of an invalid
sample spec, but the error would not be as obvious: the
crash would happen due to a divide-by-zero operation in
pa_frame_aligned().

12 years agopadsp: Fix a double-free bug.
Tanu Kaskinen [Fri, 23 Mar 2012 08:11:21 +0000 (10:11 +0200)]
padsp: Fix a double-free bug.

12 years agodbus: Fix device latency querying.
Tanu Kaskinen [Fri, 23 Mar 2012 07:59:17 +0000 (09:59 +0200)]
dbus: Fix device latency querying.

12 years agosink-input/source-output: Prevent filter sink/source cycles
David Henningsson [Fri, 23 Mar 2012 12:06:27 +0000 (13:06 +0100)]
sink-input/source-output: Prevent filter sink/source cycles

Misbehaving clients can try to set a filter sink to output to
itself, leading to crashes later on. This patch protects us from that.

Thanks to Roman Beslik for testing and finding an error in the first
version of this patch.

Tested-by: Roman Beslik <rabeslik@gmail.com>
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=44397
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agomodule-jack-sink/source: Set fixed latency correctly on creation
Maarten Lankhorst [Mon, 26 Mar 2012 21:12:24 +0000 (23:12 +0200)]
module-jack-sink/source: Set fixed latency correctly on creation

Changes since v1:
Use max value of jack_port_get_latency_range to calculate the latency
and squash compiler warnings cased by using jack_port_get_total_latency

Modifying latency only works inside a callback, and for hardware the
latency is generally fixed on jack, so just take the max value.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
12 years agoFix input device for M-audio fasttrack pro
David Henningsson [Mon, 19 Mar 2012 10:54:12 +0000 (11:54 +0100)]
Fix input device for M-audio fasttrack pro

Some M-audio fasttrack pro devices, the input device is at index 1 instead of index 0.
According to
http://mailman.alsa-project.org/pipermail/alsa-devel/2012-March/050701.html
the reason for this is probably that the device has mutually exclusive
analog and digital input. With this patch we can catch the input regardless
of state.

BugLink: https://bugs.launchpad.net/bugs/569932
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agolibpulse: Cope with systems not implementing SA_NOCLDWAIT
Pino Toscano [Mon, 19 Mar 2012 12:42:15 +0000 (12:42 +0000)]
libpulse: Cope with systems not implementing SA_NOCLDWAIT

Even though SA_NOCLDWAIT is a POSIX mandatory flag the Hurd doesn't
implement it. So let's only check for it if it's defined.

12 years agoRevert "resamplers: Optimize trivial resampler"
Colin Guthrie [Fri, 23 Mar 2012 09:24:48 +0000 (09:24 +0000)]
Revert "resamplers: Optimize trivial resampler"

This causes problems with 24kHz audio (results in echoing)
when upscaling to 44.1kHz or 48kHz.

It can be reapplied when the optimisation works for all cases.

This reverts commit 8539fe9765e5713f9863ab15d0c5b42189f98ae2.

12 years agocore-util: Attempt to make runtime paths smaller to avoid 108 char limit.
Colin Guthrie [Wed, 14 Mar 2012 01:41:48 +0000 (01:41 +0000)]
core-util: Attempt to make runtime paths smaller to avoid 108 char limit.

When the runtime path gets long (which can happen on some NFS
mounts where $HOME is not just /home/$USER), it can grow
longer the 108 char limit imposed by sockaddr_un.sun_path.

This just calls realpath which should ultimately point into
/tmp in most cases and result in a much smaller path.

Only do this when we are adding on a name component to the
runtime path so creating the actual symlink will still get
the original, long name, but this shouldn't be a problem
as it never goes into the sockaddr_un.sun_path.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44680

12 years agostream: Fix sample spec initialisation for extended API
Arun Raghavan [Tue, 27 Mar 2012 19:31:32 +0000 (01:01 +0530)]
stream: Fix sample spec initialisation for extended API

This fixes pa_sample_spec init to use the correct API. Not doing so
triggers a valgrind warning as we call pa_sample_spec_valid() on this
later on, which checks the rate and channels fields. Thanks to Rémi
Denis-Courmont for reporting this.

12 years agoalsa-mixer: Fix a small issue when detecting required-any
David Henningsson [Mon, 26 Mar 2012 08:45:52 +0000 (10:45 +0200)]
alsa-mixer: Fix a small issue when detecting required-any

If somebody writes the line "required-any=ignore", that shouldn't
mean a required-any element needs to be present for the path to
succeed probing.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoalsa-mixer: Show HDMI ports for older Nvidia cards
David Henningsson [Mon, 26 Mar 2012 08:31:47 +0000 (10:31 +0200)]
alsa-mixer: Show HDMI ports for older Nvidia cards

Some older cards do not have jack detection. This patch makes the
port still show up.
An implementation detail: the "required = ignore" line has in itself
no effect, but we have to write *something* there, or else the entire
jack detection section will be ignored by the parser.

BugLink: https://bugs.launchpad.net/bugs/961286
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agodbus: Check method call signatures.
Tanu Kaskinen [Sun, 25 Mar 2012 05:40:56 +0000 (08:40 +0300)]
dbus: Check method call signatures.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=45815
12 years agofix compilation warning via PRI prefix
Deng Zhenrong [Thu, 22 Mar 2012 13:52:12 +0000 (21:52 +0800)]
fix compilation warning via PRI prefix

modules/alsa/alsa-mixer.c:3110:21:
    warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'pa_channel_position_mask_t' [-Wformat]
modules/alsa/alsa-mixer.c:3110:21:
    warning: format '%lx' expects argument of type 'long unsigned int', but argument 8 has type 'pa_channel_position_mask_t' [-Wformat]

pa_channel_position_mask_t is type defined to uint64_t, and to display
uint64_t, it's better to use PRIx64 primitives.

Signed-off-by: Deng Zhenrong <dzrongg@gmail.com>
12 years agobluetooth: Remove unused variable.
Tanu Kaskinen [Thu, 22 Mar 2012 17:39:46 +0000 (19:39 +0200)]
bluetooth: Remove unused variable.

12 years agobuild-sys: padsp target should not be phony
David Henningsson [Wed, 21 Mar 2012 10:24:42 +0000 (11:24 +0100)]
build-sys: padsp target should not be phony

Prevent rebuilding padsp when it's not needed.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agopactl: show availability information for "list cards"
David Henningsson [Wed, 21 Mar 2012 11:17:47 +0000 (12:17 +0100)]
pactl: show availability information for "list cards"

Now that the client API exposes availability information for ports
on cards, we can make output consistent with "list sinks" and
"list sources".

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agomodule-switch-on-port-available: Do not switch profile if current port is available
David Henningsson [Mon, 19 Mar 2012 15:42:10 +0000 (16:42 +0100)]
module-switch-on-port-available: Do not switch profile if current port is available

For switching profiles, we are a little more cautious, only switch
from an unavailable port to an available one. Profile switching is
mainly used for HDMI/DisplayPort, and this is to avoid switching from
analog to HDMI/DP when it becomes available.

See http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-March/012991.html
and replies for more information.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agomodule-loopback: Never call adjust_rates after teardown
David Henningsson [Tue, 20 Mar 2012 10:44:15 +0000 (11:44 +0100)]
module-loopback: Never call adjust_rates after teardown

Calling adjust_rates after teardown results in segfault, and
judging from the Ubuntu bug report, this can happen.
Actively prevent this by destroying the time event, and by
setting adjust_time to 0, we also prevent this routine being
called on max request update.

BugLink: https://bugs.launchpad.net/bugs/946400
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoprotocol-native: Remove redundant asserts
Arun Raghavan [Mon, 19 Mar 2012 08:59:59 +0000 (14:29 +0530)]
protocol-native: Remove redundant asserts

As David points out, the previous commit made a couple of asserts
redundant (the XOR covers all cases that were previous tested for).
Remove these redundant commits now.

12 years agoprotocol-native: Reinstate assert that was incorrectly removed
Arun Raghavan [Mon, 19 Mar 2012 08:46:04 +0000 (14:16 +0530)]
protocol-native: Reinstate assert that was incorrectly removed

Commit 54cddc6ddf075b6248b0b8521120b2bd86049978 removed an assert that
looked redundant but was not. This commit reinstates it in a slightly
modified form. It is not stated as (a ^ b) instead of (!a || !b) in
order to make the condition more obvious.

12 years agoprotocol-native: Protect against clients trying to set a NULL port
David Henningsson [Fri, 16 Mar 2012 13:38:38 +0000 (14:38 +0100)]
protocol-native: Protect against clients trying to set a NULL port

For some reason, a badly behaving client was trying to set a NULL
port, which caused PulseAudio to crash. Add safeguards on two levels
just to be protected. (Also remove a redundant check.)

BugLink: https://bugs.launchpad.net/bugs/951273
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agosystemd: complement module-console-kit with module-systemd-login
Lennart Poettering [Sat, 17 Mar 2012 00:52:41 +0000 (01:52 +0100)]
systemd: complement module-console-kit with module-systemd-login

ConsoleKit has been deprecated and replaced by systemd's logind daemon,
hence provide the same functionality of module-console-kit in
module-systemd-login. This also makes sure that the CK module becomes a
NOP if the system is booted with systemd, resp. that the systemd module
becomes a NOP if the system is booted without systemd, thus being nice
to OSes such as Debian which want to support multiple init systems.

12 years agobuild-sys: Bump soname
Arun Raghavan [Thu, 15 Mar 2012 12:40:41 +0000 (18:10 +0530)]
build-sys: Bump soname

12 years agoi18n: Update Polish translation
Piotr Drąg [Fri, 24 Feb 2012 22:13:35 +0000 (23:13 +0100)]
i18n: Update Polish translation

12 years agoUpdate Ukrainian translation.
Yuri Chornoivan [Fri, 2 Mar 2012 15:59:20 +0000 (17:59 +0200)]
Update Ukrainian translation.

12 years agodaemon: Initialize dbus to use thread-safe mode by default
David Henningsson [Mon, 12 Mar 2012 23:06:22 +0000 (00:06 +0100)]
daemon: Initialize dbus to use thread-safe mode by default

In most cases, we use dbus from more than one thread, as we
e.g. enable real-time scheduling from the ALSA threads.
Therefore set dbus to thread-safe mode by default, as recommended
in https://bugs.freedesktop.org/show_bug.cgi?id=47060#c5

This fixes a bug where PulseAudio could crash in two parallel
calls to pa_make_realtime.

BugLink: https://bugs.launchpad.net/bugs/937933
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoalsa-mixer: Don't remove paths if jacks state.(un)plugged differ
David Henningsson [Mon, 12 Mar 2012 10:32:43 +0000 (11:32 +0100)]
alsa-mixer: Don't remove paths if jacks state.(un)plugged differ

If the jack state differs, they are not the same path, so don't
remove them.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoRevert "build-sys: Remove the public API stuff from libpulsecommon."
Tanu Kaskinen [Mon, 12 Mar 2012 07:05:52 +0000 (09:05 +0200)]
Revert "build-sys: Remove the public API stuff from libpulsecommon."

This reverts commit 24ff7196753a3273bac34e87bdcf42384f974d45.

If these files aren't compiled in both libpulse and
libpulsecommon, some things will try use non-public
functions from libpulse. Therefore those internal functions
have to be included directly in libpulsecommon.

This problem appears to be only visible with --as-needed,
which is why the problem wasn't noticed immediately. The
problem has existed also earlier, and it was fixed by
Maarten Bosmans in commit 2de2c735. The commit that is
now reverted basically reverted Maarten's commit (I didn't
know that when I wrote the bad patch).

12 years agoxen: Add Xen paravirtualized sink support.
Giorgos Boutsioukis [Sun, 26 Feb 2012 23:34:09 +0000 (15:34 -0800)]
xen: Add Xen paravirtualized sink support.

A part of Xen's paravirtualized audio driver has been developed as a
pulseaudio module. This module acts as a tunnel over Xen's shared memory
mechanism and allows a domU guest to send audio data to a dom0 backend.

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=43503

12 years agoalsa-mixer: Make speaker get available=no when headphones are plugged in
David Henningsson [Thu, 23 Feb 2012 06:17:07 +0000 (07:17 +0100)]
alsa-mixer: Make speaker get available=no when headphones are plugged in

While developing the new UI we had to ask ourselves the question of whether
"speakers" should be considered available when headphones are plugged in.
In most cases, they are not available and therefore we should list them
as such.

OTOH, we don't want unplugging the headphones to be considered an act of
wanting to use the speakers (the user might prefer HDMI), and there might
be line-outs that keeps the speakers from unmuting anyway. So, at this point,
I think the most reasonable would be to make the speakers have
PA_PORT_AVAILABLE_NO when headphones are plugged in and
PA_PORT_AVAILABLE_UNKNOWN when they are not. But we might want to revisit
this decision once we have the priority lists up and running.

The same reasoning applies for "Internal Mic", which should become unavailable
when any other mic is plugged in.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agointrospect: Expose port info per card to clients
David Henningsson [Thu, 23 Feb 2012 06:17:06 +0000 (07:17 +0100)]
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>
12 years agoconf: Load switch-on-port-available module by default
David Henningsson [Thu, 23 Feb 2012 06:17:05 +0000 (07:17 +0100)]
conf: Load switch-on-port-available module by default

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoAdd a new module switch-on-port-available that acts on port changes
David Henningsson [Thu, 23 Feb 2012 06:17:04 +0000 (07:17 +0100)]
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.

12 years agoalsa: Add port information to HDMI profiles
David Henningsson [Thu, 23 Feb 2012 06:17:03 +0000 (07:17 +0100)]
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>
12 years agoalsa: Jack detection kcontrol implementation
David Henningsson [Thu, 23 Feb 2012 06:17:02 +0000 (07:17 +0100)]
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>
12 years agoi18n: Fix POTFILES.
Tanu Kaskinen [Sat, 10 Mar 2012 10:54:29 +0000 (12:54 +0200)]
i18n: Fix POTFILES.

12 years agobuild-sys: Remove the public API stuff from libpulsecommon.
Tanu Kaskinen [Fri, 9 Mar 2012 06:43:19 +0000 (08:43 +0200)]
build-sys: Remove the public API stuff from libpulsecommon.

That stuff is already in libpulse, so those files got
compiled twice.

12 years agoproplist: Match pa_proplist_copy argument name between header and implementation.
Tanu Kaskinen [Fri, 9 Mar 2012 07:20:16 +0000 (09:20 +0200)]
proplist: Match pa_proplist_copy argument name between header and implementation.

12 years agoproplist: Constify the pa_proplist_copy and _update input pointers.
Tanu Kaskinen [Fri, 9 Mar 2012 06:46:34 +0000 (08:46 +0200)]
proplist: Constify the pa_proplist_copy and _update input pointers.

12 years agoAdd module-virtual-surround-sink.
Niels Ole Salscheider [Sun, 8 Jan 2012 20:22:35 +0000 (21:22 +0100)]
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

12 years agoflist: Make name non-const to avoid casting with pa_xfree().
Tanu Kaskinen [Wed, 7 Mar 2012 07:39:18 +0000 (09:39 +0200)]
flist: Make name non-const to avoid casting with pa_xfree().

12 years agoflist: Avoid the ABA problem
David Henningsson [Sun, 4 Mar 2012 05:07:37 +0000 (06:07 +0100)]
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>
12 years agodbus: Use correct free function.
Tanu Kaskinen [Fri, 2 Mar 2012 10:02:29 +0000 (12:02 +0200)]
dbus: Use correct free function.

12 years agoformat: Allow format->sample spec conversion for compressed formats
Arun Raghavan [Mon, 5 Mar 2012 15:00:33 +0000 (20:30 +0530)]
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.

12 years agoformat: Add API to query a property's type
Arun Raghavan [Mon, 6 Feb 2012 11:47:34 +0000 (17:17 +0530)]
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.

12 years agoformat: Trivial reorganisation
Arun Raghavan [Mon, 6 Feb 2012 11:04:53 +0000 (16:34 +0530)]
format: Trivial reorganisation

Moves all the property setters together

12 years agoformat: Update map-file
Arun Raghavan [Tue, 7 Feb 2012 07:40:59 +0000 (13:10 +0530)]
format: Update map-file

Adding property getters manually for now.

12 years agoformat: Add more property getters
Arun Raghavan [Mon, 6 Feb 2012 10:48:49 +0000 (16:18 +0530)]
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.

12 years agoformat: Expose pa_format_info<->pa_sample_spec conversion functions
Arun Raghavan [Mon, 6 Feb 2012 06:04:47 +0000 (11:34 +0530)]
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().

12 years agoformat: Don't assert on errors in getters
Arun Raghavan [Mon, 6 Feb 2012 05:50:17 +0000 (11:20 +0530)]
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.

12 years agoformat: Export pa_format_info int and string property getters
Arun Raghavan [Mon, 6 Feb 2012 05:44:53 +0000 (11:14 +0530)]
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.

12 years agobluetooth: Run update-sbc
Colin Guthrie [Fri, 24 Feb 2012 21:22:38 +0000 (21:22 +0000)]
bluetooth: Run update-sbc

This is primarily for the bluez commit 03bb9d3 by Siamashka Siamashka
which fixes a compilation error with gcc 4.7

12 years agoalsa: add DTS profile
Alexander E. Patrakov [Sun, 12 Feb 2012 11:28:55 +0000 (17:28 +0600)]
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/

12 years agobluetooth: Fix calling many times Audio.GetProperties for the same device
Luiz Augusto von Dentz [Mon, 20 Feb 2012 13:44:28 +0000 (15:44 +0200)]
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.

12 years agobuild: Fix out-of-tree build
Arun Raghavan [Mon, 20 Feb 2012 13:53:47 +0000 (19:23 +0530)]
build: Fix out-of-tree build

Previous commits broke the out-of-tree build on padsp.

12 years ago.gitignore: Add padsp to gitignore
Sjoerd Simons [Sun, 19 Feb 2012 11:47:41 +0000 (12:47 +0100)]
.gitignore: Add padsp to gitignore

12 years agobuild: Force order of library installation
Sjoerd Simons [Fri, 17 Feb 2012 21:11:59 +0000 (22:11 +0100)]
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

12 years agopadsp: Move the padsp helper lib into a private library
Michael Biebl [Wed, 15 Feb 2012 20:59:17 +0000 (21:59 +0100)]
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

12 years agobuild: Move libpulsecommon into $pkglib
Michael Biebl [Wed, 15 Feb 2012 20:54:28 +0000 (21:54 +0100)]
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]

12 years agotunnel: fixup create_record_stream
David Henningsson [Mon, 30 Jan 2012 15:47:54 +0000 (16:47 +0100)]
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>
12 years agoPROTOCOL: Fix documentation for version 22
David Henningsson [Mon, 30 Jan 2012 15:47:53 +0000 (16:47 +0100)]
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>
12 years agoalsa-mixer: Don't use dangling pointers as port hashmap keys
David Henningsson [Wed, 15 Feb 2012 15:51:31 +0000 (16:51 +0100)]
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>
12 years agopulse: Fix old bug in stream_free
Maarten Lankhorst [Wed, 15 Feb 2012 01:09:02 +0000 (02:09 +0100)]
pulse: Fix old bug in stream_free

Signed-off-by: Maarten Lankhorst<m.b.lankhorst@gmail.com>
12 years agocli: Ensure source output volumes are printed via cli interface (pacmd ls)
Colin Guthrie [Tue, 14 Feb 2012 11:40:14 +0000 (11:40 +0000)]
cli: Ensure source output volumes are printed via cli interface (pacmd ls)

12 years agopacmd: Fix compiler warning
Arun Raghavan [Sun, 12 Feb 2012 17:44:20 +0000 (23:14 +0530)]
pacmd: Fix compiler warning

We were comparing an int with a size_t.

12 years agoman: Document the local-server-type daemon.conf option.
Tanu Kaskinen [Sat, 14 Jan 2012 14:19:14 +0000 (16:19 +0200)]
man: Document the local-server-type daemon.conf option.

12 years agovirtual-sink: Remove irrelevant comment.
Tanu Kaskinen [Sun, 12 Feb 2012 14:23:17 +0000 (16:23 +0200)]
virtual-sink: Remove irrelevant comment.

The comment is inherited from module-ladspa-sink. It
doesn't make sense in module-virtual-sink.

12 years agocore: svolume tests should generate realistic random volume data
Peter Meerwald [Thu, 12 Jan 2012 16:20:05 +0000 (17:20 +0100)]
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

12 years agocore: whitespace typo
Peter Meerwald [Thu, 12 Jan 2012 16:20:04 +0000 (17:20 +0100)]
core: whitespace typo

12 years agoalsa: fix comment
Peter Meerwald [Thu, 12 Jan 2012 16:20:03 +0000 (17:20 +0100)]
alsa: fix comment

12 years agosample-util: Fix "Darth Vader" panning bug
David Henningsson [Thu, 9 Feb 2012 14:59:20 +0000 (15:59 +0100)]
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>
12 years agosink-input,source-output: Handle devices going away in unlink hooks
Arun Raghavan [Thu, 9 Feb 2012 11:20:31 +0000 (16:50 +0530)]
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.

12 years agoloopback: Trivial whitespace fix
Arun Raghavan [Tue, 7 Feb 2012 08:33:47 +0000 (14:03 +0530)]
loopback: Trivial whitespace fix

12 years agoloopback: Fix crash when moving sink-input fails
Frédéric Dalleau [Mon, 6 Feb 2012 17:15:36 +0000 (18:15 +0100)]
loopback: Fix crash when moving sink-input fails

12 years agoformat: Add "since 1.0" documentation tags where they were missing
Arun Raghavan [Mon, 6 Feb 2012 04:17:39 +0000 (09:47 +0530)]
format: Add "since 1.0" documentation tags where they were missing

12 years agoalsa-mixer: Take override-maps into account in subset elimination
David Henningsson [Thu, 2 Feb 2012 11:46:54 +0000 (12:46 +0100)]
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>
12 years agoalsa-mixer: Make sure unsupported paths are removed after probing
David Henningsson [Thu, 19 Jan 2012 09:30:31 +0000 (10:30 +0100)]
alsa-mixer: Make sure unsupported paths are removed after probing

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoloopback: Fix crashes
Maarten Lankhorst [Sun, 22 Jan 2012 13:11:23 +0000 (14:11 +0100)]
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.

12 years agoi18n: Run make update-po
Colin Guthrie [Mon, 30 Jan 2012 10:11:41 +0000 (10:11 +0000)]
i18n: Run make update-po

12 years agoi18n: Do not translate strings that cannot have any sensible translations.
Colin Guthrie [Mon, 30 Jan 2012 10:08:26 +0000 (10:08 +0000)]
i18n: Do not translate strings that cannot have any sensible translations.

12 years agoi18n: Fudge translations after previous commit to avoid mixing English/localized...
Colin Guthrie [Sat, 21 Jan 2012 10:10:03 +0000 (10:10 +0000)]
i18n: Fudge translations after previous commit to avoid mixing English/localized phrases.

The translations are now obviously outdated and wrong, but as the
core meaning has not changed, this is the lesser of two evils.

12 years agoalsa: Improve "well known descriptions" for ports
David Henningsson [Wed, 11 Jan 2012 14:40:08 +0000 (15:40 +0100)]
alsa: Improve "well known descriptions" for ports

 * If we don't have "Digital Speakers", we should say "Speakers"
   instead of "Analog Speakers", and similar for other ports.
 * Change "IEC958" to "S/PDIF" (more well known name)
 * Add new ports and mappings for HDMI
 * Change "Internal" to "Built-in" for the card name

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoalsa-mixer: Allow speaker port to control "Front Speaker"
David Henningsson [Thu, 12 Jan 2012 09:58:34 +0000 (10:58 +0100)]
alsa-mixer: Allow speaker port to control "Front Speaker"

"Front Speaker", "Surround Speaker" seems to be a common enough name
to make it into alsa-utils, so we should probably care about it as
well. In this case, there was a macbook pro whose speakers didn't work
without these controls.

BugLink: http://bugs.launchpad.net/bugs/551441
Reported-by: Jeroen T. Vermeulen <jtv@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agofix the ever-popular 'the the' typo
Peter Meerwald [Sun, 8 Jan 2012 12:16:51 +0000 (13:16 +0100)]
fix the ever-popular 'the the' typo

some are comments, some are user-visible doxygen text and documentation

12 years agomanpage: document --log-meta, --log-time, log-backtrace
Peter Meerwald [Sun, 8 Jan 2012 12:16:50 +0000 (13:16 +0100)]
manpage: document --log-meta, --log-time, log-backtrace

12 years agomanpage: document --log-target=file:PATH
Peter Meerwald [Sun, 8 Jan 2012 12:16:49 +0000 (13:16 +0100)]
manpage: document --log-target=file:PATH

12 years agostream-restore: Don't verify entry validity needlessly.
Tanu Kaskinen [Fri, 6 Jan 2012 14:15:58 +0000 (16:15 +0200)]
stream-restore: Don't verify entry validity needlessly.

clean_up_db() makes sure that all entries in the database
are valid.

12 years agostream-restore: Clean up the database at startup.
Tanu Kaskinen [Fri, 6 Jan 2012 14:14:03 +0000 (16:14 +0200)]
stream-restore: Clean up the database at startup.

Fixes a crash: https://bugs.freedesktop.org/show_bug.cgi?id=44522

12 years agopulse: Document general error handling.
Peter Meerwald [Sun, 8 Jan 2012 10:13:37 +0000 (11:13 +0100)]
pulse: Document general error handling.

12 years agobluetooth: Change function name add_matches to update_matches.
Tanu Kaskinen [Sun, 1 Jan 2012 17:44:28 +0000 (19:44 +0200)]
bluetooth: Change function name add_matches to update_matches.

A function that is used for removing matches should not be
called add_matches.