Skip to content

feat: expose DS5 player-indicator and mic-mute LED outputs - #97

Open
joelfcscoelho wants to merge 2 commits into
LizardByte:masterfrom
joelfcscoelho:ds5-player-mic-led
Open

feat: expose DS5 player-indicator and mic-mute LED outputs#97
joelfcscoelho wants to merge 2 commits into
LizardByte:masterfrom
joelfcscoelho:ds5-player-mic-led

Conversation

@joelfcscoelho

@joelfcscoelho joelfcscoelho commented Aug 20, 2026

Copy link
Copy Markdown

Description

The DualSense output report carries the player indicator LEDs (the little row under
the touchpad) and the mic mute LED, but the DS5 profile wasn't surfacing either one.
It reported rumble, the RGB lightbar, adaptive triggers and trigger rumble, and just
dropped these two, so when a game set the player number or turned the mic light on
there was no way for a consumer to see it.

This adds output kinds for both:

  • player_led and mic_led in GamepadOutputKind, with matching fields on GamepadOutput
  • supports_player_led / supports_mic_led on the profile capabilities, both set for DualSense
  • parsing in append_dualsense_outputs: player LEDs come from offset + 43 when the
    player-indicator valid flag is set (valid_flag1 & 0x10), and the mic LED from
    offset + 8 when the mic-mute flag is set (0x01). Same shape as the existing
    lightbar block, inside the same bounds check.
  • unit tests for the parsing plus the profile/capability expectations

Existing output kinds are untouched. There's a companion Sunshine PR that consumes
these and forwards the LEDs to the streaming client.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@CLAassistant

CLAassistant commented Aug 20, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Add player_led and mic_led to GamepadOutputKind and GamepadOutput, and
parse them from the DualSense output report in append_dualsense_outputs
(player indicator gated by valid_flag1 bit 0x10 at offset+43; mic-mute LED
gated by bit 0x01 at offset+8), mirroring the existing rgb_led handling.
The DS5 profile advertises both via new supports_player_led /
supports_mic_led capability flags.

Signed-off-by: Joel Coelho <joelfernandocscoelho@gmail.com>
Signed-off-by: Joel Coelho <joelfernandocscoelho@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.62%. Comparing base (15a37d3) to head (623b214).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #97      +/-   ##
==========================================
+ Coverage   75.47%   75.62%   +0.15%     
==========================================
  Files          34       34              
  Lines        8133     8177      +44     
  Branches     3044     3054      +10     
==========================================
+ Hits         6138     6184      +46     
+ Misses       1454     1420      -34     
- Partials      541      573      +32     
Flag Coverage Δ
FreeBSD 51.93% <81.81%> (+0.21%) ⬆️
Linux-Clang 57.66% <83.33%> (+0.17%) ⬆️
Linux-GCC 68.41% <100.00%> (+0.21%) ⬆️
Windows-MSVC 88.54% <100.00%> (+0.12%) ⬆️
Windows-MinGW-UCRT64 65.47% <100.00%> (+0.30%) ⬆️
macOS 51.81% <88.88%> (+0.39%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/core/gamepad_adapter.cpp 98.79% <100.00%> (+0.02%) ⬆️
src/core/profiles.cpp 94.87% <ø> (ø)
src/core/report.cpp 93.23% <100.00%> (-0.50%) ⬇️
src/include/libvirtualhid/gamepad_adapter.hpp 100.00% <100.00%> (ø)
src/include/libvirtualhid/types.hpp 96.55% <100.00%> (+0.12%) ⬆️
tools/virtualhid_control_model.cpp 98.23% <100.00%> (+0.15%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15a37d3...623b214. Read the comment docs.

@ReenigneArcher

ReenigneArcher commented Aug 20, 2026

Copy link
Copy Markdown
Member

Thank you! Could you rebase your Sunshine PR and make it point to 623b214 ?

Edit: Can you do it after I merge LizardByte/Sunshine#5531 please?

@joelfcscoelho

Copy link
Copy Markdown
Author

Thank you! Could you rebase your Sunshine PR and make it point to 623b214 ?

Edit: Can you do it after I merge LizardByte/Sunshine#5531 please?

Will do mate

@ReenigneArcher

Copy link
Copy Markdown
Member

Thanks! I will give it a test shortly

@ReenigneArcher

Copy link
Copy Markdown
Member

I tested this with Sunshine on Windows and unfortunately it doesn't seem to be working.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants