* What is the format of dma_area?
@ 2005-10-07 3:15 Bill Gatliff
2005-10-07 10:08 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Bill Gatliff @ 2005-10-07 3:15 UTC (permalink / raw)
To: alsa-devel
Guys:
I'm trying to write a PCM driver that uses an AC97 codec, on an ARM
host, but no DMA. (Please pardon some of my terminology, I'm a bit of
an ALSA noob).
My trigger() looks something like this:
int *buffer;
int bytes;
...
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
bytes = frames_to_bytes(substream->runtime,
substream->runtime->period_size);
buffer = substream->runtime->dma_area;
...
Then, I copy *buffer++ out to the codec one 32-bit chunk (truncated to
20 bits) at a time.
One thing I don't understand is how dma_area is formatted. Is it a
stream of integers, like this?
int dma_area[channels][samples];
... or like this?
int dma_area[samples][channels];
... or what? I'm having trouble figuring out where the left- and
right-channel data is in the dma buffer.
Thanks!
b.g.
--
Bill Gatliff
bgat@billgatliff.com
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What is the format of dma_area?
2005-10-07 3:15 What is the format of dma_area? Bill Gatliff
@ 2005-10-07 10:08 ` Takashi Iwai
2005-10-07 14:06 ` Bill Gatliff
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2005-10-07 10:08 UTC (permalink / raw)
To: Bill Gatliff; +Cc: alsa-devel
At Thu, 06 Oct 2005 22:15:49 -0500,
Bill Gatliff wrote:
>
> Guys:
>
>
> I'm trying to write a PCM driver that uses an AC97 codec, on an ARM
> host, but no DMA. (Please pardon some of my terminology, I'm a bit of
> an ALSA noob).
>
> My trigger() looks something like this:
>
> int *buffer;
> int bytes;
> ...
> switch (cmd) {
> case SNDRV_PCM_TRIGGER_START:
> bytes = frames_to_bytes(substream->runtime,
> substream->runtime->period_size);
> buffer = substream->runtime->dma_area;
> ...
>
> Then, I copy *buffer++ out to the codec one 32-bit chunk (truncated to
> 20 bits) at a time.
>
> One thing I don't understand is how dma_area is formatted. Is it a
> stream of integers, like this?
>
> int dma_area[channels][samples];
It's called "non-interleaved" format in general.
> ... or like this?
>
> int dma_area[samples][channels];
It's "interleaved" format.
It's up to you and hardware. Set the appropriate bit flag in pcm
hardware info field.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What is the format of dma_area?
2005-10-07 10:08 ` Takashi Iwai
@ 2005-10-07 14:06 ` Bill Gatliff
0 siblings, 0 replies; 3+ messages in thread
From: Bill Gatliff @ 2005-10-07 14:06 UTC (permalink / raw)
To: alsa-devel
Takashi:
Takashi Iwai wrote:
>It's up to you and hardware. Set the appropriate bit flag in pcm hardware info field.
>
>
Thanks! Both for the information and for the quick reply!!
b.g.
--
Bill Gatliff
bgat@billgatliff.com
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-10-07 14:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-07 3:15 What is the format of dma_area? Bill Gatliff
2005-10-07 10:08 ` Takashi Iwai
2005-10-07 14:06 ` Bill Gatliff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox