Commit graph

7095 commits

Author SHA1 Message Date
Tanu Kaskinen
7560314f36 switch-on-port-available: Prepare for dual-direction ports going away
As an extra, I broke try_to_switch_profile() into smaller
functions, because the two levels of loops with continue
statements inside both were a bit hard to follow.
2013-06-04 00:38:38 +05:30
Arun Raghavan
6b08d75c94 build-sys: Bump soname 2013-06-04 00:13:42 +05:30
Arun Raghavan
d78d0053b5 Add a NEWS file
Short version based on Tanu's longer notes posted on list (and now on
the wiki, linked from this file.
2013-06-04 00:08:14 +05:30
Vadim Troshchinskiy
a0032eb7f9 osx: Fix latency querying
get_latency_us() used an uninitialized variable, and an incorrect
scope for some of the AudioObjectGetPropertyData() calls. As a result,
audio would randomly not work at all.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=65122
2013-05-29 14:08:23 +03:00
Arun Raghavan
dbe7bd6677 build-sys: Bump soname
We dropped pa_format_info_free2 as an exposed symbol, but this was never
exposed via headers, so not counting this as ABI change.
2013-05-23 08:35:15 +05:30
David Henningsson
19a7c6e49b rtp: Reset timestamp with correct size if not found
This fixes a compiler warning when building under Ubuntu.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-05-22 16:07:57 +02:00
David Henningsson
d396b76934 module-device-manager: Fix description restore
e->description is a pointer, not a fixed char array. Hence it
makes no sense to use strncmp.

This fixes a compiler warning when compiling under Ubuntu.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-05-22 16:07:57 +02:00
David Henningsson
de5eb70032 core-util: Add pa_safe_streq
Like pa_streq, but does not blow up on NULL pointers.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-05-22 16:07:57 +02:00
Arun Raghavan
ae9f6dc356 sink-input,source-output: Deal with FIX* flags and extended API
The sample spec fixup when FIX* flags are set was not being propagated
to the pa_format_info, causing the two to be out of sync when FIX* was
used.
2013-05-22 17:20:21 +05:30
Mikel Astiz
b156325c68 bluetooth: Fix missing port->profile association
Commit 17b3cb954b merged Bluetooth ports
into two ports (one for input, one for output) but the association
between ports and profiles was lost.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=64713
2013-05-21 14:46:38 +02:00
Mikel Astiz
305f8c7af1 bluetooth: Create ports before card profiles
Both operations are currently independent and their order can therefore
be swapped.
2013-05-21 14:46:31 +02:00
David Henningsson
c0a4f81123 sink-input/source-output: Don't set save_volume if volume is not writable
This fixes a later assertion failure in module-stream-restore.

Buglink: https://bugs.launchpad.net/bugs/896602
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-05-20 15:01:43 +02:00
Tanu Kaskinen
862b24c2e5 map-file: Remove pa_format_info_free2
The function doesn't exist anymore.
2013-05-20 10:56:42 +03:00
David Henningsson
ef2810e1be alsa-mixer: Add "Line Out Jack" to analog-output.conf
A stationary computer usually has headphone jack(s) and line out jacks.
In some cases analog-output.conf will be a subset of
analog-output-headphones.conf, causing line outs to be unusable (because
headphones are unplugged).

This late in the cycle, this was the safest way I could think of to try
to fix this for a particular computer. In later versions of PulseAudio
we could consider making a dedicated line out path instead, and have
proper jack detection there.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-05-17 15:48:02 +02:00
David Henningsson
0a9a1d7488 alsa: Fix crash when profile_set == NULL
Better check if the pointer is NULL before dereferencing it, instead of
after!

BugLink: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1159853
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-05-14 11:05:24 +02:00
David Henningsson
a9915752f8 po: Fix error in hungarian translation
The stray %s caused PulseAudio to crash.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-05-14 05:52:37 +02:00
Peter Meerwald
8bca464394 echo-cancel: Fix send/recv_counter in calc_diff()
send_counter/recv_counter relate to the bytes (play stream) passed
through the queue, hence the same sample spec must be used

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Acked-by: Stefan Huber <shuber@sthu.org>
2013-05-13 10:32:25 +05:30
Tanu Kaskinen
9e4229cfe0 alsa-mixer: Don't use the mono path in the analog-stereo mapping.
As far as I can see, having a mono path in a stereo mapping doesn't
make any sense. It also causes breakage: if the Master Mono mixer
element has two volume channels, the analog-output path gets removed
due to being a subset of analog-output-mono, and that in turn causes
the Master element getting muted. Users generally don't like that.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=54673
2013-05-08 16:35:13 +03:00
Peter Meerwald
592ba453e3 doc: Reword description of meta commands in pulse-cli-syntax.5
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-04-29 16:19:40 +02:00
Peter Meerwald
5701e83191 doc: Fix description how boolean values can be specified
"any word starting with the letters" parts; this does not hold
any longer with commit 0e29e7365907ffbe90df768a4dea277dba40d495
core-util: Don't accept random words in pa_parse_boolean()

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-04-29 16:19:26 +02:00
Peter Meerwald
e87fbc7e86 doc: Mention just one CLI language in default.pa.5
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-04-29 16:19:15 +02:00
Peter Meerwald
f1d19935b4 pstream: Fix case in log message
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-04-29 16:19:07 +02:00
Arun Raghavan
759c0bc6f9 build-sys: json-c changed everything :(
json-c 0.11 ships a pkg-config file with a different name, and changes
the name of its library as well.
2013-04-27 09:06:44 +05:30
David Henningsson
ca4942e89c alsa-mixer: Switch to Headphone when Headphone mic jack is plugged in
When a "Headphone Mic" jack becomes available, we do not know if
a headphone or a mic has been plugged in. Therefore, setting both
paths to "unknown" is, in theory, the correct thing to do.
However, in practice, people are more likely to plug in a headphone
rather than a mic. Therefore, allow autoswitch to the headphone port
when the jack is plugged in.

A more advanced implementation would consider what was plugged in last
time depending on what port was selected on the input side at that
time, and set availability accordingly. However, such an implementation
will have to wait (probably at least until we have our fancy routing
system implementation).

Buglink: https://bugs.launchpad.net/bugs/1169143
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-04-24 12:18:23 +02:00
David Henningsson
068a3ec9d4 alsa-mixer: Allow input fallback port for devices with no gain control
I recently came across a device without any ALSA-level mixer controls,
everything was physical knobs on the hardware.

This patch enables that device to get a port too ("Analog Input").

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-04-24 10:59:42 +02:00
David Henningsson
2553757922 alsa: Fix ELD access warning on shutdown
The hdmi_eld_changed callback is called by alsa-lib at shutdown.
In that case, just exit instead of trying to access something with
already closed handles.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-04-24 10:57:47 +02:00
David Henningsson
d389e7d37c default.pa: Load switch-on-port-available before udev-detect
We need to pick the right port as early as possible, before the
first volume is picked up. Hence this module needs to be loaded
before the sound card modules are loaded.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-04-24 07:56:01 +02:00
David Henningsson
fe73f47828 module-switch-on-port-available: Handle hotplugged cards
If a card is hot-plugged (which all cards will be when we load
this module before module-*-detect), make sure we don't start up
a sink with an unavailable port selected.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-04-24 07:32:48 +02:00
David Henningsson
0b83787d4e alsa: Initialize ports before sinks/sources
This way port availability has been filled in when we create the
sink, which will later enable us to pick the right port directly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-04-24 07:31:29 +02:00
Piotr Drąg
3556c820ee i18n: Update Polish translation 2013-04-23 18:40:09 +03:00
Arun Raghavan
4c23720ef1 pulsecore: Make run-from-build not readlink() on every call
Since this is no longer only defined in debug builds, let's make sure
that there is no impact if this is indavertently called repeatedly at
startup.
2013-04-20 10:12:34 +05:30
Arun Raghavan
3d7bc637c4 daemon: Fix dlsearchpath while running from build tree
It appears that, libltdl will find the .la file in the builddir and
figure out where the real .so is.

This also requires .ifexists to be fixed up to correspondingly search in
<dlsearchpath>/.libs.
2013-04-20 10:04:32 +05:30
Arun Raghavan
4cd7e6df1d rygel: Set DLNA profile on our MediaItems
We know we always serve up LPCM, and exposing this via D-Bus lets Rygel
set the appropriate metadata while presenting the raw (i.e.
non-transcoded) stream to clients.
2013-04-20 09:09:01 +05:30
Peter Meerwald
8946117ebf doc: Explain PULSE_SERVER string in pulseaudio.1
first attempt to document the "server string"
See https://bugs.freedesktop.org/show_bug.cgi?id=62444

quite a bit is missing: [hostname], defaults

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-04-17 08:22:07 +02:00
Peter Meerwald
8ccda50f51 doc: Document PULSE_COOKIE in pulseaudio.1
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-04-17 08:20:02 +02:00
João Paulo Rechi Vita
7a66dcda72 alsa-source: Fix log message
The log message when updating the source sample rate wrongly mentions
"Sink" instead of "Source". This was probably a copy and paste error.
2013-04-17 08:13:06 +02:00
Peter Meerwald
f771bbcfa9 doc: Some more nitpicking in pulse/def.h doxygen documentation
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-04-17 08:12:23 +02:00
Peter Meerwald
2cc23f2c4e doc: Mostly fixing up i.e. versus i.e.\ in doxygen documentation
same for e.g. versus e.g.\ and e.g. versus E.g.

this is ueber-nitpicking: will anybody ever notice?

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-04-17 08:08:42 +02:00
David Henningsson
50cf983194 alsa-mixer: Change profile-sets directory to PA_SRCDIR
A recent patch changed the path files from PA_BUILDDIR to PA_SRCDIR.
Do the same to the profile-set files for consistency (and to fix
out of tree builds).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-04-16 14:44:05 +02:00
Yuri Chornoivan
168751dc66 Fix various typos in messages and comments 2013-04-16 12:42:50 +02:00
Arun Raghavan
ecd17d870a equalizer: Fix compiler warning due use of 'signal'
Changing uses of the symbol 'signal' as it redefines the signal-handling
libc function of the same name.
2013-04-16 11:38:23 +05:30
Arun Raghavan
1ffbb323c6 build-sys: Bump sonames
libpulse-simple changed this time as well (addition of hole-handling).
2013-04-15 23:33:53 +05:30
Arun Raghavan
11d8da83d4 alsa: Fix mixer path when running from build tree
The mixer paths are not available in ${builddir} - we need to look in
${srcdir}. This should fix running an in-tree build without make install
as well as alsa-mixer-path-test in make distcheck.

Since the most straightforward way to define PA_SRCDIR was in
Makefile.am, I'm moving PA_BUILDDIR there as well for consistency.
2013-04-14 11:27:41 +05:30
Arun Raghavan
ae559c0724 pulsecore: Don't conditionally inline pa_run_from_build_tree()
There's no good reason to assume an in-tree build will be debug-only.
This breaks alsa-mixer-path-test on make distcheck, for example.
2013-04-14 10:50:15 +05:30
David Henningsson
ff96c63a3e alsa-mixer: Add more jack detection for Headset mic path
On some machines which has a headset jack, the headset mic does not have its own
jack detection. Then we can look at the headphone jack to get some indication:
We know that if the headphone is unplugged, so is the headset mic. The opposite
is not guaranteed since the user might have plugged in a headphone, not a headset.

Also, there exist multi-function jacks which support both Headphone, Mic in headphone jack
and Headset Mic. In this case the jack name will be "Headphone Mic", not "Headphone", so
we need to include this name too.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-04-14 10:12:00 +05:30
Tanu Kaskinen
4096989ad6 sink, source: Send notifications when flags change
The hooks aren't currently used, but for example, the D-Bus protocol
could use them if it implemented flag change signals.
2013-04-10 16:30:03 +03:00
Tanu Kaskinen
ed51769a59 sink, source: Really set the fixed latency in set_fixed_latency_within_thread(), always.
The old assumption seemed to be that if a sink or source has the
DYNAMIC_LATENCY flag set, it can never change, so the fixed latency
will always be zero. This assumption doesn't hold with filter sinks
and sources that are moved around.

This fixes a crash with two module-virtual-sink instances on top of
each other, when the bottom one is moved from a sink without dynamic
latency to a sink with dynamic latency. What happened was that first
the bottom virtual sink "updated" (due to this bug nothing was
actually updated) its fixed latency to match the master sink (zero
fixed latency), and then the top virtual sink updated its fixed
latency to match the master sink. The master sink was the bottom
virtual sink, whose fixed latency should have been set to zero, but it
was not, so the pa_sink_set_fixed_latency_within_thread() failed in
the assertion "latency == 0".
2013-04-10 16:30:01 +03:00
Tanu Kaskinen
6745b1f970 sink, source: Propagate flag changes to filters
An example: let's say that there's an alsa sink and two filter sinks
on top of each other:

        alsa-sink <- filter1 <- filter2

With the old code, if filter1 gets moved to another sink, and the
new sink doesn't have the LATENCY and DYNAMIC_LATENCY flags set
(unlike alsa-sink), filter1's flags are updated fine in the moving()
callback, but filter2 is not notified at all about the flag changes.
With this patch, the flag changes are propagated to filter2 too.
2013-04-10 16:29:57 +03:00
Tanu Kaskinen
d646d931dc shm: Don't force the shm files to be read-only
Forcing the shm file to be read-only makes shm_unlink() fail on OS X.
Thanks to Albert Zeyer for reporting the bug and investigating the
root cause.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=62988
2013-04-10 14:31:54 +03:00
David Henningsson
b4342845db pstream: Optimise write of smaller packages
During a stream, most packets sent are either memblocks (with SHM info),
or requests for more data. These are only slightly bigger than the
header.

This patch makes it possible to write these packages in one write
instead of two: a memcpy of just a few bytes is worth saving extra
syscalls for write and poll.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-04-09 14:25:51 +02:00