snd_ac97_set_rate(chip->ac97, AC97_SPDIF, ac97_rate); 
snd_ac97_set_rate(chip->ac97, AC97_SPDIF, chip->no_vra ? 48000 : runtime->rate); 
static int snd_via8233_playback_prepare(snd_pcm_substream_t *substream){	via82xx_t *chip = snd_pcm_substream_chip(substream);	viadev_t *viadev = (viadev_t *)substream->runtime->private_data;	snd_pcm_runtime_t *runtime = substream->runtime;	int ac97_rate = chip->dxs_src ? 48000 : runtime->rate;	int rate_changed;	u32 rbits;	if ((rate_changed = via_lock_rate(&chip->rates[0], ac97_rate)) < 0)		return 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, ac97_rate);	}	if (runtime->rate == 48000)		rbits = 0xfffff;	else		rbits = (0x100000 / 48000) * runtime->rate + ((0x100000 % 48000) * runtime->rate) / 48000;	snd_assert((rbits & ~0xfffff) == 0, return -EINVAL);	snd_via82xx_channel_reset(chip, viadev);	snd_via82xx_set_table_ptr(chip, viadev);	outb(chip->playback_volume[0], VIADEV_REG(viadev, OFS_PLAYBACK_VOLUME_L));	outb(chip->playback_volume[1], VIADEV_REG(viadev, OFS_PLAYBACK_VOLUME_R));	outl((runtime->format == SNDRV_PCM_FORMAT_S16_LE ? VIA8233_REG_TYPE_16BIT : 0) | /* format */	     (runtime->channels > 1 ? VIA8233_REG_TYPE_STEREO : 0) | /* stereo */	     rbits | /* rate */	     0xff000000,    /* STOP index is never reached */	     VIADEV_REG(viadev, OFFSET_STOP_IDX));	udelay(20);	snd_via82xx_codec_ready(chip, 0);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/01ef355f0c34d6fbb451512e70e4cf336776b7fd/via82xx.c/buggy/sound/pci/via82xx.c