diff options
author | Tzung-Bi Shih <tzungbi@chromium.org> | 2019-02-27 13:04:24 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-19 07:59:05 +0000 |
commit | aa17252161c5cc526555c2f82ad238361f7d22a0 (patch) | |
tree | a09f6825289a1fb7fb3c971215557651dcc50460 /common/audio_codec.c | |
parent | 0beadf2ffd8b23e15d1e7c14de8719d0f45c9519 (diff) | |
download | chrome-ec-aa17252161c5cc526555c2f82ad238361f7d22a0.tar.gz |
audio_codec: add WoV abstract layer
Common logic for Wake-on-Voice.
- set hotword detection model
- get notifications from the chip
- read audio data from the chip
- use the audio data to detect hotword
- send host event to AP if hotword is detected
BRANCH=none
BUG=b:122027734, b:123268236
TEST=1. define CONFIG_AUDIO_CODEC in board.h
2. define CONFIG_AUDIO_CODEC_DMIC in board.h
3. define CONFIG_AUDIO_CODEC_DMIC_SOFTWARE_GAIN in board.h
4. define CONFIG_AUDIO_CODEC_DMIC_MAX_SOFTWARE_GAIN in board.h
5. define CONFIG_AUDIO_CODEC_WOV in board.h
6. make BOARD=kukui_scp -j
Change-Id: I26f7a8dbf9a6d57b1845fbb0666aa1d8285d9013
Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1490800
Diffstat (limited to 'common/audio_codec.c')
-rw-r--r-- | common/audio_codec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/audio_codec.c b/common/audio_codec.c index 1dcc7e9b16..e21df5c039 100644 --- a/common/audio_codec.c +++ b/common/audio_codec.c @@ -10,7 +10,15 @@ #define CPRINTS(format, args...) cprints(CC_AUDIO_CODEC, format, ## args) -static const uint32_t capabilities; +static const uint32_t capabilities = + 0 +#ifdef CONFIG_AUDIO_CODEC_CAP_WOV_AUDIO_SHM + | BIT(EC_CODEC_CAP_WOV_AUDIO_SHM) +#endif +#ifdef CONFIG_AUDIO_CODEC_CAP_WOV_LANG_SHM + | BIT(EC_CODEC_CAP_WOV_LANG_SHM) +#endif + ; static struct { uint8_t cap; |