* ESP32-C3 has no ULP coprocessor
Only the ESP32, ESP32-S2 and ESP32-S3 chips have an ULP coprocessor, ESP32-C3 doesn't have it. So exclude this code from compiling, as it cannot compile in the C3 environment.
* uint32_t and size_t is not the same on RISC-V
This change is necessary to be able to compile it on ESP32-C3
* uint32_t and size_t is not the same on RISC-V
The change is necessary to compile it on ESP32-C3
* ESP32-C3: I2S_MODE_DAC_BUILT_IN / I2S_MODE_PDM not available
On some ESP32 chips (e.g. ESP32-C3), builtin DAC is not possible as it lacks the hardware module. In order to be able to compile the library on ESP32-C3 the defines cannot be used.
* esp8266: Allows I2S-NoDAC to use only I2S-out-data GPIO
avoiding conflicts with repurposed GPIO, especially conflicting with SDFS.
* +message
* new upstream API update
* check i2s_begin's return value
The BCK and WS pins aren't needed or used when using the I2SNoDAC
option. Restore their settings to whatever they were before, leaving
them untouched. Apps may configure the additional pins either before or
after the I2SNoDac is created.
* make dma_buf_count configurable by user, so we can have a larger dma buffer on esp32
* fix comment about interrupt priority (see esp-idf documentation system/intr_alloc)
The I2S outputs were converting samples in the buffer passed in
from u8->s16 on every call. When the I2S was full, however, the
sample would not get pushed and the output function would be
called at a later time with the same buffer...which was already
at 16 bits. It'd be converted again and turned into a high
frequency noise on the output.
Now only modify a copy of the input sample in I2S and I2SNoDAC.
Fixes the conversion problem competely.
Fixes#2
Hans-J. Ubben found a bug where the pinout wasn't being set properly on
ESP32s because the builtInDAC member was not set before calling SetPinout.
Fix per his suggestion.
With the multiple I2S modes on the ESP32, it makes sense to use a
cleaner class hierarchy for the I2S tools. Make I2SNoDAC into a
subclass of I2S (renamed from I2SDAC) and remove about 80% of the
code which was identical exept for the per-sample bitstream synthesis.