summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm5110.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2016-05-31 13:44:17 +0200
committerMark Brown <broonie@kernel.org>2016-05-31 15:35:49 +0200
commit546ad3d024fd47e5042d80ae1dc4c7d1b00912a7 (patch)
tree67df210c278996a980c5b4411d32e450b0021839 /sound/soc/codecs/wm5110.c
parentASoC: arizona: Add event notification on voice trigger events (diff)
downloadlinux-546ad3d024fd47e5042d80ae1dc4c7d1b00912a7.tar.xz
linux-546ad3d024fd47e5042d80ae1dc4c7d1b00912a7.zip
ASoC: arizona: Add data structure for voice trigger notifier
64-bit builds would generate a warning when we passed the core number as a pointer through the notifier data: sound/soc/codecs/cs47l24.c:1091:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void *)i); Rather than just fix this up with more casting add a data structure that holds information for the notifier chain. This will make it easier to add additional information in the future as well. Fixes: 7baa7e2490e1 ("ASoC: arizona: Add event notification on voice trigger events") Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm5110.c')
-rw-r--r--sound/soc/codecs/wm5110.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index dbc9b4df38a0..83c48eca56f5 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -2222,6 +2222,7 @@ static irqreturn_t wm5110_adsp2_irq(int irq, void *data)
{
struct wm5110_priv *priv = data;
struct arizona *arizona = priv->core.arizona;
+ struct arizona_voice_trigger_info info;
int serviced = 0;
int i, ret;
@@ -2229,10 +2230,12 @@ static irqreturn_t wm5110_adsp2_irq(int irq, void *data)
ret = wm_adsp_compr_handle_irq(&priv->core.adsp[i]);
if (ret != -ENODEV)
serviced++;
- if (ret == WM_ADSP_COMPR_VOICE_TRIGGER)
+ if (ret == WM_ADSP_COMPR_VOICE_TRIGGER) {
+ info.core = i;
arizona_call_notifiers(arizona,
ARIZONA_NOTIFY_VOICE_TRIGGER,
- (void *)i);
+ &info);
+ }
}
if (!serviced) {