Hi Brown Thanks for your comment. > -----Original Message----- > From: Mark Brown <broonie@xxxxxxxxxx> > Sent: Monday, July 1, 2024 8:23 PM > To: Ding, Shenghao <shenghao-ding@xxxxxx> > Cc: andriy.shevchenko@xxxxxxxxxxxxxxx; lgirdwood@xxxxxxxxx; > perex@xxxxxxxx; pierre-louis.bossart@xxxxxxxxxxxxxxx; > 13916275206@xxxxxxx; zhourui@xxxxxxxxxx; alsa-devel@xxxxxxxxxxxxxxxx; > Salazar, Ivan <i-salazar@xxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; Chadha, > Jasjot Singh <j-chadha@xxxxxx>; liam.r.girdwood@xxxxxxxxx; Yue, Jaden > <jaden-yue@xxxxxx>; yung-chuan.liao@xxxxxxxxxxxxxxx; Rao, Dipa > <dipa@xxxxxx>; yuhsuan@xxxxxxxxxx; Lo, Henry <henry.lo@xxxxxx>; > tiwai@xxxxxxx; Xu, Baojun <baojun.xu@xxxxxx>; soyer@xxxxxx; > Baojun.Xu@xxxxxxx; judyhsiao@xxxxxxxxxx; Navada Kanyana, Mukund > <navada@xxxxxx>; cujomalainey@xxxxxxxxxx; Kutty, Aanya > <aanya@xxxxxx>; Mahmud, Nayeem <nayeem.mahmud@xxxxxx>; > savyasanchi.shukla@xxxxxxxxxxxxx; flaviopr@xxxxxxxxxxxxx; Ji, Jesse > <jesse-ji@xxxxxx>; darren.ye@xxxxxxxxxxxx > Subject: [EXTERNAL] Re: [PATCH v1] ASoc: tas2781: Add name_prefix as the > prefix name of DSP firmwares and calibrated data files > > On Sat, Jun 29, 2024 at 06:11:10PM +0800, Shenghao Ding wrote: > > > tas_priv->fw_state = TASDEVICE_RCA_FW_OK; > > - scnprintf(tas_priv->coef_binaryname, 64, "%s_coef.bin", > > - tas_priv->dev_name); > > + if (tas_priv->name_prefix) > > + scnprintf(tas_priv->rca_binaryname, 64, "%s-%s_coef.bin", > > + tas_priv->name_prefix, tas_priv->dev_name); > > + else > > + scnprintf(tas_priv->coef_binaryname, 64, "%s_coef.bin", > > + tas_priv->dev_name); > > I'll apply this but I do wonder if it's worth falling back to trying to load the > unprefixed name if we fail to load the prefixed one. If fail to load dsp firmware, the driver won't load unprefixed name firmware, but switch tas2563/tas2781 to bypass-dsp mode automatically. In this mode, smartamp become simple amp. These day, I met a case from one of my customers, they put 2 pieces of tas2563, and 2 pieces of tas2781 in the same i2c bus. In order to identify tas2563 and tas2781, I think name_prefix is a good solution for this case. Looking forward to your comment. Thanks.