]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: provide a more useful get_unmapped_area handler for pcm
authorDaniel Glöckner <dg@emlix.com>
Tue, 9 Mar 2010 17:57:52 +0000 (12:57 -0500)
committerTakashi Iwai <tiwai@suse.de>
Wed, 10 Mar 2010 08:05:03 +0000 (09:05 +0100)
commitaf6d859caf105c8cd408b2516de0fd318c635916
tree82e98a8ee7611f71e56022186fc5d25a889f7422
parent7d758f45a3d15290986eed04eb85a1b7f6b8a152
ALSA: provide a more useful get_unmapped_area handler for pcm

Shared memory mappings on nommu machines require a get_unmapped_area
file operation that suggests an address for the mapping. The current
implementation returns 0 and thus forces the driver to implement an
mmap handler that fixes up the start and end address of the vma.

This patch returns the address of the dma buffer, so it should work
out of the box for all drivers that use the snd_pcm_runtime->dma_area
pointer.

Addresses for mapping the status and control pages are returned as
well, but to make those work the conditional compilation of
snd_pcm_mmap_{status,control} would need to be revised.

URL: http://thread.gmane.org/gmane.linux.alsa.devel/61230
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_native.c