Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270432
b: refs/heads/master
c: 5495ffb
h: refs/heads/master
v: v3
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Sep 20, 2011
1 parent 88ec689 commit 859efd5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57e5c63007955838043e34c732d224b2cbbb128f
refs/heads/master: 5495ffbd7b56d8bffebc5e30f03ea374590f1bb4
8 changes: 8 additions & 0 deletions trunk/sound/pci/via82xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,7 @@ static int snd_via82xx_pcm_open(struct via82xx *chip, struct viadev *viadev,
struct snd_pcm_runtime *runtime = substream->runtime;
int err;
struct via_rate_lock *ratep;
bool use_src = false;

runtime->hw = snd_via82xx_hw;

Expand All @@ -1196,6 +1197,7 @@ static int snd_via82xx_pcm_open(struct via82xx *chip, struct viadev *viadev,
SNDRV_PCM_RATE_8000_48000);
runtime->hw.rate_min = 8000;
runtime->hw.rate_max = 48000;
use_src = true;
} else if (! ratep->rate) {
int idx = viadev->direction ? AC97_RATES_ADC : AC97_RATES_FRONT_DAC;
runtime->hw.rates = chip->ac97->rates[idx];
Expand All @@ -1212,6 +1214,12 @@ static int snd_via82xx_pcm_open(struct via82xx *chip, struct viadev *viadev,
if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
return err;

if (use_src) {
err = snd_pcm_hw_rule_noresample(runtime, 48000);
if (err < 0)
return err;
}

runtime->private_data = viadev;
viadev->substream = substream;

Expand Down

0 comments on commit 859efd5

Please sign in to comment.