Re: DMA Physical Address through "snd_pcm_lib_malloc_pages"

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

 



At Thu, 24 Jun 2010 03:50:17 +0530,
Adish Kuvelker wrote:
> 
> Hello,
> 
> I am trying to allocate memory for DMA buffer through
> "snd_pcm_lib_malloc_pages" in hw_params callout function, with prior
> use of "snd_pcm_lib_preallocate_pages_for_all". The chapter on PCM
> Interface in "writing an ALSA driver" states that if the standard
> function "snd_pcm_lib_malloc_pages" is use for allocating the DMA
> buffers then the DMA fields of dma_addr, dma_area, dma_bytes are set
> by the ALSA middle layer.
> 
> However my code walk through didn't point me to the area where this
> physical memory setting is done. My DMA channel is not serving a PCI
> device. I would be very grateful if any of you guys can point me to
> the code where this settings get done by calling
> "snd_pcm_lib_malloc_pages".

snd_pcm_lib_*_pages() works only with the preallocated buffers, and
the pre-allocation can be done with the generic struct device, as long
as the device (bus) supports dma_alloc_coherent() properly.

But this can be pretty arch-specific, so better to clarify more your
hardware if you need detailed answers...


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux