[alsa-devel] PROBLEM: SIS7019 stops recording after 42 min
linux at schou.dk
Sun Jun 20 08:20:17 CEST 2010
2010/6/19 David Dillow <dave at thedillows.org>:
> Not trimming for the benefit of alsa-devel, cc'd. Please trim replies.
> On Sat, 2010-06-19 at 16:13 +0200, Hans Schou wrote:
>> I have a problem with recording sound when using the sound chip
>> SIS7019 with both kernel 2.6.26 and 2.6.34. After recording about 42
>> minutes it kind a stops recording, more precisely it is taking a pause
>> of exactly 10 seconds between each reading.
>> As recorder I have tried several programs and all of them fails after
>> 42 minutes. Some programs uses Alsa and some uses the old deprecated
>> method. In this example I have logged sox rec.
>> Recording method in a script:
>> strace -tt -o strace.log rec -c 1 -r 44100 -2 sox.wav &
>> sleep 3000
>> kill $?
> I think the answer is no, but to be sure -- are you talking directly to
> the hardware device, or are you going through pulseaudio?
Eh? No to what? Alsa? I am not really sure. In strace I can see 'rec'
uses ioclt which could implies that it is talking directly to
> While rec is running, can you capture the configuration using
> head -1000 /proc/asound/card0/pcm0c/sub0/*
Below was captured while running:
arecord -c 1 -r 44100 -f S16 arec01.wav
==> /proc/asound/card0/pcm0c/sub0/hw_params <==
rate: 44100 (44100/1)
==> /proc/asound/card0/pcm0c/sub0/info <==
subname: subdevice #0
==> /proc/asound/card0/pcm0c/sub0/prealloc <==
==> /proc/asound/card0/pcm0c/sub0/prealloc_max <==
==> /proc/asound/card0/pcm0c/sub0/status <==
owner_pid : 3112
tstamp : 1277013038.809174469
delay : 10640
avail : 10640
avail_max : 10920
hw_ptr : 38368
appl_ptr : 27728
==> /proc/asound/card0/pcm0c/sub0/sw_params <==
I got a strange error message from arecord while recording at rate 44100:
overrun!!! (at least 0.188 ms long)
overrun!!! (at least 0.190 ms long)
overrun!!! (at least 0.191 ms long)
Could this be a clue?
The error does occur with rate 8000 8bit (the default).
> Can you try using arecord? You can use options to tell it how to
> configure the PCM. Especially interesting will be to configure 2 periods
> per buffer vs whatever rec uses. 2 periods per buffer uses the hardware
> interrupts to clock out periods, where as 3+ uses a more complex
> mechanism. You can also use -M to use mmap vs not.
Options like this?
strace -tt -o arec.log arecord -c 1 -r 44100 -f S16 -M arec.wav
More information about the Alsa-devel