ASoC: SOF: Intel: add hyphen between name and index to amp name_prefix

For those amps that use their name as name prefix the amp id should be
added after a hyphen symbol. Like "rt1320-1".

Fixes: 5226d19d4c ("ASoC: SOF: Intel: use sof_sdw as default SDW machine driver")
Signed-off-by: Shuming Fan <shumingf@realtek.com>
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/20251021065700.130810-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Shuming Fan
2025-10-21 14:57:00 +08:00
committed by Mark Brown
parent 900da53226
commit 5cd5f8fc29

View File

@@ -1261,7 +1261,7 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev,
break;
}
} else {
adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s%d",
adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s-%d",
name_prefix,
*amp_index);
}