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 USB data loss and ALSA problems
  • 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 14 replies
  • Subscribers 677 subscribers
  • Views 1663 views
  • Users 0 members are here
Related

USB data loss and ALSA problems

morgaine
morgaine over 13 years ago

The USB data loss on my Pi is worrying me so I'm starting a new thread for it.

 

I started reporting on this issue over in post #7 of this other thread which was about graphics -- http://www.element14.com/community/message/55209#55209 .  The graphics issue is fixed, but problems of USB data loss started appearing after I connected up the Pi to my NFS servers which are core infrastructure here, used by several machines over a mostly gigabit LAN.

 

Although I hadn't noticed any glitches in audio playback on the Pi yesterday while playing music from the NFS servers (and I still haven't), after stopping playback overnight, this morning I found the MOC player hung in kernel, non-interruptible, with one mocp process hung on a futex() call and the other hung in a recv() call.  The NFS servers were still accessible from other processes on the board (only the player was hung).


Given that Pi's networking is implemented over USB by the LAN9512, it's clear that USB errors could interact with networking on this board.

 

Although networking seemed to be working fine, I've since tested NFS robustness on Pi by pulling out the Ethernet cable during audio playback of an ogg file held on an NFS server, waiting for the player's buffering to drain and playback to freeze waiting for network data, then replugging the Ethernet --- all is fine, playback continues perfectly after reconnection from where it left off, despite Debian taking the interface down and back up.  Networking looks good and solid.

 

What's much worse is that the hung mocp wasn't hung on networking but on audio playback, as I discovered by killing it and starting a fresh player.  Restarting the ALSA system through "/etc/init.d/alsa-utils restart" didn't fix it either, although that may not have reloaded the snd_bcm2835 module --- I'll have to check and/or reload it manually if it hangs again.  So, that's another potential problem for future resolution, there might be hiccups in ALSA on Pi.

 

So, back to my main worry, which is loss of USB device events, mostly mouse clicks.  (I have noticed key presses going astray too, but I haven't quantified this yet, and it's not as frequent as lost mouse clicks).  As I mentioned in the other thread, this is happening regularly while networking is active.  My networking is all wired, fortunately, which eliminates one potential source of problems.

 

I've eliminated a few variables to try to understand the problem better:

 

  • The mouse and keyboard are fine (a Logitech Wireless Combo MK320) --- I moved them over to another Linux machine and they worked perfectly, no lost mouse clicks.  Admittedly, it was an Intel machine, and the problem could be at ARM driver level.
  • I borrowed a different RF mouse (Sandstrom Laser Mouse SMWLL11) which is working perfectly on my laptop and plugged it into the Pi --- same problem of lost mouse clicks as before.
  • Stopping the music playback and hence the Pi's NFS traffic doesn't make the problem go away, so it's not simply a USB bandwidth issue,

 

I still have a few ideas to test, documenting the results here as I go.  Any input would be welcome. image

 

Morgaine.

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    Former Member over 13 years ago

    I have encountered issues too..

     

    When playing MP3s with MPG321 using "amixer" to control the volume will  sometimes cause the ALSA to hang. using either Ctrl+C or running amixer again can start the music playing again.

     

    It seems to me to be flakeyness in the driver - maybe a lost interrupt or something. It is a pretty reliable test to cause a hang - maybe one in 5 times when running amixer....

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

    I have encountered issues too..

     

    When playing MP3s with MPG321 using "amixer" to control the volume will  sometimes cause the ALSA to hang. using either Ctrl+C or running amixer again can start the music playing again.

     

    It seems to me to be flakeyness in the driver - maybe a lost interrupt or something. It is a pretty reliable test to cause a hang - maybe one in 5 times when running amixer....

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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 © 2025 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