diff options
| -rw-r--r-- | sound/arm/aaci.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index ea3be874c84f..2e28748a3d8d 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
| @@ -438,18 +438,14 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream, | |||
| 438 | 438 | ||
| 439 | err = snd_pcm_lib_malloc_pages(substream, | 439 | err = snd_pcm_lib_malloc_pages(substream, |
| 440 | params_buffer_bytes(params)); | 440 | params_buffer_bytes(params)); |
| 441 | if (err < 0) | 441 | if (err >= 0) { |
| 442 | goto out; | 442 | err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params), |
| 443 | 443 | params_channels(params), | |
| 444 | err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params), | 444 | aacirun->pcm->r[0].slots); |
| 445 | params_channels(params), | ||
| 446 | aacirun->pcm->r[0].slots); | ||
| 447 | if (err) | ||
| 448 | goto out; | ||
| 449 | 445 | ||
| 450 | aacirun->pcm_open = 1; | 446 | aacirun->pcm_open = err == 0; |
| 447 | } | ||
| 451 | 448 | ||
| 452 | out: | ||
| 453 | return err; | 449 | return err; |
| 454 | } | 450 | } |
| 455 | 451 | ||
| @@ -458,7 +454,7 @@ static int aaci_pcm_prepare(struct snd_pcm_substream *substream) | |||
| 458 | struct snd_pcm_runtime *runtime = substream->runtime; | 454 | struct snd_pcm_runtime *runtime = substream->runtime; |
| 459 | struct aaci_runtime *aacirun = runtime->private_data; | 455 | struct aaci_runtime *aacirun = runtime->private_data; |
| 460 | 456 | ||
| 461 | aacirun->start = (void *)runtime->dma_area; | 457 | aacirun->start = runtime->dma_area; |
| 462 | aacirun->end = aacirun->start + snd_pcm_lib_buffer_bytes(substream); | 458 | aacirun->end = aacirun->start + snd_pcm_lib_buffer_bytes(substream); |
| 463 | aacirun->ptr = aacirun->start; | 459 | aacirun->ptr = aacirun->start; |
| 464 | aacirun->period = | 460 | aacirun->period = |
