I use Jetson Nano as an online prediction system for audio data and I have encountered the following problem:
An audio stream (PyAudio) is starting just after a boot and sometimes it is blocked and does not send any data. During that blockade I am not able to record even in Audacity. More than that, it could happen after a few hours of working. I have noticed that it is always preluded by the following log in /var/log/syslog:
Jan 8 14:55:17 alpha-desktop kernel: [ 39.657424] tegra-xusb 70090000.xusb: WARN: buffer overrun event on endpoint
Jan 8 14:55:18 alpha-desktop kernel: [ 39.676556] tegra-xusb 70090000.xusb: WARN: buffer overrun event on endpoint
...
[many lines like above]
...
Jan 8 14:55:18 alpha-desktop kernel: [ 41.302375] tegra-xusb 70090000.xusb: WARN: buffer overrun event on endpoint
Jan 8 14:55:18 alpha-desktop pulseaudio[4401]: [alsa-source-USB Audio] alsa-source.c: Error opening PCM device hw:2: Device or resource busy
When working with same setup, I encountered same problems. Sometimes stream is totally blocked and what is weird, is that there are situations where stream in blocked once and after restarting applications using audio input, everything is working well. However there are situations when stream keeps blocking after each applications’ restart. Anything from Audio troubleshooting seems to have no effect and problem remains the same, also disabling pulseaudio corrupting input signal.
Are you using pulseaudio for audio capture? If not can you try …
Listing the audio sources for pulseaudio by …
$ pacmd list-sources
The default source will be indicated by a ‘*’ next to the soundcard ‘index’. I would expect that the default is pointing to your USB device and if that is the case. In my case, with a USB headset connected I see …
Then see if you see any more problems with pulseaudio trying to use the USB device. Note that you can also set the default device in /etc/pulse/default.pa as described here so that it always defaults to the same device …