diff mbox series

[BlueZ] sixaxis: Fix Sony Navigation Controller pairing

Message ID 20220314020245.135251-1-jesse12p@gmail.com
State New
Headers show
Series [BlueZ] sixaxis: Fix Sony Navigation Controller pairing | expand

Commit Message

Jesse Pullinen March 14, 2022, 2:02 a.m. UTC
Fixed the device name.

Commit 61745d2bb8b5f534278db49faf8e2cdb7e894529
("sixaxis: Fix Bluetooth PS3 clone joypad being named like the original")
made the matching use the name, which broke the pairing.
---
 profiles/input/sixaxis.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 42e99371584cc26c637fcc332de437d2c646f324

Comments

Jesse Pullinen March 27, 2022, 11 p.m. UTC | #1
Hi Luiz,

sorry it took me this long to answer.

On Monday, 2022-03-14 15:11 -0700, Luiz Augusto von Dentz wrote:
> Actually shouldn't we try to have another call to get_pairing if it
> returns NULL to a specific name? That way the pid/vid is used as
> fallback if the name doesn't match since the name perhaps can be set
> by the user, or with a firmware update.

This could work, but I think the names should be fixed anyway, or the
USB HID name could be used as the Bluetooth device name which was one
of the ideas in the discussion https://github.com/bluez/bluez/issues/46
("SHANWAN PS3 GamePad - vibration issue when connected wirelessly")
which resulted in the commit 61745d2bb8b5f534278db49faf8e2cdb7e894529
("sixaxis: Fix Bluetooth PS3 clone joypad being named like the
original") so that the kernel detects the device and applies a quirk.

I think using the same name for USB and Bluetooth would be better as it
is more consistent and then the quirks in the kernel would be applied
correctly. There is already one other name detected in the kernel which
is not in the device list here.

I don't think the devices have a changeable HID name, but if they do
then the kernel would't recognize the changed name and wouldn't apply
the quirk. If it was changed in a firmware update, it would then need
to be changed here and in the kernel if quirky, unless the USB HID name
was used which would mean only the kernel would need the change.

I think I have some clone controller(s) somewhere so maybe I can
experiment with this more later.

TL;DR;

Some of the device names are wrong and then either of these should fix
the issue:
* Try matching without name if matching with name did not work and keep
adding new devices which need quirks or
* use the USB HID name as the Bluetooth device name and then only the
kernel needs to be modified to support quirky devices.

-Jesse
diff mbox series

Patch

diff --git a/profiles/input/sixaxis.h b/profiles/input/sixaxis.h
index ab8831995..cbd27cd06 100644
--- a/profiles/input/sixaxis.h
+++ b/profiles/input/sixaxis.h
@@ -49,7 +49,7 @@  get_pairing(uint16_t vid, uint16_t pid, const char *name)
 			.type = CABLE_PAIRING_SIXAXIS,
 		},
 		{
-			.name = "Navigation Controller",
+			.name = "Sony Navigation Controller",
 			.source = 0x0002,
 			.vid = 0x054c,
 			.pid = 0x042f,