aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kling <webgeek1234@gmail.com>2019-05-09 22:40:15 -0500
committerAaron Kling <webgeek1234@gmail.com>2019-08-21 10:08:40 -0500
commitf7daf86518b97cc42f007514314e51c41e90fe15 (patch)
tree16fd9a80ae35de88d7f731fc1b5e443140a75b50
parent25a3dec21a883b9761b1c562c84e0c9e44f68326 (diff)
downloadandroid_device_lineage_atv-f7daf86518b97cc42f007514314e51c41e90fe15.tar.gz
android_device_lineage_atv-f7daf86518b97cc42f007514314e51c41e90fe15.tar.bz2
android_device_lineage_atv-f7daf86518b97cc42f007514314e51c41e90fe15.zip
Add shield controller idcs and key layouts
Change-Id: Ifb2bcc0d39b2cc5f083a380cdfa052d5ff4b72f5
-rw-r--r--idc/Android.mk43
-rw-r--r--idc/Vendor_0955_Product_7212.idc3
-rw-r--r--idc/Vendor_0955_Product_7213.idc3
-rw-r--r--idc/Vendor_0955_Product_7214.idc3
-rw-r--r--keylayout/Android.mk36
-rw-r--r--keylayout/Vendor_0955_Product_7212.kl22
-rw-r--r--keylayout/Vendor_0955_Product_7213.kl25
-rw-r--r--keylayout/Vendor_0955_Product_7214.kl51
-rw-r--r--keylayout/Vendor_0955_Product_7217.kl29
-rw-r--r--lineage_atv.mk13
10 files changed, 228 insertions, 0 deletions
diff --git a/idc/Android.mk b/idc/Android.mk
new file mode 100644
index 0000000..21ae812
--- /dev/null
+++ b/idc/Android.mk
@@ -0,0 +1,43 @@
+#
+# Copyright (C) 2019 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := Vendor_0955_Product_7212.idc
+LOCAL_SRC_FILES := Vendor_0955_Product_7212.idc
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_VENDOR_MODULE := true
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/usr/idc
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := Vendor_0955_Product_7213.idc
+LOCAL_SRC_FILES := Vendor_0955_Product_7213.idc
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_VENDOR_MODULE := true
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/usr/idc
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := Vendor_0955_Product_7214.idc
+LOCAL_SRC_FILES := Vendor_0955_Product_7214.idc
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_VENDOR_MODULE := true
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/usr/idc
+include $(BUILD_PREBUILT)
diff --git a/idc/Vendor_0955_Product_7212.idc b/idc/Vendor_0955_Product_7212.idc
new file mode 100644
index 0000000..9e9bfe6
--- /dev/null
+++ b/idc/Vendor_0955_Product_7212.idc
@@ -0,0 +1,3 @@
+# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+
+audio.mic = 1
diff --git a/idc/Vendor_0955_Product_7213.idc b/idc/Vendor_0955_Product_7213.idc
new file mode 100644
index 0000000..9e9bfe6
--- /dev/null
+++ b/idc/Vendor_0955_Product_7213.idc
@@ -0,0 +1,3 @@
+# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+
+audio.mic = 1
diff --git a/idc/Vendor_0955_Product_7214.idc b/idc/Vendor_0955_Product_7214.idc
new file mode 100644
index 0000000..9e9bfe6
--- /dev/null
+++ b/idc/Vendor_0955_Product_7214.idc
@@ -0,0 +1,3 @@
+# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+
+audio.mic = 1
diff --git a/keylayout/Android.mk b/keylayout/Android.mk
index 815279c..762cdce 100644
--- a/keylayout/Android.mk
+++ b/keylayout/Android.mk
@@ -16,6 +16,42 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_MODULE := Vendor_0955_Product_7212.kl
+LOCAL_SRC_FILES := Vendor_0955_Product_7212.kl
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_VENDOR_MODULE := true
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/usr/keylayout
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := Vendor_0955_Product_7213.kl
+LOCAL_SRC_FILES := Vendor_0955_Product_7213.kl
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_VENDOR_MODULE := true
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/usr/keylayout
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := Vendor_0955_Product_7214.kl
+LOCAL_SRC_FILES := Vendor_0955_Product_7214.kl
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_VENDOR_MODULE := true
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/usr/keylayout
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := Vendor_0955_Product_7217.kl
+LOCAL_SRC_FILES := Vendor_0955_Product_7217.kl
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_VENDOR_MODULE := true
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/usr/keylayout
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
LOCAL_MODULE := Vendor_28de_Product_1102.kl
LOCAL_SRC_FILES := Vendor_28de_Product_1102.kl
LOCAL_MODULE_TAGS := optional
diff --git a/keylayout/Vendor_0955_Product_7212.kl b/keylayout/Vendor_0955_Product_7212.kl
new file mode 100644
index 0000000..5dfb12a
--- /dev/null
+++ b/keylayout/Vendor_0955_Product_7212.kl
@@ -0,0 +1,22 @@
+# Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
+
+# NVIDIA Shield Remote (2015 edition)
+
+key 158 BACK
+key 172 HOME
+
+key 114 VOLUME_DOWN
+key 115 VOLUME_UP
+
+key 164 MEDIA_PLAY_PAUSE
+
+# Hat.
+# (D-pad is reported as individual buttons.)
+key 103 DPAD_UP
+key 105 DPAD_LEFT
+key 106 DPAD_RIGHT
+key 108 DPAD_DOWN
+key 353 DPAD_CENTER
+
+# The search button is intentionally interpreted as a custom button 16.
+key 217 BUTTON_16
diff --git a/keylayout/Vendor_0955_Product_7213.kl b/keylayout/Vendor_0955_Product_7213.kl
new file mode 100644
index 0000000..f7fe408
--- /dev/null
+++ b/keylayout/Vendor_0955_Product_7213.kl
@@ -0,0 +1,25 @@
+# Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
+
+# NVIDIA Shield Remote (2017 edition)
+
+key 158 BACK
+key 172 HOME
+
+key 114 VOLUME_DOWN
+key 115 VOLUME_UP
+
+key 713 BUTTON_14
+key 714 BUTTON_15
+
+key 164 MEDIA_PLAY_PAUSE
+
+# Hat.
+# (D-pad is reported as individual buttons.)
+key 103 DPAD_UP
+key 105 DPAD_LEFT
+key 106 DPAD_RIGHT
+key 108 DPAD_DOWN
+key 353 DPAD_CENTER
+
+# The search button is intentionally interpreted as a custom button 16.
+key 217 BUTTON_16
diff --git a/keylayout/Vendor_0955_Product_7214.kl b/keylayout/Vendor_0955_Product_7214.kl
new file mode 100644
index 0000000..cbbd437
--- /dev/null
+++ b/keylayout/Vendor_0955_Product_7214.kl
@@ -0,0 +1,51 @@
+# Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
+
+# NVIDIA Shield controller (rev. 2017)
+
+key 304 BUTTON_A
+key 305 BUTTON_B
+key 307 BUTTON_X
+key 308 BUTTON_Y
+
+key 310 BUTTON_L1
+key 311 BUTTON_R1
+
+key 158 BACK
+key 315 BUTTON_START
+key 172 HOME
+
+# These two keycodes are for click (press from above) on analog control sticks.
+key 317 BUTTON_THUMBL
+key 318 BUTTON_THUMBR
+
+key 115 VOLUME_UP
+key 114 VOLUME_DOWN
+
+key 164 MEDIA_PLAY_PAUSE
+
+# Vendor-specific codes
+key 217 BUTTON_16
+
+# Vendor-specific codes
+key 715 BUTTON_13
+key 716 BUTTON_14
+key 717 BUTTON_15
+
+# NVIDIA gamepad generates 16-bit values for the 6 axes (?)
+# Flat value of 2 is expected because this gamepad's axes
+# get correctly clipped before they reach the frameworks/base code.
+
+# Left (0x00, 0x01) and right (0x02, 0x05) analog control stick.
+axis 0x00 X flat 2
+axis 0x01 Y flat 2
+axis 0x02 Z flat 2
+axis 0x05 RZ flat 2
+
+# Triggers (0x0a, 0x09).
+axis 0x0a LTRIGGER flat 2
+axis 0x09 RTRIGGER flat 2
+
+# Hat.
+# (D-pad is reported as analog. Each axis has range from -1 to 1.)
+axis 0x10 HAT_X
+axis 0x11 HAT_Y
diff --git a/keylayout/Vendor_0955_Product_7217.kl b/keylayout/Vendor_0955_Product_7217.kl
new file mode 100644
index 0000000..d1206ac
--- /dev/null
+++ b/keylayout/Vendor_0955_Product_7217.kl
@@ -0,0 +1,29 @@
+# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
+
+# NVIDIA Shield Remote (2019 edition)
+
+key 116 POWER
+# The menu button is mapped to settings by default
+key 139 SETTINGS
+
+# (D-pad is reported as individual buttons.)
+key 103 DPAD_UP
+key 105 DPAD_LEFT
+key 106 DPAD_RIGHT
+key 108 DPAD_DOWN
+key 353 DPAD_CENTER
+
+key 158 BACK
+key 172 HOME
+
+key 217 VOICE_ASSIST
+
+key 114 VOLUME_DOWN
+key 115 VOLUME_UP
+
+key 208 MEDIA_FAST_FORWARD
+key 164 MEDIA_PLAY_PAUSE
+key 168 MEDIA_REWIND
+
+# The netflix button is mapped to button_12
+key 393 BUTTON_12
diff --git a/lineage_atv.mk b/lineage_atv.mk
index 08e9874..b641f31 100644
--- a/lineage_atv.mk
+++ b/lineage_atv.mk
@@ -14,6 +14,19 @@
# limitations under the License.
#
+# IDCs for shield controllers
+PRODUCT_PACKAGES += \
+ Vendor_0955_Product_7212.idc \
+ Vendor_0955_Product_7213.idc \
+ Vendor_0955_Product_7214.idc
+
+# Key layouts for shield controllers
+PRODUCT_PACKAGES += \
+ Vendor_0955_Product_7212.kl \
+ Vendor_0955_Product_7213.kl \
+ Vendor_0955_Product_7214.kl \
+ Vendor_0955_Product_7217.kl
+
# Key layouts for steam controller
PRODUCT_PACKAGES += \
Vendor_28de_Product_1102.kl \