OSDN Git Service

Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86
authorChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 5 Mar 2018 04:03:06 +0000 (12:03 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 5 Mar 2018 04:03:06 +0000 (12:03 +0800)
alsa/bytcrrt5640.state
fstab.x86
init.sh
init.x86.rc
packages.mk
tp_smapi/hdaps.c

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 c92f375..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,20 +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
-                       ;;
-               *ST70416-6*)
-                       set_property hal.sensors.iio.accel.matrix 0,-1,0,-1,0,0,0,0,-1
+                       set_property ro.iio.accel.x.opt_scale -1
                        ;;
                *ONDATablet*)
-                       set_property hal.sensors.iio.accel.matrix 0,1,0,1,0,0,0,0,-1
-                       ;;
-               *Surface.3*|*svnOEMB*)
+                       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 ro.iio.accel.order 102
+                       ;;
                *T10*TA*)
-                       set_property ro.iio.accel.x.opt_scale -1
-                       set_property ro.iio.accel.z.opt_scale -1
+                       set_property ro.iio.accel.y.opt_scale -1
                        ;;
                *)
                        has_sensors=false
@@ -272,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*/
+               [ -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
 }
 
@@ -422,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 0b54bd0..e0fe113 100644 (file)
@@ -64,7 +64,7 @@ service nativebridge /system/bin/enable_nativebridge
     disabled
     oneshot
 
-service logcat /system/bin/logcat -v threadtime -f /data/log.txt
+service logcat /system/bin/logcat -b all -v threadtime -f /data/log.txt
     class debug
 
 service btattach /system/bin/btattach
index 665a344..a1e102b 100644 (file)
@@ -98,3 +98,4 @@ PRODUCT_PACKAGES += \
 # Third party apps
 PRODUCT_PACKAGES += \
     Eleven \
+    TSCalibration2 \
index f54099a..338f551 100644 (file)
@@ -779,8 +779,12 @@ static int __init hdaps_init(void)
                        hdaps_invert = 0; /* default */
 
        /* Init timer before platform_driver_register, in case of suspend */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+       timer_setup(&hdaps_timer, hdaps_mousedev_poll, 0);
+#else
        init_timer(&hdaps_timer);
        hdaps_timer.function = hdaps_mousedev_poll;
+#endif
        ret = platform_driver_register(&hdaps_driver);
        if (ret)
                goto out;