Repository navigation
Conversation
Wake the AV receiver (or TV) on the far end of a Pi's HDMI link and switch
it to our input before Sendspin audio hits the HDMI output, instead of
failing to open the vc4-hdmi ALSA device while the receiver is in standby.
UniversalProxy.Cec drives `cec-ctl` from v4l-utils (shipped by the
nerves_systems_universal_proxy rpi4 system >= 0.1.12) rather than a NIF:
the kernel keeps the claimed logical address as adapter state, so one
`--playback` claim at boot and short-lived one-shots for everything else
are enough.
- Cec.Enumerate: /dev/cecN adapters, paired with the HDMI ALSA card via the
shared platform device under /sys/class/{cec,sound}/*/device.
- Cec.Server: discovery (10 s hotplug scan), claim + physical address,
receiver power/volume/mute state from bus traffic; subscribes to the
Sendspin state topic and fires One Touch Play (Image View On + Active
Source) on `stream_start` for the paired HDMI output.
- Cec.Monitor: one `cec-ctl -m` per adapter, parsed into PubSub records.
- Cec.Parser: monitor stream, one-shot replies, Driver Info.
- Cec facade: one_touch_play, standby, power_status, audio_status,
volume_up/down, mute, user_control — catch :exit idiom like the other
optional subsystems; commands run in the caller's process.
- Supervisor returns :ignore unless `UniversalProxy.Cec` has enabled: true
(set in config/target.exs), so host/test never spawn cec-ctl.
- mix.exs: UP_SYSTEMS_PATH switches the custom systems to path: deps on a
local checkout, for building against a locally built system.
Tests cover the parser formats, sysfs pairing, discovery, auto-wake on
stream_start, receiver state updates, hotplug removal and the facade's
degraded behaviour, with a recording fake cec-ctl in test/support.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L3zFyNeDAeaCXyznuLUnv8
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.
No description provided.