Add generic ADAU1701 parameter access (GET/PUT /api/dsp/param)

New core::IDsp::writeRawParam(address, value) safeloads any named
Parameter RAM cell in the compiled SigmaStudio program (74 cells: mixer/
Beep1/PEQ coefficients/limiter thresholds/etc — the same set SigmaStudio's
own Remote Connection, components/net/SigmaStudioTcpServer, already has
full access to). Value is a plain SigmaStudio floating coefficient,
converted to ADAU 8.23 fixpoint via the existing core::floatToFixpoint823.

Adau1701ParamTable.hpp holds the name->address table extracted from
Firmware/ADAU1701-Firmware/DigiRadio_IC_1_PARAM.h; core::DspParamJson
handles the wire format without core/ depending on the adau1701 driver
(net/SetupWebServer.cpp bridges the two, consistent with how other
JSON DTOs are supplied their data by the net layer).

GET /api/dsp/params lists every cell (name + address) for discovery.
PUT /api/dsp/param {"name":...,"value":...} writes one. Deliberately no
domain validation, matching the trust level already implied by the
existing SigmaStudio TCP bridge being reachable on the same network.
HTTP routes were registered in the SetupWebServer.cpp change committed
alongside the FM band scan feature (3a10ed7).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0178rASQ6ZETPMUamvpoR2KR
This commit is contained in:
2026-08-18 07:51:09 +02:00
co-authored by Claude Sonnet 5
parent 7e65394100
commit 39984a97d1
14 changed files with 563 additions and 0 deletions
@@ -208,6 +208,22 @@ public:
[[nodiscard]] std::expected<void, core::DspError> setBeepEnabled(
bool enabled);
/**
* @brief writeRawParam — safeload any named ADAU1701 Parameter RAM cell.
*
* @dname writeRawParam
* @param address Parameter RAM address.
* @param value Coefficient in the SigmaStudio floating convention.
* @return Ok on success, or DspError.
* @pubstate live-only: not part of AudioProfile, never persisted, does
* not touch profile_. No domain validation.
*
* @author Michele Bigi
* @date 2026-08-18
*/
[[nodiscard]] std::expected<void, core::DspError> writeRawParam(
unsigned address, float value);
private:
[[nodiscard]] std::expected<void, core::StoreError> persistProfile() const;
@@ -193,4 +193,10 @@ std::expected<void, core::DspError> AudioService::setBeepEnabled(bool enabled)
return dsp_.setBeepEnabled(enabled);
}
std::expected<void, core::DspError> AudioService::writeRawParam(
unsigned address, float value)
{
return dsp_.writeRawParam(address, value);
}
} // namespace audio