Commit graph

9094 commits

Author SHA1 Message Date
Georg Chini
acb02d9e88 sink, source: Call sink input suspend callback also on suspend cause change
Currently, virtual sinks and sources are not suspended when the master sink
or source is suspended. To implement this, the slave must be able to track
the suspend cause of the master.

With this patch, the sink input suspend callback will not only be called
when the sink or source is changing state, but also when the suspend cause
changes. Similar to the set_state_in_*_thread_cb() functions, the suspend
callback receives a state and a suspend cause as additional arguments.
Because the new state and suspend cause of the sink or source have already
been set, the old values are passed to the callback.
2019-03-25 05:16:15 +00:00
Georg Chini
f7b3537bbf alsa: Improve resume logic after alsa suspend
Currently, when a system is waking up from suspend, the resume process of the
ALSA sink and source is unstable. Sometimes the device needs to be restarted
multiple times and when the system was suspended between snd_pcm_mmap_begin()
and snd_pcm_mmap_commit(), pulseaudio crashes on resume.
Additionally, variables are not reset after the resume, so that sink/source
report wrong latencies.
This patch fixes the issues by closing and re-opening the PCM if recovery
from an error condition is not possible. Additionally, the variables are
reset, so that latencies are reported correctly.
2019-03-25 05:02:29 +00:00
Georg Chini
e794d0a21a loopback: Add option fast_adjust_threshold_msec
After a suspend/resume cycle of a system, it may be possible that module-loopback
accumulates several seconds of audio in the memblockq before the alsa sink becomes
active again. Also it may be possible for other reasons that the actual loopback
latency is too different from the target latency to be adjusted in a reasonable
time by the normal rate controller.
This patch adds the option fast_adjust_threshold_msec to module-loopback. If set,
the latency will be forcefully adjusted to the target latency by dropping or
inserting samples if the actual latency differs more than fast_adjust_threshold_msec
from the target latency.
Also the calculation of the real adjust time would fail when the system was
suspended because that case was not considered. Now the real adjust time
calculation is skipped if the time passed between two calls of adjust_rates()
appears significantly too long.
2019-03-25 04:46:07 +00:00
Piotr Drąg
4254d233ee Remove bad characters from Malayalam translation 2019-03-25 04:38:25 +00:00
Milo Casagrande
66b7379729 i18n: update Italian translation
Signed-off-by: Milo Casagrande <milo@milo.name>
2019-03-25 04:32:10 +00:00
Sangchul Lee
eec27ec686 core-util: Use size_t for out parameter of pa_split_*in_place()
pa_split_in_place() and pa_split_spaces_in_place() are modifed
to use size_t type instead of integer type.

alsa-ucm.c is revised according to this change.

Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
2019-03-19 11:42:19 +09:00
Tanu Kaskinen
c235acd787 build-sys: Lower the minimum gettext version
The old minimum version was set in commit 57e3ccaf51 based on what the
commit author happened to have installed at the time. Russell Treleaven
now confirmed that Debian 8's gettext version, 0.19.3, works fine too,
or at least PulseAudio builds without errors. There might be room to
lower the required version even further, but that requires someone to
test older gettext versions.
2019-03-14 21:23:30 +02:00
Tanu Kaskinen
904dd38003 alsa-mixer: improve a comment in udev rules
The word "identical" was being used in a weird way that could make the
comment a bit difficult to undertand.
2019-03-02 19:46:22 +02:00
Takashi Sakamoto
0d67e36655 alsa-mixer: distinguish Focusrite Saffire Pro 10 i/o from Liquid Saffire 56
In a former commit 37358e42c4 ("alsa: Suppress udev detection of sound
card for some units on IEEE 1394 bus"), PulseAudio has udev rules to
suppress handling some units on IEEE 1394 bus for a below issue:

Bug 199365 - repeating bus resets on Firewire bus with Focusrite Saffaire 26/io
https://bugzilla.kernel.org/show_bug.cgi?id=199365

However, I found that the rules match another model; Focusrite Liquid
Saffire 56. For detail, refer to below patch for Linux sound subsystem:

[alsa-devel] [PATCH] ALSA: bebob: use more identical mod_alias for
Saffire Pro 10 I/O against Liquid Saffire 56
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-February/146003.html

For PulseAudio, the udev rule should be improved, because Liquid Saffire 56
(an application of TCAT TCD2200 ASIC, a.k.a Dice Jr.) can be handled by
pulseaudio without the issue.

This commit changes udev rule with model name instead of model_id from
configuration ROM. Below is data on udevd for Liquid Saffire 56, for
your information:

$ udevadm info -q all -p /sys/bus/firewire/devices/fw1.0/sound/card2/
P: /devices/pci0000:00/0000:00:01.2/0000:03:00.2/0000:04:07.0/0000:0a:00.0/0000:0b:00.0/fw1/fw1.0/sound/card2
E: DEVPATH=/devices/pci0000:00/0000:00:01.2/0000:03:00.2/0000:04:07.0/0000:0a:00.0/0000:0b:00.0/fw1/fw1.0/sound/card2
E: ID_BUS=firewire
E: ID_FOR_SEAT=sound-pci-0000_0b_00_0
E: ID_ID=firewire-0x00130e04018001e9
E: ID_MODEL=LIQUID_SAFFIRE_56
E: ID_MODEL_FROM_DATABASE=XIO2213A/B/XIO2221 IEEE-1394b OHCI Controller [Cheetah Express]
E: ID_MODEL_ID=0x000006
E: ID_PATH=pci-0000:0b:00.0
E: ID_PATH_TAG=pci-0000_0b_00_0
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_INTERFACE_FROM_DATABASE=OHCI
E: ID_PCI_SUBCLASS_FROM_DATABASE=FireWire (IEEE 1394)
E: ID_SERIAL=0x00130e04018001e9
E: ID_SERIAL_SHORT=0x00130e04018001e9
E: ID_VENDOR=Focusrite
E: ID_VENDOR_FROM_DATABASE=Texas Instruments
E: ID_VENDOR_ID=0x00130e
E: SOUND_INITIALIZED=1
E: SUBSYSTEM=sound
E: SYSTEMD_WANTS=sound.target
E: TAGS=💺systemd:
E: USEC_INITIALIZED=9802422583

Fixes: 37358e42c4 ("alsa: Suppress udev detection of sound card for some units on IEEE 1394 bus")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2019-03-02 19:19:34 +02:00
Arun Raghavan
db788229c6 source: Fix a bad condition that made source events not be emitted
This broke during a refactor of sink/source state-change.
2019-02-19 09:30:34 +05:30
scootergrisen
86074557a2 Replace "!" to "." so string is identical with other string. 2019-02-16 11:31:24 +00:00
scootergrisen
4f8200a283 Change "!" to "." to match other identical string. 2019-02-16 11:23:06 +00:00
scootergrisen
a4264de3a8 channel/s to channel(s) 2019-02-16 11:11:58 +00:00
scootergrisen
dee7674c7f Remove space in "Digital Passthrough (IEC958)" 2019-02-16 11:03:45 +00:00
scootergrisen
8b6006c0c6 "e g " to "e.g." 2019-02-16 10:49:53 +00:00
scootergrisen
b1c82bbd31 Remove "module" from "module user requested module" 2019-02-16 10:19:36 +00:00
scootergrisen
108f4ab09b Add missing space 2019-02-16 10:08:49 +00:00
Georg Chini
a53b371a4f virtual-source: Fix crash in combination with module-loopback
Similar to module-tunnel-sink-new, module-virtual-source did not create
a rtpoll for the uplink sink. This lead to a crash when the uplink sink
was used by module loopback, because module-loopback relies on the sink
to provide a rtpoll. Additionally, the sink was not unlinked when the
module was unloaded.

This patch fixes both issues. The rtpoll created is never run by the sink,
so the patch is no real fix but just a workaround to make module-loopback
happy.
2019-02-15 19:33:24 +00:00
Russell Treleaven
7525cc8215 give users a template that encourages complete bug reports 2019-02-13 15:11:42 +00:00
João Paulo Rechi Vita
334ae350b4 card: Only fire the profile available changed hook for linked cards
pa_card_profile_set_available needs to check if the card is linked
before firing PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED, so callbacks
connected to it receive a fully initialized card object.

This fixes a crash introduced by commit 30a551bbc
"switch-on-port-available: Check if we need to change the active
profile".
2019-01-23 15:18:22 +00:00
Arun Raghavan
a5f25af043 protocol-native: Fix format ownership while creating record streams 2019-01-18 16:34:33 +00:00
Tanu Kaskinen
ff17374ffa bluez5-device: use correct RTP payload type
If one device tries to use PulseAudio to send audio over A2DP to another
device with bluez-alsa, that doesn't work because PulseAudio uses an
incorrect RTP payload type and bluez-alsa checks that the RTP payload
type is correct. According to the A2DP spec, the payload type should be
set to a number between 96 and 127.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/591
2019-01-17 14:43:39 +02:00
Arun Raghavan
9e0aa31f0a pactl: Fix some corner cases when setting sink formats
Mostly deals with failure more gracefully, and NULL-initialises the
format array for safety.
2019-01-16 09:39:24 +05:30
Arun Raghavan
24c389c8aa tests: Shorten how long daemon tests take to run
We split out some of the check-daemon tests that take a long time to
run, and also reduce how long we wait for the daemon to start up. This
should make the CI process quicker.
2019-01-16 09:39:24 +05:30
Arun Raghavan
39bc380c12 build-sys: Add the ability to disable maintainer mode
This allows us to disable automatically updating build system files in
case things change. This is desirable in the common case, but not
necessarily for CI, where we want the ability to take a build directory
as an artifact from one stage to the next (i.e. into a fresh checkout).
2019-01-16 09:39:24 +05:30
Diego Viola
2e755f012e memblockq: fix typo: yepp -> yep 2019-01-13 17:02:59 +00:00
Arun Raghavan
2eb8ec93a2 meson: Fix some config generation warnings 2018-12-27 17:35:56 +05:30
Arun Raghavan
a887cee1ce system.pa: Drop mention of module-hal-detect
We dropped HAL support years ago.
2018-12-27 17:34:19 +05:30
Arnaud Rebillout
dec21f363a meson: Add some platform specific configuration data
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
de44c8885d meson: Fix HAVE_AF_UNIX, add check for mkfifo function
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
12f0e9232f meson: Process and install files: default.pa, system.pa, daemon.conf, client.conf
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
bf3fbd5a8a meson: Sort the core dependencies a bit
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
1501314d59 meson: Display summary and warnings at the end of the meson configure step
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
1bc16204f4 meson: Typo in man/meson.build
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
8c07419406 meson: Add optional legacy-database-entry-format support
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
104b21f227 meson: Add optional libsamplerate support
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
b839d3fb59 meson: Add optional SoX Resampler support
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
b9a3437a5d meson: Add optional IPv6 support
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
6eba2f823d meson: Add optional Async NS support
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
35bd2e70f9 meson: Add optional GSettings support
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
639c54546d meson: Add optional Gtk+ support
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
4325393499 meson: Add optional libpulse-mainloop-glib
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
065a79ff8c meson: Add optional GLib support
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
5a6e45f5b4 meson: Add a sanity check regarding echo cancellers
Taken straight out of the configure.ac file.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
b28c4e9aea meson: Make Adrian echo canceller optional
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
4b17723928 meson: adrian-aec requires libm
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
7b748483a1 meson: Make webrtc optional
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
90eec5ab36 meson: Make hal-compat optional
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
912a62c561 meson: Make udev optional
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30
Arnaud Rebillout
fe6d0d382f meson: Make speex optional
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-12-27 17:25:56 +05:30