diff options
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r-- | sound/pci/via82xx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 35d5f4313d99..c3656fffdb50 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -1175,6 +1175,7 @@ static int snd_via82xx_pcm_open(struct via82xx *chip, struct viadev *viadev, | |||
1175 | struct snd_pcm_runtime *runtime = substream->runtime; | 1175 | struct snd_pcm_runtime *runtime = substream->runtime; |
1176 | int err; | 1176 | int err; |
1177 | struct via_rate_lock *ratep; | 1177 | struct via_rate_lock *ratep; |
1178 | bool use_src = false; | ||
1178 | 1179 | ||
1179 | runtime->hw = snd_via82xx_hw; | 1180 | runtime->hw = snd_via82xx_hw; |
1180 | 1181 | ||
@@ -1196,6 +1197,7 @@ static int snd_via82xx_pcm_open(struct via82xx *chip, struct viadev *viadev, | |||
1196 | SNDRV_PCM_RATE_8000_48000); | 1197 | SNDRV_PCM_RATE_8000_48000); |
1197 | runtime->hw.rate_min = 8000; | 1198 | runtime->hw.rate_min = 8000; |
1198 | runtime->hw.rate_max = 48000; | 1199 | runtime->hw.rate_max = 48000; |
1200 | use_src = true; | ||
1199 | } else if (! ratep->rate) { | 1201 | } else if (! ratep->rate) { |
1200 | int idx = viadev->direction ? AC97_RATES_ADC : AC97_RATES_FRONT_DAC; | 1202 | int idx = viadev->direction ? AC97_RATES_ADC : AC97_RATES_FRONT_DAC; |
1201 | runtime->hw.rates = chip->ac97->rates[idx]; | 1203 | runtime->hw.rates = chip->ac97->rates[idx]; |
@@ -1212,6 +1214,12 @@ static int snd_via82xx_pcm_open(struct via82xx *chip, struct viadev *viadev, | |||
1212 | if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) | 1214 | if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) |
1213 | return err; | 1215 | return err; |
1214 | 1216 | ||
1217 | if (use_src) { | ||
1218 | err = snd_pcm_hw_rule_noresample(runtime, 48000); | ||
1219 | if (err < 0) | ||
1220 | return err; | ||
1221 | } | ||
1222 | |||
1215 | runtime->private_data = viadev; | 1223 | runtime->private_data = viadev; |
1216 | viadev->substream = substream; | 1224 | viadev->substream = substream; |
1217 | 1225 | ||