Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit defd2086 authored by Jiri Kosina's avatar Jiri Kosina
Browse files

HID: force hid-input for Microsoft SideWinder GameVoice device



Microsoft SideWinder GameVoice driver is a trivial device with a few buttons
(0x09 HID usage) and an audio connector, which just forwards the audio input
into oridinary sound card present in the computer.

Despite this fact, the only interface of this device reports itself as a
Telephony/Headset type of HID device. This is apparently incorrect - the device
itself doesn't provide any audio/telephony functionality. This is achieved in
userland application which only needs to receive the button events from the HID
driver.

This patch establishes a new quirk which forces hid-input to claim a device it
will otherwise leave untouched.

Reported-by: default avatarTomas Carnecky <tom@dbservice.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent cb1d93c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -997,7 +997,7 @@ int hidinput_connect(struct hid_device *hid)
			if (IS_INPUT_APPLICATION(hid->collection[i].usage))
			if (IS_INPUT_APPLICATION(hid->collection[i].usage))
				break;
				break;


	if (i == hid->maxcollection)
	if (i == hid->maxcollection && (hid->quirks & HID_QUIRK_HIDINPUT) == 0)
		return -1;
		return -1;


	if (hid->quirks & HID_QUIRK_SKIP_OUTPUT_REPORTS)
	if (hid->quirks & HID_QUIRK_SKIP_OUTPUT_REPORTS)
+4 −0
Original line number Original line Diff line number Diff line
@@ -209,6 +209,9 @@
#define USB_DEVICE_ID_MGE_UPS		0xffff
#define USB_DEVICE_ID_MGE_UPS		0xffff
#define USB_DEVICE_ID_MGE_UPS1		0x0001
#define USB_DEVICE_ID_MGE_UPS1		0x0001


#define USB_VENDOR_ID_MICROSOFT		0x045e
#define USB_DEVICE_ID_SIDEWINDER_GV	0x003b

#define USB_VENDOR_ID_NEC		0x073e
#define USB_VENDOR_ID_NEC		0x073e
#define USB_DEVICE_ID_NEC_USB_GAME_PAD	0x0301
#define USB_DEVICE_ID_NEC_USB_GAME_PAD	0x0301


@@ -290,6 +293,7 @@ static const struct hid_blacklist {
	{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_EDGE, HID_QUIRK_DUPLICATE_USAGES },
	{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_EDGE, HID_QUIRK_DUPLICATE_USAGES },


	{ USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM, HID_QUIRK_HIDDEV },
	{ USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM, HID_QUIRK_HIDDEV },
	{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV, HID_QUIRK_HIDINPUT },


	{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_01, HID_QUIRK_IGNORE },
	{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_01, HID_QUIRK_IGNORE },
	{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_10, HID_QUIRK_IGNORE },
	{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_10, HID_QUIRK_IGNORE },
+1 −0
Original line number Original line Diff line number Diff line
@@ -276,6 +276,7 @@ struct hid_item {
#define HID_QUIRK_DUPLICATE_USAGES		0x00200000
#define HID_QUIRK_DUPLICATE_USAGES		0x00200000
#define HID_QUIRK_RESET_LEDS			0x00400000
#define HID_QUIRK_RESET_LEDS			0x00400000
#define HID_QUIRK_SWAPPED_MIN_MAX		0x00800000
#define HID_QUIRK_SWAPPED_MIN_MAX		0x00800000
#define HID_QUIRK_HIDINPUT			0x01000000


/*
/*
 * This is the global environment of the parser. This information is
 * This is the global environment of the parser. This information is