aboutsummaryrefslogtreecommitdiffstats
path: root/sound/arm/aaci.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-04 10:22:32 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-04 10:22:32 -0500
commit79598324838a25cc378ecbb8c29dd1e3d3951d35 (patch)
tree7d29e81580cba854042df4e33bdc8f38bbd65d03 /sound/arm/aaci.c
parent8ee763b9c82c6ca0a59a7271ce4fa29d7baf5c09 (diff)
parentb00615d163cd24fa98d155acfc1f9d81d6fe1103 (diff)
Merge branch 'topic/core-change' into for-linus
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 6c160a038b23..1534f3d88bce 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}
@@ -509,8 +508,8 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
509 aacirun->pcm_open = 0; 508 aacirun->pcm_open = 0;
510 } 509 }
511 510
512 err = devdma_hw_alloc(NULL, substream, 511 err = snd_pcm_lib_malloc_pages(substream,
513 params_buffer_bytes(params)); 512 params_buffer_bytes(params));
514 if (err < 0) 513 if (err < 0)
515 goto out; 514 goto out;
516 515
@@ -555,11 +554,6 @@ static snd_pcm_uframes_t aaci_pcm_pointer(struct snd_pcm_substream *substream)
555 return bytes_to_frames(runtime, bytes); 554 return bytes_to_frames(runtime, bytes);
556} 555}
557 556
558static int aaci_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma)
559{
560 return devdma_mmap(NULL, substream, vma);
561}
562
563 557
564/* 558/*
565 * Playback specific ALSA stuff 559 * Playback specific ALSA stuff
@@ -726,7 +720,6 @@ static struct snd_pcm_ops aaci_playback_ops = {
726 .prepare = aaci_pcm_prepare, 720 .prepare = aaci_pcm_prepare,
727 .trigger = aaci_pcm_playback_trigger, 721 .trigger = aaci_pcm_playback_trigger,
728 .pointer = aaci_pcm_pointer, 722 .pointer = aaci_pcm_pointer,
729 .mmap = aaci_pcm_mmap,
730}; 723};
731 724
732static int aaci_pcm_capture_hw_params(struct snd_pcm_substream *substream, 725static int aaci_pcm_capture_hw_params(struct snd_pcm_substream *substream,
@@ -854,7 +847,6 @@ static struct snd_pcm_ops aaci_capture_ops = {
854 .prepare = aaci_pcm_capture_prepare, 847 .prepare = aaci_pcm_capture_prepare,
855 .trigger = aaci_pcm_capture_trigger, 848 .trigger = aaci_pcm_capture_trigger,
856 .pointer = aaci_pcm_pointer, 849 .pointer = aaci_pcm_pointer,
857 .mmap = aaci_pcm_mmap,
858}; 850};
859 851
860/* 852/*
@@ -1044,6 +1036,8 @@ static int __devinit aaci_init_pcm(struct aaci *aaci)
1044 1036
1045 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops); 1037 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops);
1046 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops); 1038 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops);
1039 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1040 NULL, 0, 64 * 104);
1047 } 1041 }
1048 1042
1049 return ret; 1043 return ret;