Skip to content

Commit 98c439d

Browse files
anabolycandriy.malyshenkocraigmillard86
authored
feat: Add TAS5805M DAC settings and 15-band equalizer UI (#183)
This PR adds comprehensive DAC configuration and equalizer support for the TAS5805M chip with a web UI. Major Features: - TAS5805M DAC settings page with configurable parameters: * Bridge mode, modulation mode, switching frequency * Analog and digital volume control * Mixer implementation with compensation gains * Fault monitoring and fault reset - 15-band parametric equalizer with two modes: * Manual 15-band EQ control with per-band gains * HF and LF filter presets for quick bi-amp configuration * Real-time updates and visualization - New dedicated settings component (tas5805m_settings) for persistence - All settings persist to NVS and restore on boot Architecture Improvements: - Created dedicated tas5805m_settings component - DAC UI in the dedicated HTML tab - Data-driven front-end with settings-ui.js renderer Bug Fixes: - Fixed EQ UI showing 0 gains before music starts - Fixed channel gains not restoring on reboot - Fixed NULL semaphore crashes during player restart - Fixed DSP init ordering (semaphore creation before use) - Fixed NULL pointer checks in mDNS and player - Fixed WiFi power save interfering with low-latency audio - Fixed settings persistence and restoration Technical Details: - Extended partitions.csv for additional storage - Settings stored in NVS with proper restoration - DSP processor coordination with I2S clock requirements - Delayed settings application after DAC initialization - Proper semaphore and mutex protection Co-authored-by: andriy.malyshenko <[email protected]> Co-authored-by: Andriy Malyshenko <[email protected]>, craigmillard86 <[email protected]>
1 parent 950b212 commit 98c439d

File tree

27 files changed

+28823
-192
lines changed

27 files changed

+28823
-192
lines changed

components/audio_board/Kconfig.projbuild

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ menu "Audio Board"
173173

174174
endmenu
175175

176-
menu "TAS5805M interface Configuration"
176+
menu "TAS5805M interface configuration"
177177
depends on DAC_TAS5805M
178178

179179
config PIN_DAC_PWDN
@@ -182,29 +182,20 @@ menu "Audio Board"
182182
default 33
183183
help
184184
GPIO number to power down the DAC
185-
endmenu
186-
187-
menu "DAC-Operation-Mode"
188-
depends on DAC_TAS5805M
189-
190-
choice DAC_BRIDGE_MODE
191-
prompt "Bridge-Mode selection"
192-
default DAC_BRIDGE_MODE_DISABLED
193-
194-
config DAC_BRIDGE_MODE_DISABLED
195-
bool "Stereo (bridge mode disabled)"
185+
186+
endmenu
196187

197-
config DAC_BRIDGE_MODE_MONO
198-
bool "Mono mode (Left + Right / 2)"
199-
200-
config DAC_BRIDGE_MODE_LEFT
201-
bool "Output left input channel"
188+
menu "TAS5805M DSP Support"
189+
depends on DAC_TAS5805M
202190

203-
config DAC_BRIDGE_MODE_RIGHT
204-
bool "Output right input channel"
205-
206-
endchoice
207-
endmenu
191+
config DAC_TAS5805M_EQ_SUPPORT
192+
bool "Enable TAS5805M equalizer support"
193+
default false
194+
help
195+
When enabled, build includes optional TAS5805M equalizer support.
196+
Equalizer configuration and runtime control remain available via
197+
the device UI. Default: disabled.
198+
endmenu
208199

209200
menu "Merus MA120x0 interface Configuration"
210201
depends on DAC_MA120X0

components/audio_hal/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ IF (NOT ((CONFIG_IDF_TARGET STREQUAL "esp32c3") OR (CONFIG_IDF_TARGET STREQUAL "
1818
endif()
1919

2020
# Edit following two lines to set component requirements (see docs)
21-
set(COMPONENT_REQUIRES )
22-
set(COMPONENT_PRIV_REQUIRES audio_sal audio_board mbedtls esp_peripherals custom_board)
21+
set(COMPONENT_REQUIRES audio_sal)
22+
set(COMPONENT_PRIV_REQUIRES audio_board mbedtls esp_peripherals custom_board)
2323

2424
set(COMPONENT_SRCS ./audio_hal.c
2525
./audio_volume.c

components/audio_hal/driver/tas5805m/tas5805m_reg_cfg.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ typedef struct {
4343
uint8_t value;
4444
} tas5805m_cfg_reg_t;
4545

46-
static const uint8_t tas5805m_volume[] = {
47-
0xff, 0x9f, 0x8f, 0x7f, 0x6f, 0x5f, 0x5c, 0x5a, 0x58, 0x54, 0x50,
48-
0x4c, 0x4a, 0x48, 0x44, 0x40, 0x3d, 0x3b, 0x39, 0x37, 0x35};
49-
5046
static const tas5805m_cfg_reg_t tas5805m_registers[] = {
5147
// RESET
5248
{0x00, 0x00},

components/custom_board/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Edit following two lines to set component requirements (see docs)
2-
set(COMPONENT_REQUIRES)
3-
set(COMPONENT_PRIV_REQUIRES audio_hal esp_peripherals)
2+
set(COMPONENT_REQUIRES audio_hal audio_board)
3+
set(COMPONENT_PRIV_REQUIRES esp_peripherals)
44

55
if(CONFIG_AUDIO_BOARD_CUSTOM)
66
message(STATUS "Current board name is " CONFIG_AUDIO_BOARD_CUSTOM)

0 commit comments

Comments
 (0)