Re: overrun with 'arecord' - why ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 9 Apr 2011, Sergei Steshenko wrote:

> On Fri, 8 Apr 2011 09:48:04 -0700 (PDT)
> Bill Unruh <unruh@xxxxxxxxxxxxxx> wrote:
>
>> On Fri, 8 Apr 2011, Sergei Steshenko 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)
>>
>> Wow. That is a three  month long overrun! Or perhaps it is a bug in arecord.
>> You are using 96000 why? Remember that you are pumping out about 1MB/s. What
>> is the cable-- USB cannot handle that. I would suspect something spurious is
>> going on. (PS-- you are using 32 bit recording. You do know that there is
>> absolutely nothing in the world that has a signal to noise ration of 180dB. In
>> fact I suspect that you are not getting anymore than 16 bits of useful
>> infomation per recording session. (S/N of even 90dB is pretty rare).
>>
>>
>>> .
>>>
>>> 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.
>>>
>
>
> The sound card is on-board (i.e. on-motherboard), i.e. no USB whatsoever.
>
> Sustained write disk speed on my machine is no less than 20MBytes/second - I
> remember such number running 'scp' with all its encryption/decryption
> overhead.
>
> I've seen messages like
>
> "at least 855507586.521 ms long"
>
> for years, they happen with underruns too (e.g. in case of an MP3 stream is
> played and the connection is unreliable). I first noticed them using
> 'ecasound' and Kai Vehmanen told they were an ALSA bug - now that I see
> 'arecord' producing them I very much believe Kai Vehmanen.

Yes, it certainly is a bug. Thus it may also be true that there is no underrun
either. 
(actually, It is not clear to me what an underrun means for recording. So what
if the buffer is empty)


>
> The sound card _does_ support 24 bits, but its ALSA driver doesn't, i.e.
> my choices with the card are 16 and 32 bits.
>
> Being an electronic engineer who also happens to be the sole developer of
> my own measurement rig I definitely know from my observations with
> oscilloscope that at some frequencies my output level will be much (tens of
> dbs) below nominal, so I'd like to use the card's full dynamic range.

As an electrical engineer you know that it does no good to record at a level
way way under the noise floor. Have you actually looked at the noise the card
and the microphone/<whatever you are recording> produce? That your output is
wel below nominal does not do anything to the noise floor. Ie, is your card's
dynamic range really more than 90dB ( which is what 16 bits gives you).
That is really tough to do, as you know.

>
> The rig has its frequency plot very far from flat (for _acoustic_/physical
> reasons) and it's the way it should be.
>
> As people have already realized, 24 bits is the recording format which allows
> looseness in level settings - the only concern is to have enough headroom to
> avoid clipping, and 16 bits is the delivery format.
>
> Oh, and there are no xruns using 'aplay' with the same bandwidth. In reality
> I first start 'aplay' and then 'arecord', and for several seconds they run
> in parallel. The overrun problem this thread is about happens with _just_ 'arecord'. I.e. I've started the thread making sure the problem is an
> 'arecord' problem with no other sound activity.

Sorry, you are feeding the ouput into the input?


>
> Regards,
>  Sergei.
>

-- 
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

------------------------------------------------------------------------------
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@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux