* [PATCH] ASoC: da7219: Improve system suspend and resume handling
@ 2023-11-01 2:25 David Rau
2023-11-02 14:26 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: David Rau @ 2023-11-01 2:25 UTC (permalink / raw)
To: broonie
Cc: support.opensource, lgirdwood, perex, tiwai, alsa-devel,
linux-kernel, dmaluka, David Rau
When DA7219 is suspended, prevent the AAD IRQ handler is unexpectedly
executed and cause the I2C driver "Transfer while suspended" failure.
Signed-off-by: David Rau <David.Rau.opensource@dm.renesas.com>
---
sound/soc/codecs/da7219-aad.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/da7219-aad.c b/sound/soc/codecs/da7219-aad.c
index 3bbe85091649..4c4405942779 100644
--- a/sound/soc/codecs/da7219-aad.c
+++ b/sound/soc/codecs/da7219-aad.c
@@ -927,10 +927,15 @@ void da7219_aad_suspend(struct snd_soc_component *component)
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
u8 micbias_ctrl;
+ disable_irq(da7219_aad->irq);
+
if (da7219_aad->jack) {
/* Disable jack detection during suspend */
snd_soc_component_update_bits(component, DA7219_ACCDET_CONFIG_1,
DA7219_ACCDET_EN_MASK, 0);
+ cancel_delayed_work_sync(&da7219_aad->jack_det_work);
+ /* Disable ground switch */
+ snd_soc_component_update_bits(component, 0xFB, 0x01, 0x00);
/*
* If we have a 4-pole jack inserted, then micbias will be
@@ -947,8 +952,6 @@ void da7219_aad_suspend(struct snd_soc_component *component)
}
}
}
-
- synchronize_irq(da7219_aad->irq);
}
void da7219_aad_resume(struct snd_soc_component *component)
@@ -971,6 +974,8 @@ void da7219_aad_resume(struct snd_soc_component *component)
DA7219_ACCDET_EN_MASK,
DA7219_ACCDET_EN_MASK);
}
+
+ enable_irq(da7219_aad->irq);
}
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: da7219: Improve system suspend and resume handling
2023-11-01 2:25 [PATCH] ASoC: da7219: Improve system suspend and resume handling David Rau
@ 2023-11-02 14:26 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-11-02 14:26 UTC (permalink / raw)
To: David Rau
Cc: support.opensource, lgirdwood, perex, tiwai, alsa-devel,
linux-kernel, dmaluka
On Wed, 01 Nov 2023 10:25:07 +0800, David Rau wrote:
> When DA7219 is suspended, prevent the AAD IRQ handler is unexpectedly
> executed and cause the I2C driver "Transfer while suspended" failure.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: da7219: Improve system suspend and resume handling
commit: ab5201e20c181563774631258f737caeefed2364
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-02 14:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-01 2:25 [PATCH] ASoC: da7219: Improve system suspend and resume handling David Rau
2023-11-02 14:26 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®