Repository navigation
Conversation
There was a problem hiding this comment.
🟢 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
|
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. |
|
@charleskeepax It is mainly for the TAS2783 |
|
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. |
| /* 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)) |
There was a problem hiding this comment.
why we cannot assume the same for let's say dai_num == 3, or 7?
There was a problem hiding this comment.
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>
d392a75 to
0b731e6
Compare
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.