DMA Physical Address through "snd_pcm_lib_malloc_pages"

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

 



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". Going through the code for a few devices
registered under "pci" I found that the call to
"snd_pcm_lib_malloc_pages" is followed by call to
"snd_pcm_sgbuf_get_addr" to get the physical address. Also a call to
"__pa" is done in the "parisc/harmony.c".

Do I have to set the dma parameters in the runtime structure even
after allocating memory using "snd_pcm_lib_malloc_pages"?

Regards;
Aadish
_______________________________________________
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