diff options
author | Tzung-Bi Shih <tzungbi@chromium.org> | 2020-01-03 14:34:07 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-14 05:30:14 +0000 |
commit | ca47b0c5673ee2e970a9b29b095d4183849e3cae (patch) | |
tree | 396a5002d398c221461a510e18149996c13dfbb9 | |
parent | f6d248bb6d334b0dd0b02b7a1960079378a623ff (diff) | |
download | chrome-ec-ca47b0c5673ee2e970a9b29b095d4183849e3cae.tar.gz |
audio_codec: npcx: deprecate legacy option CONFIG_WAKE_ON_VOICE
CONFIG_WAKE_ON_VOICE consists 3 features in NPCX:
- DMIC
- I2S_RX
- WOV
These features has broken down into smaller CONFIG options. Deprecates
CONFIG_WAKE_ON_VOICE and prepares to separate smaller features in NPCX.
BRANCH=none
BUG=b:144064048, b:144063867
TEST=make BOARD=trembyle -j
Change-Id: Ieaa123299ea687644f19066cf95ef150a18bf252
Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986687
Commit-Queue: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
-rw-r--r-- | board/npcx7_evb/board.h | 4 | ||||
-rw-r--r-- | board/npcx7_evb/gpio.inc | 2 | ||||
-rw-r--r-- | chip/npcx/build.mk | 3 | ||||
-rw-r--r-- | chip/npcx/gpio_chip-npcx7.h | 3 | ||||
-rw-r--r-- | chip/npcx/wov.c | 2 | ||||
-rw-r--r-- | include/config.h | 3 |
6 files changed, 8 insertions, 9 deletions
diff --git a/board/npcx7_evb/board.h b/board/npcx7_evb/board.h index 35e5e0a031..298b5acad0 100644 --- a/board/npcx7_evb/board.h +++ b/board/npcx7_evb/board.h @@ -79,7 +79,9 @@ #define CONFIG_HIBERNATE_PSL /* Use PSL (Power Switch Logic) for hibernate */ #define CONFIG_CLOCK_SRC_EXTERNAL /* Use external 32kHz OSC as LFCLK source */ #if defined(CHIP_VARIANT_NPCX7M7WB) || defined(CHIP_VARIANT_NPCX7M7WC) -#define CONFIG_WAKE_ON_VOICE /* Use Audio front-end for Wake-on-Voice */ +#define CONFIG_AUDIO_CODEC +#define CONFIG_AUDIO_CODEC_DMIC +#define CONFIG_AUDIO_CODEC_I2S_RX /* Use Audio front-end for Wake-on-Voice */ #endif #undef CONFIG_FANS /* Remove fan application */ #define CONFIG_FANS 0 diff --git a/board/npcx7_evb/gpio.inc b/board/npcx7_evb/gpio.inc index e0bb9c1df8..145a48de85 100644 --- a/board/npcx7_evb/gpio.inc +++ b/board/npcx7_evb/gpio.inc @@ -107,7 +107,7 @@ ALTERNATE(PIN_MASK(D, 0x04), 1, MODULE_PMU, 0) /* PSL_IN1 GPIOD2 */ ALTERNATE(PIN_MASK(0, 0x07), 1, MODULE_PMU, 0) /* PSL_IN2/3/4 GPIO00/01/02 */ #endif -#ifdef CONFIG_WAKE_ON_VOICE +#if defined(CONFIG_AUDIO_CODEC_I2S_RX) || defined(CONFIG_AUDIO_CODEC_WOV) ALTERNATE(PIN_MASK(A, 0xA0), 1, MODULE_WOV, 0) /* I2S_SYNC/I2S_SCLK GPIOA5/A7 */ ALTERNATE(PIN_MASK(B, 0x01), 1, MODULE_WOV, 0) /* I2S_SDAT GPIOB0 */ ALTERNATE(PIN_MASK(9, 0x90), 1, MODULE_WOV, 0) /* DMIC_CLK/DMIC_IN GPIO94/97 */ diff --git a/chip/npcx/build.mk b/chip/npcx/build.mk index 515c191d39..6092503b06 100644 --- a/chip/npcx/build.mk +++ b/chip/npcx/build.mk @@ -22,6 +22,7 @@ chip-y+=system-$(CHIP_FAMILY).o # Optional chip modules chip-$(CONFIG_ADC)+=adc.o +chip-$(CONFIG_AUDIO_CODEC)+=apm.o wov.o chip-$(CONFIG_AUDIO_CODEC_DMIC)+=audio_codec_dmic.o chip-$(CONFIG_AUDIO_CODEC_I2S_RX)+=audio_codec_i2s_rx.o chip-$(CONFIG_FANS)+=fan.o @@ -39,8 +40,6 @@ chip-$(CONFIG_WATCHDOG)+=watchdog.o ifndef CONFIG_KEYBOARD_NOT_RAW chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o endif -chip-$(CONFIG_WAKE_ON_VOICE)+=apm.o -chip-$(CONFIG_WAKE_ON_VOICE)+=wov.o # spi monitor program fw for openocd and UUT(UART Update Tool) npcx-monitor-fw=chip/npcx/spiflashfw/npcx_monitor diff --git a/chip/npcx/gpio_chip-npcx7.h b/chip/npcx/gpio_chip-npcx7.h index 644c1c793d..44911dcf32 100644 --- a/chip/npcx/gpio_chip-npcx7.h +++ b/chip/npcx/gpio_chip-npcx7.h @@ -313,7 +313,8 @@ #endif /* WOV module (Optional) */ -#if defined(NPCX_WOV_SUPPORT) && defined(CONFIG_WAKE_ON_VOICE) +#if defined(NPCX_WOV_SUPPORT) && \ + (defined(CONFIG_AUDIO_CODEC_I2S_RX) || defined(CONFIG_AUDIO_CODEC_WOV)) #define NPCX_ALT_GPIO_9_5 /* Disable SPIP module if WOV is supported */ #define NPCX_ALT_GPIO_A_3 /* Disable SPIP module if WOV is supported */ #define NPCX_ALT_GPIO_A_1 /* Disable SPIP module if WOV is supported */ diff --git a/chip/npcx/wov.c b/chip/npcx/wov.c index 4a9012636a..8e247a5e04 100644 --- a/chip/npcx/wov.c +++ b/chip/npcx/wov.c @@ -17,7 +17,7 @@ #include "wov_chip.h" #ifndef NPCX_WOV_SUPPORT -#error "Do not enable CONFIG_WAKE_ON_VOICE if npcx ec doesn't support WOV !" +#error "Do not enable CONFIG_AUDIO_CODEC_* if npcx ec doesn't support WOV !" #endif /* Console output macros */ diff --git a/include/config.h b/include/config.h index 6d19b89453..f0f65a7aa1 100644 --- a/include/config.h +++ b/include/config.h @@ -4391,9 +4391,6 @@ /* WiFi power control signal is active-low. */ #undef CONFIG_WLAN_POWER_ACTIVE_LOW -/* Support Wake-on-Voice */ -#undef CONFIG_WAKE_ON_VOICE - /* * Write protect signal is active-high. If this is defined, there must be a * GPIO named GPIO_WP; if not defined, there must be a GPIO names GPIO_WP_L. |