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.

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.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>

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?

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