]> err.no Git - linux-2.6/commitdiff
[ALSA] via82xx - Fix SPDIF sample rates
authorTakashi Iwai <tiwai@suse.de>
Mon, 15 Aug 2005 13:02:28 +0000 (15:02 +0200)
committerJaroslav Kysela <perex@suse.cz>
Tue, 30 Aug 2005 06:46:09 +0000 (08:46 +0200)
VIA82xx driver
Fixed the sample rates set in the fourth DXS channel with Non-VRA mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/via82xx.c

index 38b96eabea607a2728479dea83e7e2b9b00586a0..819f27b2762b0063b3cfaab1600525525c33c3f4 100644 (file)
@@ -929,12 +929,12 @@ static int snd_via8233_playback_prepare(snd_pcm_substream_t *substream)
 
        if ((rate_changed = via_lock_rate(&chip->rates[0], ac97_rate)) < 0)
                return rate_changed;
-       if (rate_changed) {
+       if (rate_changed)
                snd_ac97_set_rate(chip->ac97, AC97_PCM_FRONT_DAC_RATE,
                                  chip->no_vra ? 48000 : runtime->rate);
-               snd_ac97_set_rate(chip->ac97, AC97_SPDIF,
-                                 chip->no_vra ? 48000 : runtime->rate);
-       }
+       if (chip->spdif_on && viadev->reg_offset == 0x30)
+               snd_ac97_set_rate(chip->ac97, AC97_SPDIF, runtime->rate);
+
        if (runtime->rate == 48000)
                rbits = 0xfffff;
        else