Raspberry Pi USB Audio Connection

by Lewis Loflin

Here we will explore how to connect a Raspberry Pi to a USB audio device. The advantage of doing this is less load on the RPi processor and I believe better performance. The same programming modification worked for a Plugable USB adaptor with the added bonus of a mono microphone input. This also worked on my generic USB speakers as shown in the above video.

Plugable USB

The Plugable adaptor was purchased from Amazon. My setup used the Raspberry Pi 2 operating Raspbian.

Linux aplay command in terminal.

To get started, plug your USB-AUDIO into the Pi and run the following command: "aplay -l" in a terminal. See above.

Within the output you should find: [USB Audio Device], device 0: USB Audio [USB Audio], etc. which means the Pi has recognized the USB-AUDIO adapter be it the Plugable or USB speakers. Now we can move on to configuration. If this is not here there's some problem that will have to be corrected.

geany editor with alsa-base.conf file.


raspberry@pi sudo geany /etc/modprobe.d/alsa-base.conf

Change to :

options snd-usb-audio index=0

This really doesn't seem to work:

options snd_bcm2835 index=1

Then reboot.

Alsamixer on Raspberry Pi.

Open a terminal program and type "alsamixer" and the above should open. Use your up/down, left/right keys to control audio and microphone level. If using USB speakers there will be no microphone control.

Alsa Mixer GUI on Raspberry Pi.

Above is the graphical version of Alsa-Mixer if installed will be under audio.



YouTube Videos:
MCP4725 12-Bit DAC Interface to Raspberry Pi
ADS1115 4-Channel ADC Uses I2C with Raspberry Pi
Interface I2C LCD to Raspberry Pi in C
Pulse-Width-Modulation with Raspberry Pi
Using Geany Text editor C Programming
Raspberry Pi Blink Demo
MAX6675 Raspberry Pi Demo

Videos:
Raspberry Pi, Arduino, and Learning Linux
Raspberry PI Arduino Advanced Interface
Tkinter with Raspberry Pi and PCF8591 AD-DA Sensor

Linux Videos

Live Linux Distro for Using Printer Port with Electronics
Using the powerful Rox-Filer system in Linux
Use FEH under Linux for a Wallpaper Setter
How to create Symbolic links in Linux