Quick tip for USB audio

I have a pair of USB soundcard speakers (Prestigo PSP1SI - £7 from TKMaxx) attached to my RPi3 Picroft and had the issue of input with an PSEye3 working, the response being published to the console but no sound coming from the speakers. I set the speakers to be the default with pactl set-default-sink although it does seem to take priority over the internal device - it’s at least showing as card 0 in aplay.
After narrowing debugging down to watching /var/log/mycroft-audio.log I spotted the error aplay: set_params:1239: Channels count non available - this basically means the device isn’t returning a channel to send output to.
Playing the tts wav file from the cache worked. Removing the default device setting from /etc/mycroft/mycroft.confsent output to the built in audio device. Playing with setting the device to variations of hw0 didn’t work.
After a bit more headscratching, I tried setting the device to sysdefault and it worked, so play_wav_cmdline in /etc/mycroft/mycroft.conf now looks like this:
"play_wav_cmdline": "aplay -D sysdefault %1"
Your mileage may, of course, vary, but that seems something to try if you have the same problem. It may not survive reboots so I probably need to configure an .asoundrc but it’s working at the moment.

1 Like