[PATCH 0/6] Suspend related fixes on Tegra
This series addresses following problems: * The runtime PM is not balanced in MVC driver, whenever mute or volume mixer controls are set. * Some of the AHUB devices (SFC, MVC, Mixer, AMX and ADX) use late system sleep. Suspend failure is seen on Jetson TX2 platform.
Sameer Pujar (6): ASoC: tegra: Balance runtime PM count ASoC: tegra: Use normal system sleep for SFC ASoC: tegra: Use normal system sleep for MVC ASoC: tegra: Use normal system sleep for Mixer ASoC: tegra: Use normal system sleep for AMX ASoC: tegra: Use normal system sleep for ADX
sound/soc/tegra/tegra210_adx.c | 4 ++-- sound/soc/tegra/tegra210_amx.c | 4 ++-- sound/soc/tegra/tegra210_mixer.c | 4 ++-- sound/soc/tegra/tegra210_mvc.c | 8 ++++---- sound/soc/tegra/tegra210_sfc.c | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-)
After successful application of volume/mute settings via mixer control put calls, the control returns without balancing the runtime PM count. This makes device to be always runtime active. Fix this by allowing control to reach pm_runtime_put() call.
Fixes: e539891f9687 ("ASoC: tegra: Add Tegra210 based MVC driver") Cc: stable@vger.kernel.org Signed-off-by: Sameer Pujar spujar@nvidia.com --- sound/soc/tegra/tegra210_mvc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra210_mvc.c b/sound/soc/tegra/tegra210_mvc.c index ae00570..c9859e1 100644 --- a/sound/soc/tegra/tegra210_mvc.c +++ b/sound/soc/tegra/tegra210_mvc.c @@ -164,7 +164,7 @@ static int tegra210_mvc_put_mute(struct snd_kcontrol *kcontrol, if (err < 0) goto end;
- return 1; + err = 1;
end: pm_runtime_put(cmpnt->dev); @@ -236,7 +236,7 @@ static int tegra210_mvc_put_vol(struct snd_kcontrol *kcontrol, TEGRA210_MVC_VOLUME_SWITCH_MASK, TEGRA210_MVC_VOLUME_SWITCH_TRIGGER);
- return 1; + err = 1;
end: pm_runtime_put(cmpnt->dev);
The driver currently subscribes for a late system sleep call. The initcall_debug log shows that suspend call for SFC device happens after the parent device (AHUB). This seems to cause suspend failure on Jetson TX2 platform. Also there is no use of having late system sleep specifically for SFC device. Fix the order by using normal system sleep.
Fixes: b2f74ec53a6c ("ASoC: tegra: Add Tegra210 based SFC driver") Cc: stable@vger.kernel.org Signed-off-by: Sameer Pujar spujar@nvidia.com --- sound/soc/tegra/tegra210_sfc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra210_sfc.c b/sound/soc/tegra/tegra210_sfc.c index 955cecd..af33bf2 100644 --- a/sound/soc/tegra/tegra210_sfc.c +++ b/sound/soc/tegra/tegra210_sfc.c @@ -3602,8 +3602,8 @@ static int tegra210_sfc_platform_remove(struct platform_device *pdev) static const struct dev_pm_ops tegra210_sfc_pm_ops = { SET_RUNTIME_PM_OPS(tegra210_sfc_runtime_suspend, tegra210_sfc_runtime_resume, NULL) - SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) };
static struct platform_driver tegra210_sfc_driver = {
The driver currently subscribes for a late system sleep call. The initcall_debug log shows that suspend call for MVC device happens after the parent device (AHUB). This seems to cause suspend failure on Jetson TX2 platform. Also there is no use of having late system sleep specifically for MVC device. Fix the order by using normal system sleep.
Fixes: e539891f9687 ("ASoC: tegra: Add Tegra210 based MVC driver") Cc: stable@vger.kernel.org Signed-off-by: Sameer Pujar spujar@nvidia.com --- sound/soc/tegra/tegra210_mvc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra210_mvc.c b/sound/soc/tegra/tegra210_mvc.c index c9859e1..93cbeb6 100644 --- a/sound/soc/tegra/tegra210_mvc.c +++ b/sound/soc/tegra/tegra210_mvc.c @@ -641,8 +641,8 @@ static int tegra210_mvc_platform_remove(struct platform_device *pdev) static const struct dev_pm_ops tegra210_mvc_pm_ops = { SET_RUNTIME_PM_OPS(tegra210_mvc_runtime_suspend, tegra210_mvc_runtime_resume, NULL) - SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) };
static struct platform_driver tegra210_mvc_driver = {
The driver currently subscribes for a late system sleep call. The initcall_debug log shows that suspend call for Mixer device happens after the parent device (AHUB). This seems to cause suspend failure on Jetson TX2 platform. Also there is no use of having late system sleep specifically for Mixer device. Fix the order by using normal system sleep.
Fixes: 05bb3d5ec64a ("ASoC: tegra: Add Tegra210 based Mixer driver") Cc: stable@vger.kernel.org Signed-off-by: Sameer Pujar spujar@nvidia.com --- sound/soc/tegra/tegra210_mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra210_mixer.c b/sound/soc/tegra/tegra210_mixer.c index 6fb041c..9513034 100644 --- a/sound/soc/tegra/tegra210_mixer.c +++ b/sound/soc/tegra/tegra210_mixer.c @@ -670,8 +670,8 @@ static int tegra210_mixer_platform_remove(struct platform_device *pdev) static const struct dev_pm_ops tegra210_mixer_pm_ops = { SET_RUNTIME_PM_OPS(tegra210_mixer_runtime_suspend, tegra210_mixer_runtime_resume, NULL) - SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) };
static struct platform_driver tegra210_mixer_driver = {
The driver currently subscribes for a late system sleep call. The initcall_debug log shows that suspend call for AMX device happens after the parent device (AHUB). This seems to cause suspend failure on Jetson TX2 platform. Also there is no use of having late system sleep specifically for AMX device. Fix the order by using normal system sleep.
Fixes: 77f7df346c45 ("ASoC: tegra: Add Tegra210 based AMX driver") Cc: stable@vger.kernel.org Signed-off-by: Sameer Pujar spujar@nvidia.com --- sound/soc/tegra/tegra210_amx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c index 86ad550..a10d616 100644 --- a/sound/soc/tegra/tegra210_amx.c +++ b/sound/soc/tegra/tegra210_amx.c @@ -587,8 +587,8 @@ static int tegra210_amx_platform_remove(struct platform_device *pdev) static const struct dev_pm_ops tegra210_amx_pm_ops = { SET_RUNTIME_PM_OPS(tegra210_amx_runtime_suspend, tegra210_amx_runtime_resume, NULL) - SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) };
static struct platform_driver tegra210_amx_driver = {
The driver currently subscribes for a late system sleep call. The initcall_debug log shows that suspend call for ADX device happens after the parent device (AHUB). This seems to cause suspend failure on Jetson TX2 platform. Also there is no use of having late system sleep specifically for ADX device. Fix the order by using normal system sleep.
Fixes: a99ab6f395a9 ("ASoC: tegra: Add Tegra210 based ADX driver") Cc: stable@vger.kernel.org Signed-off-by: Sameer Pujar spujar@nvidia.com --- sound/soc/tegra/tegra210_adx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c index 035e24e..69fabf9 100644 --- a/sound/soc/tegra/tegra210_adx.c +++ b/sound/soc/tegra/tegra210_adx.c @@ -518,8 +518,8 @@ static int tegra210_adx_platform_remove(struct platform_device *pdev) static const struct dev_pm_ops tegra210_adx_pm_ops = { SET_RUNTIME_PM_OPS(tegra210_adx_runtime_suspend, tegra210_adx_runtime_resume, NULL) - SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) };
static struct platform_driver tegra210_adx_driver = {
On Tue, 23 Nov 2021 19:37:33 +0530, Sameer Pujar wrote:
This series addresses following problems:
- The runtime PM is not balanced in MVC driver, whenever mute or volume mixer controls are set.
- Some of the AHUB devices (SFC, MVC, Mixer, AMX and ADX) use late system sleep. Suspend failure is seen on Jetson TX2 platform.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-linus
Thanks!
[1/6] ASoC: tegra: Balance runtime PM count commit: 70408f755f589f67957b9ec6852e6b01f858d0a2 [2/6] ASoC: tegra: Use normal system sleep for SFC commit: af120d07bbb0721708b10204beed66ed2cb0cb62 [3/6] ASoC: tegra: Use normal system sleep for MVC commit: c83d263a89f30d1c0274827c475f3583cf8e477f [4/6] ASoC: tegra: Use normal system sleep for Mixer commit: b78400e41653b3a752a4cd17d2fcbd4a96bb4bc2 [5/6] ASoC: tegra: Use normal system sleep for AMX commit: 638c31d542a576714a52bb6a9a7dedff98e32a1d [6/6] ASoC: tegra: Use normal system sleep for ADX commit: cf36de4fc5ce5502ce5070a793addd9d49df4113
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
participants (2)
-
Mark Brown
-
Sameer Pujar