1. 17 May, 2019 1 commit
    • spiiroin's avatar
      [mce] Unify license blurbs. JB#33684 · 091d6e7e
      spiiroin authored
      MCE uses LGPL v2.1 (without "or later") license, but due to missing / use
      of different license blurbs this is not always clear enough.
      
      Replace blurbs referring to "LGPLv2" short form which could be either
      LGPL v2.0 or v2.1 without "or later" with the same blurb that is used
      in mce.c file.
      
      Similarly add blurb to source files that are missing one altogether.
      
      Add all authors that can be derived from git logs.
      
      Update Jolla Ltd. copyright statements to match git activity.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      091d6e7e
  2. 16 Jun, 2015 1 commit
    • spiiroin's avatar
      Allow fine tuning ALS usage via mce settings · 41f1e2e1
      spiiroin authored
      MCE has one setting that dictates whether ambient light sensor is used
      or not. This was ok as long as ALS was used only for display brightness
      tuning, but now that there are other reasons for using ALS functionality
      of those too depend on whether automatic brightness tuning is in use or
      not.
      
      Leave the existing setting in place, use it as ALS master toggle and
      add separate settings for:
      - Use ALS automatic display brightness tuning
      - Use ALS for filtering false positive lid closed events
      
      If the master toggle is set to disabled, ALS is not used by mce.
      
      If the master toggle is set to enabled, ALS is powered up/down depending
      on feature specific settings and device state.
      
      Refactor ALS data processing so that:
      - callback for passing lux value from sensorfw uses int, not unsigned int
      - als power up depends on all three settings
      - variables holding cached lux values are given more descriptive names
      - all auto brightness filters use similar logic for testing whether the
        feature is enabled & als data is available
      - move all constants related to display settings to display.h
      
      ALS data is used for filtering out potential false positive lid close
      events only if the relevant settings are enabled.
      
      Options for mcetool:
        --set-als-mode=<enabled|disabled>
        Now works as use als master toggle.
      
        --set-als-autobrightness=<enabled|disabled>
        Can be used to disable automatic brightness tuning even if using ALS
        is otherwise enabled.
      
        --set-filter-lid-with-als=<enabled|disabled>
        Can be used to disable lid close filtering even if using ALS is
        otherwise enabled.
      
      [mce] Allow fine tuning ALS usage via mce settings. Fixes JB#29892
      41f1e2e1
  3. 03 Feb, 2015 1 commit
    • spiiroin's avatar
      Make state enum to state name helper functions globally available · 67d966cb
      spiiroin authored
      In many cases the helpers were created at the module that is primarily
      responsive for maintaining the datapipe content and datapipe listeners
      do debug logging using the numeric states - which requires effort to
      decode.
      
      Move state enum to string helper functions to datapipe.c and list
      prototypes in mce.h next to enum type declaration.
      67d966cb
  4. 25 Aug, 2014 1 commit
  5. 31 Oct, 2013 1 commit
    • spiiroin's avatar
      If possible, use evdev inputs for PS and ALS data · d093c377
      spiiroin authored
      If ALS / PS inputs are detected during evdev probing, those
      will be used instead of the data provided by the sensord.
      
      This allows mce to apply wakelocks while processing the
      sensor data, and thus avoid accidental falling back to suspend
      in case there are ipc delays getting the data to mce via
      sensord.
      
      Enabling/disabling sensors still happens only via sensord.
      
      [mce] If possible, use evdev inputs for PS and ALS data
      d093c377
  6. 30 Oct, 2013 1 commit
  7. 11 Oct, 2013 1 commit
    • spiiroin's avatar
      Add enablers for stopping sensors in suspend · f6e42620
      spiiroin authored
      Ambient light and proximity sensors are stopped before entering
      late suspend.
      
      Also fixes incorrect interpretation of initial PS value.
      
      [mce] Add enablers for stopping sensors in suspend
      f6e42620
  8. 16 Sep, 2013 1 commit
    • spiiroin's avatar
      Use sensorfw for ambient light and proximity sensor input · 3b1468aa
      spiiroin authored
      Tracks sensord D-Bus name on system bus to detect availability
      of the sensors API.
      
      While the D-Bus name is not reserved, ALS and PS enable states
      are cached internally within MCE. When sensord startup / restart
      is detected the cached state is used for opening sensor sessions
      as needed.
      
      [mce] Use sensorfw for ambient light and proximity sensor input
      3b1468aa