Skip to content

Commit 7a8735c

Browse files
shumingfanbroonie
authored andcommitted
ASoC: rt712-sdca: fix for JD event handling in ClockStop Mode0
When the system suspends, peripheral SDCA interrupts are disabled. When system level resume is invoked, the 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> Reported-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230721090721.128264-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent d20d35d commit 7a8735c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sound/soc/codecs/rt712-sdca-sdw.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,16 @@ static int __maybe_unused rt712_sdca_dev_resume(struct device *dev)
438438
if (!rt712->first_hw_init)
439439
return 0;
440440

441-
if (!slave->unattach_request)
441+
if (!slave->unattach_request) {
442+
if (rt712->disable_irq == true) {
443+
mutex_lock(&rt712->disable_irq_lock);
444+
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_0);
445+
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8);
446+
rt712->disable_irq = false;
447+
mutex_unlock(&rt712->disable_irq_lock);
448+
}
442449
goto regmap_sync;
450+
}
443451

444452
time = wait_for_completion_timeout(&slave->initialization_complete,
445453
msecs_to_jiffies(RT712_PROBE_TIMEOUT));

0 commit comments

Comments
 (0)