Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
in terms of what it achieves today , this is fine. But when and if we do start supporting module unload at runtime, won't this need to be moved before snd_sof_remove()?
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.
@ranj063 I don't understand your comment sorry. Do you mean
release_firmware()
should be invoked beforesnd_sof_remove()
in the future? I don't see why. As @ujfalusi wrote, the only reason we need thestruct firmware
again is to resume after suspend (especially on platforms without IMR resume), even for that it shouldn't be needed eventually. So releasingstruct firmware
before or after some releasing other things does not matter, does it? Of course the sooner the better but I don't see any required order or dependency.I asked the compiler to list all places where we use
struct firmware
, here is the complete list as of commit 132b2eeIt's not used anywhere else with my current
.config
.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.
I'm not sure why the order of release_firmware() would matter, in
snd_sof_device_remove()
the firmware is not needed, we could have drop it first thing or last thing. It does not really matter.@ranj063, what does "module unload at runtime" means? Do you want to be able to remove the modules while audio is playing or something else?
Are we preparing for hot-plugable DSPs?
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.
from what I understood, I think runtime module unload means you load/unload FW modules based on topology. But I could be wrong. And in any cae, we're a bit far from supporting this at the moment. So this PR is good to go for now.