Low latency kernel?

xruns are basically a resource issue.  Web browsers have flash and
java and javascript scripts that loop for infinity and other things
that strip you of your resources.  Basically I'd start by closing your
browsers while recording.  If you're trying to capture content from
the browsers, there's other ways to accomplish that IMO.  Without
having to sample the output from a soundcard on a soundcard.
Otherwise when browsers access sound, it's generally the old OSS way
(/dev/dsp).  A few extras like java and flash have gotten smart about
more modern ways, but not all sounds from a web browser are triggered
by those methods.  And not all versions of those things are smart
about it.

Alternatively give your audio priority consideration in
/etc/security/limits.conf.  Check /proc/asound/ for information while
recording.  You might need to tweak period size or other things.
Audio might need priority in other ways.  Which could mean changing
the nice level of the recording application, or the nice level of most
everything else.  I've gotten in the habit of running povray and
ffmpeg conversions with nice -n 19, just so I can still do other
things while they run.  Otherwise they all run at the same nice level
and do battle over who's more important.  Which is not an environment
you want your realtime recording application(s) to be in.

Basically one thing at a time.  If arecord is your recording method,
and what you're recording doesn't need a gui, you might try running
without X and see if you still have xruns.  If you must, slowly add
things back like X, until it breaks to know where your limits are.
AFAIK, arecord is a single threaded application.  So if it's not being
run on the not used CPU(s), and the one that it is on is maxed...  Not
that I'd know how or IF you can choose CPU per task for non SMP aware
applications.

- James


On 4/8/11, Sergei Steshenko <steshenko_ser...@list.ru> wrote:
> Hello,
>
> I've tried to run 'arecord' as part of simultaneous playback + capture "rig"
> (for acoustic measurements) and noticed overruns.
>
> So, even plain single 'record' occasionally produces overruns:
>
> arecord -D hw:0,2,0 -c 2 -r 96000 -d 6 -f S32_LE recorded.wav
> Recording WAVE 'recorded.wav' : Signed 32 bit Little Endian, Rate 96000 Hz,
> Stereo
> overrun!!! (at least 855507586.521 ms long)
> .
>
> So, my question is: "Why ?". It's a 2.6Ghz machine with SATA disks. Two
> cores,
> web browsers are the most active tasks (nothing fancy, no sound activity on
> the side of the web browsers). Effectively one core is free.
>
> Any ideas ?
>
> The gear:
>
> Card: HDA NVidia
> Chip: Realtek ALC883
> .
>
> Thanks,
>   Sergei.
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Alsa-user mailing list
> Alsa-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-user
>

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to