From mboxrd@z Thu Jan 1 00:00:00 1970 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 66DCD8F66; Sun, 21 Jul 2024 14:41:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.38.239.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721572915; cv=none; b=EphIK87uC8IJJY0VWfRKBnnJuL2tk3QbAGkYf+CS7EM8dyG9UZYLUXOe028aJTCKQGZSqkJCW7rzKskNoinvptwjJExg0IKbHnj1IQS2LStK4rfdTE59/ER/+44QYC7e6u8bA59EEKyR1wvEpsOpoHH14LPKayrhSqRjVEk8TN8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721572915; c=relaxed/simple; bh=VoJaaG5wstmPG1mVJPSdCXg6dO7H1HfZoQRJ01j21Ho=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RMsiGCMsV0W6nDBqd1D1VEzoL8iOLIR52nKhelVFA8iC70NaOS0XC24SMbijZvgZjEBG4oB/b4MuJzfczo5OCGelvFJsSu+cWFP5SkIwa8ksNQlevf53zj0Z6lJ2/vFtgZR0MAwjsF37sOax3qFZByHX0pY+C5Vy6Y5D7loRh3k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=enpas.org; spf=pass smtp.mailfrom=enpas.org; arc=none smtp.client-ip=46.38.239.100 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 17F50100225; Sun, 21 Jul 2024 14:33:54 +0000 (UTC) Message-ID: <5b42961b-8ca6-4245-b16c-d703255e5aea@enpas.org> Date: Sun, 21 Jul 2024 23:33:47 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] hid-playstation: DS4: Update rumble and lightbar together To: Roderick Colenbrander , Jiri Kosina , Benjamin Tissoires Cc: Roderick Colenbrander , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240616163055.75174-1-max@enpas.org> Content-Language: en-US From: Max Staudt Autocrypt: addr=max@enpas.org; keydata= xsNNBFWfXgEBIADcbJMG2xuJBIVNlhj5AFBwKLZ6GPo3tGxHye+Bk3R3W5uIws3Sxbuj++7R PoWqUkvrdsxJAmnkFgMKx4euW/MCzXXgEQOM2nE0CWR7xmutpoXYc9BLZ2HHE2mSkpXVa1Ea UTm00jR+BUXgG/ZzCRkkLvN1W9Hkdb75qE/HIpkkVyDiSteJTIjGnpTnJrwiHbZVvXoR/Bx3 IWFNpuG80xnsGv3X9ierbalXaI3ZrmFiezbPuGzG1kqV1q0gdV4DNuFVi1NjpQU1aTmBV8bv gDi2Wygs1pOSj+dlLPwUJ+9jGVzFXiM3xUkNaJc4UPRKxAGskh1nWDdg0odbs0OarQ0o+E+v d7WbKK7TR1jfYNcQ+Trr0ca0m72XNFk0hUxNyaEv3kkZEpAv0IDKqXFQD700kr3ftZ8ZKOxd CP4UqVYI+1d0nR9LnJYVjRpKI9QqIx492As6Vl1YPjUbmuKi4OT2JdvaT4czGq9EJkbhjC8E KQqc2mWeLnnwiMJwp8fMGTq+1TuBgNIbVSdTeyMnNr5w0UmJ4Y/TNFnTsOR0yytpJlHU4YiW HDQKaw6wzvdxql2DCjRvn+Hgm9ifMmtPn5RO3PGvq7XQJ0bNzJ/lXl9ts9QbeR62vQUuv63S P6WIU+uEUZVtaNJIjmsoEkziMX01Agi+5gCgKkY8mLakdXOAGX9CaUr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RiZ54aML PsRBqTJGs7jw5gOWMMchFaemEnEJtg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/17/24 09:26, Roderick Colenbrander wrote: >> If not, then maybe there is protocol documentation that could help >> test writers in creating more precise tests? > > Unfortunately none of the documentation for our controllers is > public. Just read between the lines in the code, which we cover with > some clues here and there :) I've seen the clues and they are certainly an improvement of hid-playstation over hid-sony that I am grateful for :) As for the documentation, I didn't mean that you should open it to the wide public (although that would be fabulous!). Rather, I suggested providing what's needed to the people writing the downstream tests that we've been going on about for a while now. The utility of tests is... rather limited, if they don't verify an actual specification, but just a specific code's behaviour. After all, these tests would fail even when talking to a real PlayStation 4. >>> (The official Android tests are kind of kernel version agnostic >>> as they work across multiple kernel and Android versions. >> >> Hm, sounds to me like the Android test framework is broken if it >> cannot be kernel-specific in such cases. What's required in order >> to improve this? > > It is a bit of a long process we work on with Google. Some initial > fixing of some of the bugs will be for this year to make sure the 6.6 > tests pass properly. But any work to maybe handle multiple behaviors, > that's quite tricky and would take quite a bit of time to be honest. Sure, time is not the issue, as long as there is a clear light of correct software at the end of the tunnel :) Are these tests open source? Can kernel patchers run the tests easily (without installing a full Android SDK) and see which tests their patches would break? > Considering how widely Android and all these devices are used, I'm > hesitant to make changes to not cause regressions. Even just a simple > one can take forever to trickle down. Apologies, I am still confused. With v6.2, hid-playstation gained DS4 support. With v6.3, hid-sony lost DS4 support. DS4 support was removed from hid-sony just one minor release after it was included in hid-playstation. I didn't see any hesitation there, despite the wire protocol seeing significant changes compared to hid-sony, which had been deployed for almost a decade. Given how quickly the DS4 code was removed from hid-sony, why are fixes suddenly difficult, less than two years into the hid-playstation era, after around 8 years of DS4 support in hid-sony? The change from hid-sony to hid-playstation caused a regression on a real-world device, on Android phones: I have an 8BitDo controller that quirkily emulates a DS4, and which worked fine with my old Android phone, with a kernel from the hid-sony days. With v6.3, this controller broke, and this went into LTS v6.6. Does this kind of regression, which has clearly spread across the Android ecosystem with v6.6, deserve to be fixed? As a generalised question, how about controllers that work on Android phones with kernel v6.1 (hid-sony), but not with v6.6 (hid-playstation), because of protocol changes that don't affect first-party controllers. Do we accept upstream regressions on actual, physical devices for the sake of passing downstream tests? Max