ASoC: Mediatek: MT8183: enable dev runtime suspend and resume
Subsystems (3)
PATCH 1/1 ASoC: Mediatek: MT8183: enable dev runtime suspend and resume
System suspend will power off audio, so we need regcache sync when system resume.
Remove pm_runtime_get_sync in dev probe and pm_runtime_put_sync in dev remove.So that audio dev can triggle runitme suspend and resume.
---
Hi,
This patch is based on for-next and test passed.
--- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c +1 -4
@@ -1142,8 +1142,6 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)regcache_cache_only (afe->regmap, true);regcache_mark_dirty (afe->regmap); -pm_runtime_get_sync (&pdev->dev); -/* init memif */ afe->memif_size =MT8183_MEMIF_NUM ; afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
@@ -1235,11 +1233,10 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)static int mt8183_afe_pcm_dev_remove (struct platform_device *pdev) { -pm_runtime_put_sync (&pdev->dev); -pm_runtime_disable (&pdev->dev);if (!pm_runtime_status_suspended (&pdev->dev))mt8183_afe_runtime_suspend (&pdev->dev); +return 0 ; }
Signature · 1 line
1.8.1.1.dirty
Mark Brown
maintainerQuoted 5 lines · Jiaxin Yu
System suspend will power off audio, so we need regcache sync when system resume.
Remove
pm_runtime_get_syncin dev probe andpm_runtime_put_syncin dev remove.So that audio dev can triggle runitme suspend and resume.
While allowing runtime PM to run is good it'd be better to have a standard system power management resume function as well that ensures everything is restored after suspend to avoid unfortunate interactions with user configuration of runtime PM.
Mark Brown
maintainerApplied "ASoC: Mediatek: MT8183: enable dev runtime suspend and resume" to the asoc tree
In reply to Jiaxin YuThe patch
ASoC: Mediatek: MT8183: enable dev runtime suspend and resume
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
5463eb5c2f758069d1db21ed2cf23339431c9481Mon Sep 17 00:00:00 2001
From: Jiaxin Yu <[email protected]>
Date: Wed, 22 May 2019 22:52:04 +0800
Subject: [PATCH] ASoC: Mediatek: MT8183: enable dev runtime suspend and resume
System suspend will power off audio, so we need regcache sync when system resume.
Remove pm_runtime_get_sync in dev probe and pm_runtime_put_sync in dev remove.So that audio dev can triggle runitme suspend and resume.
--- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c +1 -4
@@ -1142,8 +1142,6 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)regcache_cache_only (afe->regmap, true);regcache_mark_dirty (afe->regmap); -pm_runtime_get_sync (&pdev->dev); -/* init memif */ afe->memif_size =MT8183_MEMIF_NUM ; afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
@@ -1235,11 +1233,10 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)static int mt8183_afe_pcm_dev_remove (struct platform_device *pdev) { -pm_runtime_put_sync (&pdev->dev); -pm_runtime_disable (&pdev->dev);if (!pm_runtime_status_suspended (&pdev->dev))mt8183_afe_runtime_suspend (&pdev->dev); +return 0 ; }
Signature · 1 line
2.20.1