Commit graph

7122 commits

Author SHA1 Message Date
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
Stefan Huber
83a64ff7b4 virtual-source: remove redundant checks and callbacks
- do not check pa_xnew0()'s return value
- remove redundant source_output_process_msg_cb()
2013-03-06 01:41:19 +02:00
Stefan Huber
b5226992d4 modules: add module-remap-source 2013-03-05 23:20:13 +02:00
David Henningsson
544d01721e default.pa: Load module-jackdbus-detect with channels=2 by default
There was a recent thread on Linux Audio Users mailinglist about
whether to do so or not, and it looks like most people would prefer
having a stereo default (but even better would have been a
module-jack-card where you can easily set channels/profiles on the fly).

Reference:
http://lists.linuxaudio.org/pipermail/linux-audio-user/2013-February/091068.html

Reported-by: Kaj Ailomaa <zequence@mousike.me>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-01 13:01:33 +01:00
Tanu Kaskinen
773ca81dea format: Add #defines for enum values 2013-02-22 14:25:36 +02:00
David Henningsson
fd3a4e588c alsa-card: Make ELD monitor name a port property
If there is a proper monitor name, we expose this as a device.product.name
property on the port. This can be useful for UIs who might want to show
this name.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-02-19 20:45:38 +02:00
David Henningsson
bf487f0ffa alsa-mixer: Add possibility to configure ELD device
The alsa mixer kcontrol has "device index" 3, 7, 8, and 9.
We need to configure this properly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-02-19 20:14:40 +02:00
David Henningsson
eaa893d7d1 alsa-util: Add a function to read ELD info
Currently, this function only reads the monitor name, but could
be extended to read e g supported formats as well.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-02-19 20:10:16 +02:00
Mikel Astiz
a40d83a472 card: Set initial profile availability state
Commit afd33da56a introduces this new
flag but the default initial value is missing, considering that
pa_xmalloc is used to allocate the memory.
2013-02-19 19:31:54 +02:00
Mikel Astiz
2f0f07a755 bluetooth: Fix assertion failure if BlueZ crashes during GetProperties
If BlueZ crashes exactly while PulseAudio waits for the GetProperties reply, the
device has already been removed from the hashmap and therefore an assertion
failure is experienced.

The solution consists of ignoring the reply in these cases.

The problem can be observed in the following traces:

D: [pulseaudio] bluetooth-util.c: Bluetooth daemon appeared.
D: [pulseaudio] bluetooth-util.c: dbus: interface=org.bluez.Manager, path=/, member=AdapterAdded
D: [pulseaudio] bluetooth-util.c: Adapter /org/bluez/497/hci1 created
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/HFPAG on adapter /org/bluez/497/hci1.
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/HFPHS on adapter /org/bluez/497/hci1.
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/A2DPSource on adapter /org/bluez/497/hci1.
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/A2DPSink on adapter /org/bluez/497/hci1.
D: [pulseaudio] bluetooth-util.c: dbus: interface=org.bluez.Adapter, path=/org/bluez/497/hci1, member=DeviceCreated
D: [pulseaudio] bluetooth-util.c: Device /org/bluez/497/hci1/dev_90_84_0D_B2_C7_04 created
D: [pulseaudio] bluetooth-util.c: dbus: interface=org.freedesktop.DBus, path=/org/freedesktop/DBus, member=NameOwnerChanged
D: [pulseaudio] bluetooth-util.c: Bluetooth daemon disappeared.
E: [pulseaudio] bluetooth-util.c: Assertion 'p->call_data == d' failed at modules/bluetooth/bluetooth-util.c:685, function get_properties_reply(). Aborting.
2013-02-19 19:30:17 +02:00
Mikel Astiz
90ae777500 bluetooth: Fix possible adapter duplicates
The D-Bus signal AdapterAdded can be received during our call to
GetProperties(), before the reply is received. In this case, the adapter
will be listed twice and thus the endpoint registration will fail with
"AlreadyExists" as follows:

D: [pulseaudio] bluetooth-util.c: dbus: interface=org.bluez.Manager, path=/, member=AdapterAdded
D: [pulseaudio] bluetooth-util.c: Adapter /org/bluez/21220/hci0 created
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/HFPAG on adapter /org/bluez/21220/hci0.
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/HFPHS on adapter /org/bluez/21220/hci0.
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/A2DPSource on adapter /org/bluez/21220/hci0.
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/A2DPSink on adapter /org/bluez/21220/hci0.
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/HFPAG on adapter /org/bluez/21220/hci0.
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/HFPHS on adapter /org/bluez/21220/hci0.
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/A2DPSource on adapter /org/bluez/21220/hci0.
D: [pulseaudio] bluetooth-util.c: Registering /MediaEndpoint/A2DPSink on adapter /org/bluez/21220/hci0.
E: [pulseaudio] bluetooth-util.c: RegisterEndpoint() failed: org.bluez.Error.AlreadyExists: Already Exists
E: [pulseaudio] bluetooth-util.c: RegisterEndpoint() failed: org.bluez.Error.AlreadyExists: Already Exists
E: [pulseaudio] bluetooth-util.c: RegisterEndpoint() failed: org.bluez.Error.AlreadyExists: Already Exists
E: [pulseaudio] bluetooth-util.c: RegisterEndpoint() failed: org.bluez.Error.AlreadyExists: Already Exists
2013-02-18 19:50:37 +02:00
Stefan Huber
163430f05b echo-cancel: Enable different sample specs for rec and out stream
Enable advanced AEC methods to use different specs (i.e., number of
channels) for rec and out stream. A typical application is beam forming
resp. multi-channel AEC, which takes multiple record channels to produce
an echo-canceled output stream.
This commit alters the EC API as follows: the EC's init() used to get
source and sink's sample spec/channel map. The new interface renamed
source to rec and sink to play and additionally passes sample spec and
channel map of the out stream. The new parameter names of init()
{rec,play,out}_{ss,map} are more intuitive and also resemble to the
parameter names known from run(). Both rec_{ss,map} and out_{ss,map} are
initialized as we knew it from source_{ss,map} before being passed to
init(). The previous EC implementations only require trivial changes,
i.e., setting rec_{ss,map} to out_{ss,map} at the end of init() in case
that out_{ss,map} is modified in init().
2013-02-18 19:16:40 +02:00
Mikel Astiz
17b3cb954b bluetooth: Merge all ports into "bluetooth-input" and "bluetooth-output"
The card profile availability flag already provides all the necessary
information and therefore all Bluetooth ports can be merged, leaving
the two generic ones only: "bluetooth-input" and "bluetooth-output". The
availability of these port now represents whether the device is
streaming audio, with the following mapping:
- PA_AVAILABLE_UNKNOWN: some profile connected but not streaming
- PA_AVAILABLE_NO: no profiles connected
- PA_AVAILABLE_YES: some profile streaming (regardless of which)

Each port's flag represents the profiles with the corresponding I/O
capabilities (pa_direction_t).
2013-02-18 18:39:12 +02:00
Mikel Astiz
d776416709 bluetooth: Use profile availability to auto-switch profiles
Use the card profile availability flag instead of port availability in
order to automatically switch profiles, for example when a paired phone
starts streaming A2DP audio.
2013-02-18 18:02:39 +02:00
Mikel Astiz
966a827d77 bluetooth: Expose card profile availability
Use the transport's state to not only update the ports availability, but
also to update the card profile availability flag. The interpretation is
as follows:
- PA_AVAILABLE_UNKNOWN: BT profile is connected but no audio streaming
- PA_AVAILABLE_NO: BT profile disconnected
- PA_AVAILABLE_YES: BT profile connected and audio streaming
2013-02-18 17:48:43 +02:00
Mikel Astiz
cfa79a84fc cli: Show card profile availability status
Expose the newly added card profile availability in pacmd.
2013-02-18 17:40:24 +02:00