[alsa-devel] [PATCH] [ALSA] mpc8610: Add mmap support

Alexander E. Patrakov patrakov at gmail.com
Thu Jan 17 18:00:42 CET 2008

Timur Tabi wrote:
> Alexander E. Patrakov wrote:
>> Hm, the "struct snd_pcm_ops fsl_dma_ops" doesn't contain the .page 
>> callback. With saa7134-alsa, this led to the "device claims to support 
>> mmap but actually doesn't work" bug, see the following subthread:
> Isn't that an ARM chip?  The default MMAP handler in ALSA doesn't support ARM, 
> but it works for PowerPC.

saa7134 is a Philips chip that you'll find in many TV tuners.

As for the .page logic, my question was indeed stupid. I should have read the 
snd_pcm_mmap_data_nopage() function and notice that, by default, it wants to do 

vaddr = runtime->dma_area + offset;
page = virt_to_page(vaddr);

and saa7134 wants to use vmalloc_to_page() instead of virt_to_page() due to the 
way it allocates the DMA buffer.

> I haven't tried record, but I did try playback, and it worked.  Without this 
> patch, adding -M gives me this error:
> aplay: set_params:852: Access type not available
> After applying this patch, playback works fine.


Alexander E. Patrakov

More information about the Alsa-devel mailing list