# Copyright (c) 2018, jollaman999 <admin@jollaman999.com>. All rights reserved.

on boot
    # Quad DAC force advanced mode
    write /sys/devices/soc/c175000.i2c/i2c-1/1-0048/force_advanced_mode 1

    # Screen Off Volume Control
    write /sys/android_touch/scroff_volctr 1

on post-fs
    # io-sched tunes
    write /sys/block/sda/queue/iostats 0
    write /sys/block/sda/queue/nr_requests 256
    write /sys/block/sda/queue/scheduler cfq
    write /sys/block/sda/queue/add_random 0
    write /sys/block/sda/queue/rotation 0
    write /sys/block/sda/queue/rq_affinity 2
    write /sys/block/sda/queue/read_ahead_kb 2048

    # Dynamic fsync
    write /sys/kernel/dyn_fsync/Dyn_fsync_active 1

on property:sys.boot_completed=1
    # Adjust LMK minfree values
    write /sys/module/lowmemorykiller/parameters/minfree "12288,15360,18432,21504,24576,30720"

    # kgsl power control limit
    write /sys/class/kgsl/kgsl-3d0/kgsl_pwrctrl_limit_enable 1

    # kcal_fix_yellow
    write /sys/devices/platform/kcal_ctrl.0/kcal "252 250 256"
    write /sys/devices/platform/kcal_ctrl.0/kcal_sat 258
