Topic: External USB sound card help
Playing a wave file through a USB-connected Creative MP3+ sound card yields a noisy screeching tone of about 500 Hz, not music as when I play the same wave file through Chumby's internal codec/speakers. I've carefully checked everything, and can't figure out what's wrong.
I'm working on using a Chumby for an amateur radio controller and data terminal. In order to accomplish that, I need to use an external sound card, so I can get low-bandwidth audio to and from the (external) amateur radios.
I knew Chumby uses ALSA. After looking through the list of USB sound cards supported by ALSA, I chose a Creative MP3+, a widely-used card. I plugged it into my desktop system running Ubuntu Gutsy Gibbon, and the card's light lit up immediately. aplay -l showed the sound card in the list. I ran "speaker-test -Dhw:1,0 -c2 -f440 -tsine -r48000" first, and got an 'A' note. Then, I used "aplay -Dhw1,0 -twav -fdat grace.wav" and was rewarded with Paul Simon. So the card works file on ALSA on an x86 2.6 kernel.
Then, I plugged the sound card into USB-A of my Ironforge Chumby with Firmware v1.2, and the light on the card came on immediately. aplay -l yields:
**** List of PLAYBACK Hardware Devices ****
card 0: default , device 0: Chumby-TSC2100-PCM [Chumby-TSC2100-PCM]
Subdevice #0: subdevice #0
card 1: MP3 [Sound Blaster MP3+], device 0: USB Audio [USB Audio]
Subdevice #0: subdevice #0
Looks good so far. Speaker-test isn't available on the chumby, so I went directly to aplay. I put a 48-kSa/s wav file on my USB drive, and plugged it into the USB-B port. Then:
chumby:~#aplay -Dhw:1,0 -twav -vv -f dat /mnt/usb/grace.wav
Instead of the first 5 seconds of Paul Simon's Graceland, I'm blasted with a noisy, screeching tone. aplay dumped the following before I Ctrl-C'd it:
Playing WAVE '/mnt/usb/grace.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Hardware PCM card 1 'Sound Blaster MP3+' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24000
period_size : 6000
period_time : 125000
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 6000
xfer_align : 6000
start_threshold : 24000
stop_threshold : 24000
silence_size : 0
boundary : 1572864000
Max peak (12000 samples): 0x0000321d ######## 39%
Max peak (12000 samples): 0x000036bc ######### 42%
Max peak (12000 samples): 0x00003fd1 ########## 49%
Max peak (12000 samples): 0x00003034 ######## 37%
Aborted by signal Interrupt...
I tried copying the file to the internal /psp filesystem, thinking there was a USB bandwidth overload, but I got the same results. Anyway, should be plenty of USB bandwidth; 48kHz of stereo 16 bit samples works out to 1.536 Mb/s, and I thought USB1.1 could handle 12 Mb/s.
I also tried booting the Chumby up with the sound card already plugged in. Same screeching sound.
Any ideas on how I can get the external sound card to play? Has anyone tried to do this? What am I missing? Thanks.