From 0b731e67684186d41ca327776d2ec311e16df0fd Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Tue, 20 Oct 2026 12:51:02 +0800 Subject: [PATCH] ASoC: SOF: Intel: Skip endpoint presence check for single-DAI codecs For peripherals with a single endpoint (dai_num == 1), assume the endpoint is always present and skip checking its presence against the SDCA DisCo table. A similar assumption is already adopted in asoc_sdw_parse_sdw_endpoints(). This addresses the "function type only supported as DisCo constant" issue with TAS2783. Due to this non-standard DisCo table, the smart amp function is omitted from the supported SDCA function list, which prevents the amp DAI link from being created. Note that this introduces a known side effect: if a single endpoint is disabled in the BIOS while the peripheral remains present in the DisCo table, its DAI link will still be created. Signed-off-by: Bard Liao --- sound/soc/sof/intel/hda.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index e1815bfe358b5d..3e96f652551a1e 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -1209,8 +1209,15 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev, return NULL; } for (j = 0; j < codec_info_list[i].dai_num; j++) { - /* Check if the endpoint is present by the SDCA DisCo table */ - if (!is_endpoint_present(sdw_device, codec_info_list[i].dais[j].dai_type)) + /* + * Check if the endpoint is present by the SDCA DisCo table + * Peripherals are assumed to have at least one endpoint, so we do not + * verify presence for peripherals supporting only a single endpoint. + * Note: If the endpoint is disabled via BIOS, the endpoint instance + * will still be created. + */ + if (codec_info_list[i].dai_num > 1 && + !is_endpoint_present(sdw_device, codec_info_list[i].dais[j].dai_type)) continue; endpoints[ep_index].num = j;