Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

device-generic-common: Commit

device/generic/common


Commit MetaInfo

Revision4d28c4e794566dab02f9cd86abc32b86adc6166d (tree)
Time2018-02-13 16:22:05
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Merge remote-tracking branch 'x86/nougat-x86' into cm-14.1-x86

Change Summary

Incremental Difference

--- a/alsa/bytcrrt5640.state
+++ b/alsa/bytcrrt5640.state
@@ -1783,7 +1783,7 @@ state.bytcrrt5640 {
17831783 control.154 {
17841784 iface MIXER
17851785 name 'Headphone Switch'
1786- value false
1786+ value true
17871787 comment {
17881788 access 'read write'
17891789 type BOOLEAN
@@ -2504,7 +2504,7 @@ state.bytcrrt5640 {
25042504 control.224 {
25052505 iface MIXER
25062506 name 'HP L Playback Switch'
2507- value false
2507+ value true
25082508 comment {
25092509 access 'read write'
25102510 type BOOLEAN
@@ -2514,7 +2514,7 @@ state.bytcrrt5640 {
25142514 control.225 {
25152515 iface MIXER
25162516 name 'HP R Playback Switch'
2517- value false
2517+ value true
25182518 comment {
25192519 access 'read write'
25202520 type BOOLEAN
@@ -3178,7 +3178,7 @@ state.bytrt5640 {
31783178 control.25 {
31793179 iface MIXER
31803180 name 'Headphone Switch'
3181- value false
3181+ value true
31823182 comment {
31833183 access 'read write'
31843184 type BOOLEAN
--- a/fstab.x86
+++ b/fstab.x86
@@ -6,3 +6,4 @@ none /cache tmpfs nosuid,nodev,noatime defaults
66 /devices/*/*sdmmc*/* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
77 /devices/*/80860F14:01/mmc_* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
88 /devices/*/80860F14:02/mmc_* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
9+/devices/*/PNP0FFF:00/mmc_* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
--- a/init.sh
+++ b/init.sh
@@ -1,5 +1,5 @@
11 #
2-# Copyright (C) 2013-2015 The Android-x86 Open Source Project
2+# Copyright (C) 2013-2018 The Android-x86 Open Source Project
33 #
44 # License: GNU Public License v2 or later
55 #
@@ -10,6 +10,11 @@ function set_property()
1010 [ -n "$DEBUG" ] && echo "$1"="$2" >> /dev/x86.prop
1111 }
1212
13+function set_prop_if_empty()
14+{
15+ [ -z "$(getprop $1)" ] && set_property "$1" "$2"
16+}
17+
1318 function init_misc()
1419 {
1520 # device information
@@ -53,7 +58,6 @@ function init_hal_bluetooth()
5358 T10*TA|HP*Omni*)
5459 BTUART_PORT=/dev/ttyS1
5560 set_property hal.bluetooth.uart.proto bcm
56- [ -z "$(getprop sleep.state)" ] && set_property sleep.state none
5761 ;;
5862 MacBookPro8*)
5963 rmmod b43
@@ -142,6 +146,7 @@ function init_hal_gralloc()
142146 set_property ro.hardware.hwcomposer drm
143147 set_property ro.hardware.gralloc gbm
144148 fi
149+ set_prop_if_empty sleep.state none
145150 ;;
146151 0*inteldrmfb|0*radeondrmfb|0*nouveaufb|0*svgadrmfb|0*amdgpudrmfb)
147152 if [ "$HWACCEL" != "0" ]; then
@@ -178,6 +183,9 @@ function init_hal_power()
178183
179184 # TODO
180185 case "$PRODUCT" in
186+ HP*Omni*|OEMB|Surface*3|T10*TA)
187+ set_prop_if_empty sleep.state none
188+ ;;
181189 *)
182190 ;;
183191 esac
@@ -249,13 +257,21 @@ function init_hal_sensors()
249257 hal_sensors=hdaps
250258 ;;
251259 *i7Stylus*)
252- set_property hal.sensors.iio.accel.matrix 1,0,0,0,-1,0,0,0,-1
253- ;;
254- *ST70416-6*)
255- set_property hal.sensors.iio.accel.matrix 0,-1,0,-1,0,0,0,0,-1
260+ set_property ro.iio.accel.y.opt_scale -1
261+ set_property ro.iio.accel.z.opt_scale -1
256262 ;;
257263 *ONDATablet*)
258- set_property hal.sensors.iio.accel.matrix 0,1,0,1,0,0,0,0,-1
264+ set_property ro.iio.accel.order 102
265+ ;;
266+ *ST70416-6*)
267+ set_property ro.iio.accel.order 102
268+ ;&
269+ *HPEliteBook*|*Surface*3*|*svnOEMB*|*T305CA*|*Venue11Pro5130*|*20FQ*|*20FR*)
270+ set_property ro.iio.accel.y.opt_scale -1
271+ ;&
272+ *T10*TA*)
273+ set_property ro.iio.accel.x.opt_scale -1
274+ set_property ro.iio.accel.z.opt_scale -1
259275 ;;
260276 *)
261277 has_sensors=false
@@ -265,13 +281,16 @@ function init_hal_sensors()
265281 # has iio sensor-hub?
266282 if [ -n "`ls /sys/bus/iio/devices/iio:device* 2> /dev/null`" ]; then
267283 busybox chown -R 1000.1000 /sys/bus/iio/devices/iio:device*/
268- lsmod | grep -q hid_sensor_accel_3d && hal_sensors=hsb || hal_sensors=iio
284+ [ -n "`ls /sys/bus/iio/devices/iio:device*/in_accel_x_raw 2> /dev/null`" ] && has_sensors=true
285+ hal_sensors=iio
269286 elif lsmod | grep -q lis3lv02d_i2c; then
270287 hal_sensors=hdaps
288+ has_sensors=true
289+ elif [ "$hal_sensors" != "kbd" ]; then
290+ has_sensors=${HAS_SENSORS:-true}
271291 fi
272292
273293 set_property ro.hardware.sensors $hal_sensors
274- [ "$hal_sensors" != "kbd" ] && has_sensors=true
275294 set_property config.override_forced_orient $has_sensors
276295 }
277296
@@ -415,13 +434,13 @@ function do_bootcomplete()
415434 alsa_amixer -c $c set Headphone on
416435 alsa_amixer -c $c set Headphone 100%
417436 alsa_amixer -c $c set Speaker 100%
418- alsa_amixer -c $c set Capture 100%
437+ alsa_amixer -c $c set Capture 80%
419438 alsa_amixer -c $c set Capture cap
420439 alsa_amixer -c $c set PCM 100 unmute
421440 alsa_amixer -c $c set SPO unmute
422441 alsa_amixer -c $c set IEC958 on
423- alsa_amixer -c $c set 'Mic Boost' 3
424- alsa_amixer -c $c set 'Internal Mic Boost' 3
442+ alsa_amixer -c $c set 'Mic Boost' 1
443+ alsa_amixer -c $c set 'Internal Mic Boost' 1
425444 fi
426445 done
427446
--- a/init.x86.rc
+++ b/init.x86.rc
@@ -85,6 +85,11 @@ service tablet-mode /system/bin/tablet-mode
8585 disabled
8686 oneshot
8787
88+service ctrl-alt-del /system/bin/input keyevent --longpress POWER
89+ disabled
90+ oneshot
91+ keycodes 97 100 111
92+
8893 on property:system_init.startsurfaceflinger=0
8994 # disable cursor blinking
9095 write /dev/tty0 "[?17;0;0c"
--- a/packages.mk
+++ b/packages.mk
@@ -36,7 +36,6 @@ PRODUCT_PACKAGES := \
3636 power.x86 \
3737 rtk_hciattach \
3838 scp \
39- sensors.hsb \
4039 sftp \
4140 ssh \
4241 sshd \
@@ -80,3 +79,4 @@ PRODUCT_PACKAGES += \
8079 # Third party apps
8180 PRODUCT_PACKAGES += \
8281 Eleven \
82+ TSCalibration2 \
Show on old repository browser