Initial commit of LedsValve.p, LED driver for Valve Steam Machine - #87
Initial commit of LedsValve.p, LED driver for Valve Steam Machine#87CalcProgrammer1 wants to merge 3 commits into
Conversation
c8e7409 to
efc3acc
Compare
efc3acc to
c6547ab
Compare
|
I've done some code cleanup and now I think it's ready for review. One thing I'm still deciding on is whether to pass the RGB values in 3 separate Pawn cells or combine them into a single cell, it might be more efficient to do single cell and if I match the 0x00BBGGRR format that simplifies the OpenRGB side as that is the format our RGBColor type uses. I renamed it from leds-valve.p to LedsValve.p to match the other module naming conventions. The ioctls implemented line up with the leds-valve.c sysfs entries in /sys/class/leds/valve-led[0-16] on Linux with the addition of ioctl_init for initializing the module. |
c6547ab to
497b833
Compare
|
Another thing I am thinking of adding is an ioctl_get_led_count or something along those lines, as in the Linux implementation you can count the number of /sys/class/leds/valve-led[X] entries to determine LED count but here this method is not available. @namazso have any thoughts on this MR? Ideally these ioctls, at least the ones from the common Linux framework, could be reused on other Linux multi-LED/RGB driver ports in the future. |
|
I just pushed a new "registry" branch, could you try using it to check baseboard vendor? |
|
I'll look into testing the registry check this week. |
497b833 to
5736297
Compare
|
Implemented the registry check and verified on the Steam Machine. I moved the registry.inc file into the includes folder to get it to compile properly. I also had to write a string comparison function locally to compare the strings, that might be a good candidate to move to an include file (unless there's already a string compare function I am missing that I could use instead). |
5736297 to
95838b2
Compare
|
Updated the merge request to add the registry check within the PawnIO module using your new registry include file. Confirmed that it works and intentionally corrupted the strings it checks the two parameters against to force it to fail and confirm it does not load even if OpenRGB attempts to load it. |
95838b2 to
67bea44
Compare
|
Ready for review/merge. I cleaned up the registry info check (the original check I had would allow incorrect pairings OEM:Fremont and Valve:F7F where the Linux driver would not). I added functions for getting the number of LEDS and number of components for each LED, which could be useful if we reuse the same ioctls for future Linux-ported multi_intensity LED drivers. Verified latest build on hardware including the new ioctls. |
67bea44 to
fec44d4
Compare
|
Removed all internal state tracking/global variables. Replaced with register reads where appropriate. |
fec44d4 to
16361c8
Compare
Still needs some work, but this was a quick port from the leds-valve.c Linux driver. It compiles and I have successfully used it to control the Valve Steam Machine with OpenRGB to the same level of functionality my Linux implementation has (direct control over independent LEDs, selecting built in effects, adjusting speed of built in effects, and adjusting brightness). Does not perform DMI verification of the vendor/product like the leds-valve.c driver does as PawnIO does not support DMI, so I'm doing that verification on the OpenRGB side before loading this module. Not all ioctls have been tested yet.
Implements #86
OpenRGB side changes: https://gitlab.com/CalcProgrammer1/OpenRGB/-/merge_requests/3439