OSDN Git Service

Merge remote-tracking branch 'x86/oreo-x86' into pie-x86
[android-x86/device-generic-common.git] / init.sh
diff --git a/init.sh b/init.sh
index 37827a2..e5fc8f0 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -36,7 +36,7 @@ function init_misc()
 
        # enable sdcardfs if /data is not mounted on tmpfs or 9p
        mount | grep /data\ | grep -qE 'tmpfs|9p'
-       [ $? -ne 0 ] && modprobe sdcardfs
+       [ $? -eq 0 ] && set_prop_if_empty ro.sys.sdcardfs false
 
        # remove wl if it's not used
        local wifi
@@ -128,11 +128,15 @@ function init_hal_bluetooth()
 
 function init_hal_camera()
 {
-       case "$PRODUCT" in
-               e-tab*Pro)
+       case "$UEVENT" in
+               *e-tabPro*)
                        set_prop_if_empty hal.camera.0 0,270
                        set_prop_if_empty hal.camera.2 1,90
                        ;;
+               *LenovoideapadD330*)
+                       set_prop_if_empty hal.camera.0 0,90
+                       set_prop_if_empty hal.camera.2 1,90
+                       ;;
                *)
                        ;;
        esac
@@ -178,13 +182,11 @@ function init_hal_gralloc()
        [ "$VULKAN" = "1" ] && GRALLOC=gbm
 
        case "$(cat /proc/fb | head -1)" in
-               *virtiodrmfb|*DRM*emulated)
-                       if [ "$HWACCEL" != "0" ]; then
-                               set_property ro.hardware.hwcomposer ${HWC:-drm}
-                               set_property ro.hardware.gralloc ${GRALLOC:-gbm}
-                               set_property debug.drm.mode.force ${video:-1280x800}
-                       fi
-                       ;;
+               *virtio*drmfb|*DRM*emulated)
+                       HWC=${HWC:-drm}
+                       GRALLOC=${GRALLOC:-gbm}
+                       video=${video:-1280x768}
+                       ;&
                0*i915drmfb|0*inteldrmfb|0*radeondrmfb|0*nouveau*|0*svgadrmfb|0*amdgpudrmfb)
                        if [ "$HWACCEL" != "0" ]; then
                                set_property ro.hardware.hwcomposer ${HWC:-}
@@ -311,6 +313,10 @@ function init_hal_sensors()
                        modprobe hdaps
                        hal_sensors=hdaps
                        ;;
+               *LenovoideapadD330*)
+                       set_property ro.iio.accel.quirks no-trig
+                       set_property ro.iio.accel.order 102
+                       ;&
                *LINX1010B*)
                        set_property ro.iio.accel.x.opt_scale -1
                        set_property ro.iio.accel.z.opt_scale -1
@@ -513,7 +519,7 @@ function do_bootcomplete()
                        alsa_amixer -c $c set Speaker 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 PCM 100% unmute
                        alsa_amixer -c $c set SPO unmute
                        alsa_amixer -c $c set IEC958 on
                        alsa_amixer -c $c set 'Mic Boost' 1