Fix microphone stereo detection on the T-Deck Plus
I2S_CHANNEL_FMT_ALL_LEFT copies a single channel into every slot, so both microphones read the same signal and the balance stayed at zero. Use I2S_CHANNEL_FMT_MULTIPLE (the real TDM mode) instead. The board only fits two of the four ES7210 mic footprints, but the schematic carries all four. Rather than hardcode MIC1/MIC3, the detector now measures the TDM slots and locks onto the two that carry signal, treating the lower slot as the left microphone. Equal maximum gain is applied to all inputs so the pair amplifies consistently. Also widen the balance range (claps produce only a few dB of difference between the closely spaced mics) and recalibrate loudness to the dBFS range seen with 37.5 dB analog gain.
This commit is contained in:
@@ -1079,7 +1079,7 @@ void setup()
|
||||
if (!soundDetector.begin(16000)) {
|
||||
Serial.println("Sound detector init failed (ES7210 mics)");
|
||||
} else {
|
||||
Serial.println("Sound detector ready (MIC1 left / MIC3 right)");
|
||||
Serial.println("Sound detector ready (dual mics, slots auto-detected)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user