Si4684 RF investigation report; fix ADAU1701 I2C reliability under long safeload bursts

- Add docs/si4684-rf-investigation-report.md: full record of the FM/DAB no-lock
  investigation (crystal, front-end matching, ANTCAP sweep, continuity, leading
  EP solder-defect hypothesis, PCBWay report sent) plus the separate audio
  profile NVS bug found and partially fixed this session.
- Fix sigma_i2c_write() (SigmaStudioFW.c): no retry on I2C failure meant a single
  transient NACK anywhere in a long safeload burst (EQ apply = ~55 sequential
  transactions) aborted the whole sequence. Added a 3-attempt retry.
- Add granular failure logging (AudioService::applyProfileToDsp/persistProfile,
  Adau1701Driver::applyMixer/applyEq, NvsAudioProfileStore::saveProfile error
  codes) to isolate the remaining NVS-side audio profile save failure.
- Si4684Driver::tuneFm gains an optional ANTCAP argument (default 0 = unchanged
  auto-tune behavior) used during this session's front-end matching sweep.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-13 22:21:04 +02:00
co-authored by Claude Sonnet 5
parent 6f7b6dd12c
commit bee8cfa86f
7 changed files with 193 additions and 13 deletions
@@ -13,10 +13,14 @@
#include "audio/AudioService.hpp"
#include "esp_log.h"
namespace audio {
namespace {
constexpr char kTag[] = "AudioService";
[[nodiscard]] core::AudioProfile profileForHardware(
const core::AudioProfile& profile) noexcept
{
@@ -59,7 +63,11 @@ std::expected<void, core::StoreError> AudioService::persistProfile() const
if (store_ == nullptr) {
return {};
}
return store_->saveProfile(profile_);
auto saved = store_->saveProfile(profile_);
if (!saved) {
ESP_LOGW(kTag, "persistProfile: NVS save failed");
}
return saved;
}
std::expected<void, core::StoreError> AudioService::applyProfileToDsp(
@@ -67,6 +75,7 @@ std::expected<void, core::StoreError> AudioService::applyProfileToDsp(
{
const core::AudioProfile hardware = profileForHardware(profile);
if (auto applied = dsp_.applyProfile(hardware); !applied) {
ESP_LOGW(kTag, "applyProfileToDsp: DSP safeload failed");
return std::unexpected(core::StoreError::IoFailed);
}
return {};