Skip to content

Commit 23adeb7

Browse files
shumingfanbroonie
authored andcommitted
ASoC: rt711-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/20230721090711.128247-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent b69de26 commit 23adeb7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sound/soc/codecs/rt711-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 rt711_sdca_dev_resume(struct device *dev)
438438
if (!rt711->first_hw_init)
439439
return 0;
440440

441-
if (!slave->unattach_request)
441+
if (!slave->unattach_request) {
442+
if (rt711->disable_irq == true) {
443+
mutex_lock(&rt711->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+
rt711->disable_irq = false;
447+
mutex_unlock(&rt711->disable_irq_lock);
448+
}
442449
goto regmap_sync;
450+
}
443451

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

0 commit comments

Comments
 (0)