Spen working in 0, 90, 180, 270 now
I figured it out the s-pen 90, 180, 270 problem!!!
After reading
https://source.android.com/devices/input/input-device-configuration-files
and looking at the example, I remembered seeing the wacom driver file, table_msm8974.h, had code that said
char *tuning_model = "N7100";
The N7100 is the Samsung Galaxy Note II which has a spen.
The driver name for the spen is sec_e-pen as shown previously in the logcat.
So I searched github for n7100 sec_e-pen.idc and found
https://raw.githubusercontent.com/i...7100/proprietary/system/usr/idc/sec_e-pen.idc
I copied that file onto the tablet
/system/vendor/usr/idc/sec_e-pen.idc
using twrp to mount system as rw.
So for code, I suggest something like
Code:
# sec_e-pen.idc driver needed so tablet knows its orientation aware and can work in 90, 180 and 270 mode.
PRODUCT_COPY_FILES += \
vendor/samsung/gt5note10wifi/proprietary/sec_e-pen.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/sec_e-pen.idc
in device/samsung/gt5note10wifi/device.mk
The contents of sec_e-pen.idc are two lines
Code:
touch.deviceType = pointer
touch.orientationAware = 1
Without this sec_e-pen.idc, the code defaults to touch.orientationAware=0 which is why the spen didn't understand the 90, 180 and 270 rotation change.
So again, without recompiling your RR 10 code, I put sec_e-pen.idc into /system/vendor/usr/idc directory and RR 10 works properly at 0, 90, 180 and 270 with spen.
I didn't test your RR 9.0 build with the above sec_e-pen.idc, but it should work.
So you should have a fully working RR 10 build with external audio and spen fixed now for people to try after making the suggested changes.
I will make a lineageos 17.1 build sometime after I get back on Oct 20 and test it for functionality, reliability and stability. If it's stable and functional, I will release that build.
=== logcat of it working with sec_e-pen.idc. Note orientation of sec_e-pen now matches sec_touchscreen ===
=== rotate 90 ===
InputReader: Reconfiguring input devices. changes=0x00000004
InputReader: Device reconfigured: id=3, name='input_mt_wrapper', size 768x1024, orientation 0, mode 4, display id 0
I InputReader: Device reconfigured: id=8, name='sec_touchscreen', size 768x1024, orientation 1, mode 1, display id 0
I InputReader: Device reconfigured: id=10, name='sec_e-pen', size 768x1024, orientation 1, mode 4, display id 0
=== rotate 180 ===
InputReader: Reconfiguring input devices. changes=0x00000004
InputReader: Device reconfigured: id=3, name='input_mt_wrapper', size 768x1024, orientation 0, mode 4, display id 0
InputReader: Device reconfigured: id=8, name='sec_touchscreen', size 768x1024, orientation 2, mode 1, display id 0
InputReader: Device reconfigured: id=10, name='sec_e-pen', size 768x1024, orientation 2, mode 4, display id 0
=== rotate 270 ===
InputReader: Reconfiguring input devices. changes=0x00000004
InputReader: Device reconfigured: id=3, name='input_mt_wrapper', size 768x1024, orientation 0, mode 4, display id 0
InputReader: Device reconfigured: id=8, name='sec_touchscreen', size 768x1024, orientation 3, mode 1, display id 0
InputReader: Device reconfigured: id=10, name='sec_e-pen', size 768x1024, orientation 3, mode 4, display id 0
BTW, input_mt_wrapper, which I'm not sure what it does, would probably require a similar idc file created if we needed that to work in 90, 180 and 270.