mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans Schou <linux@schou.dk>
To: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: PROBLEM: SIS7019 stops recording after 42 min
Date: Sun, 20 Jun 2010 08:20:17 +0200	[thread overview]
Message-ID: <AANLkTimwZFNLBNJWODyzKXwx9CbIorg3OCA53XZchkeN@mail.gmail.com> (raw)
In-Reply-To: <1276972298.22889.16.camel@obelisk.thedillows.org>

2010/6/19 David Dillow <dave@thedillows.org>:
> Not trimming for the benefit of alsa-devel, cc'd. Please trim replies.

ok

> On Sat, 2010-06-19 at 16:13 +0200, Hans Schou wrote:
>> Hi
>>
>> 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
hardware.

> 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 <==
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 1
rate: 44100 (44100/1)
period_size: 5513
buffer_size: 22050

==> /proc/asound/card0/pcm0c/sub0/info <==
card: 0
device: 0
subdevice: 0
stream: CAPTURE
id: SiS7019
name: SiS7019
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 0

==> /proc/asound/card0/pcm0c/sub0/prealloc <==
64

==> /proc/asound/card0/pcm0c/sub0/prealloc_max <==
128

==> /proc/asound/card0/pcm0c/sub0/status <==
state: RUNNING
owner_pid   : 3112
trigger_time: 1277013037.939382815
tstamp      : 1277013038.809174469
delay       : 10640
avail       : 10640
avail_max   : 10920
-----
hw_ptr      : 38368
appl_ptr    : 27728

==> /proc/asound/card0/pcm0c/sub0/sw_params <==
tstamp_mode: NONE
period_step: 1
avail_min: 5513
start_threshold: 1
stop_threshold: 22050
silence_threshold: 0
silence_size: 0
boundary: 1944986400

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


best regards/hans

  reply	other threads:[~2010-06-20  6:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-19 14:13 Hans Schou
2010-06-19 18:31 ` David Dillow
2010-06-20  6:20   ` Hans Schou [this message]
2010-06-20 14:26     ` David Dillow
2010-06-21  5:56       ` Hans Schou
2010-06-21 14:06         ` David Dillow
2010-06-21 17:42           ` Hans Schou
2010-06-21 18:49             ` Hans Schou
2010-06-21 19:06               ` David Dillow
2010-06-21 20:10               ` Hans Schou
2010-06-23  3:00                 ` David Dillow
2010-06-23  5:36                   ` David Dillow
2010-06-23 18:22                     ` Hans Schou
2010-06-23 18:26                       ` Hans Schou
2010-06-23 20:42                       ` David Dillow
2010-06-24  8:08                         ` [alsa-devel] " Hans Schou
2010-06-21 18:50             ` David Dillow
2010-06-21 19:04               ` [alsa-devel] " Hans Schou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimwZFNLBNJWODyzKXwx9CbIorg3OCA53XZchkeN@mail.gmail.com \
    --to=linux@schou.dk \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®