Repository navigation
ASoC: SOF: sof-pci-dev: add .shutdown callback #2581
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
70b4d7f
beae2a4
9ff1259
e178352
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 |
|---|---|---|
|
|
@@ -22,9 +22,10 @@ static const struct snd_sof_debugfs_map tgl_dsp_debugfs[] = { | |
|
|
||
| /* Tigerlake ops */ | ||
| const struct snd_sof_dsp_ops sof_tgl_ops = { | ||
| /* probe and remove */ | ||
| /* probe/remove/shutdown */ | ||
| .probe = hda_dsp_probe, | ||
|
Collaborator
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. In commit, "Fixes:" is only used when pointing to commit hashes. To refer to a bug URL, please use "BugLink: " instead.
Collaborator
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. @kv2019i since we are here and I know on i.MX there might be similar issues, do you know how the HIFI DSP is reset / power on / power off on Intel platforms?
Collaborator
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. @dbaluta Actual power-on is triggered via PCI MMIO writes, see hda-dsp.c:hda_dsp_core_power_down() in kernel. On DSP side, there is a sequence to ramp down resources and got a loop executing waiti, see for example platform_pm_runtime_power_off(). 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. @kv2019i fixes is a github construct, it should be used in PR description to help autoclose related bugs if possible. But yes i agree not in the commit message. |
||
| .remove = hda_dsp_remove, | ||
| .shutdown = hda_dsp_remove, | ||
|
|
||
| /* Register IO */ | ||
| .write = sof_io_write, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,14 @@ static inline int snd_sof_remove(struct snd_sof_dev *sdev) | |
| return 0; | ||
|
Collaborator
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. In commit: "platform specific shutdown stuff" -> "platform specific actions at shutdown" |
||
| } | ||
|
|
||
| static inline int snd_sof_shutdown(struct snd_sof_dev *sdev) | ||
|
ranj063 marked this conversation as resolved.
Resolved
|
||
| { | ||
| if (sof_ops(sdev)->shutdown) | ||
| return sof_ops(sdev)->shutdown(sdev); | ||
|
|
||
| return 0; | ||
| } | ||
|
|
||
| /* control */ | ||
|
|
||
| /* | ||
|
|
||
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.
PCI driver shutdown has "void" return type, so we can't return an error to upper layer. But, but, I think it's ok to keep the "int" and return type, and keep this aligned with rest of SOF ops API.