[alsa-devel] DMA Physical Address through "snd_pcm_lib_malloc_pages"

Takashi Iwai tiwai at suse.de
Thu Jun 24 09:44:01 CEST 2010


At Thu, 24 Jun 2010 12:52:47 +0530,
Adish Kuvelker wrote:
> 
> Hello,
> 
> If I use "SNDRV_DMA_TYPE_CONTINUOUS" as a parameter to pre-allocate
> function to get contiguous locations of memory and use the function
> snd_dma_continuous_data() would that be correct setting for my case?

I guess no.  As mentioned, it's no DMA memory, i.e. simple pages
allocated via __get_free_pages() and co.

> Where are the parameters of dma_addr and dma_area written to the
> runtime structure?

These are available only for pages properly allocated for DMA.


Takashi

> 
> Regards;
> Aadish
> 
> On Thu, Jun 24, 2010 at 12:45 PM, Takashi Iwai <tiwai at suse.de> wrote:
> > At Thu, 24 Jun 2010 12:38:35 +0530,
> > Adish Kuvelker wrote:
> >>
> >> Hello Takashi,
> >>
> >> I am developing a DMA Controller driver to service the PCM out data to
> >> the Audio controller on the arm-based ATLASIII procesor. In case you
> >> need any more information on the architecture I can pass.
> >>
> >> Since the DMA isn't on PCI bus I am pre-allocation continuous memero
> >> using the "snd_pcm_lib_preallocate_pages_for_all" passing
> >> SNDDRV_DMA_TYPE_DEV and "snd_dma_continuous_data" as appropriate
> >> parameters.
> >
> > snd_dma_continuous_data() is only for SNDRV_DMA_TYPE_CONTINUOUS.
> > In this case, the pages aren't for DMA.
> >
> > For SNDRV_DMA_TYPE_DEV, simply pass the device pointer you use.
> >
> >
> > Takashi
> >
> 


More information about the Alsa-devel mailing list