USB Audio Not Working
-
I have followed numerous tutorials (incl https://retropie.org.uk/docs/Sound-Issues/) and still am unable to get audio out of my external USB Audio interface when running games in Amiberry.
In terminal, I can successfully runspeaker-test -c2 -D plight:1,0
This generates white noise through the headphone output
In RetroPi, under sound settings I have the following:
Audio Card = DEFAULT
Audio Device = MASTER
OMX Player Audio Device = ALSA: HW:1,0NB - System Volume is always at 0% and keeps resetting to that if I change it
But when I load a game in Amiberry, there is no audio
HELP!!!!
Huge thanks in advance
-
Please add some info about your setup, as detailed in https://retropie.org.uk/forum/topic/3/read-this-first.
Did you disable the on-board audio on the Pi ? -
@mitu
Raspberry Pi 400 running RetroPi 4.7.15 (I think! Just ran an update)Powered via USB into powersupply
USB Devices attached are a USB Audio Adapter bought from PiHut (https://thepihut.com/products/usb-audio-adapter-works-with-raspberry-pi)
I have updated the /config.txt file with the following:
#dtparam=audio=on
dtparam=audio=off -
@fentimanj If the on-board audio was disabled, then the USB soundcard should be the only audio output and should be selected by default by any program that uses ALSA.
Make sure you don't have any
$HOME/.asoundrc
file (remove the file if it exists) and try again to use Amiberry.
For EmulationStation, the configuration should be similar to https://retropie.org.uk/docs/Sound-Issues/#step-3-choosing-the-audio-device-mixer. The Audio Card should be set to 'default' and the Audio Device to whateveramixer scontrols -D default
reports. -
@mitu Thank you for this - it's really helpful
When I execute:
amixer scontrols -D default
I get the following error:amixer: Mixer attach default error: No such file or directory
-
@fentimanj said in USB Audio Not Working:
When I execute: amixer scontrols -D default
Can you run
aplay -l aplay -L
and post the output ?
Did you follow the documentation on the Adafruit site and modified any config files after installing the USB sound card (e.g. modified/etc/asoundrc
oralsa.conf
) ? -
I've checked and don't have either of those files in /etc.
And no, I didn't follow any Adafruit documentation when installaplay -l
**** List of PLAYBACK Hardware Devices **** card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0
aplay -L
null Discard all samples (playback) or generate zero samples (capture) default output sysdefault:CARD=Device USB Audio Device, USB Audio Default Audio Device front:CARD=Device,DEV=0 USB Audio Device, USB Audio Front speakers surround21:CARD=Device,DEV=0 USB Audio Device, USB Audio 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=Device,DEV=0 USB Audio Device, USB Audio 4.0 Surround output to Front and Rear speakers surround41:CARD=Device,DEV=0 USB Audio Device, USB Audio 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=Device,DEV=0 USB Audio Device, USB Audio 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=Device,DEV=0 USB Audio Device, USB Audio 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=Device,DEV=0 USB Audio Device, USB Audio 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers iec958:CARD=Device,DEV=0 USB Audio Device, USB Audio IEC958 (S/PDIF) Digital Audio Output dmix:CARD=Device,DEV=0 USB Audio Device, USB Audio Direct sample mixing device dsnoop:CARD=Device,DEV=0 USB Audio Device, USB Audio Direct sample snooping device hw:CARD=Device,DEV=0 USB Audio Device, USB Audio Direct hardware device without any conversions plughw:CARD=Device,DEV=0 USB Audio Device, USB Audio Hardware device with all software conversions
-
Based on this output, I think you'd need to set in EmulationStation the
Audio Card
to Device.To get the name of the mixer (volume control), run
amixer scontrols -c Device
and choose the 1st entry and set it as Audio Device. For instance, in my case, the USB audio card is named 'Controller':
amixer scontrols -c Controller Simple mixer control 'PCM',0 Simple mixer control 'Headset',0
I would use PCM as the AudioDevice settings in
~/.emulationstation/es_settings.cfg
:<string name="AudioCard" value="Controller" /> <string name="AudioDevice" value="PCM" />
This should fix the audio not working (or the volume slider rather) in EmulationStation.
For Amiberry, I'm not sure why it's not working - maybe it's trying to use the 'default' card and it's not working ?
Try following the advice here and create a
/home/pi/.asoundrc
file containingdefaults.pcm.!card 1 defaults.ctl.!card 1
-
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.