alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* overrun in second capture device after stopping first capture device
@ 2010-01-21 12:40 Tobias Schneider
  2010-01-26 14:23 ` Tobias Schneider
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Schneider @ 2010-01-21 12:40 UTC (permalink / raw)
  To: Alsa-devel

Dear ALSA Dev-Team,

while testing my driver, I figured out that under some circumstances 
there occur overruns when recording two streams:

first I startet a long capture at device 1:

-bash-3.2#
-bash-3.2# arecord -D hw:0,1 -d 180 -r 32000 -c 1 -t wav -f S16_LE 
arecord_049.wav
Recording WAVE 'arecord_049.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
overrun!!! (at least 121.536 ms long)
overrun!!! (at least 115.361 ms long)
overrun!!! (at least 190.883 ms long)
overrun!!! (at least 121.772 ms long)
overrun!!! (at least 119.487 ms long)

In another terminal, I started a second capture on the second device. 
Everytime
this capture is done, I got an overrun in the first capture (see above)

-bash-3.2#                                                                                                                                              
 
-bash-3.2# arecord -D hw:0,0 -d 15 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2# arecord -D hw:0,0 -d 15 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2# arecord -D hw:0,0 -d 15 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2# arecord -D hw:0,0 -d 15 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2# arecord -D hw:0,0 -d 15 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2#

It seems, that the duration of the overrun relates to the capture time 
of the second capture, as it increases with bigger capture times. But if 
capture times are bigger than 25s, it seems there is no overrun...just 
some logs to clarify:

First Terminal:
-bash-3.2#
-bash-3.2# arecord -D hw:0,1 -d 180 -r 32000 -c 1 -t wav -f S16_LE 
arecord_049.wav
Recording WAVE 'arecord_049.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
overrun!!! (at least 99.074 ms long)

Second Terminal:
-bash-3.2#
-bash-3.2# arecord -D hw:0,0 -d 30 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav  
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2# arecord -D hw:0,0 -d 30 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2# arecord -D hw:0,0 -d 30 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2# arecord -D hw:0,0 -d 15 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2#


First Terminal:
-bash-3.2# arecord -D hw:0,1 -d 180 -r 32000 -c 1 -t wav -f S16_LE 
arecord_049.wav
Recording WAVE 'arecord_049.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
overrun!!! (at least 193.656 ms long)


Second Terminal:
-bash-3.2# arecord -D hw:0,0 -d 25 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2# arecord -D hw:0,0 -d 20 -r 32000 -c 1 -t wav -f S16_LE 
arecord_047.wav
Recording WAVE 'arecord_047.wav' : Signed 16 bit Little Endian, Rate 
32000 Hz, Mono
-bash-3.2#


So I am wondering why such an overrun occurs, can someone please give me 
some hints what my be the reason?

Thanks in Advance!
Tobias

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-29 18:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21 12:40 overrun in second capture device after stopping first capture device Tobias Schneider
2010-01-26 14:23 ` Tobias Schneider
2010-01-29 18:12   ` Tobias Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).