From 6d396c18e783afd8ac46a2d64f4db0730232f38c Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Wed, 29 Oct 2025 17:49:09 +0800 Subject: [PATCH] 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 --- sound/soc/sof/intel/hda.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 925460fbe4fcbf..0bb85f92e1069d 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);