[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openvortex-dev] DMA questions

From: Jeff Muizelaar
Subject: Re: [Openvortex-dev] DMA questions
Date: Sat, 12 Apr 2003 17:37:39 -0400 (EDT)

On Sat, 12 Apr 2003, Phil Jensen wrote:

> When allocating a DMA buffer for sample data, how big should it be?  From
> what I remember of what I read, I thought that there are 4 sub-buffers, of
> each which are 4k?  Does this mean I should be allocating a single chunk of
> 16k, or four separate chunks of 4k?

Either will work, 4 chunks of 4k is nicer to the kernel then 1 16k chunk.
The reason I did this was only to make things simpler while testing and
such. I believe the alsa driver does this more correctly.

> What I'm currently doing now is allocating a single 16384 byte chunk, and
> setupbuffer() looks something like this: (look familiar?  :)
> void vortex2_setupbuffer(struct aureal_state *softstate, unsigned long
> address) {
>         cmn_err(CE_NOTE, "vortex2_setupbuffer(): entered with address
> 0x%x\n", ad
> dress);
>         AUREAL_PUT32( 0x27400, address);
>         AUREAL_PUT32( 0x27404, address+0x1000);
>         AUREAL_PUT32( 0x27408, address+0x2000);
>         AUREAL_PUT32( 0x2740c, address+0x3000);

You'd basically use something like this if you were using 4 different
        AUREAL_PUT32(0x27400, address1);
        AUREAL_PUT32(0x27404, address2);
        AUREAL_PUT32(0x27408, address3);
        AUREAL_PUT32(0x2740c, address4);

>         AUREAL_PUT32( 0x27800, 0xceffffff);
>         AUREAL_PUT32( 0x27804, 0xfcffffff);

This deals with the chaining of the buffers. I don't think it needs to be
changed as long as the buffers are being loaded the same. Once again check
the alsa driver for more definitive answers.

> }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]