Linux Input/HID development
 help / color / mirror / Atom feed
* Fix for Chromecast Remote not working
@ 2026-05-02  4:35 Randy Sommerfeld
  0 siblings, 0 replies; only message in thread
From: Randy Sommerfeld @ 2026-05-02  4:35 UTC (permalink / raw)
  To: linux-input

[-- 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");

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-02  4:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-02  4:35 Fix for Chromecast Remote not working Randy Sommerfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox