Closed BeardOverflow closed 1 year ago
Your embedded controller has different constants. Some of them can be easily fixable by editing the constants.h file. For example:
cat /sys/devices/platform/msi-ec/webcam
unknown (75)
Convert the value to hexadecimal (I must improve the error message, sorry), press Fn+6 in your keyboard (camera switching), annotate the new value. Go to the constants file and edit it with the new values:
#define MSI_EC_WEBCAM_ON 0x4b
#define MSI_EC_WEBCAM_OFF 0x49
That's all.
I am sorry, currently I have no time to continue developing. The module should detect your embedded controller version and should handle several constant's tables. After the summer, on October I probably able to continue improving this module.
Regards.
The actual value can be obtained by masking the value from ec for example the mask for camera is 0x2
so doing
value & 0x2
gives the actual value, same can be done for other attributes I'm using this logic in #3 to get appropriate state of leds regardless of the constant value.
Though there are a few caveats to writing the data to ec, I was able to find an issue writing state value less than 0x80 wont turn on the backlight, though the state was changing (the brightness), I suspect the kb address requires the 7th lsb to be 1 (0b10000001) to light up the led.
just a little feed back. Don't get me wrong this is awesome.
The rest is all working like it should. Super impressed.
Originally posted by @fawqsir in https://github.com/BeardOverflow/msi-ec/issues/1#issuecomment-1185133202