Skip to content

Fix full-duplex DAC distortion and build on ESPHome 2026.10.0 - #6

Open
Bunton33 wants to merge 10 commits into
betafrom
claude/cast-pro1-firmware-distortion-927aa1
Open

Bunton33 wants to merge 10 commits into
betafrom
claude/cast-pro1-firmware-distortion-927aa1

Conversation

@Bunton33

@Bunton33 Bunton33 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Version: 26.10.26.1

What does this implement/fix?

Fixes loud, distorted analog output: in full duplex the DAC is the I2S clock slave, and at the default mclk_multiple of 256 ESP-IDF warns its clock ratio is too low, so the DAC and ADC now use 512. Also sets min_version: 2026.10.0 so stable builds pass again, renames deprecated keys, bumps CI pins, and drops dev from CI until 2026.11. Also fixes silent optical output by vendoring the pinned i2s_audio with 8 SPDIF DMA buffers, moving some Wi-Fi/BSS memory out of internal RAM, and giving SPDIF a 2 s timeout so switching back to Analog works. Also frees internal RAM so Line In, announcements and update checks no longer crash or fail while HA plays media on optical, and restores the DNS servers that an unplugged Ethernet port wiped every 15 s. Tested on a CAST PRO-1 over Wi-Fi with HA and Music Assistant: analog and optical both sound good, including Line In with optical.

Types of changes

  • Bugfix (fixed change that fixes an issue)
  • New feature (thanks!)
  • Breaking change (repair/feature that breaks existing functionality)
  • Dependency Update - Does not publish
  • Other - Does not publish
  • Website of github readme file update - Does not publish
  • Github workflows - Does not publish

Checklist / Checklijst:

  • The code change has been tested and works locally
  • The code change has not yet been tested

If user-visible functionality or configuration variables are added/modified:

  • Added/updated documentation for the web page

🤖 Generated with Claude Code

TrevorSchirmer and others added 4 commits October 8, 2026 16:43
Switch Full Duplex Component
Drop the hard-coded assignee and call the shared Workflows autoassign
workflow, which now falls back to the AUTO_ASSIGNEE organization
variable. Run on pull_request_target so assignment also works on
fork-submitted PRs; the workflow never checks out PR code.
…able

Assign issues and PRs via the AUTO_ASSIGNEE org variable
In full duplex the DAC's TX channel is the clock slave, and at the
default mclk_multiple of 256 (48 kHz, 32-bit slots) its MCLK/BCLK ratio
is 4, below ESP-IDF's minimum of 6. Raise the DAC and ADC to 512.

Set min_version to 2026.10.0, which sorts below 2026.10.0b1, so stable
builds pass again. Move flash_mode to esp32: and esp32_improv to
improv_ble. Bump CI pins, build beta on stable, and drop dev from CI
until the 2026.11 switch to the in-tree i2s_audio.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4f0561dc-60ad-4007-bc17-e0de8d80d3e2
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bugfix Something isn't working label Oct 26, 2026
@Bunton33 Bunton33 changed the title Fix full-duplex DAC distortion (mclk_multiple 512) and build on ESPHome 2026.10.0 Fix full-duplex DAC distortion and build on ESPHome 2026.10.0 Oct 26, 2026
Bunton33 and others added 6 commits October 26, 2026 15:46
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Full duplex holds the DAC and ADC DMA buffers from boot, so the SPDIF
speaker could not allocate its 15 DMA buffers. Vendor the pinned
i2s_audio with 8 SPDIF buffers, move Wi-Fi/BSS memory out of internal
RAM, and give SPDIF a 2 s timeout so switching back to Analog works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the audio_http decoder stacks to PSRAM, and have the microphone task wait for internal RAM instead of aborting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ESP-IDF clears the DNS servers whenever any interface restarts DHCP, and an unplugged Ethernet port retries every 15 s, so restore the default interface's servers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release finished HTTP stream threads, shrink lwIP mailboxes, and move the Line In task stack to PSRAM so announcements work with Line In on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An update check needs about 24 KB of internal RAM, which HA playback on optical can leave short, so checks now wait instead of failing silently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Bunton33 Bunton33 mentioned this pull request Oct 27, 2026
2 of 10 tasks
@TrevorSchirmer

Copy link
Copy Markdown
Member

@Bunton33 Need to take a look, I don't think any of the custom components is needed. In the main branch we dropped those and they weren't needed. Are you sure we need to add that all back?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants