Repository navigation
Report the Line In signal to Music Assistant - #21
Merged
Merged
Conversation
Adds an opt-in Line In Signal Detection switch. The unit listens to Analog In while idle on Optical and during Line In streams, and tells Music Assistant when a signal starts and stops, so "Automatically play line-in on" works. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
2 of 10 tasks
Adds a Line In Clipping diagnostic sensor and a Line In Peak sensor (disabled by default), read from the raw ADC whenever Line In runs. A source that's too strong for the input clips at the ADC, so this tells people to turn it down. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
From a user perspective, I would like to see line-in sensing for analog too. It would probably need some kind of loudness threshold so it does not activate on every noise. (Record player can create a huming if not grounded correctly, even without playing a record at the moment) |
…-sense # Conflicts: # Integrations/ESPHome/Core.yaml
…-sense # Conflicts: # Integrations/ESPHome/Core.yaml
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WestwardWinds
marked this pull request as ready for review
November 19, 2026 17:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version: 26.11.19.1
What does this implement/fix?
Adds Line In Signal Detection (off by default), so Music Assistant's Automatically play line-in on can start Analog In when a record or TV starts and stop it after the sound ends. Today the firmware always reports a signal, so that setting never fires.
A signal counts after about half a second of sound, short enough to start quickly but long enough to ignore a needle thump. When it's on, the CAST PRO-1 listens to Analog In only while idle on Optical and during Line In streams. On Optical the DAC never needs the shared I2S port. It gives the port back as soon as anything plays, gates every ADC start on a RAM trial, and only sends changes. Analog units get autostop but not autostart. The README has the user steps.
It also adds Line In Clipping (diagnostic) and Line In Peak (disabled by default), read from the raw ADC while Line In streams. Hot sources like a turntable's built-in preamp clip at the PCM1808, which has no gain control, so this tells people to turn the source down. The README now suggests a -10 dB inline attenuator.
It costs about 900 B of static RAM, plus about 20 KB of internal RAM while listening idle. It compiles on ESPHome 2026.12-dev but isn't tested on hardware yet. A turntable test needs to confirm the -50 dBFS default threshold, the timings and the RAM. Draft so we don't forget it.
Questions for Trevor:
Types of changes
Checklist / Checklijst:
If user-visible functionality or configuration variables are added/modified:
🤖 Generated with Claude Code