fix(audio): ES8311 BOTH complementary open + audio-stream close ref-count + mic unmute
- es8311 driver open() now allows OUTPUT->INPUT complementary (promotes to BOTH) when same native rate 44100 - audio-stream close_stream() ref-counts shared BOTH codec (don't close if other direction still open) - MCP recordVoice + VoiceRecorder app explicitly unmute and set 100% gain Fixes mic input not working - was returning ERROR_RESOURCE when output already open
This commit is contained in:
@@ -796,6 +796,9 @@ bool recordVoice(int durationSec, const std::string& filename, size_t& recordedB
|
||||
set_error(error, "Failed to open audio input stream");
|
||||
goto done;
|
||||
}
|
||||
audio_stream_set_mute(state.audioStreamDevice, AUDIO_CODEC_DIR_INPUT, false);
|
||||
audio_stream_set_volume(state.audioStreamDevice, AUDIO_CODEC_DIR_INPUT, 100.0f);
|
||||
LOG_I(TAG, "Mic unmuted gain 100%% for %s", filename.c_str());
|
||||
} else {
|
||||
if (!configure_i2s(state, AUDIO_SAMPLE_RATE, 1, error)) {
|
||||
goto done;
|
||||
|
||||
Reference in New Issue
Block a user