lkml.org 
[lkml]   [1999]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Reason for sound dropouts found
Date
	Richard Gooch writes:

> T. Mertes writes:
> > 1. Greatly improve readahead of sequencially readed files.
> > The readahead must be so good that the data is always
> > already in the cache when the read() syscall is
executed.
> > In that way the read() would never block. --> no dropout
> > I know this seems a little bit unrealistic.
> > 2. Every program to play sound should have two threads
> > for reading and writing and an internal buffer which
never
> > gets empty so that after finishing one write() to the
> > sound device the next write() can start immidiate
without
> delay. --> no dropout
> > This could be done also by a sound demon used by all
> > sound programms. When this user buffer swaps out,
> > you get your dropouts aggain.
> > 3. The internal dma buffer of the sound driver could be
> > enlarged. When the dma buffer is big enough the sound
> > card would play from this buffer during waits for the
> > read(). --> no dropout
> [...]
> > What do the linux kernel specialists think of
> > having big sound driver buffers?
>
> I think (2) is the only reasonable solution. It's really easy to
solve
> this in user space. No reason to allocate huge kernel buffers (3)
> which consume RAM.

A user space solution also needs to have the buffer in the
RAM, otherwise it has to wait for swap instead of read().
So it may be necessary to lock the user space buffer in RAM.
Besides, the kernel buffers are freed also when the sound
device is not used. And the size of the kernel buffer should
be configurable (like now in ALSA, but on a larger scale).
For that reasons I would not rule (3) out.

I think we should do it the Linux way:
All possible ways should be followed.


Greetings Thomas


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.025 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site