All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: alsa-devel@alsa-project.org
Cc: aford@beaconembedded.com, Adam Ford <aford173@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	Stephen Kitt <steve@sk2.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Minghao Chi <chi.minghao@zte.com.cn>,
	patches@opensource.cirrus.com (open list:WOLFSON
	MICROELECTRONICS DRIVERS),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] ASoC: wm8962: Fix suspend while playing music
Date: Thu, 26 May 2022 13:21:28 -0500	[thread overview]
Message-ID: <20220526182129.538472-1-aford173@gmail.com> (raw)

If the audio CODEC is playing sound when the system is suspended,
it can be left in a state which throws the following error:

wm8962 3-001a: ASoC: error at soc_component_read_no_lock on wm8962.3-001a: -16

Once this error has occurred, the audio will not work again until rebooted.

Fix this by configuring SET_SYSTEM_SLEEP_PM_OPS.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 34cd5a2a997c..5cca89364280 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3868,6 +3868,7 @@ static int wm8962_runtime_suspend(struct device *dev)
 #endif
 
 static const struct dev_pm_ops wm8962_pm = {
+	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 	SET_RUNTIME_PM_OPS(wm8962_runtime_suspend, wm8962_runtime_resume, NULL)
 };
 
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Adam Ford <aford173@gmail.com>
To: alsa-devel@alsa-project.org
Cc: aford@beaconembedded.com,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Liam Girdwood <lgirdwood@gmail.com>,
	"open list:WOLFSON MICROELECTRONICS DRIVERS"
	<patches@opensource.cirrus.com>, Takashi Iwai <tiwai@suse.com>,
	Minghao Chi <chi.minghao@zte.com.cn>,
	Mark Brown <broonie@kernel.org>, Stephen Kitt <steve@sk2.org>,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	Adam Ford <aford173@gmail.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH] ASoC: wm8962: Fix suspend while playing music
Date: Thu, 26 May 2022 13:21:28 -0500	[thread overview]
Message-ID: <20220526182129.538472-1-aford173@gmail.com> (raw)

If the audio CODEC is playing sound when the system is suspended,
it can be left in a state which throws the following error:

wm8962 3-001a: ASoC: error at soc_component_read_no_lock on wm8962.3-001a: -16

Once this error has occurred, the audio will not work again until rebooted.

Fix this by configuring SET_SYSTEM_SLEEP_PM_OPS.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 34cd5a2a997c..5cca89364280 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3868,6 +3868,7 @@ static int wm8962_runtime_suspend(struct device *dev)
 #endif
 
 static const struct dev_pm_ops wm8962_pm = {
+	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 	SET_RUNTIME_PM_OPS(wm8962_runtime_suspend, wm8962_runtime_resume, NULL)
 };
 
-- 
2.25.1


             reply	other threads:[~2022-05-26 18:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 18:21 Adam Ford [this message]
2022-05-26 18:21 ` [PATCH] ASoC: wm8962: Fix suspend while playing music Adam Ford
2022-05-27  7:56 ` Charles Keepax
2022-05-27  7:56   ` Charles Keepax
2022-06-07 10:46 ` Mark Brown
2022-06-07 10:46   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220526182129.538472-1-aford173@gmail.com \
    --to=aford173@gmail.com \
    --cc=aford@beaconembedded.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=chi.minghao@zte.com.cn \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=geert+renesas@glider.be \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=steve@sk2.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.