Add Slice 5 ADAU1701 runtime audio control (firmware 0.5.0).

Safeload mixer/EQ/master on the ADAU1701, persist AudioProfile in NVS,
expose /api/audio routes and web UI controls, with host tests and manual sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-06 16:47:58 +02:00
co-authored by Cursor
parent 4b931b0aad
commit ab3651e678
58 changed files with 3191 additions and 41 deletions
@@ -5,9 +5,13 @@ SigmaStudio project **DigiRadio**, IC1 = ADAU1701.
Key files:
- `DigiRadio_IC_1.h` — program/param RAM data + `default_download_IC_1()`
- `DigiRadio_IC_1_REG.h` — register map
- `DigiRadio_IC_1_PARAM.h` — parameter handles (safeload, Slice 5+)
- `DigiRadio_IC_1_PARAM.h` — parameter handles (safeload addresses)
The ESP32 replays `default_download_IC_1()` over I2C on every boot via
`adau1701::Adau1701Driver` (see `components/drivers/adau1701/`).
`adau1701::Adau1701Driver`. Runtime mixer/EQ/master changes use the
ADAU1701 safeload mechanism (`sigma_safeload_param` /
`sigma_safeload_block` in `SigmaStudioFW.c`).
I2C address: 7-bit `0x34` (ADDR0=ADDR1=GND), matching `board_pins.hpp`.
Sample rate: **48 kHz** (see `DigiRadio_NetList.xml`).
@@ -49,6 +49,35 @@ void SIGMA_WRITE_REGISTER_BLOCK(unsigned char devAddress,
*/
void adau1701_run_default_download(void);
/** Safeload data register base (0x0810..0x0814). */
#define ADAU1701_SAFELOAD_DATA_BASE 0x0810U
/** Safeload address register base (0x0815..0x0819). */
#define ADAU1701_SAFELOAD_ADDR_BASE 0x0815U
/** DSP core control register (IST bit triggers safeload). */
#define ADAU1701_CORE_CONTROL_REG 0x081CU
/** IST bit value OR-ed into core control to commit safeload. */
#define ADAU1701_CORE_IST_TRIGGER 0x003CU
/**
* @brief Safeload one 8.23 fixpoint parameter (click-free update).
*
* @param paramAddr Parameter RAM address from DigiRadio_IC_1_PARAM.h.
* @param fixpoint 32-bit SigmaStudio fixpoint value.
* @return 0 on success, non-zero on I2C failure.
*/
int sigma_safeload_param(unsigned int paramAddr, int fixpoint);
/**
* @brief Safeload up to five parameters in one IST transfer (e.g. biquad).
*
* @param count Number of pairs (1..5).
* @param paramAddrs Parameter RAM addresses.
* @param fixpoints 32-bit fixpoint values.
* @return 0 on success, non-zero on I2C failure.
*/
int sigma_safeload_block(unsigned char count, const unsigned int* paramAddrs,
const int* fixpoints);
#ifdef __cplusplus
}
#endif