Decouple the SigmaStudio RAM download from compiled-in adau1701_program.c: DRAD v1 blobs in the dsp partition with embedded fallback, POST /api/dsp/program, and host-tested blob parse/serialize helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
57 lines
2.3 KiB
Markdown
57 lines
2.3 KiB
Markdown
# ADAU1701 SigmaStudio export
|
|
|
|
SigmaStudio project **DigiRadio**, IC1 = ADAU1701. Shipped with DigiRadio firmware
|
|
**0.8.3**.
|
|
|
|
## Key files
|
|
|
|
| File | Role |
|
|
|------|------|
|
|
| `DigiRadio_IC_1.h` | Program/param RAM data + `default_download_IC_1()` |
|
|
| `DigiRadio_IC_1_REG.h` | Control register map (safeload trigger) |
|
|
| `DigiRadio_IC_1_PARAM.h` | Parameter cell indices (`ADDR_*`) |
|
|
| `DigiRadio_NetList.xml` | Schematic netlist (reference) |
|
|
| `SigmaStudioFW.h` | Safeload / I2C glue API |
|
|
|
|
## Runtime (fw 0.8.3)
|
|
|
|
- **Boot:** ESP32 replays the active `DspProgram` over I2C via
|
|
`adau1701::Adau1701Driver` on every power-up. Source order: valid blob in
|
|
the `dsp` flash partition, else the embedded export from this folder
|
|
(`EmbeddedDspProgramSource`).
|
|
- **Program update:** `POST /api/dsp/program` with a `DRAD` v1 blob (see
|
|
`Software/tools/pack_dsp_program.py`). Device reboots and loads the new
|
|
script on next boot.
|
|
- **Live control:** six-band PEQ, input mixer, master volume, stereo/bass
|
|
enhancement overlays — safeload via `audio::AudioService` and REST
|
|
`/api/audio/*`; profile persisted in encrypted NVS.
|
|
- **Web UI:** **Audio** tab — 6 EQ sliders + mixer/enhance controls.
|
|
|
|
I2C address: 7-bit `0x34` (ADDR0=ADDR1=GND). Sample rate: **48 kHz**.
|
|
|
|
Safeload implementation: `components/drivers/adau1701/src/SigmaStudioFW.c`.
|
|
Parameter map: `components/drivers/adau1701/include/adau1701/Adau1701ParamMap.hpp`.
|
|
|
|
## After re-exporting from SigmaStudio
|
|
|
|
1. **Action → Export System Files** into this folder (overwrite headers).
|
|
2. Reconcile new `ADDR_*` symbols in `Adau1701ParamMap.hpp` if block names moved.
|
|
3. Rebuild and flash firmware (`idf.py build`).
|
|
4. Update manual: `docs/manual/ch-sigmastudio.tex`, `docs/manual/ch-adau1701.tex`.
|
|
|
|
Do **not** use SigmaStudio *Link Compile Download* on DigiRadio — export only;
|
|
the ESP32 programs the DSP at every power-up.
|
|
|
|
## DRAD v1 blob (flash / HTTP upload)
|
|
|
|
Layout: magic `DRAD`, version u16 (=1), write count u16, CRC32 (IEEE over
|
|
writes section), then for each write: address u16, length u16, data bytes.
|
|
Pack from JSON with `Software/tools/pack_dsp_program.py` or use
|
|
`core::serializeDspProgramBlob()` in host tests.
|
|
|
|
## Documentation
|
|
|
|
- Design: `docs/manual/ch-sigmastudio.tex`
|
|
- Driver & API: `docs/manual/ch-adau1701.tex`
|
|
- HTTP: `docs/manual/ch-api.tex` (`/api/audio/*`)
|