From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9EAFDC433EF for ; Tue, 17 May 2022 06:19:34 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nqqXz-000620-Ci; Tue, 17 May 2022 02:19:07 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nqqXr-00061Q-FV for kernelnewbies@kernelnewbies.org; Tue, 17 May 2022 02:19:03 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 05B283200A16; Tue, 17 May 2022 02:18:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 17 May 2022 02:18:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1652768334; x=1652854734; bh=L3HYB8Ontg QN9JjzkyRQleShDkLVq0xO9tF2qkjb3mY=; b=HBLY+l41HdpLyjAOs1NhAHic12 yDH3CQDYg1B9ie+XI1ygA06PvFUD8HWRGKB1IS4tK6e5jVouJAs1fMwqOHYff2lz 760A1IxYKlOQGKq8iV3xmv5WeVRqopQXkqpdsaGwDIGPlZ6+GeeruqPRkRaka2tV i9RLLi/vwSDryFHj0PLFndy7eR1AWNARHspjBwe6pE784wQ2pB4gr74GdZKLdl4o PztQK6Nui7Xzge07VJUZb9oTckvMkW+uiPbHnD/xzXNmY3bxqbBvoFDNcOtXgS4l 6/UpveBZeLSmQDCc/yVTbrsrZ3J/sT1Hb7cC2tQMP4XSwPWTSOX53/64qD1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1652768334; x=1652854734; bh=L3HYB8OntgQN9JjzkyRQleShDkLV q0xO9tF2qkjb3mY=; b=qhCl5SKFE0hQdoBiNNvqRcKsRzS3CNKk/XulsSpNYbMI ha02H1gD5orNnSVTVsGfAA7gAFgzQc2YlETKicMTH2trKTAQlER/j5yrasE5BuSx stCvMQJIMz+kk80e2ZjyOZYZ6MaCRJwBIY74UWBmGTgXjli4GhtY7Jh3qO66F1oI ODvNh4SD3teZUOoa+ROpechooZ9jkydpsaex2QtfgzXv3OKgqNYrldmDRHFwpgyx 4Uryc/8Qa86Wtp2ndGjjGs0DQtvpKHnobTF3w5haxCkOfSEuZiYFWHdXoOjl7blg 6hXPS9AnoIRUV21IhxZVDVGS9DVkLinw7DAe8zB/HA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrheeigddutdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfhfgggtuggjsehttd ertddttddvnecuhfhrohhmpefirhgvghcumffjuceoghhrvghgsehkrhhorghhrdgtohhm qeenucggtffrrghtthgvrhhnpeehgedvvedvleejuefgtdduudfhkeeltdeihfevjeekje euhfdtueefhffgheekteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 May 2022 02:18:53 -0400 (EDT) Date: Tue, 17 May 2022 08:18:50 +0200 From: Greg KH To: Matt Silva Subject: Re: Supporting a USB HID device interface that is missing a interrupt input endpoint Message-ID: References: <1sT3lu7QxRdv6jrZycSEE8VsfPtAXiJNL5BBDBp-cMiTG3DbEau-NDI_mo8leikQo5u6KBwPS-mb_6sz0aja8idAVM5hMwg2oQ6dRzjJrXo=@protonmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1sT3lu7QxRdv6jrZycSEE8VsfPtAXiJNL5BBDBp-cMiTG3DbEau-NDI_mo8leikQo5u6KBwPS-mb_6sz0aja8idAVM5hMwg2oQ6dRzjJrXo=@protonmail.com> Cc: "kernelnewbies@kernelnewbies.org" X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Mon, May 16, 2022 at 11:40:09PM +0000, Matt Silva wrote: > Hi, first time emailing here, so if there are any issues with my question, let me know and I'll fix it. > > Basically, I'm working with a USB HID microphone that also supports RGB features. I'm working to reverse engineer the RGB features provided by a proprietary Windows driver and add support to OpenRGB. If this is a custom windows kernel driver, perhaps you don't need to talk HID to the device at all? Or is this just a device that is using the userspace Windows HID interface to talk to the device directly without any kernel code needed (that used to be the only way userspace programs could talk to USB devices on Windows for vendor-specific devices, so they all claim to be HID when they really are not.) > The issue is that the interface that handles the RGB packets only has an OUT interrupt endpoint (rather than an IN interrupt) and as such doesn't get picked up by the usbhid driver (and therefore can't be picked up by the HIDAPI library that OpenRGB uses). However, on Windows this interface is detected as a HID device. I've narrowed down where this happens to "drivers/hid/usbhid/hid-core.c:1350", and making some testing changes there to check when the device idVendor, idProd, and interface number match and then only check for endpoint being interrupt rather than input interrupt, I can get the kernel to properly associate the interface with the usbhid driver. A USB HID device has to have an interrupt IN endpoint to be HID compliant from what I remember in the specification, so the kernel is correct here. But you should double check this with the specification to be sure (they are free to download from usb.org). > My main question is regarding how this change should be implemented. Why not just talk directly to the device using libusb from userspace? I don't know how openrgb works, but odds are there are other devices that do not register as HID devices that it supports? Hope this helps, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies