summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShenghao Ding <shenghao-ding@ti.com>2025-10-07 18:37:08 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-13 15:37:48 -0500
commit8c845ed3cd13c45fdf6fe0264958243567c4452f (patch)
tree2700e1dabba12d7cb7af2ebecc32097570530060
parent365184e242575458b991149073d07140c49d8590 (diff)
downloadlinux-8c845ed3cd13c45fdf6fe0264958243567c4452f.tar.gz
linux-8c845ed3cd13c45fdf6fe0264958243567c4452f.tar.bz2
linux-8c845ed3cd13c45fdf6fe0264958243567c4452f.zip
ALSA: hda/tas2781: Enable init_profile_id for device initialization
commit 7ddb711b6e0d33e0a673b49f69dff0d950ed60b9 upstream. Optimize the time consumption of profile switching, init_profile saves the common settings of different profiles, such as the dsp coefficients, etc, which can greatly reduce the profile switching time comsumption and remove the repetitive settings. Fixes: e83dcd139e77 ("ASoC: tas2781: Add keyword "init" in profile section") Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--sound/hda/codecs/side-codecs/tas2781_hda_i2c.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
index b5b7a1e82b75..32f16a8f9df3 100644
--- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
@@ -472,6 +472,12 @@ static void tasdevice_dspfw_init(void *context)
if (tas_priv->fmw->nr_configurations > 0)
tas_priv->cur_conf = 0;
+ /* Init common setting for different audio profiles */
+ if (tas_priv->rcabin.init_profile_id >= 0)
+ tasdevice_select_cfg_blk(tas_priv,
+ tas_priv->rcabin.init_profile_id,
+ TASDEVICE_BIN_BLK_PRE_POWER_UP);
+
/* If calibrated data occurs error, dsp will still works with default
* calibrated data inside algo.
*/
@@ -760,6 +766,12 @@ static int tas2781_system_resume(struct device *dev)
tasdevice_reset(tas_hda->priv);
tasdevice_prmg_load(tas_hda->priv, tas_hda->priv->cur_prog);
+ /* Init common setting for different audio profiles */
+ if (tas_hda->priv->rcabin.init_profile_id >= 0)
+ tasdevice_select_cfg_blk(tas_hda->priv,
+ tas_hda->priv->rcabin.init_profile_id,
+ TASDEVICE_BIN_BLK_PRE_POWER_UP);
+
if (tas_hda->priv->playback_started)
tasdevice_tuning_switch(tas_hda->priv, 0);