On Tue, 18 Dec 2001, David Mansfield wrote:
> >
> > audio_devs[devc->dev]->min_fragment = 5;
> >
>
> Generally speaking, you want to be able to specify about a 1ms fragment,
> speaking as a realtime audio programmer (no offense Victor...). However,
> 1ms is 128 bytes at 16bit stereo, but only 32 bytes at 8bit mono. Nobody
> does 8bit mono, but that's probably why it's there. A lot of drivers seem
> to have 128 byte as minimum fragment size.
Good point.
Somebody should really look at "dma_set_fragment", and see whether we can
make "min_fragment" be really just a hardware minimum chunk size, but use
other heuristics like frequency to cut off the minimum size (ie just do
something like
/* We want to limit it to 1024 Hz */
min_bytes = freq*channel*bytes_per_channel >> 10;
Although I'm not sure we _have_ the frequency at that point: somebody
might set the fragment size first, and the frequency later.
Maybe the best thing to do is to educate the people who write the sound
apps for Linux (somebody was complaining about "esd" triggering this, for
example).
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Dec 23 2001 - 21:00:16 EST