aboutsummaryrefslogtreecommitdiffstats
path: root/sound/arm
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-04 10:22:37 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-04 10:22:37 -0500
commit57648cd52b1848c6885bdbd948d113d52f3ddd43 (patch)
tree218c74fde12577ea22f51eabcf4e8b65273edb54 /sound/arm
parent79598324838a25cc378ecbb8c29dd1e3d3951d35 (diff)
parentfb716c0b7bed36064cd41d800c8f339f41adf084 (diff)
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'sound/arm')
-rw-r--r--sound/arm/aaci.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index 1534f3d88bce..1497dce1b04a 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -18,10 +18,7 @@
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/amba/bus.h> 20#include <linux/amba/bus.h>
21 21#include <linux/io.h>
22#include <asm/io.h>
23#include <asm/irq.h>
24#include <asm/sizes.h>
25 22
26#include <sound/core.h> 23#include <sound/core.h>
27#include <sound/initval.h> 24#include <sound/initval.h>
@@ -513,15 +510,9 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
513 if (err < 0) 510 if (err < 0)
514 goto out; 511 goto out;
515 512
516 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 513 err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
517 err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params), 514 params_channels(params),
518 params_channels(params), 515 aacirun->pcm->r[0].slots);
519 aacirun->pcm->r[0].slots);
520 else
521 err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
522 params_channels(params),
523 aacirun->pcm->r[0].slots);
524
525 if (err) 516 if (err)
526 goto out; 517 goto out;
527 518
@@ -537,7 +528,7 @@ static int aaci_pcm_prepare(struct snd_pcm_substream *substream)
537 struct aaci_runtime *aacirun = runtime->private_data; 528 struct aaci_runtime *aacirun = runtime->private_data;
538 529
539 aacirun->start = (void *)runtime->dma_area; 530 aacirun->start = (void *)runtime->dma_area;
540 aacirun->end = aacirun->start + runtime->dma_bytes; 531 aacirun->end = aacirun->start + snd_pcm_lib_buffer_bytes(substream);
541 aacirun->ptr = aacirun->start; 532 aacirun->ptr = aacirun->start;
542 aacirun->period = 533 aacirun->period =
543 aacirun->bytes = frames_to_bytes(runtime, runtime->period_size); 534 aacirun->bytes = frames_to_bytes(runtime, runtime->period_size);