Skip to contentSkip to conversation

ASoC: arizona: Free speaker thermal IRQs in CODEC remove

PATCH In review Charles Keepax 2 participants 4 messages Apr 15, 2016 – Apr 18, 2016

Subsystems (5)
lore
Share & tools
lore
#1 lore raw

PATCH 2/2 ASoC: wm5102: Free compressed IRQ in CODEC remove

In reply to Charles Keepax

We request one of the DSP IRQs during CODEC probe, as such we should free it during CODEC remove, this patch does so.

---
 sound/soc/codecs/wm5102.c | 3 +++
 1 file changed, 3 insertions(+)
sound/soc/codecs/wm5102.c +3 -0
index 59fd3e8..1bae17e 100644
@@ -1955,11 +1955,14 @@ err_adsp2_codec_probe:
 static int wm5102_codec_remove(struct snd_soc_codec *codec)
 {
 	struct wm5102_priv *priv = snd_soc_codec_get_drvdata(codec);
+	struct arizona *arizona = priv->core.arizona;
 
 	wm_adsp2_codec_remove(&priv->core.adsp[0], codec);
 
 	priv->core.arizona->dapm = NULL;
 
+	arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
+
 	arizona_free_spk(codec);
 
 	return 0;
Signature · 1 line
2.1.4
#0 lore raw

PATCH 1/2 ASoC: arizona: Free speaker thermal IRQs in CODEC remove

The thermal warning IRQs for the speaker are requested in CODEC probe but never freed. This patch frees them in CODEC remove.

---
 sound/soc/codecs/arizona.c | 12 ++++++++++++
 sound/soc/codecs/arizona.h |  2 ++
 sound/soc/codecs/cs47l24.c |  3 +++
 sound/soc/codecs/wm5102.c  |  2 ++
 sound/soc/codecs/wm5110.c  |  2 ++
 sound/soc/codecs/wm8997.c  |  2 ++
 sound/soc/codecs/wm8998.c  |  2 ++
 7 files changed, 25 insertions(+)
sound/soc/codecs/arizona.c +12 -0
index d8a6823..7b82550 100644
@@ -251,6 +251,18 @@ int arizona_init_spk(struct snd_soc_codec *codec)
 }
 EXPORT_SYMBOL_GPL(arizona_init_spk);
 
+int arizona_free_spk(struct snd_soc_codec *codec)
+{
+	struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
+	struct arizona *arizona = priv->arizona;
+
+	arizona_free_irq(arizona, ARIZONA_IRQ_SPK_OVERHEAT_WARN, arizona);
+	arizona_free_irq(arizona, ARIZONA_IRQ_SPK_OVERHEAT, arizona);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(arizona_free_spk);
+
 static const struct snd_soc_dapm_route arizona_mono_routes[] = {
 	{ "OUT1R", NULL, "OUT1L" },
 	{ "OUT2R", NULL, "OUT2L" },
sound/soc/codecs/arizona.h +2 -0
index 1ea8e4e..ce0531b 100644
@@ -307,6 +307,8 @@ extern int arizona_init_spk(struct snd_soc_codec *codec);
 extern int arizona_init_gpio(struct snd_soc_codec *codec);
 extern int arizona_init_mono(struct snd_soc_codec *codec);
 
+extern int arizona_free_spk(struct snd_soc_codec *codec);
+
 extern int arizona_init_dai(struct arizona_priv *priv, int dai);
 
 int arizona_set_output_mode(struct snd_soc_codec *codec, int output,
sound/soc/codecs/cs47l24.c +3 -0
index 6b8b557..c10f71e 100644
@@ -1140,6 +1140,9 @@ static int cs47l24_codec_remove(struct snd_soc_codec *codec)
 	priv->core.arizona->dapm = NULL;
 
 	arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
+
+	arizona_free_spk(codec);
+
 	return 0;
 }
 
sound/soc/codecs/wm5102.c +2 -0
index a8b3e3f..59fd3e8 100644
@@ -1960,6 +1960,8 @@ static int wm5102_codec_remove(struct snd_soc_codec *codec)
 
 	priv->core.arizona->dapm = NULL;
 
+	arizona_free_spk(codec);
+
 	return 0;
 }
 
sound/soc/codecs/wm5110.c +2 -0
index 83ba70f..2728ac5 100644
@@ -2298,6 +2298,8 @@ static int wm5110_codec_remove(struct snd_soc_codec *codec)
 
 	arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
 
+	arizona_free_spk(codec);
+
 	return 0;
 }
 
sound/soc/codecs/wm8997.c +2 -0
index 52d766e..6b0785b 100644
@@ -1072,6 +1072,8 @@ static int wm8997_codec_remove(struct snd_soc_codec *codec)
 
 	priv->core.arizona->dapm = NULL;
 
+	arizona_free_spk(codec);
+
 	return 0;
 }
 
sound/soc/codecs/wm8998.c +2 -0
index 0123960..449f666 100644
@@ -1324,6 +1324,8 @@ static int wm8998_codec_remove(struct snd_soc_codec *codec)
 
 	priv->core.arizona->dapm = NULL;
 
+	arizona_free_spk(codec);
+
 	return 0;
 }
 
Signature · 1 line
2.1.4
maintainer
#2 lore raw

Applied "ASoC: wm5102: Free compressed IRQ in CODEC remove" to the asoc tree

In reply to Charles Keepax

The patch

ASoC: wm5102: Free compressed IRQ in CODEC remove

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

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

Quoted 1 line

From ab9f87c413c297cb9e7d544e0e634aaadc7fb87d Mon Sep 17 00:00:00 2001

From: Charles Keepax <[email protected]>
Date: Fri, 15 Apr 2016 13:11:57 +0100
Subject: [PATCH] ASoC: wm5102: Free compressed IRQ in CODEC remove

We request one of the DSP IRQs during CODEC probe, as such we should free it during CODEC remove, this patch does so.

---
 sound/soc/codecs/wm5102.c | 3 +++
 1 file changed, 3 insertions(+)
sound/soc/codecs/wm5102.c +3 -0
index 59fd3e8bf899..1bae17ee8817 100644
@@ -1955,11 +1955,14 @@ err_adsp2_codec_probe:
 static int wm5102_codec_remove(struct snd_soc_codec *codec)
 {
 	struct wm5102_priv *priv = snd_soc_codec_get_drvdata(codec);
+	struct arizona *arizona = priv->core.arizona;
 
 	wm_adsp2_codec_remove(&priv->core.adsp[0], codec);
 
 	priv->core.arizona->dapm = NULL;
 
+	arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
+
 	arizona_free_spk(codec);
 
 	return 0;
Signature · 1 line
2.8.0.rc3
maintainer
#3 lore raw

Applied "ASoC: arizona: Free speaker thermal IRQs in CODEC remove" to the asoc tree

In reply to Charles Keepax

The patch

ASoC: arizona: Free speaker thermal IRQs in CODEC remove

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

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

Quoted 1 line

From 54dca7015a7d6c09d34623c6ec61de30896186dd Mon Sep 17 00:00:00 2001

From: Charles Keepax <[email protected]>
Date: Fri, 15 Apr 2016 13:11:56 +0100
Subject: [PATCH] ASoC: arizona: Free speaker thermal IRQs in CODEC remove

The thermal warning IRQs for the speaker are requested in CODEC probe but never freed. This patch frees them in CODEC remove.

---
 sound/soc/codecs/arizona.c | 12 ++++++++++++
 sound/soc/codecs/arizona.h |  2 ++
 sound/soc/codecs/cs47l24.c |  3 +++
 sound/soc/codecs/wm5102.c  |  2 ++
 sound/soc/codecs/wm5110.c  |  2 ++
 sound/soc/codecs/wm8997.c  |  2 ++
 sound/soc/codecs/wm8998.c  |  2 ++
 7 files changed, 25 insertions(+)
sound/soc/codecs/arizona.c +12 -0
index 92d22a018d68..83959312f7a0 100644
@@ -249,6 +249,18 @@ int arizona_init_spk(struct snd_soc_codec *codec)
 }
 EXPORT_SYMBOL_GPL(arizona_init_spk);
 
+int arizona_free_spk(struct snd_soc_codec *codec)
+{
+	struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
+	struct arizona *arizona = priv->arizona;
+
+	arizona_free_irq(arizona, ARIZONA_IRQ_SPK_OVERHEAT_WARN, arizona);
+	arizona_free_irq(arizona, ARIZONA_IRQ_SPK_OVERHEAT, arizona);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(arizona_free_spk);
+
 static const struct snd_soc_dapm_route arizona_mono_routes[] = {
 	{ "OUT1R", NULL, "OUT1L" },
 	{ "OUT2R", NULL, "OUT2L" },
sound/soc/codecs/arizona.h +2 -0
index 1ea8e4ecf8d4..ce0531b8c632 100644
@@ -307,6 +307,8 @@ extern int arizona_init_spk(struct snd_soc_codec *codec);
 extern int arizona_init_gpio(struct snd_soc_codec *codec);
 extern int arizona_init_mono(struct snd_soc_codec *codec);
 
+extern int arizona_free_spk(struct snd_soc_codec *codec);
+
 extern int arizona_init_dai(struct arizona_priv *priv, int dai);
 
 int arizona_set_output_mode(struct snd_soc_codec *codec, int output,
sound/soc/codecs/cs47l24.c +3 -0
index 576087bda330..00e9b6fc1b5c 100644
@@ -1108,6 +1108,9 @@ static int cs47l24_codec_remove(struct snd_soc_codec *codec)
 	priv->core.arizona->dapm = NULL;
 
 	arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
+
+	arizona_free_spk(codec);
+
 	return 0;
 }
 
sound/soc/codecs/wm5102.c +2 -0
index a8b3e3f701f9..59fd3e8bf899 100644
@@ -1960,6 +1960,8 @@ static int wm5102_codec_remove(struct snd_soc_codec *codec)
 
 	priv->core.arizona->dapm = NULL;
 
+	arizona_free_spk(codec);
+
 	return 0;
 }
 
sound/soc/codecs/wm5110.c +2 -0
index 83ba70fe16e6..2728ac545ffe 100644
@@ -2298,6 +2298,8 @@ static int wm5110_codec_remove(struct snd_soc_codec *codec)
 
 	arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv);
 
+	arizona_free_spk(codec);
+
 	return 0;
 }
 
sound/soc/codecs/wm8997.c +2 -0
index 52d766efe14f..6b0785b5a5c5 100644
@@ -1072,6 +1072,8 @@ static int wm8997_codec_remove(struct snd_soc_codec *codec)
 
 	priv->core.arizona->dapm = NULL;
 
+	arizona_free_spk(codec);
+
 	return 0;
 }
 
sound/soc/codecs/wm8998.c +2 -0
index 012396074a8a..449f66636205 100644
@@ -1324,6 +1324,8 @@ static int wm8998_codec_remove(struct snd_soc_codec *codec)
 
 	priv->core.arizona->dapm = NULL;
 
+	arizona_free_spk(codec);
+
 	return 0;
 }
 
Signature · 1 line
2.8.0.rc3