RaspberryPi3 - Pulse Audio not seeing USB soundcard

Hi all,

I’m currently dealing with an issue with my Raspberry Pi 3 where my USB sound card doesn’t appear in Pulse Audio on bootup. It will only show up if I unplug and re-plug it back into the Pi. I use the card to capture audio and process it with a piece of software called TwoToneDetect which to the best of my knowledge requires PulseAudio to function. When I use pavucontrol to check sound inputs the card will not show up as an input or output device and only a dummy output device is shown. Again if I kill pulse audio using ‘killall pulseaudio’ or physically disconnect and reconnect the sound card, it will begin to show in pavucontrol and function with PulseAudio.

Any help would be much appreciated… I’m using UbuntuMate 16.04

Thanks,
Ryan

This to me sounds like mostly stemming from boot order. The fact killing PA works suggests to me that the phenomenon finds its origin in PA simply not seeing the sound device as PA is started during boot.

Not too sure what to do about fixing this particular phenomenon though. Had a look at anything PA configuration related that might do the trick but couldn’t find anything at short notice.

A crude but effective workaround would be to kill PA a fixed interval after boot. It’ll simply be restarted and then will properly accept the device.

A script along the lines of:

#!/bin/sh
sleep 20;
killall pulseaudio

Increase the 20 to a higher number if 20 seconds proves to be too short of an interval.

Added to the startup applications this would probably do the trick but it’s a bit of a nasty hack, in my own opinion.

Thanks,

I've been messing with this and beating my head over my desk for a few days and I think your solution may be the only option.

I run a number of scripts via crontab and I'm thinking I may just set a sleep time on them and run the 'killall pulseaudio' first then have the other scripts wake and fire TwoToneDetect and sox recording.

I appreciate the help.

Ryan