At Sun, 16 Mar 2003 03:10:15 -0400,
Manuel Jander wrote:
> 
> Hello,
> 
> I'm writing Scatter Gather support for the Aureal Vortex,
> and the problem is that i get period sizes that dont match
> the page size. That is not so bad, but the page count doesnt
> match the period count either.
> 
> How are the pages mapped on the buffer ?? I dont see any chance
> that could work. Why arent the page count at least equal to the
> period count ?

you can define such a hw_constraint function.
but...

normal ALSA drivers use a phyiscally or virtually linear pcm buffer.
most of drivers allocate a phyically continous buffer, and the drivers
supporting sg-buffer, such as emu10k1 or via82xx, map the distinct
kernel pages (its size depending on the architecture, 4Kbyte on i386)
onto the virtually linear address.  emu10k1 and trident have its own
page table and can use the sg-buffer simply as a linear buffer.
meanwhile, via82xx (and intel8x0) have the buffer-descriptor, and on
ALSA driver, the periods are split to 4k byte boundary if the size
isn't aligned to 4k page size.

however, a driver does NOT have to use a linear buffer;  this
condition is necessary only for supporting mmap.  if your driver
doesn't support mmap, it's ok to use a completely non-contiguous
buffer.  you'll need to define copy/silence callbacks appropriately
for copying the play/capture data and setting the silence data.

i'm not sure how the aureal driver works.  IIRC, it can use up to 4 x
4k pages, right?  if its size is really only 4 pages, i'd recommend to
use a simple phyically linear buffer.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to