Regression apparently caused by commit 088a40980efbc2c449b72f0f2c7ebd82f71d08e2 "ASoC: amd: acp: add pm ops support for acp pci driver"
I'm trying to develop a sound machine driver based on the acp legacy driver. The first version of the driver was sent for review on the alsa mailing list this
spring: https://lore.kernel.org/all/[email protected]
I'm trying to fix some of the issues that were brought up during the review back then, but when I ported the patches to the latest commit on the for-next branch, I noticed a regression where I couldn't hear any sound at all.
So I started a bisect session and found that the first bad commit is:
ASoC: amd: acp: add pm ops support for acp pci driver commit 088a40980efbc2c449b72f0f2c7ebd82f71d08e2
https://lore.kernel.org/lkml/[email protected]
If I revert this commit sound works as expected. So I started tinkering a little bit with it and I believe that what happens is that the acp pci driver
enters the autosuspend state and never leaves this state at all.
I noticed this because if I increase the autosuspend delay to a much
larger value, then the sound works until that delay passes.
I added traces and I can see that when the delay expires the suspend callback snd_acp_suspend() gets called, but the resume callback snd_acp_resume() never gets called.
I'm no expert in runtime power management (though I did read a bit on it), so I don't understand all the things that happen underneath, but one thing that is not clear to me is who's supposed to mark activity on this device and keep it from entering autosuspend if the user wants to play some sound? Shouldn't there be some counterpart that calls pm_runtime_mark_last_busy() ? I looked through the code and can't find who's calling pm_runtime_mark_last_busy().
Some help here would be welcome. Is there something missing in my machine driver code, or is the runtime pm handling in acp pci driver wrong?
On Thu, Aug 03, 2023 at 10:22:07PM +0300, Marian Postevca wrote:
Please fix your mail client to word wrap within paragraphs at something substantially less than 80 columns. Doing this makes your messages much easier to read and reply to.
Quoted 7 lines
I'm no expert in runtime power management (though I did read a bit on it), so I don't understand all the things that happen underneath, but one thing that is not clear to me is who's supposed to mark activity on this device and keep it from entering autosuspend if the user wants to play some sound? Shouldn't there be some counterpart that calls
pm_runtime_mark_last_busy()? I looked through the code and can't find who's callingpm_runtime_mark_last_busy().
The core will hold devices out of suspend through a combination of DAPM and PCMs being held open, it just does get and puts rather than making an effort to use autosuspend delays. See the calls to pm_runtime_get_sync() in the core.
Quoted 21 lines · Marian Postevca
I'm trying to develop a sound machine driver based on the acp legacy driver. The first version of the driver was sent for review on the alsa mailing list this
spring: https://lore.kernel.org/all/[email protected]I'm trying to fix some of the issues that were brought up during the review back then, but when I ported the patches to the latest commit on the for-next branch, I noticed a regression where I couldn't hear any sound at all.
So I started a bisect session and found that the first bad commit is:
ASoC: amd: acp: add pm ops support for acp pci driver commit088a40980efbc2c449b72f0f2c7ebd82f71d08e2
https://lore.kernel.org/lkml/[email protected]If I revert this commit sound works as expected. So I started tinkering a little bit with it and I believe that what happens is that the acp pci driver
enters the autosuspend state and never leaves this state at all.
I noticed this because if I increase the autosuspend delay to a much
larger value, then the sound works until that delay passes.
I added traces and I can see that when the delay expires the suspend callbacksnd_acp_suspend()gets called, but the resume callbacksnd_acp_resume()never gets called.
Quoted 8 lines
I'm no expert in runtime power management (though I did read a bit on it), so I don't understand all the things that happen underneath, but one thing that is not clear to me is who's supposed to mark activity on this device and keep it from entering autosuspend if the user wants to play some sound? Shouldn't there be some counterpart that calls
pm_runtime_mark_last_busy()? I looked through the code and can't find who's callingpm_runtime_mark_last_busy().Some help here would be welcome. Is there something missing in my machine driver code, or is the runtime pm handling in acp pci driver wrong?
We haven't up streamed pm ops for Renoir platform.
That is the cause for the issue.
Will upstream them in a week.
Quoted 5 lines · syed saba kareem
We haven't up streamed pm ops for Renoir platform.
That is the cause for the issue.
Will upstream them in a week.
Did you manage to upstream the pm ops for Renoir platform? I have checked the latest commit on the for-next branch ( ed2232d49187cebc007ecf4e6374069b11ab3219 ) and the issue is still there.
I still have to revert commit 088a40980efbc2c449b72f0f2c7ebd82f71d08e2 to have my driver function properly.
Quoted 21 lines · Marian Postevca
I'm trying to develop a sound machine driver based on the acp legacy driver. The first version of the driver was sent for review on the alsa mailing list this
spring: https://lore.kernel.org/all/[email protected]I'm trying to fix some of the issues that were brought up during the review back then, but when I ported the patches to the latest commit on the for-next branch, I noticed a regression where I couldn't hear any sound at all.
So I started a bisect session and found that the first bad commit is:
ASoC: amd: acp: add pm ops support for acp pci driver commit088a40980efbc2c449b72f0f2c7ebd82f71d08e2
https://lore.kernel.org/lkml/[email protected]If I revert this commit sound works as expected. So I started tinkering a little bit with it and I believe that what happens is that the acp pci driver
enters the autosuspend state and never leaves this state at all.
I noticed this because if I increase the autosuspend delay to a much
larger value, then the sound works until that delay passes.
I added traces and I can see that when the delay expires the suspend callbacksnd_acp_suspend()gets called, but the resume callbacksnd_acp_resume()never gets called.
Quoted 8 lines
I'm no expert in runtime power management (though I did read a bit on it), so I don't understand all the things that happen underneath, but one thing that is not clear to me is who's supposed to mark activity on this device and keep it from entering autosuspend if the user wants to play some sound? Shouldn't there be some counterpart that calls
pm_runtime_mark_last_busy()? I looked through the code and can't find who's callingpm_runtime_mark_last_busy().Some help here would be welcome. Is there something missing in my machine driver code, or is the runtime pm handling in acp pci driver wrong?
Thanks for the regression report. I'm adding it to regzbot:
#regzbot ^introduced: 088a40980efbc2
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 28 lines · Bagas Sanjaya
Quoted 27 lines · Marian Postevca
I'm trying to develop a sound machine driver based on the acp legacy driver. The first version of the driver was sent for review on the alsa mailing list this
spring: https://lore.kernel.org/all/[email protected]I'm trying to fix some of the issues that were brought up during the review back then, but when I ported the patches to the latest commit on the for-next branch, I noticed a regression where I couldn't hear any sound at all.
So I started a bisect session and found that the first bad commit is:
ASoC: amd: acp: add pm ops support for acp pci driver commit088a40980efbc2c449b72f0f2c7ebd82f71d08e2
https://lore.kernel.org/lkml/[email protected]If I revert this commit sound works as expected. So I started tinkering a little bit with it and I believe that what happens is that the acp pci driver
enters the autosuspend state and never leaves this state at all.
I noticed this because if I increase the autosuspend delay to a much
larger value, then the sound works until that delay passes.
I added traces and I can see that when the delay expires the suspend callbacksnd_acp_suspend()gets called, but the resume callbacksnd_acp_resume()never gets called.I'm no expert in runtime power management (though I did read a bit on it), so I don't understand all the things that happen underneath, but one thing that is not clear to me is who's supposed to mark activity on this device and keep it from entering autosuspend if the user wants to play some sound? Shouldn't there be some counterpart that calls
pm_runtime_mark_last_busy()? I looked through the code and can't find who's callingpm_runtime_mark_last_busy().
Quoted 6 lines
Quoted 2 lines
Some help here would be welcome. Is there something missing in my machine driver code, or is the runtime pm handling in acp pci driver wrong?
Thanks for the regression report. I'm adding it to regzbot:
#regzbot ^introduced:
088a40980efbc2
We were working on some other priority tasks, will upstream the changes
by next week.
Quoted 32 lines · syed saba kareem
Quoted 30 lines · Bagas Sanjaya
Quoted 29 lines · Marian Postevca
I'm trying to develop a sound machine driver based on the acp legacy driver. The first version of the driver was sent for review on the alsa mailing list this
spring: https://lore.kernel.org/all/[email protected]I'm trying to fix some of the issues that were brought up during the review back then, but when I ported the patches to the latest commit on the for-next branch, I noticed a regression where I couldn't hear any sound at all.
So I started a bisect session and found that the first bad commit is:
ASoC: amd: acp: add pm ops support for acp pci driver commit088a40980efbc2c449b72f0f2c7ebd82f71d08e2
https://lore.kernel.org/lkml/[email protected]If I revert this commit sound works as expected. So I started tinkering a little bit with it and I believe that what happens is that the acp pci driver
enters the autosuspend state and never leaves this state at all.
I noticed this because if I increase the autosuspend delay to a much
larger value, then the sound works until that delay passes.
I added traces and I can see that when the delay expires the suspend callbacksnd_acp_suspend()gets called, but the resume callbacksnd_acp_resume()never gets called.I'm no expert in runtime power management (though I did read a bit on it), so I don't understand all the things that happen underneath, but one thing that is not clear to me is who's supposed to mark activity on this device and keep it from entering autosuspend if the user wants to play some sound? Shouldn't there be some counterpart that calls
pm_runtime_mark_last_busy()? I looked through the code and can't find who's callingpm_runtime_mark_last_busy().Some help here would be welcome. Is there something missing in my machine driver code, or is the runtime pm handling in acp pci driver wrong?
Quoted 8 lines
Quoted 4 lines
Thanks for the regression report. I'm adding it to regzbot:
#regzbot ^introduced:
088a40980efbc2We were working on some other priority tasks, will upstream the changes
by next week.
OK, thanks!
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 10 lines · syed saba kareem
Quoted 1 line · Bagas Sanjaya
On Thu, Aug 03, 2023 at 10:22:07PM +0300, Marian Postevca wrote:
[...]
Quoted 4 lines
Quoted 3 lines
Some help here would be welcome. Is there something missing in my machine driver code, or
is the runtime pm handling in acp pci driver wrong?We were working on some other priority tasks, will upstream the changes
by next week.
Hi syed saba kareem! Did that happen? From here it looks like it did not, so I assume the regression was not yet addressed. But it's easy to miss something, hence this mail.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.
#regzbot poke
Quoted 7 lines · Linux regression tracking (Thorsten Leemhuis)
Quoted 6 lines · syed saba kareem
Quoted 1 line · Bagas Sanjaya
On Thu, Aug 03, 2023 at 10:22:07PM +0300, Marian Postevca wrote:
[...]
Quoted 3 lines
Quoted 3 lines
Some help here would be welcome. Is there something missing in my machine driver code, or
is the runtime pm handling in acp pci driver wrong?
Quoted 6 lines
Quoted 3 lines
We were working on some other priority tasks, will upstream the changes
by next week.
Hi syed saba kareem! Did that happen? From here it looks like it did not, so I assume the regression was not yet addressed. But it's easy to miss something, hence this mail.
Hi , We have up streamed the patch it is in review.
Please find the below link for the patch details.
https://patchwork.kernel.org/project/alsa-devel/patch/[email protected]/
Quoted 7 lines
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.#regzbot poke
Quoted 10 lines · syed saba kareem
Quoted 9 lines · Linux regression tracking (Thorsten Leemhuis)
Quoted 8 lines · syed saba kareem
Quoted 1 line · Bagas Sanjaya
On Thu, Aug 03, 2023 at 10:22:07PM +0300, Marian Postevca wrote:
[...]
Quoted 3 lines
Quoted 3 lines
Some help here would be welcome. Is there something missing in my machine driver code, or
is the runtime pm handling in acp pci driver wrong?We were working on some other priority tasks, will upstream the changes
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
by next week.
Hi syed saba kareem! Did that happen? From here it looks like it did not, so I assume the regression was not yet addressed. But it's easy to miss something, hence this mail.
Hi , We have up streamed the patch it is in review. Please find the below link for the patch details.
https://patchwork.kernel.org/project/alsa-devel/patch/[email protected]/
Ahh, great. Has to Fixes: tag and no Link:/Closes: tag to this thread, otherwise I would have noticed that change myself, but whatever.
Thx!
#regzbot monitor:
https://lore.kernel.org/all/[email protected]/
#regzbot fix: ASoC: amd: acp: add pm ops support for renoir platform #regzbot ignore-activity
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.
Quoted 7 lines · syed saba kareem
Hi , We have up streamed the patch it is in review.
Please find the below link for the patch details.
https://patchwork.kernel.org/project/alsa-devel/patch/[email protected]/
Sorry maybe I'm not understanding here something, when you are saying that the patch is in review, where is this review being done?
As far as I can tell Mark Brown only pulled the first patch from your series:
Quoted 12 lines
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: amd: acp: add
Kconfigoptions for acp7.0 based platform drivercommit: d3534684ada99ef8c0899eb28c62b4462483ee19[2/2] ASoC: amd: acp: add pm ops support for renoir platform
(no commit info)
I don't see the second patch in for-next.
Quoted 6 lines · Marian Postevca
Quoted 4 lines · syed saba kareem
Hi , We have up streamed the patch it is in review.
Please find the below link for the patch details.
Quoted 7 lines
Sorry maybe I'm not understanding here something, when you are saying that the patch is in review, where is this review being done?
As far as I can tell Mark Brown only pulled the first patch from your series:
We got comments for the second patch and we addressed them.
It seems it may be stuck at review stage as one patch got merged.
Will resend the patch again.
You can find the received review comments for the patch in the below link.
https://patchwork.kernel.org/project/alsa-devel/patch/[email protected]/
Quoted 12 lines
Quoted 11 lines
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: amd: acp: add
Kconfigoptions for acp7.0 based platform drivercommit: d3534684ada99ef8c0899eb28c62b4462483ee19[2/2] ASoC: amd: acp: add pm ops support for renoir platform
(no commit info)I don't see the second patch in for-next.
Quoted 16 lines · syed saba kareem
Quoted 6 lines · Marian Postevca
Quoted 4 lines · syed saba kareem
Hi , We have up streamed the patch it is in review.
Please find the below link for the patch details.
Quoted 7 lines
Sorry maybe I'm not understanding here something, when you are saying that the patch is in review, where is this review being done?
As far as I can tell Mark Brown only pulled the first patch from your series:
Quoted 7 lines
We got comments for the second patch and we addressed them.
It seems it may be stuck at review stage as one patch got merged.
Will resend the patch again.
You can find the received review comments for the patch in the below link.
Any news? From a quick look it seems this didn't make any progress at all, but I might be missing something.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.
#regzbot poke
Quoted 16 lines
Quoted 14 lines
Quoted 5 lines
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
for-nextQuoted 8 lines
Thanks!
[1/2] ASoC: amd: acp: add
Kconfigoptions for acp7.0 based platform driver
commit:d3534684ada99ef8c0899eb28c62b4462483ee19[2/2] ASoC: amd: acp: add pm ops support for renoir platform (no commit info)I don't see the second patch in for-next.