Re: [PATCH v4] HID: logitech-dj: Add support for a new lightspeed receiver iteration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> Thanks for taking the time to test it.
> 
> No problem, I had a go at this a few years ago and had the same issue
> with my patches.
> I did email the last Logitech contact I could find associated with the
> driver, but he seems to have moved to a different part of the company.
> 
>> Is your product id the same as the one in the patch or are you modifying
>> it before compiling?
> 
> No modifications, it's 046d:c547

Awesome, thanks!

> 
>> Can you please dump the HID descriptors from your receiver
>> (sudo usbhid-dump -m 046d:c547) and share them?
> 
> Sure (hoping this doesn't get mangled):
> 
> 001:003:002:DESCRIPTOR         1756919882.495801
>  06 00 FF 09 01 A1 01 85 10 95 06 75 08 15 00 26
>  FF 00 09 01 81 00 09 01 91 00 C0 06 00 FF 09 02
>  A1 01 85 11 95 13 75 08 15 00 26 FF 00 09 02 81
>  00 09 02 91 00 C0
> 
> 001:003:001:DESCRIPTOR         1756919882.500790
>  05 01 09 06 A1 01 85 01 05 07 19 E0 29 E7 15 00
>  25 01 75 01 95 08 81 02 95 05 05 08 19 01 29 05
>  91 02 95 01 75 03 91 03 95 70 75 01 05 07 19 04
>  29 73 81 02 95 05 19 87 29 8B 81 02 95 03 19 90
>  29 92 81 02 C0 05 0C 09 01 A1 01 85 03 95 02 75
>  10 15 01 26 FF 02 19 01 2A FF 02 81 00 C0 05 01
>  09 80 A1 01 85 04 95 01 75 02 15 01 25 03 09 82
>  09 81 09 83 81 00 75 01 15 00 25 01 09 9B 81 06
>  75 05 81 03 C0
> 
> 001:003:000:DESCRIPTOR         1756919882.504793
>  05 01 09 02 A1 01 09 01 A1 00 95 10 75 01 15 00
>  25 01 05 09 19 01 29 10 81 02 95 02 75 10 16 01
>  80 26 FF 7F 05 01 09 30 09 31 81 06 95 01 75 08
>  15 81 25 7F 09 38 81 06 95 01 05 0C 0A 38 02 81
>  06 C0 06 00 FF 09 F1 75 08 95 05 15 00 26 FF 00
>  81 00 C0

Alright, the HID report descriptors are identical to mine.

I looked at the descriptors again and I noticed that the report ID for
the LEDs, which was previously 14, is now 1.

Can you apply this on top of the existing changes and test again?

diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 00a975b70f59..dd51492258f3 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -78,6 +78,7 @@
 #define REPORT_TYPE_SYSTEM_CONTROL		0x04
 #define REPORT_TYPE_MEDIA_CENTER		0x08
 #define REPORT_TYPE_LEDS			0x0E
+#define REPORT_TYPE_LEDS_LIGHTSPEED		0x01
 
 /* RF Report types bitfield */
 #define STD_KEYBOARD				BIT(1)
@@ -1455,8 +1456,14 @@ static int logi_dj_ll_raw_request(struct hid_device *hid,
 				count, report_type, reqtype);
 	}
 
-	if (buf[0] != REPORT_TYPE_LEDS)
-		return -EINVAL;
+	/* This Lightspeed receiver type uses a different LED report ID */
+	if (djrcv_dev->type == recvr_type_gaming_hidpp_ls_1_3) {
+		if (buf[0] != REPORT_TYPE_LEDS_LIGHTSPEED)
+			return -EINVAL;
+	} else {
+		if (buf[0] != REPORT_TYPE_LEDS)
+			return -EINVAL;
+	}
 
 	if (djrcv_dev->type != recvr_type_dj && count >= 2) {
 		if (!djrcv_dev->keyboard) {








[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux