Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SOF: Intel: remove hyphen from AMP<index> name_prexix

For those amp with "AMP" name_prefix in the codec_info_list[], use the
AMP<index> format to meet the UCM expectation.

Fixes: 5cd5f8fc29fa ("ASoC: SOF: Intel: add hyphen between name and index to amp name_prefix")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20251030065503.1216419-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Bard Liao and committed by
Mark Brown
ef371463 f1dfbc1b

+8
+8
sound/soc/sof/intel/hda.c
··· 1260 1260 "AMP", *amp_index); 1261 1261 break; 1262 1262 } 1263 + } else if (!strcmp(name_prefix, "AMP")) { 1264 + adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s%d", 1265 + name_prefix, 1266 + *amp_index); 1263 1267 } else { 1268 + /* 1269 + * The name_prefix will be the amp name if it is not "Left" or "AMP", set it to 1270 + * <name_prefix>-<amp_index> format. Like rt1320-1 1271 + */ 1264 1272 adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s-%d", 1265 1273 name_prefix, 1266 1274 *amp_index);