Giter Site home page Giter Site logo

als's Introduction

ALS (Ambient Light Sensor) Driver

ASUS Zenbook Ambient Light Sensor Driver.

Device /sys/bus/acpi/devices/ACPI0008:00 (ACPI path: _SB.ALS).

Exported attributes:

  • ali (Ambient Light Illuminance) (ACPI path: _SB.ALS._ALI)

Asus Zenbook:

  • _SB.ALS._HID() // Hardware ID. Return ACPI0008
  • _SB.ALS._STA() // Status. Always return 0x0B
  • _SB.ALS._DIS() // Disable Device. Empty method, does nothing.
  • _SB.ALS._ALI() // Ambient Light Illuminance. Returns one of the following values: 0x32 (min illuminance), 0xC8, 0x190, 0x258, 0x320 (max illuminance).
  • _SB.ALS._ALR() // Ambient Light Response. Returns [[0x30, 0x0], [0x30, 0x32], [0x64, 0xC8], [0x7D, 0x0190], [0xA0, 0x0258], [0xD0, 0x0320]].

Note: For enable/disable ALS device, you must call _SB.PCI0.LPCB.EC0.TALS method with 0x1/0x0 integer. For notifications set acpi_osi="Windows 2012".

What methods notify ALS device about changes:

  • _SB.ATKD.ALSC (flag) // status changed
  • _SB.PCI0.LPCB.EC0.EC0W
  • _SB.PCI0.LPCB.EC0._QCD () // illuminance changed
  • _SB.PCI0.LPCB.EC0._QDD () // illuminance changed

What methods control ALS device:

  • _SB.ATKD.ALSC (flag) // ALS Control
  • _SB.PCI0.LPCB.EC0.TALS (flag)

ALS device status:

  • _SB.ATKD.GALS () & 0x10 // Get ALs Status

ALS related paths:

  • _SB.ALAE // ALS Device Enabled; 0-1
  • _SB.LSTP // Light Sensor ? Present; 1
  • _SB.ALS.LUXL // LUX Level; 0
  • _SB.PCI0.LPCB.EC0 // Embedded Controller ITE IT8572G
  • _SB.PCI0.LPCB.EC0.RRAM (0x04C9) // Read RAM; returns 0x0-0xF
  • _SB.PCI0.LPCB.EC0.OLUX // Old LUX

Stack:

\_SB.ALS._ALI ()
    ^^PCI0.LPCB.EC0.RALS ()
        if (ALAE) {
            v = RRAM (0x04C9)
            if (v <= 1) return 0x32;
            else if (v <= 0x06) return 0xC8;
            else if (v <= 0x09) return 0x0190;
            else if (v <= 0x0E) return 0x0258;
            else return 0x0320;

        } else return 0xC8

UX31A Notes:

ALS connected to IT8572G via GPI0

als's People

Contributors

victorenator avatar generalov avatar rufferson avatar

Stargazers

It Is The Potato avatar Corrado Primier avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

lightinen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.