element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Raspi USB issues with long recordings using arecord
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 6 replies
  • Subscribers 677 subscribers
  • Views 1574 views
  • Users 0 members are here
Related

Raspi USB issues with long recordings using arecord

Former Member
Former Member over 12 years ago

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

  • Sign in to reply
  • Cancel
  • Former Member
    Former Member over 12 years ago

    You might try asking on the official forums USB thread

     

    http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=23544

     

    Or try the "FIQ fix"

     

    http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=39175

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago

    try loading rasplex you should get a better outcome

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    There is a new version of Raspbian available for download as of July 26.

    No release notes, AFAIK.  But maybe it would help.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GreenYamo
    GreenYamo over 12 years ago

    Hello Joel, You may have already tried this, but do you have any chance to borrow a different hub ? It would seem from previous problems, not all Hubs (or even USB devices) are created equal. Some seem to back power, some don't supply the regulation 500ma to each port (even though they say they do) so I think I would try that, along with the suggestions regarding firmware above. I had a lot of problems with various USB webcams a while back, all problems vanished when I upgraded the Pi firmware.

     

    Steve

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to Former Member

    Hi Coder27,

     

      I just tried that release before posting the issue.  I can confirm that the latest 7-26-13, release has the git-core USB fix, but I am still having the USB bus error out for the encoder issue.  A recent observation is that when the error occurs, it only affects the audio encoder.  The keyboard/mouse/wireless are still working.  When I look at what the git-core fixed, I have different issues then what it was intended to fix.  I will keep looking.  I really appreciate your suggestions.

     

    Joel

     

     

    -


    coder27 <messages@element14.com> wrote:

    coder27 http://www.element14.com/community/people/coder27 created the discussion

     

    "Re: Raspi USB issues with long recordings using arecord"

     

    To view the discussion, visit: http://www.element14.com/community/message/84995#84995/l/re-raspi-usb-issues-with-long-recordings-using-arecord

     

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to GreenYamo

    Hi Steve,

     

      I have tried three different hubs and two different USB audio encoders.  All of the hubs I tried were powered hubs.  This issue occurs even without the hub connected to the Raspi.  It just that when I run the audio encoder through a hub, I no longer get the USB bus error that locks out the audio encoder.  I am running the latest Raspbian “wheezy” from July 26, 2013.  I think that was your question about Pi firmware or were you thinking of a device driver type firmware update?  If there is a USB device driver upgrade, then I am unaware of that other then the git-core update, which comes in the 7-26-13 release.

     

      Thanks much for your feedback.

     

    Joel

     

     

    -


    GreenYamo <messages@element14.com> wrote:

    Steve Read http://www.element14.com/community/people/GreenYamo created the discussion

     

    "Re: Raspi USB issues with long recordings using arecord"

     

    To view the discussion, visit: http://www.element14.com/community/message/84999#84999/l/re-raspi-usb-issues-with-long-recordings-using-arecord

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube