[lkml]   [2001]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Scheduler ( was: Just a second ) ...
> 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. Even the high end stuff like
the RME hammerfall only go down to 64 byte fragment PER CHANNEL, which is
the same as 128 bytes for stereo in the SB 16.

> Raising that min_fragment thing from 5 to 10 would make the minimum DMA
> buffer go from 32 bytes to 1kB, which is a _lot_ more reasonable (what,
> at 2*2 bytes per sample and 44kHz would mean that a 1kB DMA buffer empties
> in less than 1/100th of a second, but at least it should be < 200 irqs/sec
> rather than >400).

Note that the ALSA drivers allow the app to set watermarks for wakeup,
while allowing flexibility in fragment size and number. You can
essentially say, wake me up when there are at least n fragments empty, and
put me to sleep if m fragments are full.


| David Mansfield |
| |

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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