diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-11-26 15:08:54 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-27 10:15:24 +0100 |
commit | d6797322231af98b9bb4afb175dd614cf511e5f7 (patch) | |
tree | cbeb990703df277452611c2e3ea9f4c45ff9c5e6 /sound/arm/aaci.c | |
parent | 6985c8877a711c7c307af05203858cb7c3c89d0d (diff) |
ALSA: Remove old DMA-mmap code from arm/devdma.c
The call of dma_mmap_coherent() is done in the PCM core now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/arm/aaci.c')
-rw-r--r-- | sound/arm/aaci.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 1f0f8213e2d5..e59372887f36 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -30,7 +30,6 @@ #include <sound/pcm_params.h> #include "aaci.h" -#include "devdma.h" #define DRIVER_NAME "aaci-pl041" @@ -492,7 +491,7 @@ static int aaci_pcm_hw_free(struct snd_pcm_substream *substream) /* * Clear out the DMA and any allocated buffers. */ - devdma_hw_free(NULL, substream); + snd_pcm_lib_free_pages(substream); return 0; } @@ -505,8 +504,8 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream, aaci_pcm_hw_free(substream); - err = devdma_hw_alloc(NULL, substream, - params_buffer_bytes(params)); + err = snd_pcm_lib_malloc_pages(substream, + params_buffer_bytes(params)); if (err < 0) goto out; @@ -551,11 +550,6 @@ static snd_pcm_uframes_t aaci_pcm_pointer(struct snd_pcm_substream *substream) return bytes_to_frames(runtime, bytes); } -static int aaci_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma) -{ - return devdma_mmap(NULL, substream, vma); -} - /* * Playback specific ALSA stuff @@ -722,7 +716,6 @@ static struct snd_pcm_ops aaci_playback_ops = { .prepare = aaci_pcm_prepare, .trigger = aaci_pcm_playback_trigger, .pointer = aaci_pcm_pointer, - .mmap = aaci_pcm_mmap, }; static int aaci_pcm_capture_hw_params(struct snd_pcm_substream *substream, @@ -850,7 +843,6 @@ static struct snd_pcm_ops aaci_capture_ops = { .prepare = aaci_pcm_capture_prepare, .trigger = aaci_pcm_capture_trigger, .pointer = aaci_pcm_pointer, - .mmap = aaci_pcm_mmap, }; /* @@ -1040,6 +1032,8 @@ static int __devinit aaci_init_pcm(struct aaci *aaci) snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops); + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, + NULL, 0, 64 * 104); } return ret; |