Skip to content

Commit de77fa2

Browse files
justradicalpastaq
authored andcommitted
feat(Hardware Support): Add AYN Odin 2 Mini
1 parent 21d37c0 commit de77fa2

2 files changed

Lines changed: 109 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/capability_map_v2.json
2+
version: 2
3+
kind: CapabilityMap
4+
name: AYN Type 3
5+
id: ayn3
6+
7+
mapping:
8+
- name: D-Pad Up
9+
source_events:
10+
- evdev:
11+
event_type: KEY
12+
event_code: BTN_DPAD_UP
13+
value_type: button
14+
target_event:
15+
gamepad:
16+
button: DPadUp
17+
18+
- name: D-Pad Down
19+
source_events:
20+
- evdev:
21+
event_type: KEY
22+
event_code: BTN_DPAD_DOWN
23+
value_type: button
24+
target_event:
25+
gamepad:
26+
button: DPadDown
27+
28+
- name: D-Pad Left
29+
source_events:
30+
- evdev:
31+
event_type: KEY
32+
event_code: BTN_DPAD_LEFT
33+
value_type: button
34+
target_event:
35+
gamepad:
36+
button: DPadLeft
37+
38+
- name: D-Pad Right
39+
source_events:
40+
- evdev:
41+
event_type: KEY
42+
event_code: BTN_DPAD_RIGHT
43+
value_type: button
44+
target_event:
45+
gamepad:
46+
button: DPadRight
47+
48+
- name: Back Button
49+
source_events:
50+
- evdev:
51+
event_type: KEY
52+
event_code: BTN_BACK
53+
value_type: button
54+
target_event:
55+
gamepad:
56+
button: QuickAccess
57+
58+
# Kernel reports NORTH/WEST by physical position, but Xbox layout
59+
# relies on these swapped. This results in NORTH/WEST swapped in
60+
# evtest, but produces expected behaviour in games.
61+
62+
- name: West Button
63+
source_events:
64+
- evdev:
65+
event_type: KEY
66+
event_code: BTN_NORTH
67+
value_type: button
68+
target_event:
69+
gamepad:
70+
button: West
71+
72+
- name: North Button
73+
source_events:
74+
- evdev:
75+
event_type: KEY
76+
event_code: BTN_WEST
77+
value_type: button
78+
target_event:
79+
gamepad:
80+
button: North
81+
82+
filtered_events: []
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/ShadowBlip/InputPlumber/main/rootfs/usr/share/inputplumber/schema/composite_device_v1.json
2+
version: 1
3+
kind: CompositeDevice
4+
name: AYN Odin 2 Mini
5+
6+
options:
7+
auto_manage: true
8+
9+
matches:
10+
- udev:
11+
sys_path: /sys/firmware/devicetree/base
12+
attributes:
13+
- name: compatible
14+
value: ayn,odin2mini
15+
16+
source_devices:
17+
- group: gamepad
18+
capability_map_id: ayn3
19+
evdev:
20+
name: AYN Odin2 Gamepad
21+
phys_path: rsinput-gamepad/input0
22+
vendor_id: "2020"
23+
product_id: "3001"
24+
handler: event*
25+
26+
target_devices:
27+
- xbox-elite

0 commit comments

Comments
 (0)