stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] ASoC: tegra: Balance runtime PM count
       [not found] <1637676459-31191-1-git-send-email-spujar@nvidia.com>
@ 2021-11-23 14:07 ` Sameer Pujar
  2021-11-23 14:07 ` [PATCH 2/6] ASoC: tegra: Use normal system sleep for SFC Sameer Pujar
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: Sameer Pujar @ 2021-11-23 14:07 UTC (permalink / raw)
  To: broonie, lgirdwood, perex, tiwai
  Cc: thierry.reding, jonathanh, alsa-devel, linux-tegra, linux-kernel,
	Sameer Pujar, stable

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);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/6] ASoC: tegra: Use normal system sleep for SFC
       [not found] <1637676459-31191-1-git-send-email-spujar@nvidia.com>
  2021-11-23 14:07 ` [PATCH 1/6] ASoC: tegra: Balance runtime PM count Sameer Pujar
@ 2021-11-23 14:07 ` Sameer Pujar
  2021-11-23 14:07 ` [PATCH 3/6] ASoC: tegra: Use normal system sleep for MVC Sameer Pujar
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: Sameer Pujar @ 2021-11-23 14:07 UTC (permalink / raw)
  To: broonie, lgirdwood, perex, tiwai
  Cc: thierry.reding, jonathanh, alsa-devel, linux-tegra, linux-kernel,
	Sameer Pujar, stable

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 = {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/6] ASoC: tegra: Use normal system sleep for MVC
       [not found] <1637676459-31191-1-git-send-email-spujar@nvidia.com>
  2021-11-23 14:07 ` [PATCH 1/6] ASoC: tegra: Balance runtime PM count Sameer Pujar
  2021-11-23 14:07 ` [PATCH 2/6] ASoC: tegra: Use normal system sleep for SFC Sameer Pujar
@ 2021-11-23 14:07 ` Sameer Pujar
  2021-11-23 14:07 ` [PATCH 4/6] ASoC: tegra: Use normal system sleep for Mixer Sameer Pujar
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: Sameer Pujar @ 2021-11-23 14:07 UTC (permalink / raw)
  To: broonie, lgirdwood, perex, tiwai
  Cc: thierry.reding, jonathanh, alsa-devel, linux-tegra, linux-kernel,
	Sameer Pujar, stable

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 = {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/6] ASoC: tegra: Use normal system sleep for Mixer
       [not found] <1637676459-31191-1-git-send-email-spujar@nvidia.com>
                   ` (2 preceding siblings ...)
  2021-11-23 14:07 ` [PATCH 3/6] ASoC: tegra: Use normal system sleep for MVC Sameer Pujar
@ 2021-11-23 14:07 ` Sameer Pujar
  2021-11-23 14:07 ` [PATCH 5/6] ASoC: tegra: Use normal system sleep for AMX Sameer Pujar
  2021-11-23 14:07 ` [PATCH 6/6] ASoC: tegra: Use normal system sleep for ADX Sameer Pujar
  5 siblings, 0 replies; 6+ messages in thread
From: Sameer Pujar @ 2021-11-23 14:07 UTC (permalink / raw)
  To: broonie, lgirdwood, perex, tiwai
  Cc: thierry.reding, jonathanh, alsa-devel, linux-tegra, linux-kernel,
	Sameer Pujar, stable

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 = {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/6] ASoC: tegra: Use normal system sleep for AMX
       [not found] <1637676459-31191-1-git-send-email-spujar@nvidia.com>
                   ` (3 preceding siblings ...)
  2021-11-23 14:07 ` [PATCH 4/6] ASoC: tegra: Use normal system sleep for Mixer Sameer Pujar
@ 2021-11-23 14:07 ` Sameer Pujar
  2021-11-23 14:07 ` [PATCH 6/6] ASoC: tegra: Use normal system sleep for ADX Sameer Pujar
  5 siblings, 0 replies; 6+ messages in thread
From: Sameer Pujar @ 2021-11-23 14:07 UTC (permalink / raw)
  To: broonie, lgirdwood, perex, tiwai
  Cc: thierry.reding, jonathanh, alsa-devel, linux-tegra, linux-kernel,
	Sameer Pujar, stable

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 = {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 6/6] ASoC: tegra: Use normal system sleep for ADX
       [not found] <1637676459-31191-1-git-send-email-spujar@nvidia.com>
                   ` (4 preceding siblings ...)
  2021-11-23 14:07 ` [PATCH 5/6] ASoC: tegra: Use normal system sleep for AMX Sameer Pujar
@ 2021-11-23 14:07 ` Sameer Pujar
  5 siblings, 0 replies; 6+ messages in thread
From: Sameer Pujar @ 2021-11-23 14:07 UTC (permalink / raw)
  To: broonie, lgirdwood, perex, tiwai
  Cc: thierry.reding, jonathanh, alsa-devel, linux-tegra, linux-kernel,
	Sameer Pujar, stable

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 = {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-23 14:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1637676459-31191-1-git-send-email-spujar@nvidia.com>
2021-11-23 14:07 ` [PATCH 1/6] ASoC: tegra: Balance runtime PM count Sameer Pujar
2021-11-23 14:07 ` [PATCH 2/6] ASoC: tegra: Use normal system sleep for SFC Sameer Pujar
2021-11-23 14:07 ` [PATCH 3/6] ASoC: tegra: Use normal system sleep for MVC Sameer Pujar
2021-11-23 14:07 ` [PATCH 4/6] ASoC: tegra: Use normal system sleep for Mixer Sameer Pujar
2021-11-23 14:07 ` [PATCH 5/6] ASoC: tegra: Use normal system sleep for AMX Sameer Pujar
2021-11-23 14:07 ` [PATCH 6/6] ASoC: tegra: Use normal system sleep for ADX Sameer Pujar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).