diff options
Diffstat (limited to 'sound/arm/aaci.c')
-rw-r--r-- | sound/arm/aaci.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index b88bbded2f4f..b377370af2d7 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -366,6 +366,10 @@ static int __aaci_pcm_open(struct aaci *aaci, | |||
366 | runtime->hw.rates = aacirun->pcm->rates; | 366 | runtime->hw.rates = aacirun->pcm->rates; |
367 | snd_pcm_limit_hw_rates(runtime); | 367 | snd_pcm_limit_hw_rates(runtime); |
368 | 368 | ||
369 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && | ||
370 | aacirun->pcm->r[1].slots) | ||
371 | snd_ac97_pcm_double_rate_rules(runtime); | ||
372 | |||
369 | /* | 373 | /* |
370 | * FIXME: ALSA specifies fifo_size in bytes. If we're in normal | 374 | * FIXME: ALSA specifies fifo_size in bytes. If we're in normal |
371 | * mode, each 32-bit word contains one sample. If we're in | 375 | * mode, each 32-bit word contains one sample. If we're in |
@@ -439,9 +443,12 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream, | |||
439 | err = snd_pcm_lib_malloc_pages(substream, | 443 | err = snd_pcm_lib_malloc_pages(substream, |
440 | params_buffer_bytes(params)); | 444 | params_buffer_bytes(params)); |
441 | if (err >= 0) { | 445 | if (err >= 0) { |
442 | err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params), | 446 | unsigned int rate = params_rate(params); |
447 | int dbl = rate > 48000; | ||
448 | |||
449 | err = snd_ac97_pcm_open(aacirun->pcm, rate, | ||
443 | params_channels(params), | 450 | params_channels(params), |
444 | aacirun->pcm->r[0].slots); | 451 | aacirun->pcm->r[dbl].slots); |
445 | 452 | ||
446 | aacirun->pcm_open = err == 0; | 453 | aacirun->pcm_open = err == 0; |
447 | aacirun->cr = CR_FEN | CR_COMPACT | CR_SZ16; | 454 | aacirun->cr = CR_FEN | CR_COMPACT | CR_SZ16; |
@@ -808,6 +815,12 @@ static struct ac97_pcm ac97_defs[] __devinitdata = { | |||
808 | (1 << AC97_SLOT_PCM_SRIGHT) | | 815 | (1 << AC97_SLOT_PCM_SRIGHT) | |
809 | (1 << AC97_SLOT_LFE), | 816 | (1 << AC97_SLOT_LFE), |
810 | }, | 817 | }, |
818 | [1] = { | ||
819 | .slots = (1 << AC97_SLOT_PCM_LEFT) | | ||
820 | (1 << AC97_SLOT_PCM_RIGHT) | | ||
821 | (1 << AC97_SLOT_PCM_LEFT_0) | | ||
822 | (1 << AC97_SLOT_PCM_RIGHT_0), | ||
823 | }, | ||
811 | }, | 824 | }, |
812 | }, | 825 | }, |
813 | [1] = { /* PCM in */ | 826 | [1] = { /* PCM in */ |