/* Writes a value on the given register and updates the register cache. The cached values are used for the cached-read and the suspend/resume.  */
void snd_ac97_write_cache(struct snd_ac97 *ac97, unsigned short reg, unsigned short value)
/* Writes a value on the given register and updates the register cache. The cached values are used for the cached-read and the suspend/resume.  */
void snd_ac97_write_cache(struct snd_ac97 *ac97, unsigned short reg, unsigned short value)
{
	if (!snd_ac97_valid_reg(ac97, reg))
		return;
	mutex_lock(&ac97->reg_mutex);
	ac97->regs[reg] = value;
	ac97->bus->ops->write(ac97, reg, value);
	set_bit(reg, ac97->reg_accessed);
	mutex_unlock(&ac97->reg_mutex);
}