Commit graph

2559 commits

Author SHA1 Message Date
Juho Hämäläinen
ae415b07a0 dbus: Use hooks for module new and removed events 2015-05-21 10:24:16 +02:00
Juho Hämäläinen
7e0d0b8b00 dbus: Use hook for sample cache proplist changes 2015-05-21 10:20:35 +02:00
Juho Hämäläinen
4e8a62c3c2 dbus: Use hooks for sample cache new and removed events 2015-05-21 10:17:26 +02:00
David Henningsson
5598923b8e alsa-mixer: Make line out path unavailable when "Front Headphone" is plugged in
This case was apparently overlooked.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-05-05 16:48:11 +02:00
Tanu Kaskinen
2737985f27 oss: Use the correct fd when interacting with the mixer
Adapted from a FreeBSD patch:
http://svnweb.freebsd.org/ports/head/audio/pulseaudio/files/patch-src_modules_oss_module-oss.c?revision=372768&view=markup
2015-04-30 13:21:02 +03:00
Arun Raghavan
3f0ab4522a udev: Deal with unavailable bus property
Fixes a compiler warning:

../../src/modules/udev-util.c: In function 'pa_udev_get_info':
../../src/modules/udev-util.c:228:443: warning: 'bus' may be used uninitialized in this function [-Wmaybe-uninitialized]
         if (!pa_streq(bus, "firewire") && (v = udev_device_get_property_value(card, "ID_MODEL_FROM_DATABASE")) && *v)
2015-04-13 08:35:53 +05:30
Andrey Zholos
492fa1ff32 detect: Fix OSS device detection with long names
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89921
2015-04-13 08:32:16 +05:30
David Henningsson
6db74fc3c7 alsa-mixer: Add paths/ports for multichannel profile
This makes the GUIs (e g gnome/unity-control-center) look more consistent
with other inputs/outputs that also have ports.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-04-10 16:08:24 +02:00
David Henningsson
02dc6d84ed alsa-mixer: Use separate profiles for Multichannel Input/Output
This works around bug 80850: a mapping can only have one channel map,
and in case of a 6-out 10-in device, the mapping will be adjusted to
have both 10 and 6 channels, which does not work.

Reported-by: Benjamin Tegge <benjaminosm@googlemail.com>
Suggested-by: Raymond Yau <superquad.vortex2@gmail.com>
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=80850
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-04-10 16:08:24 +02:00
Takashi Sakamoto
3ac73598c6 udev: use ID_MODEL/ID_VENDOR to give friendly name for FireWire devices
For recently supported FireWire sound devices, udev's database assign
the name of IEEE 1394 Phy/Link chipset to ID_XXX_FROM_DATABASE. This is
not friently names to users.

This commit applies a workaround to skip ID_XXX_FROM_DATABASE for any
FireWire devices.

[Fixed up by David Henningsson <david.henningsson@canonical.com>]

Reported-by: Andras Muranyi <muranyia@gmail.com>
Reference: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1381475
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-04-10 16:08:24 +02:00
David Henningsson
37a7834737 module-switch-*: use pa_module_hook_connect
Refactoring, no functional change.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-04-10 09:26:49 +02:00
David Henningsson
10d9d8af5f module-filter-*: use pa_module_hook_connect
Refactoring, no functional change.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-04-10 09:26:47 +02:00
David Henningsson
6eae0d4bf4 module-alsa-card: use pa_module_hook_connect
Refactoring, no functional change.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-04-10 09:26:45 +02:00
David Henningsson
a5ea142487 module-suspend-on-idle: use pa_module_hook_connect
Refactoring, no functional change.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-04-10 09:26:43 +02:00
David Henningsson
619def0c73 module-*-restore: use pa_module_hook_connect
Refactoring, no functional change.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-04-10 09:26:40 +02:00
Juho Hämäläinen
42eac216cf dbus: Use hooks for default sink and source changes
[Fixes by David Henningsson <david.henningsson@canonical.com>]
2015-04-02 16:19:20 +02:00
Juho Hämäläinen
3bb69ebfc2 dbus: Use hooks for put and unlink
Use hooks for all events that have core hooks defined. Some events
handled in iface-core don't have hooks so leave those for later.
2015-04-02 16:12:15 +02:00
Juho Hämäläinen
86fcc3f445 dbus: Use state changed hook for sink-input and source-output rate changes 2015-04-02 16:09:16 +02:00
Juho Hämäläinen
7f83817edd dbus: Use hooks for sink-input and source-output events 2015-04-02 16:08:51 +02:00
Juho Hämäläinen
5087af78d5 dbus: Use hooks for sink and source events 2015-04-02 16:08:26 +02:00
Juho Hämäläinen
36c3f01cb2 dbus: Use hooks for client proplist changes 2015-04-02 16:08:00 +02:00
Juho Hämäläinen
c324255e3e dbus: Use hooks for card profile events 2015-04-02 16:06:50 +02:00
René J. V. Bertin
5f24529316 coreaudio: Change error type to OSStatus
CoreAudio routines that return an error status do so with the
OSStatus type, which is not a UInt32: typical OS X errors are
negative numbers.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-04-01 09:43:05 +02:00
Hui Wang
c36e191ce5 lfe-filter: change the crossover frequency as a parameter
Add a user defined parameter lfe-crossover-freq for the lfe-filter,
to pass this parameter to the lfe-filter, we need to change the
pa_resampler_new() API as well.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2015-03-30 10:52:30 +02:00
Sagar Nageshmurthy
ff329cdabb Fix: Prevent calling pa_rtpoll_free() for a NULL rtpoll
Flushing the asyncmsgq can cause arbitrarily callbacks to run, potentially
causing recursion into pa_thread_mq_done again. Because of this; rtpoll which
is cleared in the second iteration is tried to free once again by the first
iteration leading to PA crash.
2015-03-27 14:34:15 +01:00
Tanu Kaskinen
85f5d93306 ucm: Add support for "JackControl"
JackControl is used to indicate the kcontrol name for jack detection.
2015-03-23 19:26:03 +02:00
Peter Meerwald
037fdf485f tagstruct: Distinguish pa_tagstruct_new() use cases
pa_tagstruct_new() is called either with no data, i.e. (NULL, 0)
to create a dynamic tagstruct or with a pointer to fixed data

introduce a new function pa_tagstruct_new_fixed() for the latter case

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-02-26 23:23:17 +01:00
Alexander E. Patrakov
7c223a6565 echo-cancel: fix the obviously-wrong "buffer+=buffer" logic
Same bug as in module-loopback, pointed out by Georg Chini in a private
email.

Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
2015-02-26 10:00:17 +05:30
Tanu Kaskinen
006bf0fb34 alsa: Don't access pa_sink/source_new_data after done() has been called
This change doesn't affect behaviour, because accessing boolean fields
in the new data was safe even after the done() call, but it was still
bad style.
2015-02-23 20:11:26 +02:00
Peter Meerwald
2dca000215 alsa: Fix spelling of officially
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-02-23 16:37:52 +01:00
Alexander E. Patrakov
aa3a27d5cd module-loopback: don't use 0 for custom source output message id
Message id 0 is PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY. So, every time PulseAudio
sent PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY message to the loopback source output,
it actually hit the SOURCE_OUTPUT_MESSAGE_LATENCY_SNAPSHOT handler instead. As a
result, the SOURCE_OUTPUT_MESSAGE_LATENCY_SNAPSHOT handler was called when not
intended, the default PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY handler was not called
at all, and the latency was thus evaluated incorrectly.

Reported-by: Georg Chini <georg@chini.tk>
Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
2015-02-16 15:02:12 +01:00
David Henningsson
838742b06e alsa-util: Make two of the warnings "debug" instead of "error"
...because we will later try with plug:* which will probably succeed,
so this is not an error.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-02-16 10:41:54 +01:00
Peter Meerwald
55a25246ee alsa-util: No logging when sound card only supports non-interleaved sample format
as suggested by
https://bugs.freedesktop.org/show_bug.cgi?id=84804

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2015-02-16 10:35:45 +01:00
Tanu Kaskinen
82ec47898e alsa: Don't try to use ELD controls with UCM
This fixes a crash that occurred when trying to access non-existent
port data. Doing this:

    pa_alsa_port_data *data = PA_DEVICE_PORT_DATA(port);

is not a good idea when using UCM, because in the UCM mode ports don't
have any data, so the data pointer points to some random memory.
2015-02-12 15:06:59 +02:00
Georg Chini
d6ef0ec3dc loopback: Don't push zero-sized block to memblockq
During my work on module-loopback I found a bug that sometimes crashes pulse when
module-loopback is loaded due to pushing a zero-length block into the memblockq.
As there is a one-line fix I thought you might want it for 6.0.
2015-02-02 13:17:35 +02:00
David Henningsson
5cc3d4aa9d alsa-mixer: Make speaker unavailable when Line Out is plugged in
ALSA mutes speaker when Line Out is plugged in by default, so
we should follow that convention.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-01-29 10:24:35 -05:00
Tanu Kaskinen
f75335f25c alsa-mixer: Add lineout to surround21 mappings
This makes the analog-surround-21 mapping consistent with other
surround mappings. I'm not sure if this makes any practical
difference, though.
2015-01-29 10:18:41 -05:00
David Henningsson
bf53143387 module-device-restore: Fix memory leak in read_sink_format_reply
This function could sometimes leak a perportentry.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-01-29 10:18:38 -05:00
Ondrej Holecek
5effc83479 update FSF addresses to FSF web page
FSF addresses used in PA sources are no longer valid and rpmlint
generates numerous warnings during packaging because of this.
This patch changes all FSF addresses to FSF web page according to
the GPL how-to: https://www.gnu.org/licenses/gpl-howto.en.html

Done automatically by sed-ing through sources.
2015-01-14 22:20:40 +02:00
David Henningsson
9d0a5b5cb7 alsa-mixer: Mute headphones and speakers on line out path
When line out path is active, we want to mute speakers for obvious
reasons, and headphones to avoid volume spikes.

Reported-by: TienFu Chen <tienfu.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2015-01-13 13:58:01 +01:00
Boris Egorov
1931e40b1c tunnel: use proper value for pa_source_state switch
pa_source_state_t can have value PA_SOURCE_INVALID_STATE, not
PA_SINK_INVALID_STATE. It happens to be the same here, but it can break
sometimes.

Issue detected by PVS Studio.
2015-01-13 11:27:46 +01:00
Boris Egorov
3e6ce485f0 alsa-util: fix parenthesis position in err assignment
Issue detected by CppCheck and PVS Studio
2015-01-13 11:27:46 +01:00
Tanu Kaskinen
e0e0ebb03f tunnel-sink-new: Fix stale audio on resume
I noticed that when resuming the tunnel sink, there was a small amount
of previously played audio before the new audio started to play.
Normally that probably wouldn't be noticeable, because there would be
a few seconds of silence played before suspending the sink due to
inactivity, so the unwanted old audio would be just silence, but in my
configuration sinks are suspended immediately when there's nothing
playing to them, so the glitch becomes audible.
2015-01-02 14:33:05 +02:00
Alexander E. Patrakov
6e4e8621a6 Fix URLs still pointing to the old wiki
Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
2014-12-22 12:59:23 +02:00
Tanu Kaskinen
1d3fd4f862 card-restore: Fix profile restoring with bluetooth
The bluetooth card is created when the first profile becomes
available, which means that the card may have profiles that are not
available when the card is initialized. If module-card-restore tries
to restore such profile, that will fail, and the card will be
initialized with the "off" profile active.

This patch modifies module-card-restore so that if follows the profile
availability status, and when the saved profile becomes available, it
is activated. Additionally, module-card-restore is modified so that it
doesn't even try to restore unavailable profiles, when the necessary
information is available. In practice there are two existing places
where the profile is restored, and only one of those contexts has the
necessary information available. Unfortunately, it's the more
important context (card creation) where the information is not
available. This means that module-card-restore will set the initial
profile of a new card even if the profile is unavailable, and this
will cause an ugly warning in the log, even though there's nothing
abnormal happening.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=87081
2014-12-19 11:51:13 +01:00
David Henningsson
de1e78a47c bluez5: Do not suspend on no -> unknown profile transitions
In case a transport is currently disconnected and transitions to
idle, that should not count as a "remote hang up" event.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-12-19 11:50:28 +01:00
Alexander E. Patrakov
e2a433b222 Warn on loading module-dbus-protocol
See also
https://www.mail-archive.com/ubuntu-audio-dev@lists.launchpad.net/msg00268.html

The warning may be useful for users who carried over the module-loading
statement from default configuration files shipped with old PulseAudio
versions.

Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
2014-12-08 14:23:53 +02:00
Jason Newton
162adb9873 module-equalizer-sink: remove erroneous fixme
pa_memblockq_drop is guaranteed to drop the chunk we just extracted from the
memblockq which internally unrefs the chunk.
2014-12-08 10:25:44 +01:00
Jason Newton
7201c9be98 module-equalizer-sink: use fftwf_free in all the right places
Several mallocs were made using fftwf_malloc and were erroneously freed by
pa_xfree. This patch corrects these calls of pa_xfree to fftwf_free.
2014-12-08 10:25:40 +01:00
Alexander E. Patrakov
d72cb78d4c Warn on loading module-equalizer-sink
See objections to the code in this email:

http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-March/020174.html
Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
2014-12-08 10:22:43 +01:00