Commit 7baa7e24 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown

ASoC: arizona: Add event notification on voice trigger events

Inform the notifier chain if the DSP recognises a voice trigger.
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2230c49f
...@@ -63,6 +63,9 @@ ...@@ -63,6 +63,9 @@
#define ARIZONA_DVFS_SR1_RQ 0x001 #define ARIZONA_DVFS_SR1_RQ 0x001
#define ARIZONA_DVFS_ADSP1_RQ 0x100 #define ARIZONA_DVFS_ADSP1_RQ 0x100
/* Notifier events */
#define ARIZONA_NOTIFY_VOICE_TRIGGER 0x1
struct arizona; struct arizona;
struct wm_adsp; struct wm_adsp;
......
...@@ -1074,6 +1074,10 @@ static irqreturn_t cs47l24_adsp2_irq(int irq, void *data) ...@@ -1074,6 +1074,10 @@ static irqreturn_t cs47l24_adsp2_irq(int irq, void *data)
ret = wm_adsp_compr_handle_irq(&priv->core.adsp[i]); ret = wm_adsp_compr_handle_irq(&priv->core.adsp[i]);
if (ret != -ENODEV) if (ret != -ENODEV)
serviced++; serviced++;
if (ret == WM_ADSP_COMPR_VOICE_TRIGGER)
arizona_call_notifiers(arizona,
ARIZONA_NOTIFY_VOICE_TRIGGER,
(void *)i);
} }
if (!serviced) { if (!serviced) {
......
...@@ -2229,6 +2229,10 @@ static irqreturn_t wm5110_adsp2_irq(int irq, void *data) ...@@ -2229,6 +2229,10 @@ static irqreturn_t wm5110_adsp2_irq(int irq, void *data)
ret = wm_adsp_compr_handle_irq(&priv->core.adsp[i]); ret = wm_adsp_compr_handle_irq(&priv->core.adsp[i]);
if (ret != -ENODEV) if (ret != -ENODEV)
serviced++; serviced++;
if (ret == WM_ADSP_COMPR_VOICE_TRIGGER)
arizona_call_notifiers(arizona,
ARIZONA_NOTIFY_VOICE_TRIGGER,
(void *)i);
} }
if (!serviced) { if (!serviced) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment