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
3 changes: 2 additions & 1 deletion sound/soc/sof/intel/hda.c
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,8 @@ static struct snd_soc_acpi_adr_device *find_acpi_adr_device(struct device *dev,
}
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))
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