rlcd: fix audio freeze, OOM, robot sound, pops and voice recorder

- Fix DTS I2S pinmap to RLCD correct pins (mclk 16, bclk 9, ws 45, tx 8, rx 10) resolving GPIO5 conflict with display DC
- Port ES8311 DAC and ES7210 mic ADC init from working MicroPython audio_util.py
- Fix I2S DMA OOM by reducing to 6x160 and RX fallback to TX-only
- Fix MCLK multiple for 12.288MHz family (16k->768 exact) to avoid robot sound
- Avoid ES8311 reclock glitch for 16k rate to eliminate pop
- Clean log spam (file lock once, listDir DEBUG, I2S DEBUG) that caused UART jitter
- VoiceRecorder: request stereo from ES7210 and downmix left channel to fix mic-like low pitch
This commit is contained in:
Adolfo Reyna
2026-07-11 23:54:08 -04:00
parent 89c9f317c1
commit ff87ff4b1b
4 changed files with 298 additions and 68 deletions
+7 -3
View File
@@ -25,7 +25,11 @@ static std::function<std::shared_ptr<Lock>(const std::string&)> findLockFunction
std::shared_ptr<Lock> getLock(const std::string& path) {
if (findLockFunction == nullptr) {
LOGGER.warn("File lock function not set!");
static bool warned = false;
if (!warned) {
LOGGER.warn("File lock function not set!");
warned = true;
}
return noLock;
}
@@ -71,7 +75,7 @@ bool listDirectory(
auto lock = getLock(path)->asScopedLock();
lock.lock();
LOGGER.info("listDir start {}", path);
LOGGER.debug("listDir start {}", path);
DIR* dir = opendir(path.c_str());
if (dir == nullptr) {
LOGGER.error("Failed to open dir {}", path);
@@ -85,7 +89,7 @@ bool listDirectory(
closedir(dir);
LOGGER.info("listDir stop {}", path);
LOGGER.debug("listDir stop {}", path);
return true;
}