LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Closed Thread
 
Search this Thread
Old 04-25-2007, 03:08 PM   #1
bjj2282
LQ Newbie
 
Registered: Apr 2007
Posts: 13

Rep: Reputation: 0
Why is ALSA giving me xruns?


I am new to Linux and I am new to ALSA. I am working on an embedded Linux system with Kernel 2.6.16.11 (PPC arch). I am using ALSA 1.0.9a. I am trying to route audio from usb to a TLV codec. I figured the easiest way to do this for demo purposes was to just pipe arecord's output to aplay (e.g. arecord -D hw:1,0 -f dat | aplay). This works except for the audio pausing frequently and printing "underrun!!! (at least 120.315 ms long)" with a different value for the time in ms every time. I have played with the value of every parameter in arecord's options and all it does is change the value of time in ms (not linearly) and usually making the pausing worse. I thought this could be a clock drift problem so I tried just using arecord and I still get overruns. I have used multiple audio sources over usb and I have also used audio from a mic which uses a completely different driver so I don't think it has to do with my codec driver and I am using the generic snd-usb-audio driver from linux which seems to be working fine for what it needs to be doing. This leads me to believe that there is something wrong with arecord. When I studied the aplay.c source file from the alsa-utils package I found that whether I am using capture or playback (overrun or underrun) it is getting to the same snd_pcm_state which is xrun. Can anyone explain to me why it is getting in this xrun state and what I can possibly do to prevent this? Any insight would be useful, thanks.
 
Old 04-25-2007, 03:38 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
Old 04-25-2007, 03:41 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

Rep: Reputation: 149Reputation: 149
This thread is closed. The one in Software remains open: http://www.linuxquestions.org/questi...d.php?t=548955
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is ALSA giving me xruns? bjj2282 Linux - Software 18 05-08-2007 09:59 AM
kernel-2.6.3 compiled with alsa but xmms alsa output dont plays demmylls Linux - General 3 09-01-2006 05:32 AM
Alsa sound *jumpy*: alsa-space: xrun of at least 11.449 msecs. resetting stream qwijibow Linux - General 6 04-22-2006 08:35 PM
broke gentoo after installing alsa-driver & alsa-utils snakeo2 Linux - Newbie 1 01-26-2006 09:05 AM
ALSA-oss compatability works, but not programs intended for alsa ? qwijibow Linux - Software 5 03-14-2004 08:28 AM


All times are GMT -5. The time now is 01:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration