aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cs5535audio
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-01-21 05:49:03 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:30:09 -0500
commit0de27c10d3524eba9e81f56ff315e97d95b3faa0 (patch)
tree8b417543e63e65a2ffbd01a0fe9ba89bdaa1f7c8 /sound/pci/cs5535audio
parentc57cccc0382fedd95373ffdb192f45d278210686 (diff)
[ALSA] cs5535audio - Fix available sample rates
The available sample rates on CS5535 depend on AC97 codec chip. Set the additional hw params limit. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/cs5535audio')
-rw-r--r--sound/pci/cs5535audio/cs5535audio_pcm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c
index 499e27961a30..cdcda87116c3 100644
--- a/sound/pci/cs5535audio/cs5535audio_pcm.c
+++ b/sound/pci/cs5535audio/cs5535audio_pcm.c
@@ -97,6 +97,8 @@ static int snd_cs5535audio_playback_open(struct snd_pcm_substream *substream)
97 struct snd_pcm_runtime *runtime = substream->runtime; 97 struct snd_pcm_runtime *runtime = substream->runtime;
98 98
99 runtime->hw = snd_cs5535audio_playback; 99 runtime->hw = snd_cs5535audio_playback;
100 runtime->hw.rates = cs5535au->ac97->rates[AC97_RATES_FRONT_DAC];
101 snd_pcm_limit_hw_rates(runtime);
100 cs5535au->playback_substream = substream; 102 cs5535au->playback_substream = substream;
101 runtime->private_data = &(cs5535au->dmas[CS5535AUDIO_DMA_PLAYBACK]); 103 runtime->private_data = &(cs5535au->dmas[CS5535AUDIO_DMA_PLAYBACK]);
102 if ((err = snd_pcm_hw_constraint_integer(runtime, 104 if ((err = snd_pcm_hw_constraint_integer(runtime,
@@ -342,6 +344,8 @@ static int snd_cs5535audio_capture_open(struct snd_pcm_substream *substream)
342 struct snd_pcm_runtime *runtime = substream->runtime; 344 struct snd_pcm_runtime *runtime = substream->runtime;
343 345
344 runtime->hw = snd_cs5535audio_capture; 346 runtime->hw = snd_cs5535audio_capture;
347 runtime->hw.rates = cs5535au->ac97->rates[AC97_RATES_ADC];
348 snd_pcm_limit_hw_rates(runtime);
345 cs5535au->capture_substream = substream; 349 cs5535au->capture_substream = substream;
346 runtime->private_data = &(cs5535au->dmas[CS5535AUDIO_DMA_CAPTURE]); 350 runtime->private_data = &(cs5535au->dmas[CS5535AUDIO_DMA_CAPTURE]);
347 if ((err = snd_pcm_hw_constraint_integer(runtime, 351 if ((err = snd_pcm_hw_constraint_integer(runtime,