How-to: Use USB Audio in Retropie v3.7
Posted: Thu May 12, 2016 9:06 pm
For those who's considering to go the USB audio route (vs. the PWM method), I've prepared this guide to help anyone who's at a loss on how to configure their Retropie installation for USB audio use. Note you'll need a USB keyboard attached or you can SSH into your system assuming you have configured it already for access within your home network.
Steps:
1. Attach the USB audio dongle into one of the USB ports connected the RPi. Reboot the system.
2. Once EmulationStation has loaded, exit from it by pressing F4. This will take you to the terminal.
3. Check if your USB audio has been detected by Raspbian Jessie by typing the command below:
Output should be:
The C-Media Electronics, Inc line shows that the USB audio device is detected.
4. Once we're sure the USB audio device is detected, let's check the order of priority of the sound cards being used by the system. Do so by typing this command:
Output should be:
As you can see from the output above, the snd_bcm2835 is the built-in sound card but we want the system to use snd_usb_audio
5. We can change and force the system to load the sound cards in a different order by creating a sound configuration file. Create the file by using the command below:
You will then enter the Nano editor environment and type the following lines:
Afterwards, press Ctrl+X to exit and answer Yes when prompted to save.
6. Reboot the system, exit EmulationStation once again to go to the terminal.
7. If you've successfully completed all the above steps, you should see the output below when you type the command:
Output should be:
Notice that the order has changed and it's now the snd_usb_audio that's on top of the list with an index of 0
8. Test the sound by going to EmulationStation and playing a game. You should immediately hear EmulationStation sounds when you go select from the list of games.
Load EmulationStation by typing the following command:
Good luck!
Steps:
1. Attach the USB audio dongle into one of the USB ports connected the RPi. Reboot the system.
2. Once EmulationStation has loaded, exit from it by pressing F4. This will take you to the terminal.
3. Check if your USB audio has been detected by Raspbian Jessie by typing the command below:
Code: Select all
pi@retropie:~ $ lsusb
Code: Select all
Bus 001 Device 007: ID 0d8c:0014 C-Media Electronics, Inc.
Bus 001 Device 004: ID 0424:2517 Standard Microsystems Corp. Hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
4. Once we're sure the USB audio device is detected, let's check the order of priority of the sound cards being used by the system. Do so by typing this command:
Code: Select all
pi@retropie:~ $ cat /proc/asound/modules
Code: Select all
0 snd_bcm2835
1 snd_usb_audio
5. We can change and force the system to load the sound cards in a different order by creating a sound configuration file. Create the file by using the command below:
Code: Select all
pi@retropie:~ $ sudo nano /etc/modprobe.d/alsa-base.conf
Code: Select all
options snd_usb_audio index=0
options snd_bcm2835 index=1
options snd slots=snd-usb-audio,snd-bcm2835
6. Reboot the system, exit EmulationStation once again to go to the terminal.
7. If you've successfully completed all the above steps, you should see the output below when you type the command:
Code: Select all
pi@retropie:~ $ cat /proc/asound/modules
Code: Select all
0 snd_usb_audio
1 snd_bcm2835
8. Test the sound by going to EmulationStation and playing a game. You should immediately hear EmulationStation sounds when you go select from the list of games.
Load EmulationStation by typing the following command:
Code: Select all
pi@retropie:~ $ emulationstation