On Sun, Feb 29, 2004 at 01:31:01PM +0100, Jaroslav Kysela wrote:
> On Sun, 29 Feb 2004, Russell King wrote:
> > Could someone enlighten me about the way alsa-lib / alsa-driver are
> > supposed to work when using mmap mode please?  I'm looking at the 1.0.2
> > code, along with madplay and Linux 2.6.4-rc1.
> > 
> > madplay sets the start_threshold to the size of the buffer, and min_avail
> > to one period size - in much the same way as the alsa-lib test/pcm.c
> > program.
> 
> We know about this problem. The start_threshold must be equal or less than
> (buffer_size / avail_min) * avail_min in this case.

I think it's a little more complex than that.  In my case,
buffer_size = 16384, avail_min = 256, so:

        (buffer_size / avail_min) * avail_min = 16384

which is what was being programmed anyway.  However,

        (int(buffer_size / avail_min) - 1) * avail_min = 16128

would make more sense.  Do you agree?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to