aboutsummaryrefslogtreecommitdiffstats
path: root/sound/arm/aaci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/arm/aaci.c')
-rw-r--r--sound/arm/aaci.c16
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 @@
30#include <sound/pcm_params.h> 30#include <sound/pcm_params.h>
31 31
32#include "aaci.h" 32#include "aaci.h"
33#include "devdma.h"
34 33
35#define DRIVER_NAME "aaci-pl041" 34#define DRIVER_NAME "aaci-pl041"
36 35
@@ -492,7 +491,7 @@ static int aaci_pcm_hw_free(struct snd_pcm_substream *substream)
492 /* 491 /*
493 * Clear out the DMA and any allocated buffers. 492 * Clear out the DMA and any allocated buffers.
494 */ 493 */
495 devdma_hw_free(NULL, substream); 494 snd_pcm_lib_free_pages(substream);
496 495
497 return 0; 496 return 0;
498} 497}
@@ -505,8 +504,8 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
505 504
506 aaci_pcm_hw_free(substream); 505 aaci_pcm_hw_free(substream);
507 506
508 err = devdma_hw_alloc(NULL, substream, 507 err = snd_pcm_lib_malloc_pages(substream,
509 params_buffer_bytes(params)); 508 params_buffer_bytes(params));
510 if (err < 0) 509 if (err < 0)
511 goto out; 510 goto out;
512 511
@@ -551,11 +550,6 @@ static snd_pcm_uframes_t aaci_pcm_pointer(struct snd_pcm_substream *substream)
551 return bytes_to_frames(runtime, bytes); 550 return bytes_to_frames(runtime, bytes);
552} 551}
553 552
554static int aaci_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma)
555{
556 return devdma_mmap(NULL, substream, vma);
557}
558
559 553
560/* 554/*
561 * Playback specific ALSA stuff 555 * Playback specific ALSA stuff
@@ -722,7 +716,6 @@ static struct snd_pcm_ops aaci_playback_ops = {
722 .prepare = aaci_pcm_prepare, 716 .prepare = aaci_pcm_prepare,
723 .trigger = aaci_pcm_playback_trigger, 717 .trigger = aaci_pcm_playback_trigger,
724 .pointer = aaci_pcm_pointer, 718 .pointer = aaci_pcm_pointer,
725 .mmap = aaci_pcm_mmap,
726}; 719};
727 720
728static int aaci_pcm_capture_hw_params(struct snd_pcm_substream *substream, 721static int aaci_pcm_capture_hw_params(struct snd_pcm_substream *substream,
@@ -850,7 +843,6 @@ static struct snd_pcm_ops aaci_capture_ops = {
850 .prepare = aaci_pcm_capture_prepare, 843 .prepare = aaci_pcm_capture_prepare,
851 .trigger = aaci_pcm_capture_trigger, 844 .trigger = aaci_pcm_capture_trigger,
852 .pointer = aaci_pcm_pointer, 845 .pointer = aaci_pcm_pointer,
853 .mmap = aaci_pcm_mmap,
854}; 846};
855 847
856/* 848/*
@@ -1040,6 +1032,8 @@ static int __devinit aaci_init_pcm(struct aaci *aaci)
1040 1032
1041 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops); 1033 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops);
1042 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops); 1034 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops);
1035 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1036 NULL, 0, 64 * 104);
1043 } 1037 }
1044 1038
1045 return ret; 1039 return ret;