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.

ASoc: tas2781: Add name_prefix as the prefix name of DSP firmwares and calibrated data files

Add name_prefix as the prefix name of DSP firmwares
and calibrated data files which stored speaker
calibrated impedance.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20240629101112.628-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Shenghao Ding and committed by
Mark Brown
55f0a1fa 878f4c36

+15 -4
+15 -4
sound/soc/codecs/tas2781-i2c.c
··· 394 394 * failing to load DSP firmware is NOT an error. 395 395 */ 396 396 tas_priv->fw_state = TASDEVICE_RCA_FW_OK; 397 - scnprintf(tas_priv->coef_binaryname, 64, "%s_coef.bin", 398 - tas_priv->dev_name); 397 + if (tas_priv->name_prefix) 398 + scnprintf(tas_priv->rca_binaryname, 64, "%s-%s_coef.bin", 399 + tas_priv->name_prefix, tas_priv->dev_name); 400 + else 401 + scnprintf(tas_priv->coef_binaryname, 64, "%s_coef.bin", 402 + tas_priv->dev_name); 399 403 ret = tasdevice_dsp_parser(tas_priv); 400 404 if (ret) { 401 405 dev_err(tas_priv->dev, "dspfw load %s error\n", ··· 422 418 * calibrated data inside algo. 423 419 */ 424 420 for (i = 0; i < tas_priv->ndev; i++) { 425 - scnprintf(tas_priv->cal_binaryname[i], 64, "%s_cal_0x%02x.bin", 426 - tas_priv->dev_name, tas_priv->tasdevice[i].dev_addr); 421 + if (tas_priv->name_prefix) 422 + scnprintf(tas_priv->cal_binaryname[i], 64, 423 + "%s-%s_cal_0x%02x.bin", tas_priv->name_prefix, 424 + tas_priv->dev_name, 425 + tas_priv->tasdevice[i].dev_addr); 426 + else 427 + scnprintf(tas_priv->cal_binaryname[i], 64, 428 + "%s_cal_0x%02x.bin", tas_priv->dev_name, 429 + tas_priv->tasdevice[i].dev_addr); 427 430 ret = tas2781_load_calibration(tas_priv, 428 431 tas_priv->cal_binaryname[i], i); 429 432 if (ret != 0)