X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fdevice-generic-common.git;a=blobdiff_plain;f=init.sh;h=52d9ecd21ecdf6ca77f0c02cd4c962cd161b0e5e;hp=5f367db8a23a5c3027f287845152b27e74b345c3;hb=23d49d61cc87e8a63abdd2e29e7fcfef2fc78863;hpb=c35ffc56465e575d812b712feb59acf0ae13cb79 diff --git a/init.sh b/init.sh index 5f367db..52d9ecd 100644 --- a/init.sh +++ b/init.sh @@ -38,13 +38,10 @@ function init_hal_audio() VirtualBox*|Bochs*) [ -d /proc/asound/card0 ] || modprobe snd-sb16 isapnp=0 irq=5 ;; - *) + TS10*) + set_prop_if_empty hal.audio.out pcmC0D2p ;; esac - - if grep -qi "IntelHDMI" /proc/asound/card0/id; then - [ -d /proc/asound/card1 ] || set_property ro.hardware.audio.primary hdmi - fi } function init_hal_bluetooth() @@ -118,10 +115,8 @@ function set_drm_mode() ET1602*) drm_mode=1366x768 ;; - VMware*) - [ -n "$video" ] && drm_mode=$video - ;; *) + [ -n "$video" ] && drm_mode=$video ;; esac @@ -130,6 +125,8 @@ function set_drm_mode() function init_uvesafb() { + UVESA_MODE=${UVESA_MODE:-${video%@*}} + case "$PRODUCT" in ET2002*) UVESA_MODE=${UVESA_MODE:-1600x900} @@ -148,8 +145,8 @@ function init_hal_gralloc() if [ "$HWACCEL" != "0" ]; then set_property ro.hardware.hwcomposer drm set_property ro.hardware.gralloc gbm + set_property debug.drm.mode.force ${video:-1280x800} fi - set_prop_if_empty sleep.state none ;; 0*inteldrmfb|0*radeondrmfb|0*nouveaufb|0*svgadrmfb|0*amdgpudrmfb) if [ "$HWACCEL" != "0" ]; then @@ -173,6 +170,17 @@ function init_hal_hwcomposer() return } +function init_hal_vulkan() +{ + case "$(cat /proc/fb | head -1)" in + 0*inteldrmfb) + set_property ro.hardware.vulkan android-x86 + ;; + *) + ;; + esac +} + function init_hal_lights() { chown 1000.1000 /sys/class/backlight/*/brightness @@ -186,7 +194,7 @@ function init_hal_power() # TODO case "$PRODUCT" in - HP*Omni*|OEMB|Surface*3|T10*TA) + HP*Omni*|OEMB|Standard*PC*|Surface*3|T10*TA) set_prop_if_empty sleep.state none ;; *) @@ -365,6 +373,7 @@ function do_init() init_hal_gps init_hal_gralloc init_hal_hwcomposer + init_hal_vulkan init_hal_lights init_hal_power init_hal_sensors @@ -420,6 +429,9 @@ function do_bootcomplete() setkeycodes 0x66 172 setkeycodes 0x6b 127 ;; + Surface*Go) + echo on > /sys/devices/pci0000:00/0000:00:15.1/i2c_designware.1/power/control + ;; VMware*) pm disable com.android.bluetooth ;;