From: Bard Liao Date: Thu, 30 Oct 2025 06:55:03 +0000 (+0800) Subject: ASoC: SOF: Intel: remove hyphen from AMP name_prexix X-Git-Tag: v6.19-rc1~156^2~3^2~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef37146360385282b5f6a5b4bf695db30d609887;p=thirdparty%2Fkernel%2Flinux.git ASoC: SOF: Intel: remove hyphen from AMP name_prexix For those amp with "AMP" name_prefix in the codec_info_list[], use the AMP 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 Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20251030065503.1216419-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 4a59dd53c5696..c1518dbee1b7a 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -1260,7 +1260,15 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev, "AMP", *amp_index); break; } + } else if (!strcmp(name_prefix, "AMP")) { + adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s%d", + name_prefix, + *amp_index); } else { + /* + * The name_prefix will be the amp name if it is not "Left" or "AMP", set it to + * - format. Like rt1320-1 + */ adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s-%d", name_prefix, *amp_index);