M changelog.md => changelog.md +1 -0
@@ 11,6 11,7 @@
* `[audio]` Fix playback of mono sound using headphones
* `[vfs]` Fix emulator build error for target Linux Release
+* `[audio]` Fix builtin microphone handling
## Changed
M module-bsp/board/rt1051/bsp/audio/CodecMAX98090.cpp => module-bsp/board/rt1051/bsp/audio/CodecMAX98090.cpp +6 -1
@@ 189,7 189,8 @@ CodecRetCode CodecMAX98090::Start(const CodecParams ¶m)
} break;
case bsp::AudioDevice::InputPath::Microphone: {
- max98090_reg_digmic_enable_t digena = {0};
+ max98090_reg_input_to_record_quick_t q_input_setup = {0};
+ max98090_reg_digmic_enable_t digena = {0};
// Enable left and right digital mic interface
digena.digmicl = 1;
@@ 199,6 200,10 @@ CodecRetCode CodecMAX98090::Start(const CodecParams ¶m)
i2cAddr.subAddress = MAX98090_REG_DIG_MIC_ENABLE;
i2c->Write(i2cAddr, (uint8_t *)&digena, 1);
+
+ q_input_setup.in12sab = 1;
+ i2cAddr.subAddress = MAX98090_REG_LINE_INPUT_TO_RECORD_QUICK;
+ i2c->Write(i2cAddr, (uint8_t *)&q_input_setup, 1);
} break;
default: