Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffe24ccf authored by DingYong's avatar DingYong Committed by Josep del Río
Browse files

Add keyboard volume mute LED. (2/2)

(cherry picked from https://partner-android-review.googlesource.com/q/commit:80f60ec95afc0c5995647aa19f87b5389f656c25)

Change-Id: I75f68a34b2557deeb9e5d760480e5ab4aa6af328
Bug: 373556678
Flag: NONE external OEM contribution only active in their devices
parent 1a824fd3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -131,8 +131,9 @@ enum class InputDeviceLightType : int32_t {
    PLAYER_ID = 1,
    KEYBOARD_BACKLIGHT = 2,
    KEYBOARD_MIC_MUTE = 3,
    KEYBOARD_VOLUME_MUTE = 4,

    ftl_last = KEYBOARD_MIC_MUTE
    ftl_last = KEYBOARD_VOLUME_MUTE
};

enum class InputDeviceLightCapability : uint32_t {
+2 −1
Original line number Diff line number Diff line
@@ -129,7 +129,8 @@ static const std::unordered_map<std::string, InputLightClass> LIGHT_CLASSES =
         {"multi_intensity", InputLightClass::MULTI_INTENSITY},
         {"max_brightness", InputLightClass::MAX_BRIGHTNESS},
         {"kbd_backlight", InputLightClass::KEYBOARD_BACKLIGHT},
         {"mic_mute", InputLightClass::KEYBOARD_MIC_MUTE}};
         {"mic_mute", InputLightClass::KEYBOARD_MIC_MUTE},
         {"mute", InputLightClass::KEYBOARD_VOLUME_MUTE}};

// Mapping for input multicolor led class node names.
// https://www.kernel.org/doc/html/latest/leds/leds-class-multicolor.html
+2 −0
Original line number Diff line number Diff line
@@ -514,6 +514,8 @@ void PeripheralController::configureLights() {
            type = InputDeviceLightType::KEYBOARD_BACKLIGHT;
        } else if (rawInfo.flags.test(InputLightClass::KEYBOARD_MIC_MUTE)) {
            type = InputDeviceLightType::KEYBOARD_MIC_MUTE;
        } else if (rawInfo.flags.test(InputLightClass::KEYBOARD_VOLUME_MUTE)) {
            type = InputDeviceLightType::KEYBOARD_VOLUME_MUTE;
        } else {
            type = InputDeviceLightType::INPUT;
        }
+2 −0
Original line number Diff line number Diff line
@@ -179,6 +179,8 @@ enum class InputLightClass : uint32_t {
    KEYBOARD_BACKLIGHT = 0x00000100,
    /* The input light has mic_mute name */
    KEYBOARD_MIC_MUTE = 0x00000200,
    /* The input light has mute name */
    KEYBOARD_VOLUME_MUTE = 0x00000400,
};

enum class InputBatteryClass : uint32_t {