audio DSP on the ESP32 chip
Posted: Mon Jan 08, 2018 5:46 pm
I am a hobbyist doing wireless audio DSP. I may select the ESP32 chip instead one or another ARM Cortex-M4 or M7 chip. Being a hobbyist, wanting to join the ESP32 bandwagon, I am forced to cope with what's inside the ESP32 chip. The various Tensilica HiFi DSP engines remain thus out of my reach.
Anyway, I see a nice audio DSP potential in the ESP32 chip featuring the WiFi Radio, Bluetooth radio, twin I2S (digital audio interfaces), I2C and SPI (DAC control), MUL16, MAC16, 40-bit accumulator, data load with pointer increment/decrement, zero loop overhead, and windowed register set. Not to forget the 40 nanometer design rule, the 240 MHz clock, and the dualcore feature.
Question 1 : how to reserve one of the two Tensilica LX6 cores to audio DSP, in such a way it never gets disturbed by housekeeping tasks like infrared remote control, I2C or SPI (DAC control), WiFi or Bluetooth?
Question 2 : how to persuade the GCC C compiler to intensively rely on the MAC16 engine when coding a FIR filter (convolver) say 256-tap long ? This is thus for a 16-bit audio input, 16-bit coefficients, delivering 24-bit (or 32-bit) audio output.
Question 3 : are there two MAC16 engines in the dualcore ESP32 chip? Can they work at the same time without hitting bus congestion?
Question 4 : for IIR Biquad filtering like correcting the deep bass end (Linkwitz Transform), the 32-bit IEEE754 FPU and the MUL16 engine don't provide enough precision. I therefore need to code a enhanced resolution IIR Biquad filter aiming at processing 24-bit audio as input, 16-bit coefficients, delivering 24-bit (or 32-bit) audio output. The application note entitled "Extended Precision IIR Filter Design on the TMS320C54x DSP (June 1998)" tells how to code such IIR filter, basing on the TMS320C54 featuring MUL16 and MAC16 capabilities, quite similar to the ESP32 MUL16 and MAC16 capabilities. For the ESP32, I would like to code a) the Direct form 1 IIR Biquad filter showing on page 5, and b) the Optimized Cascaded IIR Biquad filter variant showing on page 17. Can somebody provide guidance? Is the GCC C compiler, the best tool? Can I hook a straightforward ESP32 Assembly compiler on the GNU Compiler Collection, concentrating on the assembly instructions that are required for doing audio DSP?
Anyway, I see a nice audio DSP potential in the ESP32 chip featuring the WiFi Radio, Bluetooth radio, twin I2S (digital audio interfaces), I2C and SPI (DAC control), MUL16, MAC16, 40-bit accumulator, data load with pointer increment/decrement, zero loop overhead, and windowed register set. Not to forget the 40 nanometer design rule, the 240 MHz clock, and the dualcore feature.
Question 1 : how to reserve one of the two Tensilica LX6 cores to audio DSP, in such a way it never gets disturbed by housekeeping tasks like infrared remote control, I2C or SPI (DAC control), WiFi or Bluetooth?
Question 2 : how to persuade the GCC C compiler to intensively rely on the MAC16 engine when coding a FIR filter (convolver) say 256-tap long ? This is thus for a 16-bit audio input, 16-bit coefficients, delivering 24-bit (or 32-bit) audio output.
Question 3 : are there two MAC16 engines in the dualcore ESP32 chip? Can they work at the same time without hitting bus congestion?
Question 4 : for IIR Biquad filtering like correcting the deep bass end (Linkwitz Transform), the 32-bit IEEE754 FPU and the MUL16 engine don't provide enough precision. I therefore need to code a enhanced resolution IIR Biquad filter aiming at processing 24-bit audio as input, 16-bit coefficients, delivering 24-bit (or 32-bit) audio output. The application note entitled "Extended Precision IIR Filter Design on the TMS320C54x DSP (June 1998)" tells how to code such IIR filter, basing on the TMS320C54 featuring MUL16 and MAC16 capabilities, quite similar to the ESP32 MUL16 and MAC16 capabilities. For the ESP32, I would like to code a) the Direct form 1 IIR Biquad filter showing on page 5, and b) the Optimized Cascaded IIR Biquad filter variant showing on page 17. Can somebody provide guidance? Is the GCC C compiler, the best tool? Can I hook a straightforward ESP32 Assembly compiler on the GNU Compiler Collection, concentrating on the assembly instructions that are required for doing audio DSP?