]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SOF: Intel: remove hyphen from AMP<index> name_prexix
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 30 Oct 2025 06:55:03 +0000 (14:55 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 30 Oct 2025 12:35:04 +0000 (12:35 +0000)
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>
sound/soc/sof/intel/hda.c

index 4a59dd53c56965fc8d9ec3b19753d9604dad004a..c1518dbee1b7a96c9db165a00022ed599b766dc7 100644 (file)
@@ -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
+                * <name_prefix>-<amp_index> format. Like rt1320-1
+                */
                adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s-%d",
                                                            name_prefix,
                                                            *amp_index);