OSDN Git Service

Merge remote-tracking branch 'x86/nougat-x86' into cm-14.1-x86
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 14 Feb 2018 07:16:11 +0000 (15:16 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 14 Feb 2018 07:16:11 +0000 (15:16 +0800)
alsa/bytcrrt5640.state
fstab.x86
init.sh
init.x86.rc
packages.mk

index 23db2ca..78c314c 100644 (file)
@@ -1783,7 +1783,7 @@ state.bytcrrt5640 {
        control.154 {
                iface MIXER
                name 'Headphone Switch'
-               value false
+               value true
                comment {
                        access 'read write'
                        type BOOLEAN
@@ -2504,7 +2504,7 @@ state.bytcrrt5640 {
        control.224 {
                iface MIXER
                name 'HP L Playback Switch'
-               value false
+               value true
                comment {
                        access 'read write'
                        type BOOLEAN
@@ -2514,7 +2514,7 @@ state.bytcrrt5640 {
        control.225 {
                iface MIXER
                name 'HP R Playback Switch'
-               value false
+               value true
                comment {
                        access 'read write'
                        type BOOLEAN
@@ -3178,7 +3178,7 @@ state.bytrt5640 {
        control.25 {
                iface MIXER
                name 'Headphone Switch'
-               value false
+               value true
                comment {
                        access 'read write'
                        type BOOLEAN
index e31be00..458d2fd 100644 (file)
--- a/fstab.x86
+++ b/fstab.x86
@@ -6,3 +6,4 @@ none                    /cache          tmpfs   nosuid,nodev,noatime    defaults
 /devices/*/*sdmmc*/*           auto    auto    defaults                voldmanaged=sdcard1:auto,encryptable=userdata
 /devices/*/80860F14:01/mmc_*   auto    auto    defaults                voldmanaged=sdcard1:auto,encryptable=userdata
 /devices/*/80860F14:02/mmc_*   auto    auto    defaults                voldmanaged=sdcard1:auto,encryptable=userdata
+/devices/*/PNP0FFF:00/mmc_*    auto    auto    defaults                voldmanaged=sdcard1:auto,encryptable=userdata
diff --git a/init.sh b/init.sh
index 6b41a50..89670f8 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013-2015 The Android-x86 Open Source Project
+# Copyright (C) 2013-2018 The Android-x86 Open Source Project
 #
 # License: GNU Public License v2 or later
 #
@@ -10,6 +10,11 @@ function set_property()
        [ -n "$DEBUG" ] && echo "$1"="$2" >> /dev/x86.prop
 }
 
+function set_prop_if_empty()
+{
+       [ -z "$(getprop $1)" ] && set_property "$1" "$2"
+}
+
 function init_misc()
 {
        # device information
@@ -53,7 +58,6 @@ function init_hal_bluetooth()
                T10*TA|HP*Omni*)
                        BTUART_PORT=/dev/ttyS1
                        set_property hal.bluetooth.uart.proto bcm
-                       [ -z "$(getprop sleep.state)" ] && set_property sleep.state none
                        ;;
                MacBookPro8*)
                        rmmod b43
@@ -142,6 +146,7 @@ function init_hal_gralloc()
                                set_property ro.hardware.hwcomposer drm
                                set_property ro.hardware.gralloc gbm
                        fi
+                       set_prop_if_empty sleep.state none
                        ;;
                0*inteldrmfb|0*radeondrmfb|0*nouveaufb|0*svgadrmfb|0*amdgpudrmfb)
                        if [ "$HWACCEL" != "0" ]; then
@@ -178,6 +183,9 @@ function init_hal_power()
 
        # TODO
        case "$PRODUCT" in
+               HP*Omni*|OEMB|Surface*3|T10*TA)
+                       set_prop_if_empty sleep.state none
+                       ;;
                *)
                        ;;
        esac
@@ -249,13 +257,18 @@ function init_hal_sensors()
                        hal_sensors=hdaps
                        ;;
                *i7Stylus*)
-                       set_property hal.sensors.iio.accel.matrix 1,0,0,0,-1,0,0,0,-1
+                       set_property ro.iio.accel.x.opt_scale -1
+                       ;;
+               *ONDATablet*)
+                       set_property ro.iio.accel.order 102
+                       set_property ro.iio.accel.x.opt_scale -1
+                       set_property ro.iio.accel.y.opt_scale -1
                        ;;
                *ST70416-6*)
-                       set_property hal.sensors.iio.accel.matrix 0,-1,0,-1,0,0,0,0,-1
+                       set_property ro.iio.accel.order 102
                        ;;
-               *ONDATablet*)
-                       set_property hal.sensors.iio.accel.matrix 0,1,0,1,0,0,0,0,-1
+               *T10*TA*)
+                       set_property ro.iio.accel.y.opt_scale -1
                        ;;
                *)
                        has_sensors=false
@@ -265,13 +278,16 @@ function init_hal_sensors()
        # has iio sensor-hub?
        if [ -n "`ls /sys/bus/iio/devices/iio:device* 2> /dev/null`" ]; then
                busybox chown -R 1000.1000 /sys/bus/iio/devices/iio:device*/
-               lsmod | grep -q hid_sensor_accel_3d && hal_sensors=hsb || hal_sensors=iio
+               [ -n "`ls /sys/bus/iio/devices/iio:device*/in_accel_x_raw 2> /dev/null`" ] && has_sensors=true
+               hal_sensors=iio
        elif lsmod | grep -q lis3lv02d_i2c; then
                hal_sensors=hdaps
+               has_sensors=true
+       elif [ "$hal_sensors" != "kbd" ]; then
+               has_sensors=${HAS_SENSORS:-true}
        fi
 
        set_property ro.hardware.sensors $hal_sensors
-       [ "$hal_sensors" != "kbd" ] && has_sensors=true
        set_property config.override_forced_orient $has_sensors
 }
 
@@ -415,13 +431,13 @@ function do_bootcomplete()
                        alsa_amixer -c $c set Headphone on
                        alsa_amixer -c $c set Headphone 100%
                        alsa_amixer -c $c set Speaker 100%
-                       alsa_amixer -c $c set Capture 100%
+                       alsa_amixer -c $c set Capture 80%
                        alsa_amixer -c $c set Capture cap
                        alsa_amixer -c $c set PCM 100 unmute
                        alsa_amixer -c $c set SPO unmute
                        alsa_amixer -c $c set IEC958 on
-                       alsa_amixer -c $c set 'Mic Boost' 3
-                       alsa_amixer -c $c set 'Internal Mic Boost' 3
+                       alsa_amixer -c $c set 'Mic Boost' 1
+                       alsa_amixer -c $c set 'Internal Mic Boost' 1
                fi
        done
 
index 738d98f..d6d3aa4 100644 (file)
@@ -85,6 +85,11 @@ service tablet-mode /system/bin/tablet-mode
     disabled
     oneshot
 
+service ctrl-alt-del /system/bin/input keyevent --longpress POWER
+    disabled
+    oneshot
+    keycodes 97 100 111
+
 on property:system_init.startsurfaceflinger=0
     # disable cursor blinking
     write /dev/tty0 "\e[?17;0;0c"
index a44e4c6..9524616 100644 (file)
@@ -36,7 +36,6 @@ PRODUCT_PACKAGES := \
     power.x86 \
     rtk_hciattach \
     scp \
-    sensors.hsb \
     sftp \
     ssh \
     sshd \
@@ -80,3 +79,4 @@ PRODUCT_PACKAGES += \
 # Third party apps
 PRODUCT_PACKAGES += \
     Eleven \
+    TSCalibration2 \