From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: broonie@kernel.org
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
lee.jones@linaro.org, lgirdwood@gmail.com
Subject: [PATCH 5/5] ASoC: arizona: Add event notification on voice trigger events
Date: Fri, 13 May 2016 16:45:19 +0100 [thread overview]
Message-ID: <1463154319-10070-6-git-send-email-ckeepax@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1463154319-10070-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>
Inform the notifier chain if the DSP recognises a voice trigger.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
sound/soc/codecs/arizona.h | 3 +++
sound/soc/codecs/cs47l24.c | 4 ++++
sound/soc/codecs/wm5110.c | 4 ++++
3 files changed, 11 insertions(+)
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h
index e8d67d0..ef38413 100644
--- a/sound/soc/codecs/arizona.h
+++ b/sound/soc/codecs/arizona.h
@@ -63,6 +63,9 @@
#define ARIZONA_DVFS_SR1_RQ 0x001
#define ARIZONA_DVFS_ADSP1_RQ 0x100
+/* Notifier events */
+#define ARIZONA_NOTIFY_VOICE_TRIGGER 0x1
+
struct arizona;
struct wm_adsp;
diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c
index 489709d..b4d05cf 100644
--- a/sound/soc/codecs/cs47l24.c
+++ b/sound/soc/codecs/cs47l24.c
@@ -1085,6 +1085,10 @@ static irqreturn_t cs47l24_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)
+ arizona_call_notifiers(arizona,
+ ARIZONA_NOTIFY_VOICE_TRIGGER,
+ (void *)i);
}
if (!serviced) {
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 1c8b559..f1b3294 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -2240,6 +2240,10 @@ 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)
+ arizona_call_notifiers(arizona,
+ ARIZONA_NOTIFY_VOICE_TRIGGER,
+ (void *)i);
}
if (!serviced) {
--
2.1.4
next prev parent reply other threads:[~2016-05-13 15:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 15:45 [PATCH 0/5] Add support for trigger only voice recognition Charles Keepax
2016-05-13 15:45 ` [PATCH 1/5] ASoC: arizona: Tie SYSCLK to DRC signal activity widgets Charles Keepax
2016-05-14 10:13 ` Applied "ASoC: arizona: Tie SYSCLK to DRC signal activity widgets" to the asoc tree Mark Brown
2016-05-13 15:45 ` [PATCH 2/5] ASoC: arizona: Add voice trigger output widget Charles Keepax
2016-05-14 10:12 ` Applied "ASoC: arizona: Add voice trigger output widget" to the asoc tree Mark Brown
2016-05-13 15:45 ` [PATCH 3/5] ASoC: wm_adsp: Specifically propagate voice trigger event to caller Charles Keepax
2016-05-14 10:12 ` Applied "ASoC: wm_adsp: Specifically propagate voice trigger event to caller" to the asoc tree Mark Brown
2016-05-13 15:45 ` [PATCH 4/5] ASoC: arizona: Add a notifier chain for CODEC events Charles Keepax
2016-05-27 20:46 ` Applied "ASoC: arizona: Add a notifier chain for CODEC events" to the asoc tree Mark Brown
2016-05-13 15:45 ` Charles Keepax [this message]
2016-05-27 20:46 ` Applied "ASoC: arizona: Add event notification on voice trigger " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463154319-10070-6-git-send-email-ckeepax@opensource.wolfsonmicro.com \
--to=ckeepax@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=patches@opensource.wolfsonmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).