Skip to content

ASoC: SOF: Intel: Skip endpoint presence check for single-DAI codecs - #5986

Open
bardliao wants to merge 1 commit into
thesofproject:topic/sof-devfrom
bardliao:skip-endpoint-presence-check
Open

bardliao wants to merge 1 commit into
thesofproject:topic/sof-devfrom
bardliao:skip-endpoint-presence-check

Conversation

@bardliao

Copy link
Copy Markdown
Collaborator

When dai_num is 1, we can assume that the endpoint is always present and there is no need to check whether the endpoint is present in the SDCA DisCo table.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow condition implements the stated behavior without changing multi-DAI validation.

No open issues 🎉

What changed in this PR

Updates Intel SOF endpoint discovery to assume single-DAI codec endpoints are present.

Changes:

  • Skips SDCA DisCo endpoint checks for single-DAI codecs.
  • Preserves endpoint validation for multi-DAI codecs.
File Description
sound/​soc/​sof/​intel/​hda.c Limits endpoint presence checks to multi-DAI codecs.

Review effort: Balanced

@bardliao
bardliao requested a review from niranjanhyti October 21, 2026 05:04
@charleskeepax

Copy link
Copy Markdown

Is this just an optimisation or working around something? It feels like this should work fine without this patch. I could imagine situations where one could end up with a codec with no endpoints, vendors like to have bios disables for features like mics. If you had a mic only codec I could see a bios disable getting implemented in a way that left the codec in the ACPI but removed the mic function from the SDCA. Yes it would be a bit weird but I could definitely imagine it happening.

@bardliao

Copy link
Copy Markdown
Collaborator Author

@charleskeepax It is mainly for the TAS2783 function type only supported as DisCo constant issue. With the problematic DisCo table, the amp will not be listed in the mach table. We have the same logic in asoc_sdw_parse_sdw_endpoints().
And yes, it will be a problem if BIOS just disable the function and not remove the peripheral.

@charleskeepax

charleskeepax commented Oct 21, 2026 •

Copy link
Copy Markdown

I am not aware of anything this will break that currently exists so probably fine for now. But would be nice to update the commit message to reference that TI thing and note the similar behaviour in asoc_sdw_parse_sdw_endpoints(), will be useful if we do hit problems in the future to be able to see why this change was made.

Comment thread sound/soc/sof/intel/hda.c
/* 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))
if (codec_info_list[i].dai_num > 1 &&
!is_endpoint_present(sdw_device, codec_info_list[i].dais[j].dai_type))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we cannot assume the same for let's say dai_num == 3, or 7?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I made the assumption is because I assume a peripheral will have at least one endpoint. For the case that a peripheral supports more than 1 endpoints, we can't assume that all endpoints are present.

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 <yung-chuan.liao@linux.intel.com>
@bardliao
bardliao force-pushed the skip-endpoint-presence-check branch from d392a75 to 0b731e6 Compare October 23, 2026 01:44
Copilot AI balanced review requested due to automatic review settings October 23, 2026 01:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused condition matches the stated behavior, preserves multi-DAI checks, and has no identified blocking issues.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants