pulseaudio/src
Hui Wang ede8cbb131 alsa: make the unsuspend more robust
We met a weird situation on a couple of Lenovo machines and at least
on one Dell machine. First we open the gnome-sound-setting, then
suspend and resume the system, after the system resume back, the audio
devices change to dummy, the audio doesn't work anymore. And pacmd
list-cards shows no available sound card.

Through debugging I found after resume, the alsa receives POLLERR
events and it will call unsuspend to recover the pcm, but at that
moment, the device nodes in /dev/snd/ is not accessible, so the
snd_pcm_open() fails and the pulseaudio unload the module-alsa-card.

Here I add retry and pa_msleep if snd_pcm_open fails, I tested it on
all machines which have this problem, pa_msleep(25) is ok for most of
them, there is only one machine which needs to call pa_msleep(25)
twice, so for safety reason, I set the max retry times to 4.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2020-07-09 16:43:17 +08:00
..
daemon daemon: Add --log-target=journal to pulseaudio.service 2020-03-11 10:46:04 +00:00
modules alsa: make the unsuspend more robust 2020-07-09 16:43:17 +08:00
pulse device-port: add type member 2020-06-17 06:06:12 +00:00
pulsecore device-port: queue CARD CHANGE event before update default sink 2020-06-22 14:53:42 +00:00
tests Add a basic test suite for pa_hashmap 2020-06-22 14:39:14 +00:00
utils pactl: print device port type and available group 2020-06-17 06:06:12 +00:00
.gitignore .gitignore: add atomic-test 2019-06-15 11:14:33 +03:00
depmod.py update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
Makefile.am Add a basic test suite for pa_hashmap 2020-06-22 14:39:14 +00:00
map-file thread-mainloop: Add API for running a callback unlocked 2019-03-31 09:18:37 +00:00
meson.build meson: Remove libpulse dep from libpulsecore 2020-04-09 14:51:21 +00:00