Commit graph

7137 commits

Author SHA1 Message Date
Martin Pitt
ef199c8a81 console-kit, systemd-login: Check for logind, not for systemd
It is possible to build systemd without logind, in which case sd_booted() wo
succeed. Check for /run/systemd/seats to test for logind instead, as
recommended by systemd upstream.

For details, see:
<https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html

Drop the now unnecessary linking against libsystemd-daemon, and stop linking
the consolekit module to any systemd library.

https://bugs.freedesktop.org/show_bug.cgi?id=62593
2013-03-29 13:33:18 +02:00
Peter Meerwald
578d2ce5c8 remap: fix check when to apply specialized code path
the specialized code path just duplicate samples, so are only
applicable if the volume in map_table is == 1.0 (or == 0x10000);
don't use them for volumes >= 1.0

compare the integer version of the volume stored in map_table;
comparing floats is ugly (als leads to compiler warnings)

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-03-29 10:48:26 +02:00
Tanu Kaskinen
1d045af0a2 sink: Fix flag name typo 2013-03-28 17:15:00 +02:00
Arun Raghavan
92bb9fb8b5 resample: Switch to speex-float-1 by default
This consumes less power, has low (no?) perceivable difference, and
allows the default configuration to work out of the box on low-end
systems (such as netbooks).
2013-03-28 10:54:07 +00:00
David Henningsson
6be21425cd alsa-mixer: It's valid to have zero elements in a path
It's valid for a path to have zero elements, e g if it contains
a single jack only. Earlier, this would cause an assertion failure
in pa_path_condense.

Also convert pa_bool_t to bool.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-27 11:36:46 +02:00
Mikel Astiz
3d65e9c49e Revert "card: Support adding ports dynamically"
This reverts commit a9c3f2fb0f.

It has been recently agreed that ports should somehow have some physical
meaning, leading to the port merge in module-bluetooth-device.

With this assumption in mind, it is very unlikely that a card would
add or remove ports dynamically. Therefore, the core can be simplified
by removing the support for this.

The revert affects the code added to module-card-restore in commit
a1a0ad1af2, which can now be partially
removed.

Conflicts:
	src/pulsecore/card.c
	src/pulsecore/core.h
2013-03-27 08:43:02 +02:00
Javier Jardón
e2cb872120 build-sys: Use AM_CPPFLAGS instead of AM_CFLAGS for preprocessor arguments
As the automake documentation says:

AM_CPPFLAGS: The contents of this variable are passed to every compilation
that invokes the C preprocessor; it is a list of arguments to the preprocessor.
For instance, -I and -D options should be listed here

AM_CFLAGS: This is the variable the Makefile.am author can use to pass in
additional C compiler flags.

http://www.gnu.org/software/automake/manual/html_node/Program-Variables.html
2013-03-25 17:00:48 +02:00
David Henningsson
feeec28de4 client API: Document buffer_attr.maxlength
Let's officially support that people use maxlength to put an upper
bound on playback latency.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-25 15:44:36 +02:00
David Henningsson
5f326b705d protocol-native: Lower default minreq in low-latency scenarios
If minreq is not explicitly specified, it was always initialized to
20 ms (DEFAULT_PROCESS_MSEC). However when the total latency is not
much higher than 20 ms, this is way too high. Instead use
tlength/4 as a measure: this will give a decent sink_usec in all
modes (both traditional, adjust latency and early request modes).

This greatly improves PulseAudio's ability to ask for data in time
in low-latency scenarios.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-25 15:44:34 +02:00
David Henningsson
2026c41be6 protocol-native: Ensure tlength is not set higher than maxlength
Tlength should never be set higher than maxlength. While this is
corrected by memblockq later, we still need a correct tlength for
the subsequent calculations.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-25 15:43:33 +02:00
Tanu Kaskinen
450747cf22 .gitignore: Add alsa-mixer-path-test 2013-03-25 15:43:07 +02:00
Arun Raghavan
15009b03f1 protocol-native: Fix some debug output
s->buffer_attr_req is what we want to be printing from since that holds
the actualy requested buffer attributes.
2013-03-25 09:47:04 +00:00
Arun Raghavan
3371528178 alsa: Minor debug log addition
It's helpful to know what kind of scheduling latency we're expecting in
that debug log.
2013-03-25 09:47:04 +00:00
Arun Raghavan
45f8ece06e stream: Make it easier to enable debug output
This is only useful while hacking on PulseAudio.
2013-03-25 09:47:04 +00:00
Arun Raghavan
994f8fac1f core: Fix up some debug logging
Replaces some debugging-only pa_log() calls with pa_log_debug() so we
only get spammed while debugging if we want to be.
2013-03-25 09:47:04 +00:00
Robin H. Johnson
088ed8a8d6 rtp: Introduce source IP configuration
On a multi-homed system, the user may wish RTP to be used only on
specific interfaces. The default binding of 0.0.0.0 for the source
address causes SAP multicast on all interfaces, which is not ideal.

Introduce a new module argument, that allows selection of the source IP,
and thus interface.

(changes in v2: s/srcip/source_ip)

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2013-03-25 09:47:04 +00:00
Robin H. Johnson
d18c3664b5 rtp: rename modarg destination to destination_ip
The module argument 'source' already has special meaning as the
pa_source, however, the argument 'destination' expects an IP address.

Prior to introducing a source IP modarg for the source IP address,
rename the 'destination' argument to 'destination_ip'. Include
compatibility support for old RTP users so they don't need to change
their module usage immediately.

(changes in v2: minor formatting fixes, s/dstip/destination_ip)

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2013-03-25 09:47:04 +00:00
Robin H. Johnson
ce0294ccf2 rtp: Cleanup variable naming.
Before introducing new functionality, clarify the variable names

dest -> dst_addr
sa[46] -> dst_sa[46]
sap_sa[46] -> dst_sap_sa[46]

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2013-03-25 09:47:04 +00:00
Arun Raghavan
93a4a82bd3 tests: Minor alsa-time-test improvments
Tries to get RT privs and prints elapsed time and a periodic header to
make grokking the output easier.
2013-03-25 09:47:04 +00:00
David Henningsson
c6806efb09 tests: Add tests for alsa-mixer paths
It checks all files in the mixer/paths directory and checks
 - that the file can be parsed without errors
 - that the file is actually shipped in the makefile

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-25 08:30:32 +01:00
David Henningsson
1a3f800799 alsa-mixer: Support more phantom jacks
It's fairly uncommon, but it happens that jack detection is enabled
for some reason, e g hardware design. In that case, we cannot use
jack detection, but we can still use the hint to pick up that there
is a path.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-25 08:30:32 +01:00
David Henningsson
560ce5ece0 alsa-mixer: Add path for Headset Microphone
In kernel 3.10, some devices will have the "Headset Microphone" name
to indicate that the mic is part of a mic + headphone combo, i e, a headset.
2013-03-25 08:30:32 +01:00
Yuri Chornoivan
ff828a83c1 Update Ukrainian translation. 2013-03-23 16:40:47 +02:00
Tanu Kaskinen
34fa29bd06 Revert "conf-parser: Remove redundant feof() call"
This reverts commit 6733caf114.

Apparently, the EOF bit gets set only after there has been an attempt
to read more data than the file contains, so just reading the last
byte isn't sufficient.
2013-03-23 08:38:43 +02:00
Tanu Kaskinen
6733caf114 conf-parser: Remove redundant feof() call
fgets() returns NULL in case there's an error or f is at EOF. The
while condition just checked that f is not at EOF, therefore an error
must have happened.
2013-03-22 21:14:08 +02:00
Tanu Kaskinen
259be540e3 loopback: Flush asyncmsgq from the right context
u->asyncmsg is accessed from two IO threads. teardown() shouldn't
flush the queue from the main thread while both IO threads are still
potentially using the queue. This patch fixes that error by flushing
the queue from the sink input thread when the sink input is being
unlinked.

Flushing the queue in teardown() caused this assertion in
pa_asyncmsgq_get() to crash sometimes: pa_assert(!a->current)
2013-03-22 20:49:56 +02:00
Tanu Kaskinen
ee0a5d5014 filter-apply: Fix segfault with moving streams
process() may be called with a stream that doesn't have its sink/source set.
This can happen if the proplist change callback is called when the stream is
moving.
2013-03-22 20:49:47 +02:00
Tanu Kaskinen
f8b57af2c8 loopback: Fix segfault in may_move_to() callbacks
The sink input may_move_to() callbacks can be called while the source
output is not connected to any source (i.e. is currently moving too),
and vice versa.

Thanks to Frédéric Dalleau for reporting this bug.
2013-03-22 20:44:52 +02:00
David Henningsson
2135b2b34f sink-input: Make sure the process_underrun callback is cleared
Otherwise sink unlinking could cause a segfault.

Reported-by: heftig
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-21 18:25:09 +01:00
Tanu Kaskinen
a560cf3b67 pacat: Fix mode detection for parecord
Due to the missing "else", parecord was interpreted as parec, causing
the raw flag to be set when it shouldn't have been set.
2013-03-21 12:35:07 +02:00
David Henningsson
c0d1b1e75f tests: Move ipacl-tests to TESTS_norun
ipacl-test fails if there is no SSH server running on your machine.
Since it is not a PulseAudio error not to have an SSH server running,
this test should not be run as part of the "make check" test suite.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-20 12:08:23 +01:00
David Henningsson
e87eb85474 core, alsa: Better drain reporting
Previously, a drain request was acknowledged up to two hw buffers
too late, causing unnecessary delays.

This implements a new chain of events called process_underrun
which triggers exactly when the sink input has finished playing,
so the drain can be acknowledged quicker.

It could later be improved to give better underrun reporting to
clients too.

Tested-by: Dmitri Paduchikh <dpaduchikh@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-20 11:55:42 +01:00
poljar (Damir Jelić)
ada92732f0 zsh-completion: Fix pacat completion.
pacat --format needs = (--format=).
Also pacat should complete files firstly and command line arguments
secondly.
2013-03-18 21:28:21 +02:00
poljar (Damir Jelić)
d127e801dc zsh-completion: Add support for the new pactl commands.
This adds support for set-(sink|source)-default completion and adds
toggle to the supported arguments for the mute command.
2013-03-18 21:25:59 +02:00
poljar (Damir Jelić)
993e756e13 zsh-completion: Add support for remote servers.
This patch adds support for completion of remote PulseAudio server
arguments it also suppresses error messages when unable to connect to
PulseAudio (only for the completion function).
2013-03-18 21:25:56 +02:00
Tanu Kaskinen
f5f77a90cf alsa: Add configuration for NI Traktor Audio 2
Mostly written by Jaroslav Janukevic.
2013-03-14 14:04:41 +02:00
Marc-Antoine Perennou
874bceb84d port to gtk+-3.0
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2013-03-13 18:22:28 +02:00
Tanu Kaskinen
7e1ebf9455 pulse: Document the operation state behavior on context disconnection. 2013-03-13 16:10:16 +02:00
Tanu Kaskinen
759f82f17d ladspa: Use volume sharing.
The previous volume handling could cause ear damage: by default the
ladspa sink volume was 100%, and with flat volumes that would cause
the master sink volume to jump to 100% too.
2013-03-13 15:17:49 +02:00
Tanu Kaskinen
5619917207 udev: Add tsched_buffer_size module argument
This makes it easier to configure the buffer size.
2013-03-13 13:40:08 +02:00
Tanu Kaskinen
9849a21587 man: Remove reference to the .verbose CLI command
The .verbose metacommand was removed in commit
73eabece33 (in 2004!).

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=62270
2013-03-13 13:19:22 +02:00
Akihiro Tsukada
a3d1816f68 Bump the native protocol version
The previous AAC pass-through patch (commit: 53807e4a) introduced
a new encoding format type: PA_ENCODING_MPEG2_AAC_IEC61937,
which is mostly used in pa_format_info, but forgot to increment the
protocol version number. The version needs to be incremented, because
clients need some way of checking whether the server supports the new
encoding.
2013-03-13 12:56:37 +02:00
Tanu Kaskinen
dc68fcb33f ltdl-bind-now: Log an error in case of failures 2013-03-12 19:12:31 +02:00
Tanu Kaskinen
cfb609d4f6 module: Don't use lt_dlerror(), it's useless 2013-03-12 19:12:23 +02:00
David Henningsson
135afa28e7 bluetooth: Never allow microphone output ports
If we find a microphone output port, it is probably something else
than a microphone. Therefore label it "Bluetooth output" instead of
"Microphone".

Same goes for Headphones and Speakers, but in the other direction.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-08 18:23:41 +01:00
Mikel Astiz
0a280ceed7 bluetooth: Use form factor to set port name and description
Use the information provided by the form factor to decide which name and
description should be used during port creation.
2013-03-08 18:22:17 +01:00
Mikel Astiz
b394743fb3 bluetooth: Add specific form factor for phones
When a phone is paired, use PA_BT_FORM_FACTOR_PHONE to properly specify
its form factor.
2013-03-08 18:22:14 +01:00
Mikel Astiz
11d7a2d197 bluetooth: Use enum to represent form factors
Avoid using strings only to represent form factors in the bluetooth-util
API and instead use a new dedicated enum type: pa_bt_form_factor_t.
2013-03-08 18:22:11 +01:00
Stefan Huber
278ceb453f modules: Remove obsolete may_move_to callbacks
Some modules have source_output_may_move_to_cb() and
sink_input_may_move_to_cb() implemented that duplicate the default behavior.
Remove them.
2013-03-06 16:32:12 +02:00
Stefan Huber
1489c43acc modules: remove obsolete comment on PA_SOURCE_OUTPUT_DONT_INHIBIT_AUTO_SUSPEND 2013-03-06 01:42:07 +02:00