alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null even soundwire mode
@ 2020-07-01  7:16 Oder Chiou
  2020-07-01 22:23 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Oder Chiou @ 2020-07-01  7:16 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: Oder Chiou, jack.yu, alsa-devel, albertchen, derek.fang,
	bard.liao, shumingf, flove

Base on https://patchwork.kernel.org/patch/11237953/
Soundwire mode also should follow it.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
---
 sound/soc/codecs/rt5682.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index e9514c81b9ba..de40b6cd16cf 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -992,16 +992,17 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component,
 
 	rt5682->hs_jack = hs_jack;
 
-	if (!rt5682->is_sdw) {
-		if (!hs_jack) {
-			regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
-				RT5682_JD1_EN_MASK, RT5682_JD1_DIS);
-			regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
-				RT5682_POW_JDH | RT5682_POW_JDL, 0);
-			cancel_delayed_work_sync(&rt5682->jack_detect_work);
-			return 0;
-		}
+	if (!hs_jack) {
+		regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
+			RT5682_JD1_EN_MASK, RT5682_JD1_DIS);
+		regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
+			RT5682_POW_JDH | RT5682_POW_JDL, 0);
+		cancel_delayed_work_sync(&rt5682->jack_detect_work);
 
+		return 0;
+	}
+
+	if (!rt5682->is_sdw) {
 		switch (rt5682->pdata.jd_src) {
 		case RT5682_JD1:
 			snd_soc_component_update_bits(component,
-- 
2.27.0


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

* Re: [PATCH] ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null even soundwire mode
  2020-07-01  7:16 [PATCH] ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null even soundwire mode Oder Chiou
@ 2020-07-01 22:23 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-07-01 22:23 UTC (permalink / raw)
  To: lgirdwood, Oder Chiou
  Cc: jack.yu, alsa-devel, albertchen, derek.fang, flove, shumingf, bard.liao

On Wed, 1 Jul 2020 15:16:45 +0800, Oder Chiou wrote:
> Base on https://patchwork.kernel.org/patch/11237953/
> Soundwire mode also should follow it.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null even soundwire mode
      commit: bc4be656471b39af8f2ad57ee372012c55da1da7

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:[~2020-07-01 22:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01  7:16 [PATCH] ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null even soundwire mode Oder Chiou
2020-07-01 22:23 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).