The Adafruit USB Audio Adapter

This USB module is recommended for the Raspberry Pi, but one of the sales bullet points for this module says ā€œNot recommended for Mic inputā€

Why would you buy it just for the audio output when the Pi already has an audio output?

Well I need it for the audio input, and for just Ā£4.77 post free from The Pi Hut via Amazon, it was worth a punt.

I bought one of these adapters 3 months ago, but didnā€™t have the time to work out why it wasnā€™t working. Now I have two applications which need it, so its time to take another look.

Since Raspbian and Lubuntu are closely related, I set to work from the comfort of my armchair using my laptop. I wanted to use ā€œarecordā€ from a Gambas program, and this turned out to be my biggest problem.

Both Raspbian and Lubuntu 15.05 use the same version of alsa-utils (v1.0.27) which has a bug. Using arecord creates an audio file, plus a seemingly infinite number of small, 44 byte files.

The Adafruit USB Audio Adapter

The Pi process

Here is my recommendation for getting this running on a Raspberry Pi. Commands are entered in terminal.

Probably a good idea to start by updating Raspbian:-

sudo apt-get update
sudo apt-get upgrade

Connect the module to Pi, and connect a microphone (or suitable audio source) to the module mic input.

lsusb

ā€¦in the output you should see: C-Media Electronics CM108 Audio Controller

arecord ā€“list-devices

ā€¦the output should include:-

**** List of CAPTURE Hardware Devices ****
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

So far, so good. We will need to specify card 1 and device 0 when using arecord (e.g. hw:1,0)

alsamixer

Press F6 and select: ā€œ1 USB PnP Sound Deviceā€
Select Mic
Un-mute Mic (press M) then up-arrow for maximum input level.

Download alsa-utils: http://www.linuxfromscratch.org/blfs/view/svn/multimedia/alsa-utils.html
Download alsa-lib: http://www.linuxfromscratch.org/blfs/view/6.3/multimedia/alsa-lib.html

Extract both files.

Navigate to unzipped alsa-lib folder using file manager.
Hit F4 to open in a terminal.

./configure
make
sudo make install

Close this terminal and navigate using file manager to the unzipped alsa-utils folder.
Hit F4 to open in a terminal.

 

For more detail: The Adafruit USB Audio Adapter


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *