diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2024-02-02 14:06:19 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-02-05 14:32:26 +0000 |
commit | 3ef9f445ddb1e061ce497f54ca75bbaec52a3a46 (patch) | |
tree | 7620d49cabe1b6de96b414a149eaec6ae6fa54e7 /sound/soc/codecs | |
parent | ASoC: cs42l43: Sync the hp ilimit works when removing the component (diff) | |
download | wireguard-linux-3ef9f445ddb1e061ce497f54ca75bbaec52a3a46.tar.xz wireguard-linux-3ef9f445ddb1e061ce497f54ca75bbaec52a3a46.zip |
ASoC: cs42l43: Shut down jack detection on component remove
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>
Link: https://lore.kernel.org/r/20240202140619.1068560-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/cs42l43.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); |