I am using an external USB sound card with a Raspberry Pi Zero W. Once in a while (up to every few minutes when playing sound) it will stop playing and /var/log/syslog
logs this error:
May 21 22:52:04 music pulseaudio[14294]: [alsa-sink-USB Audio] alsa-util.c: Got POLLNVAL from ALSA
May 21 22:52:04 music pulseaudio[14294]: [alsa-sink-USB Audio] alsa-util.c: Could not recover from POLLERR|POLLNVAL|POLLHUP with snd_pcm_prepare(): No such device
May 21 22:52:04 music kernel: [175244.325496] usb 1-1: USB disconnect, device number 50
May 21 22:52:05 music pulseaudio[14294]: [alsa-sink-USB Audio] alsa-util.c: Unable to set sw params: No such device
May 21 22:52:05 music pulseaudio[14294]: [alsa-sink-USB Audio] alsa-sink.c: Failed to set software parameters: No such device
May 21 22:52:05 music kernel: [175245.275300] Indeed it is in host mode hprt0 = 00021501
May 21 22:52:06 music kernel: [175245.485152] usb 1-1: new full-speed USB device number 51 using dwc_otg
May 21 22:52:06 music kernel: [175245.485390] Indeed it is in host mode hprt0 = 00021501
May 21 22:52:06 music kernel: [175245.738077] usb 1-1: New USB device found, idVendor=1b3f, idProduct=2008, bcdDevice= 1.00
May 21 22:52:06 music kernel: [175245.738097] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 21 22:52:06 music kernel: [175245.738106] usb 1-1: Product: USB Audio Device
May 21 22:52:06 music kernel: [175245.738114] usb 1-1: Manufacturer: GeneralPlus
May 21 22:52:06 music kernel: [175245.768375] input: GeneralPlus USB Audio Device as /devices/platform/soc/20980000.usb/usb1/1-1/1-1:1.3/0003:1B3F:2008.0032/input/input49
May 21 22:52:06 music kernel: [175245.835815] hid-generic 0003:1B3F:2008.0032: input,hidraw0: USB HID v2.01 Device [GeneralPlus USB Audio Device] on usb-20980000.usb-1/input3
This is quite annoying as I have to restart pulseaudio every time this happens (I already have a script to scan the log for this and kill pulseaudio automatically...). Any idea what is happening here exactly (apparently the USB connection is dropped?) and how to make it more stable? I have tried two different USB sound cards and the error is the same :/