arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.71k stars 4.72k forks source link

I2S: more consistent usage of variables, really use apll rx setting #21459

Closed Staars closed 1 month ago

Staars commented 1 month ago

Description:

Besides some cosmetic refactoring, this should solve undefined behaviour with the I2S configuration for a microphone in standard mode. Needs more testing.

Increase default value for DMA frame number, which should now exactly match the minimal requirements for MP3 encoding with 16 bit at 32000 Hz.

Use apll setting in standard mode now.

Checklist:

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

sfromis commented 1 month ago

When building with I2S Audio for ESP32-S3, I'm having a compile error hitting a line which was updated by this PR.

/tasmota/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_3_lib_idf51.ino: In member function 'bool TasmotaI2S::startI2SChannel(bool, bool)':
xtensa-esp32s3-elf-g++ -o .pio/build/tasmota32s3/libaa8/Update/HttpsOTAUpdate.cpp.o .....
/tasmota/tasmota/tasmota_xdrv_driver/xdrv_42_0_i2s_3_lib_idf51.ino:673:44: error: 'I2S_CLK_SRC_APLL' was not declared in this scope; did you mean 'I2S_CLK_SRC_XTAL'?
  673 |               rx_std_cfg.clk_cfg.clk_src = I2S_CLK_SRC_APLL;
      |                                            ^~~~~~~~~~~~~~~~
      |                                            I2S_CLK_SRC_XTAL

(Truncated the very long command line)

My expectation was that I should not need to be looking at additional build options, or could there be something there?

Staars commented 1 month ago

Clearly my fault. Thanks for reporting. I pushed a PR.

sfromis commented 1 month ago

Thanks, with https://github.com/arendst/Tasmota/pull/21483 I'm seeing no more failed builds.