summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-06-10 12:06:09 +0100
committerMark Brown <broonie@kernel.org>2026-06-10 12:06:09 +0100
commitfc10b96e964ee1a7e218720652efa4447f148649 (patch)
treeb26e5aa46aff2fd01b1b2318644c360a2312a653 /sound/soc/sof/intel
parent53cebeb017164254cde5e31c94d8deef9e4fff97 (diff)
parent0305c084acf2ba9465acf6b5816bea441fe08b58 (diff)
downloadlinux-next-fc10b96e964ee1a7e218720652efa4447f148649.tar.gz
linux-next-fc10b96e964ee1a7e218720652efa4447f148649.zip
ASoC: Use codec_info_list.is_amp directly in find_acpi_adr_device()
Bard Liao <yung-chuan.liao@linux.intel.com> says: This series sets is_amp to all amp type codecs in codec_info_list[]. So that we can use the flag directly instead of using a local flag to check if the codec is an AMP type. The flag will be used to set different name_prefix for amp and non-amp codecs. Link: https://patch.msgid.link/20260605101805.121428-1-yung-chuan.liao@linux.intel.com
Diffstat (limited to 'sound/soc/sof/intel')
-rw-r--r--sound/soc/sof/intel/hda.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 8662b422eb80..dc85903b8d46 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -1159,7 +1159,6 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev,
struct snd_soc_acpi_adr_device *adr_dev;
const char *name_prefix = "";
int index = link->num_adr;
- bool is_amp = true; /* Set it to false if the codec wiah any NON-AMP DAI type */
int ep_index = 0;
int i, j;
@@ -1216,7 +1215,6 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev,
endpoints[ep_index].aggregated = 0;
endpoints[ep_index].group_id = 0;
endpoints[ep_index].group_position = 0;
- is_amp = false;
}
ep_index++;
}
@@ -1230,16 +1228,6 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev,
return NULL;
}
- /*
- * codec_info_list[].is_amp is a codec-level override: for multi-function
- * codecs we must treat the whole codec as an AMP when it is described as
- * such in the codec info table, even if some endpoints were detected as
- * non-AMP above. Callers/UCM rely on this to keep name_prefix and AMP
- * indexing stable and backwards compatible.
- */
- if (codec_info_list[i].is_amp)
- is_amp = true;
-
adr_dev[index].adr = ((u64)sdw_device->id.class_id & 0xFF) |
((u64)sdw_device->id.part_id & 0xFFFF) << 8 |
((u64)sdw_device->id.mfg_id & 0xFFFF) << 24 |
@@ -1247,7 +1235,7 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev,
((u64)(sdw_device->id.sdw_version & 0xF) << 44) |
((u64)(sdw_device->bus->link_id & 0xF) << 48);
- if (!is_amp) {
+ if (!codec_info_list[i].is_amp) {
/* For non-amp codecs, get name_prefix from codec_info_list[] */
adr_dev[index].name_prefix = devm_kasprintf(dev, GFP_KERNEL, "%s", name_prefix);
goto done_name_prefix;