summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Muller <mullerf@google.com>2023-08-11 11:49:20 -0700
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-08-14 18:19:28 +0000
commit512c577fdfdf0a78491d0fcf1d5cc23f1727ff47 (patch)
tree458de24eb40afb7603688e89fbb434c22234e8c8
parent686871c08c469f50ff5b31c6fee62605a5893e98 (diff)
downloadmcu_mic_codec-512c577fdfdf0a78491d0fcf1d5cc23f1727ff47.tar.gz
Differentiate regular start from dsp restart for audio use cases
This is so we know when to tell the MCU to send an ADSP AudioStart() signal to the ADSP (needed in the DSP hotword use case only). Test: Manual Bug: 295165165 Signed-off-by: Florian Muller <mullerf@google.com> (cherry picked from https://partner-android-review.googlesource.com/q/commit:683f9157c4b50051d01e465d38d7127c8bf972d4) Merged-In: Ied26dd9b3a7ef6d84400f372240f0d72d75ba437 Change-Id: Ied26dd9b3a7ef6d84400f372240f0d72d75ba437
-rw-r--r--mcu_mic_codec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mcu_mic_codec.c b/mcu_mic_codec.c
index 6023f13..2c84776 100644
--- a/mcu_mic_codec.c
+++ b/mcu_mic_codec.c
@@ -105,6 +105,7 @@ enum dmic_mcu_on {
DMIC_MCU_ON_OFF_CONDITIONAL = 10,
DMIC_MCU_ON_ON_CONDITIONAL = 11,
+ DMIC_MCU_ON_AND_TOGGLE_ADSP,
DMIC_MCU_ON_SAWTOOTH_REC = 254,
DMIC_MCU_ON_FAKE_REC = 255,
@@ -342,6 +343,8 @@ static int dmic_mcu_on_put(struct snd_kcontrol *kcontrol,
conditionalized_value = DMIC_MCU_ON_ON_CONDITIONAL;
else if (codec_data->screen_off_dsp_hw_on && (value == DMIC_MCU_ON_OFF))
conditionalized_value = DMIC_MCU_ON_OFF_CONDITIONAL;
+ else if (value_forced && (value == DMIC_MCU_ON_ON))
+ conditionalized_value = DMIC_MCU_ON_AND_TOGGLE_ADSP;
else
conditionalized_value = value;