-
Notifications
You must be signed in to change notification settings - Fork 140
ASoC: sdw_utils: remove dai registered check #5629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: topic/sof-dev
Are you sure you want to change the base?
Conversation
|
@charleskeepax Can you remind me why we added the DAI registered check? I vaguely remember below code could return error in a few corner cases. But I can't remember which cases are they. sdw_dev = bus_find_device_by_name(&sdw_bus_type, NULL, sdw_codec_name);
if (!sdw_dev) {
dev_err(dev, "codec %s not found\n", sdw_codec_name);
return -EINVAL;
}
slave = dev_to_sdw_dev(sdw_dev);
if (!slave) {
ret = -EINVAL;
goto put_device;
}I tested on my ARL + cs42l43 device and blocked list the snd_soc_cs42l43 module and load it later and it seems work fine. |
| const struct snd_soc_acpi_adr_device *adr_dev = &adr_link->adr_d[adr_index]; | ||
| const struct snd_soc_acpi_endpoint *adr_end; | ||
| const struct asoc_sdw_dai_info *dai_info; | ||
| struct snd_soc_dai_link_component *dlc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bardliao Can we drop the first sentence in the commit message and say that checking for a registered DAI for non-existing endpoints causes the following error and state the error here?
Checking for a registered DAI for non-existing endpoints causes the following error. The driver will always return -EPROBE_DEFER if the codec driver doesn't register the DAI of the unexist endpoint. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
0493cf6 to
37e5b46
Compare
|
Apologies for the slow response this got a bit lost in the christmas rush. I think the discussion was here: I think the concern is if the codec probes between this code and when the card is created. That would allow the card to be created, but the endpoint detection here might have already decided the endpoint wasn't there. |
Thanks @charleskeepax for the feedback. However, |
For some reason, we check if the DAI is registered before checking the endpoint is present. It will cause problem if the codec driver doesn't register the DAI of the unexist endpoint.