feat: add HDPS audio volume controls - #37
Open
jkdevito wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds per-output audio volume control devices for HD-PS chassis outputs (HDMI/DM Lite output mixers) and analog auxiliary mixers, exposing them via IBasicVolumeWithFeedback and registering them with DeviceManager for downstream discovery (e.g., Mobile Control).
Changes:
- Added
HdPsAudioOutputControllerdevices for outputs with an availableoutput.Mixer, keyed per-output and registered inDeviceManager. - Added
HdPsAnalogAuxOutputControllerdevices for each_chassis.AnalogAuxiliaryMixer, keyed per-mixer and registered inDeviceManager. - Updated
_chassis_OutputChangeto fire volume/mute feedback updates for registered output volume controllers.
Suppressed comments (1)
src/Chassis/HdPsXxxController.cs:655
VolumeDownuses integer division when scaling ramp time (... / 65535), which results in 0 for almost all current volume levels and makesCreateRampeffectively instantaneous. Use floating-point division (and the feedback value) so the ramp time scales correctly.
public void VolumeDown(bool pressRelease)
{
if (pressRelease)
_mixer.Volume.CreateRamp(0, (uint)(400 * (_mixer.Volume.UShortValue / 65535)));
else
_mixer.Volume.StopRamp();
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
IBasicVolumeWithFeedbackfor Mobile Control discovery.Testing
dotnet clean && dotnet buildReviewer Notes
DeviceManagerduring HDPS controller construction.