summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
Diffstat (limited to 'chip')
-rw-r--r--chip/npcx/registers.h1
-rw-r--r--chip/npcx/wov.c11
2 files changed, 7 insertions, 5 deletions
diff --git a/chip/npcx/registers.h b/chip/npcx/registers.h
index b69fc5f806..101eb93cb0 100644
--- a/chip/npcx/registers.h
+++ b/chip/npcx/registers.h
@@ -65,7 +65,6 @@
#define DEBUG_CLK 0
#define DEBUG_LPC 0
#define DEBUG_ESPI 0
-#define DEBUG_WOV 0
#define DEBUG_CEC 0
#define DEBUG_SIB 0
diff --git a/chip/npcx/wov.c b/chip/npcx/wov.c
index 8e247a5e04..c4f68f5369 100644
--- a/chip/npcx/wov.c
+++ b/chip/npcx/wov.c
@@ -21,12 +21,12 @@
#endif
/* Console output macros */
-#if !(DEBUG_WOV)
+#ifndef DEBUG_AUDIO_CODEC
#define CPUTS(...)
#define CPRINTS(...)
#else
#define CPUTS(outstr) cputs(CC_AUDIO_CODEC, outstr)
-#define CPRINTS(format, args...) cprints(CC_AUDIO_CODEC, ## args)
+#define CPRINTS(format, args...) cprints(CC_AUDIO_CODEC, format, ## args)
#endif
/* WOV FIFO status. */
@@ -171,8 +171,6 @@ struct wov_config wov_conf;
static struct wov_cfifo_buf cfifo_buf;
static wov_call_back_t callback_fun;
-static uint32_t voice_buffer[VOICE_BUF_SIZE] = {0};
-
#define WOV_RATE_ERROR_THRESH_MSEC 10
#define WOV_RATE_ERROR_THRESH 5
@@ -1820,6 +1818,10 @@ void wov_handle_event(enum wov_events event)
if (event == WOV_EVENT_ERROR_CORE_FIFO_OVERRUN)
CPRINTS("error: cfifo overrun");
}
+
+#ifdef DEBUG_AUDIO_CODEC
+static uint32_t voice_buffer[VOICE_BUF_SIZE] = {0};
+
/* voice data 16Khz 2ch 16bit 1s */
static int command_wov(int argc, char **argv)
{
@@ -2066,3 +2068,4 @@ DECLARE_CONSOLE_COMMAND(wov, command_wov,
"vadsens <0~31>\n"
"gain <0~31>",
"wov configuration");
+#endif