diff options
| author | Derek Fang <derek.fang@realtek.com> | 2026-03-26 15:53:01 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-26 16:22:42 +0000 |
| commit | dd4a1963ddf0d0f5e129efec03f34ea37109b4b7 (patch) | |
| tree | 91b4e682541f444aba26da1aa2cd8b209c487742 /sound/soc/sof/intel | |
| parent | 9033f7b7f27d09d468c98ed2b811d0f2495c70c1 (diff) | |
| download | lwn-dd4a1963ddf0d0f5e129efec03f34ea37109b4b7.tar.gz lwn-dd4a1963ddf0d0f5e129efec03f34ea37109b4b7.zip | |
ASoC: SOF: Intel: Add a is_amp flag to fix the wrong name prefix
According to the Intel sof design, it will create the name prefix
appended with amp index for the amp codec only, such as:
rt1318-1, rt1318-2, etc...
But the rt1320 is a codec with amp and mic codec functions, it doesn't
have the amp index in its name prefix as above.
And then it will be hard to identify the codec if in multi-rt1320 case.
So we add a flag to force the amp index to be appended.
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20260326075303.1083567-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel')
| -rw-r--r-- | sound/soc/sof/intel/hda.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 9ec33147d9af..edb80c2fa770 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -1232,6 +1232,16 @@ 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 | |
