ASoC: arizona: Call arizona_init_notifiers for all CODECs
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thu, 10 Nov 2016 15:24:15 +0000 (15:24 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 10 Nov 2016 16:20:24 +0000 (16:20 +0000)
The call to arizona_init_notifiers was only added for CODECs that are
generating voice trigger events, however, this is somewhat annoying
for machine drivers that might be used with multiple CODECs as they
need to conditionally register for the notifier, depending on the
CODEC being attached.

As the cost of initialising the notifier is so minimal, and we may
well add other events in the future that apply to more CODECs, simply
do this for all Arizona CODECs.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm5102.c
sound/soc/codecs/wm8997.c
sound/soc/codecs/wm8998.c

index 0136234e6e660858d5eb814a437d9c1a1c34f7e1..72ff291a85be6bf947cd4d0bf73a117fa078d44f 100644 (file)
@@ -1945,6 +1945,7 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec)
 
        arizona_init_spk(codec);
        arizona_init_gpio(codec);
+       arizona_init_notifiers(codec);
 
        snd_soc_dapm_disable_pin(dapm, "HAPTICS");
 
index 600595c54fe770d7120183b231dfd8e39b84f1a6..ea8b1bfdf5a036c19046c59d3892c0da87511d4f 100644 (file)
@@ -1063,6 +1063,7 @@ static int wm8997_codec_probe(struct snd_soc_codec *codec)
        struct wm8997_priv *priv = snd_soc_codec_get_drvdata(codec);
 
        arizona_init_spk(codec);
+       arizona_init_notifiers(codec);
 
        snd_soc_dapm_disable_pin(dapm, "HAPTICS");
 
index 4cccaae6dcfad01cb088fa8bf116368e78357163..1e1d9c1f037132e86428412c4758d56e76babae8 100644 (file)
@@ -1325,6 +1325,7 @@ static int wm8998_codec_probe(struct snd_soc_codec *codec)
 
        arizona_init_spk(codec);
        arizona_init_gpio(codec);
+       arizona_init_notifiers(codec);
 
        snd_soc_dapm_disable_pin(dapm, "HAPTICS");