Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LENA][11][4.19] Green LED indicator is brighter than blue and red #772

Open
sledges opened this issue Apr 13, 2022 · 1 comment
Open

[LENA][11][4.19] Green LED indicator is brighter than blue and red #772

sledges opened this issue Apr 13, 2022 · 1 comment
Labels

Comments

@sledges
Copy link

sledges commented Apr 13, 2022

Platform: lena
Device: pdx213 xqbt52 (Xperia 10 III)
Kernel version: 4.19.188-gadf298fa3900
Android version: AOSP11 android-11.0.0_r46
Software binaries version: SW_binaries_for_Xperia_Android_11_4.19_v9a_lena.img

Previously working on stock Sony Android 62.0.A.3.70 (also when reflashed via Emma to 62.0.A.3.109).

Description
LED indicator does not show actual colours because its green component is much brighter than the rest (blue and red).

Symptoms
When device is charging and is around 50%, LED should be yellow, but appears to be more green instead.

How to reproduce

echo 0 > /sys/class/leds/red/brightness
echo 0 > /sys/class/leds/green/brightness
echo 0 > /sys/class/leds/blue/brightness

echo 255 > /sys/class/leds/red/brightness # notice the brightness of red LED
echo 0 > /sys/class/leds/red/brightness
echo 255 > /sys/class/leds/green/brightness # notice how the green is much brighter (they are all of equal brightness on seine)

I had to roughly scale green LED by 50% to get desired colours.

So if you wanted to set LED white, values would be (255,127,255) RGB.

For yellow -- (255,127,0) etc.

It looks like stock Android does the same - the overall brightness of LED with components combined is not as bright as a result.

@sledges sledges added the bug label Apr 13, 2022
@MarijnS95
Copy link
Contributor

LMGTFY:

This is probably the custom current limiter somc added to the "qcom,tri-led" driver, which is conveniently lower for the green channel but not implemented on our copy of the driver:

https://github.com/sonyxperiadev/kernel/blob/6d8e0bb86ce43885c49e651bb554d78e8375fd9e/arch/arm64/boot/dts/somc/lagoon-lena-common.dtsi#L122-L148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants