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
@@ -27,6 +27,10 @@
#include <expected>
#include <optional>
namespace audio {
class AudioService;
} // namespace audio
namespace tuner {
class TunerService;
} // namespace tuner
@@ -52,6 +56,7 @@ public:
* @dname start
* @param store Secure store consulted for saved STA credentials.
* @param tuner Tuner service exposed by the HTTP API.
* @param audio Audio service exposed by the HTTP API.
* @return NetBootstrap on success, or a NetError.
* @pubstate none
*
@@ -59,7 +64,8 @@ public:
* @date 2026-07-06
*/
[[nodiscard]] static std::expected<NetBootstrap, NetError>
start(core::ISecureStore& store, tuner::TunerService& tuner);
start(core::ISecureStore& store, tuner::TunerService& tuner,
audio::AudioService& audio);
NetBootstrap(const NetBootstrap&) = delete;
NetBootstrap& operator=(const NetBootstrap&) = delete;
@@ -25,6 +25,10 @@
struct httpd_req;
namespace audio {
class AudioService;
} // namespace audio
namespace tuner {
class TunerService;
} // namespace tuner
@@ -45,8 +49,9 @@ namespace net {
* @date 2026-07-06
*/
struct HttpRouteContext {
core::ISecureStore* store; ///< Secure store for Wi-Fi provisioning.
tuner::TunerService* tuner; ///< Tuner service for tuner REST routes.
core::ISecureStore* store; ///< Secure store for Wi-Fi provisioning.
tuner::TunerService* tuner; ///< Tuner service for tuner REST routes.
audio::AudioService* audio; ///< Audio service for ADAU1701 REST routes.
};
/**
@@ -119,21 +124,24 @@ public:
* @param store Secure store for POST /api/wifi persistence.
* @param netState Active network phase exposed to handlers.
* @param tuner Tuner service for the tuner REST routes.
* @param audio Audio service for the audio REST routes.
* @return Ok on success, or NetError::HttpServerStartFailed.
* @pubstate writes server_, store_, netState_, and tuner_ on success.
* @pubstate writes server_, store_, netState_, tuner_, and audio_ on success.
*
* @author Michele Bigi
* @date 2026-07-06
*/
[[nodiscard]] std::expected<void, NetError> start(core::ISecureStore& store,
NetState netState,
tuner::TunerService& tuner);
tuner::TunerService& tuner,
audio::AudioService& audio);
private:
httpd_handle* server_;
core::ISecureStore* store_;
NetState netState_;
tuner::TunerService* tuner_;
audio::AudioService* audio_;
HttpRouteContext routeContext_;
};