Skip to content

Commit 7baa7e2

Browse files
charleskeepaxbroonie
authored andcommitted
ASoC: arizona: Add event notification on voice trigger events
Inform the notifier chain if the DSP recognises a voice trigger. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 2230c49 commit 7baa7e2

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

sound/soc/codecs/arizona.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
#define ARIZONA_DVFS_SR1_RQ 0x001
6464
#define ARIZONA_DVFS_ADSP1_RQ 0x100
6565

66+
/* Notifier events */
67+
#define ARIZONA_NOTIFY_VOICE_TRIGGER 0x1
68+
6669
struct arizona;
6770
struct wm_adsp;
6871

sound/soc/codecs/cs47l24.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,10 @@ static irqreturn_t cs47l24_adsp2_irq(int irq, void *data)
10741074
ret = wm_adsp_compr_handle_irq(&priv->core.adsp[i]);
10751075
if (ret != -ENODEV)
10761076
serviced++;
1077+
if (ret == WM_ADSP_COMPR_VOICE_TRIGGER)
1078+
arizona_call_notifiers(arizona,
1079+
ARIZONA_NOTIFY_VOICE_TRIGGER,
1080+
(void *)i);
10771081
}
10781082

10791083
if (!serviced) {

sound/soc/codecs/wm5110.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,6 +2229,10 @@ static irqreturn_t wm5110_adsp2_irq(int irq, void *data)
22292229
ret = wm_adsp_compr_handle_irq(&priv->core.adsp[i]);
22302230
if (ret != -ENODEV)
22312231
serviced++;
2232+
if (ret == WM_ADSP_COMPR_VOICE_TRIGGER)
2233+
arizona_call_notifiers(arizona,
2234+
ARIZONA_NOTIFY_VOICE_TRIGGER,
2235+
(void *)i);
22322236
}
22332237

22342238
if (!serviced) {

0 commit comments

Comments
 (0)