ALSA: hda/tas2781: select program 0, conf 0 by default
authorGergo Koteles <soyer@irl.hu>
Thu, 14 Dec 2023 23:33:27 +0000 (00:33 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 15 Dec 2023 07:13:40 +0000 (08:13 +0100)
commitec1de5c214eb5a892fdb7c450748249d5e2840f5
tree00c7a20bde42771c9ad697e7cd1dc38974d03efb
parent02a460adfc4920d4da775fb59ab3e54036daef22
ALSA: hda/tas2781: select program 0, conf 0 by default

Currently, cur_prog/cur_conf remains at the default value (-1), while
program 0 has been loaded into the amplifiers.

In the playback hook, tasdevice_tuning_switch tries to restore the
cur_prog/cur_conf. In the runtime_resume/system_resume,
tasdevice_prmg_load tries to load the cur_prog as well.

Set cur_prog and cur_conf to 0 if available in the firmware.

Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/038add0bdca1f979cc7abcce8f24cbcd3544084b.1702596646.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/tas2781_hda_i2c.c