Greetings to all,
I need help with an USB issue. I am trying to capture several consecutive two hour recordings using the Raspi with the audio encoder directly attached to the Raspi USB port. Sometimes I get one or two of the consecutive two hour recordings. However, after a varying amount of time ranging from a few minutes up to several hours, the USB bus errors out and the USB bus will not longer function with the audio encoder. The same USB error occurs after running Darkice, an audio streaming program, for several hours. I have tried two different USB audio encoders, and running the raspi from 700 to 950 MHz. Once I get the error, arecord or Darkice will not work unless I unplug then re-plug the usb device or reboot the raspi.
Now here is the monkey wrench: When I connect either of the audio encoders to a 4-port hub that is connected to the raspi, I don't get the USB error. I would use this configuration but the USB hub distorts the audio signal going through it. Is there a USB hub that passes audio signals to the raspi without distortion?
Here is the arecord command entered twice and the resulting output. The first command was enter right after I had unplugged then re-plugged the USB audio encoder which seems to reset the error condition. The error can occur as quickly as a few minutes or up to several hours. Most fails occur after about 10 to 20 minutes after the arecord command is entered. Then after the error, the same arecord command is entered again. The resulting message from the error is displayed.
pi@raspberrypi /var/mail $ arecord -f S16_LE -c2 -r44100 -d 0 -D hw:1,0 -t wav | lame - -o /home/pi/stereo/river_$(date +%y%m%d%H%M).mp3
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
overrun!!! (at least 23.666 ms long)
overrun!!! (at least 11.607 ms long)
overrun!!! (at least 46.105 ms long)
arecord: pcm_read:1801: read error: Input/output error
LAME 3.99.5 32bits ({C}http://lame.sf.net{C})
Using polyphase lowpass filter, transition band: 16538 Hz - 17071 Hz
Encoding <stdin> to /home/pi/stereo/river_1306021025.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III (11x) 128 kbps qval=3
pi@raspberrypi /var/mail $ arecord -f S16_LE -c2 -r44100 -d 0 -D hw:1,0 -t wav | lame - -o /home/pi/stereo/river_$(date +%y%m%d%H%M).mp3
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: set_params:1145: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 22052
PERIODS: (3 4)
BUFFER_TIME: 500000
BUFFER_SIZE: 22050
BUFFER_BYTES: 88200
TICK_TIME: 0
Warning: unsupported audio format
pi@raspberrypi /var/mail $
So hopefully this information will help. Oh, I almost forgot my level of Wheezy:
http://downloads.ras... ... spbian.zip
# I have a "B" model Pi that I received shortly after the first of this year. It has the "Made in China" sticker.
# If I run the arecord command shown above on a Single Board Computer with an Intel N450 processor that I have running Ubuntu 12.04, it works as expected. (But the SBC uses at least 5 times the power of the raspi) I am working a battery application.
# If I run Darkice to stream MP3, the raspi will stream at 128kbps with the same hardware setup as the failing arecord example above, and has the same problem.
# When I power the audio encoder externally, (not through the raspi) I still get the error.
# I have also tried running the command above as sudo.
So I am out of gas for ideas as to what to look at. With my limited knowledge, I would guess the issue is related to the USB subsystem on the raspi because when I plug the 4 port expander in the USB path between the audio encoder and the raspi, the USB error stops happening.
Joel
Message was edited by: Joel Goodwin After getting a reply from another posting, I was able to confirmation that Wheezy level I was using and the Raspi hardware are most likely not the problem. I also had tried a couple of different power supplies with no improvement. So I focused on the pcm encoder. The two different encoders I had would not work. After looking over a recommended list of audio encoders for Raspi, I decided on the Focusrite Scarlett 2i2 because I am using XLR inputs. This encoder has been working for the last three days continuously without error. So in the end it was a matter of finding a compatible encoder to operate with the Raspi for continuous audio USB operations. I would mark this issue as ANSWERED, but I am unable to figure out how to do that. Joel




