Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ASoC: rt5682-sdw: fix for JD event handling in ClockStop Mode0
@ 2023-07-03  9:02 shumingf
  2023-07-03 10:17 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 17+ messages in thread
From: shumingf @ 2023-07-03  9:02 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: alsa-devel, lars, flove, oder_chiou, jack.yu, derek.fang,
	Vijendar.Mukunda, Shuming Fan

From: Shuming Fan <shumingf@realtek.com>

During ClockStop Mode0, peripheral interrupts are disabled.
When system level resume is invoked, Peripheral SDCA interrupts
should be enabled to handle JD events.
Enable SDCA interrupts in resume sequence when ClockStop Mode0 is applied.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
---
 sound/soc/codecs/rt5682-sdw.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c
index 67404f45389f..4968a8c0064d 100644
--- a/sound/soc/codecs/rt5682-sdw.c
+++ b/sound/soc/codecs/rt5682-sdw.c
@@ -750,8 +750,15 @@ static int __maybe_unused rt5682_dev_resume(struct device *dev)
 	if (!rt5682->first_hw_init)
 		return 0;
 
-	if (!slave->unattach_request)
+	if (!slave->unattach_request) {
+		if (rt5682->disable_irq == true) {
+			mutex_lock(&rt5682->disable_irq_lock);
+			sdw_write_no_pm(slave, SDW_SCP_INTMASK1, SDW_SCP_INT1_IMPL_DEF);
+			rt5682->disable_irq = false;
+			mutex_unlock(&rt5682->disable_irq_lock);
+		}
 		goto regmap_sync;
+	}
 
 	time = wait_for_completion_timeout(&slave->initialization_complete,
 				msecs_to_jiffies(RT5682_PROBE_TIMEOUT));
-- 
2.40.1


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

end of thread, other threads:[~2023-07-04  9:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-03  9:02 [PATCH 1/5] ASoC: rt5682-sdw: fix for JD event handling in ClockStop Mode0 shumingf
2023-07-03 10:17 ` Pierre-Louis Bossart
2023-07-03 11:11   ` Shuming [范書銘]
2023-07-03 12:25     ` Pierre-Louis Bossart
2023-07-03 13:00       ` Shuming [范書銘]
2023-07-03 13:31         ` Mukunda,Vijendar
2023-07-03 14:20           ` Pierre-Louis Bossart
2023-07-03 14:46             ` Mukunda,Vijendar
2023-07-03 14:45               ` Pierre-Louis Bossart
2023-07-03 15:18                 ` Mukunda,Vijendar
2023-07-03 17:18                   ` Pierre-Louis Bossart
2023-07-04  6:36                     ` Mukunda,Vijendar
2023-07-04  7:11                       ` Pierre-Louis Bossart
2023-07-04  7:37                         ` Mukunda,Vijendar
2023-07-04  8:27                           ` Pierre-Louis Bossart
2023-07-04  9:03                             ` Mukunda,Vijendar
2023-07-04  9:14                               ` Pierre-Louis Bossart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox