Files
bsncubed 8ba4de5eda OTA: quiet the audio sources during a firmware upload
An upload during an active Spotify session crawled (~10 kB/s, 197 s)
and ended in a reset (seen twice). Workaround:
- aes67_ota_on_update(cb): cb(true) right before an accepted upload
  writes flash, cb(false) if it then fails.
- The player pauses Spotify (spotify_pause -> SpircHandler::setPause, the
  app follows) and suspends HLS fetching (hls_suspend); resumed if the
  upload fails. AES67 TX keeps running (silence).
- Verified: upload during Spotify playback paused the session and
  installed in 25.8 s (normal for 2 MB), clean reboot and self-test.
  Root cause still open (noted in CLAUDE.md with the other cspot items).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 19:02:03 +10:00

18 lines
749 B
C

// aes67_ota: Firmware upload, image checks, rollback self-test.
// Core component: must not depend on main/ (project code).
#pragma once
#include <stdbool.h>
#include "esp_err.h"
// Registers /api/ota routes. If the running image is pending verification, starts the
// self-test: IP address + own web server answering within 60 s, else roll back.
esp_err_t aes67_ota_init(void);
// Called with true right before an accepted upload starts writing flash, and with false if that
// upload then fails (on success the device reboots). Lets the project quiet heavy work (streaming,
// decoding) during the flash writes. Up to 4 callbacks.
typedef void (*aes67_ota_update_cb_t)(bool starting);
esp_err_t aes67_ota_on_update(aes67_ota_update_cb_t cb);