[alsa-devel] overrun in case of record

Rajeev kumar rajeev-dlh.kumar at st.com
Wed Sep 7 06:14:59 CEST 2011


Hello Mark

On 9/6/2011 11:31 PM, Mark Brown wrote:
>> pcm_read error: For this I have seen a bug is locked in the
>> >  bugzila(*Bug 472469*<show_bug.cgi?id=472469>  -arecord: input/output
>> >  error ). and the status  is closed saying insufficient data.
>> >  Could you please let me know what is the meaning of this bug? Is it
>> >  like, data is not available in the buffer and pcm_read from the user
>> >  space fails? But why this situation will
>> >  arise?
> You'll need to investigate the bug.
> .
>
I analyzed the bug and found that if I use arecord  in non-blocking 
mode, it works fine.

#arecord -f dat  --nonblock >  t

Working in a non-blocking  mode means there is no data available in ring 
buffer and returning -EAGAIN from the alsa, so application is
wating for data to arrive in the ring buffer. Now it is not clear to me 
why this situation will arise?
I have checked the clock and all the clock are intact. The calculation 
for number of bytes received in a sec is correct.

Best Regards
Rajeev




More information about the Alsa-devel mailing list