Skip to content

Commit ec1de5c

Browse files
soyersoyertiwai
authored andcommitted
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: 5be27f1 ("ALSA: hda/tas2781: Add tas2781 HDA driver") CC: [email protected] Signed-off-by: Gergo Koteles <[email protected]> Link: https://lore.kernel.org/r/038add0bdca1f979cc7abcce8f24cbcd3544084b.1702596646.git.soyer@irl.hu Signed-off-by: Takashi Iwai <[email protected]>
1 parent 02a460a commit ec1de5c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,10 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
543543

544544
tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK;
545545
tasdevice_prmg_load(tas_priv, 0);
546+
if (tas_priv->fmw->nr_programs > 0)
547+
tas_priv->cur_prog = 0;
548+
if (tas_priv->fmw->nr_configurations > 0)
549+
tas_priv->cur_conf = 0;
546550

547551
/* If calibrated data occurs error, dsp will still works with default
548552
* calibrated data inside algo.

0 commit comments

Comments
 (0)