From 1d2b71f27e324c15c3b122d961a5e43f4fd4caf5 Mon Sep 17 00:00:00 2001 From: MOV <15621173+MoveCall@users.noreply.github.com> Date: Fri, 6 Mar 2026 18:35:47 +0800 Subject: [PATCH] fix(esp32c5): correct PSRAM configuration (#1813) * add: Moji 2 has built-in ESP32-C5 dual band Wi-Fi * feat: PowerSaveTimer 160 >> 240 * fix(audio): add frame buffering to NoAudioProcessor On chips where CONFIG_USE_AUDIO_PROCESSOR is unavailable (e.g., ESP32-C5, which is excluded by Kconfig despite having PSRAM), NoAudioProcessor is used. The original implementation passed through 160-sample chunks directly, but the Opus encoder expects 960 samples (60ms @ 16kHz), resulting in frame size mismatch errors, high CPU usage, and watchdog resets. Added output_buffer_ to accumulate audio samples until reaching frame_samples_ (960) before outputting, matching AfeAudioProcessor behavior. other: Turn off sleep mode (PowerSaveTimer) * fix(config): enable SPIRAM for ESP32-C5 build --- main/boards/movecall-moji2-esp32c5/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/boards/movecall-moji2-esp32c5/config.json b/main/boards/movecall-moji2-esp32c5/config.json index 9cebd10..316e963 100644 --- a/main/boards/movecall-moji2-esp32c5/config.json +++ b/main/boards/movecall-moji2-esp32c5/config.json @@ -7,9 +7,9 @@ "CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y", "CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v2/16m.csv\"", "CONFIG_FREERTOS_USE_TICKLESS_IDLE=y", + "CONFIG_SPIRAM=y", "CONFIG_SPIRAM_MODE_QUAD=y", "CONFIG_SPIRAM_SPEED_80M=y", - "CONFIG_SPIRAM_SPEED=80", "CONFIG_SPI_FLASH_FREQ_LIMIT_C5_240MHZ=y" ] }