3401 - USB to Audio Adapter

Transcription

3401 - USB to Audio Adapter
Introduction
3401 - USB to Audio Adapter
The USB to Audio adapter provides sound capabilities to the PhidgetSBC. The Audio adapter offers two integrated channels - one for speakers or headphones, and one for a microphone.
The USB to Audio Adapter is not a Phidget device and is not controlled using Phidgets APIs. Using this product requires a working knowledge of Linux.
The Audio Adapter plugs into any of the PhidgetSBC USB ports.
Here is a short manual showing you how to use the device.
Connect the Sound Adapter to the PhidgetSBC
1. Log onto the SBC via SSH.
PhidgetSBC (1070):
Your SBC may be running an older version of firmware that does not support the USB Audio Adapter,
requiring you to update your SBC firmware to the latest version - update to the full version.
PhidgetSBC2 (1072):
You must install libasound2, and optionally mpg123: apt-get install libasound2 mpg123
Make sure to set “Include full Debian Package Repository” to true on the System->Packages web interface page and save changes first, or the packages won’t be available.
2.Plug the Audio Adapter into an open USB port on the SBC. The SBC should automatically recognize the
converter.
Type dmesg | tail –n 5 on the SBC to view the last 5 lines of the kernel’s message buffer. You should see
something similar to the lines below (this is output from a PhidgetSBC2):
USB to Serial Converter - May 20, 2011 3:12 PM
Page 1
usb 1-1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
usb 1-1.1: Product: USB Headphone Set
input: USB Headphone Set as /devices/platform/s3c2410-ohci/usb1/1-1/1-1.1/1-1.1:1.3/
input/input0
usbcore: registered new interface driver snd-usb-audio
This tells you that the USB to Audio adapter was properly recognized.
Playing an MP3 File
1.Plug a set of headphones, or computer speakers into the green jack on the back of the audio device.
2.Included with the Phidget SBC is an mpeg audio playback program mpg123. To play an mp3 file, simply
type:
mpg123 –g 100 filename.mp3
This file can be located either in your home directory, or on a USB storage device. The –g 100 option tells
mpg123 to turn the gain on the audio device to 100 percent.
3.The program can also be used to play streaming audio. If your SBC is connected to the internet through your
home network, you can type a command like:
mpg123 -g 100 -@ http://www.di.fm/mp3/club.pls.
The -@ option tells mpg123 that the file is actually a playlist, not a sound file.
4.Your SBC should start playing music from the radio stream.
USB to Serial Converter - May 20, 2011 3:12 PM
Page 2
Using a microphone
1.Plug a set of headphones, or computer speakers into the green jack on the back of the audio adapter.
2.Plug a microphone into the yellow jack on the back of the audio adapter
3.You can test the input of the audio adapter by typing (1070 only):
cat /dev/audio > /dev/audio
The /dev/audio device can be used for both input, as well as playback. This command reads the input, and
sends it right back to the output.
4.Speak into the microphone, you should be able to hear your voice on your headphones or speakers.
USB to Serial Converter - May 20, 2011 3:12 PM
Page 3