Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: hda/tas2781: do not reset cur_* values in runtime_suspend

The amplifier doesn't loose register state in software shutdown mode, so
there is no need to reset the cur_* values.

Without these resets, the amplifier can be turned on after
runtime_suspend without waiting for the program and
profile to be restored.

Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <aa27ae084150988bf6a0ead7e3403bc485d790f8.1709918447.git.soyer@irl.hu>

authored by

Gergo Koteles and committed by
Takashi Iwai
bec7760a c58e6ed5

-7
-7
sound/pci/hda/tas2781_hda_i2c.c
··· 832 832 static int tas2781_runtime_suspend(struct device *dev) 833 833 { 834 834 struct tas2781_hda *tas_hda = dev_get_drvdata(dev); 835 - int i; 836 835 837 836 dev_dbg(tas_hda->dev, "Runtime Suspend\n"); 838 837 ··· 840 841 if (tas_hda->priv->playback_started) { 841 842 tasdevice_tuning_switch(tas_hda->priv, 1); 842 843 tas_hda->priv->playback_started = false; 843 - } 844 - 845 - for (i = 0; i < tas_hda->priv->ndev; i++) { 846 - tas_hda->priv->tasdevice[i].cur_book = -1; 847 - tas_hda->priv->tasdevice[i].cur_prog = -1; 848 - tas_hda->priv->tasdevice[i].cur_conf = -1; 849 844 } 850 845 851 846 mutex_unlock(&tas_hda->priv->codec_lock);