From: Randy Sommerfeld <cyan@rrx.ca>
To: linux-input@vger.kernel.org
Subject: Fix for Chromecast Remote not working
Date: Sat, 2 May 2026 11:35:13 +0700 [thread overview]
Message-ID: <fca0ca85-63da-4c3b-8121-64a4ef77b649@rrx.ca> (raw)
[-- Attachment #1: Type: text/plain, Size: 737 bytes --]
Hello,
I've attached source code for a kernel module that fixes my Chromecast
Remote. Prior to this module, when pressing buttons on the Chromecast
Remote, I'd get these in the dmesg:
hid-generic 0005:18D1:9450.0004: Event data for report 1 was too short
(2 vs 1)
It seemed like a simple fix (accepting 1 instead of 2 for this specific
remote), and the attached module fixes this.
I'm not sure where this belongs in the main tree (perhaps as a quirk in
drivers/hid/ somewhere), which is why I'm submitting this as a module
instead of a patch.
As an unsophisticated dev I thought I'd bring this to someone's
attention since it might allow these remotes to be useful, and the fix
seems simple. Thank you.
Cheers,
-Randy.
[-- Attachment #2: chromecast_remote.c --]
[-- Type: text/x-csrc, Size: 1160 bytes --]
#include <linux/hid.h>
#include <linux/module.h>
#define USB_VENDOR_ID_GOOGLE 0x18d1
#define USB_DEVICE_ID_CHROMECAST_REMOTE 0x9450
static const __u8 *cc_remote_report_fixup(struct hid_device *hdev,
__u8 *rdesc,
unsigned int *rsize)
{
if (*rsize == 0x39 &&
rdesc[0x32] == 0x95 &&
rdesc[0x33] == 0x02 &&
rdesc[0x34] == 0x75 &&
rdesc[0x35] == 0x08) {
hid_info(hdev, "fixing Chromecast Remote descriptor\n");
rdesc[0x33] = 0x01;
}
return rdesc;
}
static const struct hid_device_id cc_remote_devices[] = {
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_GOOGLE,
USB_DEVICE_ID_CHROMECAST_REMOTE) },
{ }
};
MODULE_DEVICE_TABLE(hid, cc_remote_devices);
static struct hid_driver cc_remote_driver = {
.name = "chromecast_remote",
.id_table = cc_remote_devices,
.report_fixup = cc_remote_report_fixup,
};
module_hid_driver(cc_remote_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Chromecast Remote HID descriptor fixup");
reply other threads:[~2026-05-02 4:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fca0ca85-63da-4c3b-8121-64a4ef77b649@rrx.ca \
--to=cyan@rrx.ca \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox