Commit graph

7100 commits

Author SHA1 Message Date
Tanu Kaskinen
0bbef56976 device-port: Make it impossible to have dual-direction ports 2013-06-04 00:38:39 +05:30
Tanu Kaskinen
5ceb184e3e alsa-mixer: Remove the "name" option from the "General" section of path configuration files
This means that the path names will always correspond to the
path configuration file names, so they will automatically be
unique (in the scope of one card).
2013-06-04 00:38:39 +05:30
Tanu Kaskinen
3c1ca6d4b8 alsa-mixer: Introduce "description-key" option for paths
Previously the path description was looked up based on the
path name only. Since there can be multiple paths that use
the same description, it had to be possible to have multiple
paths with the same name.

Having the same name with multiple paths makes identifying
the paths more complex than necessary, so the plan is to
make it impossible to have paths with the same name. This
patch prepares for that by retaining the possibility to
still have the same description with multiple paths. Instead
of the path name, the path description is looked up by using
the "path description key" if it is set (path name is still
used as a fallback lookup key).
2013-06-04 00:38:39 +05:30
Tanu Kaskinen
66aeea7f72 switch-on-port-available: Fix error reporting style 2013-06-04 00:38:38 +05:30
Tanu Kaskinen
d4d319820d switch-on-port-available: Remove a redundant function argument 2013-06-04 00:38:38 +05:30
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