Skip to content

Commit a0b7c59

Browse files
shumingfanbroonie
authored andcommitted
ASoC: rt722-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/20230721090732.128282-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 7a8735c commit a0b7c59

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,16 @@ static int __maybe_unused rt722_sdca_dev_resume(struct device *dev)
463463
if (!rt722->first_hw_init)
464464
return 0;
465465

466-
if (!slave->unattach_request)
466+
if (!slave->unattach_request) {
467+
if (rt722->disable_irq == true) {
468+
mutex_lock(&rt722->disable_irq_lock);
469+
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK1, SDW_SCP_SDCA_INTMASK_SDCA_6);
470+
sdw_write_no_pm(slave, SDW_SCP_SDCA_INTMASK2, SDW_SCP_SDCA_INTMASK_SDCA_8);
471+
rt722->disable_irq = false;
472+
mutex_unlock(&rt722->disable_irq_lock);
473+
}
467474
goto regmap_sync;
475+
}
468476

469477
time = wait_for_completion_timeout(&slave->initialization_complete,
470478
msecs_to_jiffies(RT722_PROBE_TIMEOUT));

0 commit comments

Comments
 (0)