From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: <broonie@kernel.org>
Cc: <lgirdwood@gmail.com>, <alsa-devel@alsa-project.org>,
<patches@opensource.cirrus.com>, <linux-sound@vger.kernel.org>
Subject: [PATCH 3/3] ASoC: cs42l43: Shut down jack detection on component remove
Date: Fri, 2 Feb 2024 14:06:19 +0000 [thread overview]
Message-ID: <20240202140619.1068560-3-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20240202140619.1068560-1-ckeepax@opensource.cirrus.com>
Disable the jack detection and sync in any currently running work when
the component is removed.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/cs42l43.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c
index c84d5952cdb5..256767ef4c03 100644
--- a/sound/soc/codecs/cs42l43.c
+++ b/sound/soc/codecs/cs42l43.c
@@ -2115,6 +2115,13 @@ static void cs42l43_component_remove(struct snd_soc_component *component)
{
struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component);
+ cs42l43_set_jack(priv->component, NULL, NULL);
+
+ cancel_delayed_work_sync(&priv->bias_sense_timeout);
+ cancel_delayed_work_sync(&priv->tip_sense_work);
+ cancel_delayed_work_sync(&priv->button_press_work);
+ cancel_work_sync(&priv->button_release_work);
+
cancel_work_sync(&priv->hp_ilimit_work);
cancel_delayed_work_sync(&priv->hp_ilimit_clear_work);
--
2.30.2
next prev parent reply other threads:[~2024-02-02 14:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 14:06 [PATCH 1/3] ASoC: cs42l43: Add clear of stashed pointer on component remove Charles Keepax
2024-02-02 14:06 ` [PATCH 2/3] ASoC: cs42l43: Sync the hp ilimit works when removing the component Charles Keepax
2024-02-02 14:06 ` Charles Keepax [this message]
2024-02-06 9:37 ` [PATCH 1/3] ASoC: cs42l43: Add clear of stashed pointer on component remove Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240202140619.1068560-3-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox