summaryrefslogtreecommitdiff
path: root/include/audio_codec.h
Commit message (Collapse)AuthorAgeFilesLines
* include/audio_codec.h: Format with clang-formatJack Rosenthal2022-06-281-5/+2
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I4a772d5b094b84eb420748a7aa5dc04dcf41f027 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730206 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/mt_scp: support software gainTzung-Bi Shih2019-09-191-0/+5
| | | | | | | | | | | | | | | | | | | Multiply the audio data by a gain value. Note that it get muted when gain is 0. 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: I8c308ffb6d7c8f5bd378524bdffc980d7b9948fa Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1683028 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* audio_codec: add WoV abstract layerTzung-Bi Shih2019-09-191-0/+75
| | | | | | | | | | | | | | | | | | | | | | 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
* audio_codec: add I2S RX abstract layerTzung-Bi Shih2019-09-171-0/+61
| | | | | | | | | | | | | | | | | | | | | | Common I2S RX host commands: - set_sample_depth - set_daifmt - set_bclk 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_I2S_RX in board.h 6. make BOARD=kukui_scp -j Change-Id: I9031bad5429f51ab9f911098f38ed7eb0fa59d18 Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1564503 Commit-Queue: Sean Abraham <seanabraham@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* audio_codec: add DMIC abstract layerTzung-Bi Shih2019-09-171-0/+57
| | | | | | | | | | | | | | | | | | | Common DMIC host commands: - get_max_gain - get_gain_idx - set_gain_idx 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. make BOARD=kukui_scp -j Change-Id: I7b4cc11645675f9d790947b17c3ea385dae13483 Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1564502 Commit-Queue: Sean Abraham <seanabraham@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* audio_codec: add common abstract layerTzung-Bi Shih2019-09-171-0/+61
Common utilities: - register shared memory (SHM) - console channel Common host commands: - get_capabilities - get_shm_addr - set_shm_addr BRANCH=none BUG=b:122027734, b:123268236 TEST=1. define CONFIG_AUDIO_CODEC in board.h 2. make BOARD=kukui_scp -j Change-Id: I90e3e112bf8fdffc13eb486e0c608c264650768b Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1616882 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Sean Abraham <seanabraham@chromium.org>