Commit graph

6362 commits

Author SHA1 Message Date
Paul Menzel
fed2d8d4e8 doc: Add entry for correct spelling
Due to the formatting of `README` the only occurence of PulseAudio in a
text is capitalized. People reading `README` should at least see the
correct spelling once.

In contrast to reformat just add a spelling section as an easy solution.

Since it is not that important the last place in the ordering might
suffice.
2012-04-27 13:13:23 +05:30
David Henningsson
38b24e40fc sink/source.h: Clarify set_port comment
State which thread calls set_port in which scenario.

Reported-by: Jyri Sasha <oku@iki.fi>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-04-18 11:41:48 +02:00
Peter Meerwald
9e55b29c28 pulse: Fix warning in introspect.h; minor rewording and punctuation. 2012-04-17 18:15:42 +03:00
Peter Meerwald
a3513e7c9d pulse: Clarify proplist doxygen documentation. 2012-04-17 18:15:29 +03:00
Peter Meerwald
92fbb294b7 core: Fix comments. 2012-04-17 18:15:21 +03:00
Peter Meerwald
202b7e3abb echo-cancel: Upper/lowercase in comment. 2012-04-17 18:15:03 +03:00
Peter Meerwald
e724bcdb73 build: Fix spelling in src/Makefile.am. 2012-04-17 18:14:50 +03:00
Peter Meerwald
0033509019 dbus: Fix dbus argument type in iface-stream.c handle_move().
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=48376
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2012-04-17 18:14:27 +03:00
Colin Guthrie
e1d551f364 alsa: Add the DTS/DCA mapping to extra-hdmi.conf too.
This is needed for 0b421f on Intel/NVidia hardware.
2012-04-15 13:43:14 +01:00
David Henningsson
6961d3e1c7 alsa-sink/source: Make sure volumes are synchronised after fast user switching
Log in as user A, fast user switch to user B, let user B change
port, volume or mute status, then switch back to user A.

At this point we must make sure that the ALSA and PA volumes are
synchronised by writing to the ALSA mixer when the ALSA device
becomes available.

BugLink: https://bugs.launchpad.net/bugs/915035
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-04-12 00:13:11 +02:00
Colin Guthrie
29e4b187a3 cli: Allow source-output volumes/mute to be set via CLI
This should have been done a long time ago but it brings symmetry to the API
2012-04-10 09:49:27 +01:00
Colin Guthrie
aa19646d34 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
2012-04-10 09:49:27 +01:00
David Henningsson
87edc1ccb0 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>
2012-04-04 14:36:43 +02:00
David Henningsson
e815a1f81a 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>
2012-04-04 09:04:12 +02:00
Frédéric Dalleau
b762f4eef1 loopback: Fix crash on error during init
If an error during pa__init() causes a jump to fail: u->asyncmsgq is not
initialized.
2012-04-02 17:47:04 +03:00
Tanu Kaskinen
1c134f4517 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.
2012-03-28 17:34:19 +03:00
Tanu Kaskinen
8747930747 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.
2012-03-28 17:34:01 +03:00
Tanu Kaskinen
9d640e4491 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.
2012-03-28 17:33:29 +03:00
Tanu Kaskinen
5a26404f12 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.
2012-03-28 17:32:04 +03:00
Tanu Kaskinen
191d60688d device-manager: Fix a memory leak. 2012-03-28 17:23:05 +03:00
Tanu Kaskinen
2f7a586a23 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().
2012-03-28 17:22:44 +03:00
Tanu Kaskinen
c2c5e044cc padsp: Fix a double-free bug. 2012-03-28 17:22:23 +03:00
Tanu Kaskinen
bce720c85d dbus: Fix device latency querying. 2012-03-28 17:21:59 +03:00
David Henningsson
b7fab75fdd 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>
2012-03-28 13:19:47 +02:00
Maarten Lankhorst
3116547662 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>
2012-03-28 13:19:47 +02:00
David Henningsson
6e449eca9a 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>
2012-03-28 13:19:46 +02:00
Pino Toscano
8499afc36f 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.
2012-03-28 16:23:52 +05:30
Colin Guthrie
8ea6b0585e 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 8539fe9765.
2012-03-28 11:31:36 +01:00
Colin Guthrie
664985b7c2 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
2012-03-28 11:17:29 +01:00
Arun Raghavan
5e9e0d5086 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.
2012-03-28 01:26:07 +05:30
David Henningsson
f1a36e84a7 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>
2012-03-26 10:45:52 +02:00
David Henningsson
2577cc81b3 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>
2012-03-26 10:31:47 +02:00
Tanu Kaskinen
e9d82afdea dbus: Check method call signatures.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=45815
2012-03-25 08:40:56 +03:00
Deng Zhenrong
737a6180d4 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>
2012-03-23 10:37:23 +01:00
Tanu Kaskinen
4502d7cb28 bluetooth: Remove unused variable. 2012-03-22 19:39:46 +02:00
David Henningsson
208a49a483 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>
2012-03-21 12:30:45 +01:00
David Henningsson
70eb40705d 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>
2012-03-21 12:17:47 +01:00
David Henningsson
1f97db720b 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>
2012-03-21 10:35:09 +01:00
David Henningsson
00c3a4958e 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>
2012-03-20 11:44:15 +01:00
Arun Raghavan
13d388b4ce 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.
2012-03-19 14:29:59 +05:30
Arun Raghavan
fd637e8765 protocol-native: Reinstate assert that was incorrectly removed
Commit 54cddc6ddf 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.
2012-03-19 14:16:04 +05:30
David Henningsson
54cddc6ddf 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>
2012-03-19 09:01:29 +01:00
Lennart Poettering
860d1cf3a7 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.
2012-03-17 01:52:41 +01:00
Arun Raghavan
e83ebabc68 build-sys: Bump soname 2012-03-15 18:16:49 +05:30
Piotr Drąg
d492032feb i18n: Update Polish translation 2012-03-14 00:11:45 +00:00
Yuri Chornoivan
bf20fc26a1 Update Ukrainian translation. 2012-03-14 00:03:54 +00:00
David Henningsson
961a83a3fa 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>
2012-03-13 16:16:32 +02:00
David Henningsson
fa80315b2c 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>
2012-03-12 10:49:50 +00:00
Tanu Kaskinen
bbc600aae9 Revert "build-sys: Remove the public API stuff from libpulsecommon."
This reverts commit 24ff719675.

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).
2012-03-12 09:05:52 +02:00
Giorgos Boutsioukis
50a7bf1175 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
2012-03-11 21:15:14 +00:00