AnsweredAssumed Answered

how to get auto backlight brightness on imx6

Question asked by Josh Jordan on Oct 29, 2018
Latest reply on Nov 2, 2018 by Josh Jordan

I see this section in config.xml about auto backlight brightness.  However, I am not able to cause ambient light to affect the backlight brightness.  I have lux values reporting to event2 and can see this using getevent.  How do I make these lux values go into the backlight driver and change the backlight brightness?  Nothing is able to change the brightness whether I cover up the sensor or shine a flashlight into it.

 

    <!-- Flag indicating whether the we should enable the automatic brightness in Settings.

         Software implementation will be used if config_hardware_auto_brightness_available is not set -->

    <bool name="config_automatic_brightness_available">true</bool>

 

    <!-- Stability requirements in milliseconds for accepting a new brightness level.  This is used

         for debouncing the light sensor.  Different constants are used to debounce the light sensor

         when adapting to brighter or darker environments.  This parameter controls how quickly

         brightness changes occur in response to an observed change in light level that exceeds the

         hysteresis threshold. -->

    <integer name="config_autoBrightnessBrighteningLightDebounce">2000</integer>

    <integer name="config_autoBrightnessDarkeningLightDebounce">4000</integer>

 

    <!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.

         The N entries of this array define N + 1 zones as follows:

 

         Zone 0:        0 <= LUX < array[0]

         Zone 1:        array[0] <= LUX < array[1]

         ...

         Zone N:        array[N - 1] <= LUX < array[N]

         Zone N + 1:    array[N] <= LUX < infinity

 

         Must be overridden in platform specific overlays -->

   <integer-array name="config_autoBrightnessLevels">

        <item>20</item>

        <item>40</item>

        <item>100</item>

        <item>325</item>

        <item>600</item>

        <item>1250</item>

        <item>2200</item>

        <item>4000</item>

        <item>10000</item>

    </integer-array>

 

    <!-- Array of output values for LCD backlight corresponding to the LUX values

         in the config_autoBrightnessLevels array.  This array should have size one greater

         than the size of the config_autoBrightnessLevels array.

         This must be overridden in platform specific overlays -->

    <integer-array name="config_autoBrightnessLcdBacklightValues">

        <item>20</item>   <!-- 0-20 -->

        <item>45</item>   <!-- 20-40 -->

        <item>65</item>   <!-- 40-100 -->

        <item>90</item>   <!-- 100-325 -->

        <item>120</item>  <!-- 325-600 -->

        <item>150</item>  <!-- 600-1250 -->

        <item>180</item>  <!-- 1250-2200 -->

        <item>210</item>  <!-- 2200-4000 -->

        <item>230</item>  <!-- 4000-10000 -->

        <item>255</item>  <!-- 10000+ -->

    </integer-array>

Outcomes