Message ID | 20240115144538.12018-1-max@enpas.org |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-26149-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp1753128dyc; Mon, 15 Jan 2024 06:58:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8OpLnHJHx/yRHNPJolYMlqJCIIMq2cPCL4u8ERe01o7PdItoXqTQlEqUhEup9E2aFq4KR X-Received: by 2002:a05:6871:b1f:b0:206:4a5a:7447 with SMTP id fq31-20020a0568710b1f00b002064a5a7447mr7871440oab.80.1705330719047; Mon, 15 Jan 2024 06:58:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705330719; cv=none; d=google.com; s=arc-20160816; b=PU4mI7ErxkQrj4SrIpPurZoqxL1H33kIGEeZqcQYgEb0E1jqrR9Jq9WbcPx+SPcihJ eggIqcq9Tuo7Z/fYZIllnsHeuP7qZEZM6yvBLRyn+DUJaJpY4SOZiVokMdknapJ0U0nz C+lRL8on+FT/t7ZQcNUMjNZiiAG+OZiioHG5oYTVqz02ByrFxnU0/SxTuTtEa3chfNBf 2TsjbwE78yiDKJ1zXYawWEOHTYCp+AiH9eiurK40VW68fO5ivHXv/GE2JtuipPvpZVtM bwl1Bjo8G91wML4T+dLWG9dbxog7+WNxx8SOPze0IEuoYhVgVZs9AWglB/7bIJKgvI9/ k1og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=0p/dfhLARKTHGKAzwIeSEJIqK8NrTn6dS4ZA037Fouk=; fh=3M1PHg4byxu2MygWip944LqLZSq0Urk5Qa4iYXrexb8=; b=EtWHcTVYV7pE6ApkmsrlafnNN1g24JaQ0eXFB0j1PBxDlJvKoriJair2Jhp2RJHO++ fBikPuYFK4HsWQJQS98zXme/FX6BYUfOKTUQixwklbWS8KEJ+uX83aRa/w3EqsAOe7T8 eJtHnd0OLhasBiCAqt8dPR8E5+EGsB7Ffd3Ihrw1jIGaa8U719/QJggetx8K4O83mWHL +As6+2/IalCeuvXunbFy8u0lyJb/z56T40PrzZtM8T7TwiiH6fGNwKfbdAphPlohBPe1 BKwFnS1BLkUvvLaaXyZELKVYxQLqYvWX5nnfD8g952fb6YoeGqaGaBDrbb6+dcqUl6vi sfuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-26149-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26149-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m189-20020a633fc6000000b005c660017567si9460628pga.575.2024.01.15.06.58.38 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 06:58:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26149-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-26149-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26149-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CF0D6282966 for <ouuuleilei@gmail.com>; Mon, 15 Jan 2024 14:58:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A834F1799A; Mon, 15 Jan 2024 14:58:14 +0000 (UTC) Received: from mail.enpas.org (zhong.enpas.org [46.38.239.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF31417752; Mon, 15 Jan 2024 14:58:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=enpas.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=enpas.org Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.enpas.org (Postfix) with ESMTPSA id 0924BFFBE2; Mon, 15 Jan 2024 14:48:41 +0000 (UTC) From: Max Staudt <max@enpas.org> To: Roderick Colenbrander <roderick.colenbrander@sony.com>, Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, max@enpas.org Subject: [PATCH v1 0/7] HID: playstation: DS4: LED bugfix, third-party gamepad support Date: Mon, 15 Jan 2024 23:45:31 +0900 Message-Id: <20240115144538.12018-1-max@enpas.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788168863904518811 X-GMAIL-MSGID: 1788168863904518811 |
Series |
HID: playstation: DS4: LED bugfix, third-party gamepad support
|
|
Message
Max Staudt
Jan. 15, 2024, 2:45 p.m. UTC
Dear hid-playstation maintainers, Could you please have a look at the enclosed patches for the DualShock 4 driver in hid-playstation, and upstream them if possible? There is one bugfix, and a few small patches to enable third-party controllers. They sometimes don't implement features that they semantically "don't need", but which currently trip the driver. For example, for the DualShock 4, we don't actually need to know the firmware version in order to work with the gamepad - unlike with the DualSense, which has different driver logic depending on the version. Finally, there are two patches to add a DS4 compatible controller with an unassigned VID/PID - I'd appreciate your thoughts on that. If I can make it easier to upstream these patches, please let me know. Thanks! Max Patches in this series: [PATCH v1 1/7] HID: playstation: DS4: Fix LED blinking [PATCH v1 2/7] HID: playstation: DS4: Don't fail on MAC address [PATCH v1 3/7] HID: playstation: DS4: Don't fail on FW/HW version [PATCH v1 4/7] HID: playstation: DS4: Don't fail on calibration data [PATCH v1 5/7] HID: playstation: DS4: Parse minimal report 0x01 [PATCH v1 6/7] HID: playstation: Simplify device type ID [PATCH v1 7/7] HID: playstation: DS4: Add VID/PID for SZ-MYPOWER
Comments
On Mon, 15 Jan 2024, Max Staudt wrote: > Dear hid-playstation maintainers, > > Could you please have a look at the enclosed patches for the DualShock 4 > driver in hid-playstation, and upstream them if possible? > > There is one bugfix, and a few small patches to enable third-party > controllers. They sometimes don't implement features that they > semantically "don't need", but which currently trip the driver. > > For example, for the DualShock 4, we don't actually need to know the > firmware version in order to work with the gamepad - unlike with the > DualSense, which has different driver logic depending on the version. > > Finally, there are two patches to add a DS4 compatible controller with > an unassigned VID/PID - I'd appreciate your thoughts on that. > > If I can make it easier to upstream these patches, please let me know. > > Thanks! > > Max > > Patches in this series: > [PATCH v1 1/7] HID: playstation: DS4: Fix LED blinking > [PATCH v1 2/7] HID: playstation: DS4: Don't fail on MAC address > [PATCH v1 3/7] HID: playstation: DS4: Don't fail on FW/HW version > [PATCH v1 4/7] HID: playstation: DS4: Don't fail on calibration data > [PATCH v1 5/7] HID: playstation: DS4: Parse minimal report 0x01 > [PATCH v1 6/7] HID: playstation: Simplify device type ID > [PATCH v1 7/7] HID: playstation: DS4: Add VID/PID for SZ-MYPOWER Roderick, any word on this series, please? Thanks,
On Tue, Jan 23, 2024 at 1:51 AM Jiri Kosina <jikos@kernel.org> wrote: > > On Mon, 15 Jan 2024, Max Staudt wrote: > > > Dear hid-playstation maintainers, > > > > Could you please have a look at the enclosed patches for the DualShock 4 > > driver in hid-playstation, and upstream them if possible? > > > > There is one bugfix, and a few small patches to enable third-party > > controllers. They sometimes don't implement features that they > > semantically "don't need", but which currently trip the driver. > > > > For example, for the DualShock 4, we don't actually need to know the > > firmware version in order to work with the gamepad - unlike with the > > DualSense, which has different driver logic depending on the version. > > > > Finally, there are two patches to add a DS4 compatible controller with > > an unassigned VID/PID - I'd appreciate your thoughts on that. > > > > If I can make it easier to upstream these patches, please let me know. > > > > Thanks! > > > > Max > > > > Patches in this series: > > [PATCH v1 1/7] HID: playstation: DS4: Fix LED blinking > > [PATCH v1 2/7] HID: playstation: DS4: Don't fail on MAC address > > [PATCH v1 3/7] HID: playstation: DS4: Don't fail on FW/HW version > > [PATCH v1 4/7] HID: playstation: DS4: Don't fail on calibration data > > [PATCH v1 5/7] HID: playstation: DS4: Parse minimal report 0x01 > > [PATCH v1 6/7] HID: playstation: Simplify device type ID > > [PATCH v1 7/7] HID: playstation: DS4: Add VID/PID for SZ-MYPOWER > > Roderick, any word on this series, please? > > Thanks, > > -- > Jiri Kosina > SUSE Labs > > Sorry for the late reply. I had glanced over them, but didn't have an opportunity for a detailed review yet. I will have some input (there was a goto I remember not being needed). My general fear is a balance between supporting clone devices vs reliability. This driver is heavily used in devices (phones, tablets, TVs, cars). There have been bug reports in the past and just getting the fixes downstream takes a lot of time (e.g. Android devices). One of the key things I really would like to see enhanced are the unit tests (hid-tools / kernel side now). To really make sure we emulate behavior of these other devices well. The tricky part is that they don't always support all the HID requests of the real device (which is weird as the game console does use those HID reports and others and I don't know how it would have worked there). That's in general the key feedback about the tests. A question for Max: do you have access to all the devices being added? Thanks, Roderick
On 1/25/24 07:24, Roderick Colenbrander wrote: > Sorry for the late reply. I had glanced over them, but didn't have an > opportunity for a detailed review yet. No worries, thank you for giving the patches a chance. > My general fear is a balance between supporting clone devices vs > reliability. This driver is heavily used in devices (phones, tablets, > TVs, cars). There have been bug reports in the past and just getting > the fixes downstream takes a lot of time (e.g. Android devices). I understand this very well, which is why I hope I've kept the patches small enough to be alright to follow. If you have a bad feeling about something in particular, please let me know, and maybe we can find a better solution or alleviate concerns. On my end, I am working (currently as a hobby) on an appliance that aims to support as many controllers as possible, hence I know the choices you face in order to keep user expectations in check, and user experience consistent. See my comment on patch 7/7 - what if someone uses a third-party controller that happens to work by chance, and a kernel update breaks stuff? So I am with you on focusing on the original devices, which have predictable behaviour and quality. That said, hopefully some or all of these patches are trivial enough to be included upstream. I feel that it's beautiful to plug random stuff into a Linux box and to find that it just works :) > One of the key things I really would like to see enhanced are the unit > tests (hid-tools / kernel side now). To really make sure we emulate > behavior of these other devices well. The tricky part is that they > don't always support all the HID requests of the real device (which is > weird as the game console does use those HID reports and others and I > don't know how it would have worked there). I've been wondering the same, but without a PS4 of my own, I didn't try such controllers on a real console. That would be interesting indeed! > That's in general the key feedback about the tests. A question for > Max: do you have access to all the devices being added? I don't have all devices I've ever tested, but I do have at least one reproducer for each patch in this series. Thanks, Max