mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-16 08:56:40 -05:00
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> |
||
|---|---|---|
| .. | ||
| daemon | ||
| modules | ||
| pulse | ||
| pulsecore | ||
| tests | ||
| utils | ||
| .gitignore | ||
| depmod.py | ||
| Makefile.am | ||
| map-file | ||
| meson.build | ||