diff options
Diffstat (limited to 'sound/arm')
-rw-r--r-- | sound/arm/aaci.c | 19 |
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); |