-
Notifications
You must be signed in to change notification settings - Fork 140
[DO NOT REVIEW YET]PM Support for BYT/CHT + module load/unload fix for BSW #1523
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
add60d7
8d4dd37
2ba5e92
c43a5b5
911388b
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 |
|---|---|---|
|
|
@@ -53,8 +53,12 @@ static int sof_resume(struct device *dev, bool runtime_resume) | |
| int ret; | ||
|
|
||
| /* do nothing if dsp resume callbacks are not set */ | ||
| if (!sof_ops(sdev)->resume || !sof_ops(sdev)->runtime_resume) | ||
| return 0; | ||
| if (runtime_resume) | ||
|
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. This one is a bit controversial I can see that you could support suspend/resume but not their pm_runtime versions. I would reword the commit message. This is not a fix, it's allowing for more granularity in what can be supported. this allows pm_runtime to be unsupported while normal resume is supported.
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 this change makes no assumption about whether runtime PM or system PM is supported. sof_resume() and sof_suspend() are called for both the runtime PM and system PM cases. So all I am doing is if we're runtime suspending, check for the platform-specific runtime-suspend callback and so on for the other cases.
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. @ranj063 when maintainers see a commit message starting with 'fix' they think it's a real problem that needs to be handled on previous -stable versions. What you are doing is 'split checks for platform-specific callbacks', not a real fix. |
||
| if (!sof_ops(sdev)->runtime_resume) | ||
| return 0; | ||
| else | ||
| if (!sof_ops(sdev)->resume) | ||
| return 0; | ||
|
|
||
| /* | ||
| * if the runtime_resume flag is set, call the runtime_resume routine | ||
|
|
@@ -124,9 +128,13 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) | |
| struct snd_sof_dev *sdev = dev_get_drvdata(dev); | ||
| int ret; | ||
|
|
||
| /* do nothing if dsp suspend callback is not set */ | ||
| if (!sof_ops(sdev)->suspend) | ||
| return 0; | ||
| /* do nothing if dsp suspend callbacks are not set */ | ||
| if (runtime_suspend) | ||
| if (!sof_ops(sdev)->runtime_suspend) | ||
| return 0; | ||
| else | ||
| if (!sof_ops(sdev)->suspend) | ||
| return 0; | ||
|
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. @ranj063 Do we need these checks here ? they are already checked in snd_sof_dsp_suspend and snd_sof_dsp_runtime_suspend |
||
|
|
||
| /* release trace */ | ||
| snd_sof_release_trace(sdev); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.