Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions sound/soc/sof/intel/hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))

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.

continue;

endpoints[ep_index].num = j;
Expand Down
Loading