Repository navigation
ASoC/soundwire: Intel: avoid transfer timed out in module unload #4833
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -220,12 +220,11 @@ static int hda_sdw_exit(struct snd_sof_dev *sdev) | |
|
|
||
| hdev = sdev->pdata->hw_pdata; | ||
|
|
||
| hda_sdw_int_enable(sdev, false); | ||
|
|
||
| if (hdev->sdw) | ||
| sdw_intel_exit(hdev->sdw); | ||
| hdev->sdw = NULL; | ||
|
|
||
| hda_sdw_int_enable(sdev, false); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we give an example of when "Codecs may need to access sdw registers via sdw bus in the exit process". I don't fully buy the argument. IIRC the initial code was intentional so that we wouldn't have ANY interrupts while removing the devices.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When we run Please see the log in detail.
I agree that we don't want any interrupts while removing the devices. However, the interrupts are also used in sdw commend transfer. Can we cancel the sdw commend transfer before disabling SDW interrupt?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @plbossart Alternative solution #4838. Instead of canceling the sdw commend, #4838 wait for them be finished. |
||
| return 0; | ||
| } | ||
|
|
||
|
|
||
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.
is this really needed? We already disable pm_runtime in codec drivers, e.g.
linux/sound/soc/codecs/rt711-sdca-sdw.c
Line 360 in 59c5a8d
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.
The resume runtime is called before codec drivers being removed. So, disabling it in the .remove function is too late.
Uh oh!
There was an error while loading. Please reload this page.
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 alternatively you could do something like we do in the .prepare step:
linux/drivers/soundwire/intel_auxdevice.c
Line 517 in e915e8b
But we would need a pm_runtime_resume() which would wait for the devices to be fully resumed (I don't recall why we didn't do this for .prepare).
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.
Let me study this.