Re: [linux-audio-dev] Reverbs... and the usual whinings

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Reverbs... and the usual whinings
From: Benno Senoner (sbenno_AT_gardena.net)
Date: Sat Sep 23 2000 - 15:22:46 EEST


On Sat, 23 Sep 2000, Juhana Sadeharju wrote:
>
> The way I get always dropouts is to delete a large file (20 Mbytes do fine)
> or directory. I'm not sure what are the changes when (i) soft-RT, and then
> (ii) low-latency patch are added to the recorder. Could there be problems
> even our A/D-to-disk buffer would be 16 Mbytes?
>

no the low-latency patch alone does not ensure a drop-out free operation.
my experience says:
- use a 2 thread approach (audio thread, disk thread)
- you must use SCHED_FIFO for at least the audio thread
- use a lock-free approach to pass data back and forth between audio and disk
thread
( for example: EVO's ringbuffer.h (the most up-to-date with atomic_*
instructions and several other useful macros)
or otherwise shared mem segments, or pipes (but for that you have to use bigger
audio buffers I believe)
- use fairly large buffers for each track (256KB/track is the minimum IMHO).

basically using a low latency kernel with a non-blocking , SCHED_FIFO audio
thread (which in practice blocks only when writing/reading to/from the audio
device), even if the kernel syncs the buffers during a large disk write
(stalling almost the entire system for 1-2 secs), the audio thread is guaranteed
to not experience delays over 5msec (but the IDE disks MUST be in DMA mode).
So the key is to provide enough buffering to overcome the 1-2sec stall
of the disk thread.

hope this helps,

Benno.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sat Sep 23 2000 - 15:46:07 EEST