You are not logged in.

#1 2011-02-01 13:15:59

Velophile
Member
Registered: 2009-12-15
Posts: 48

[SOLVED] hid-aureal workaround broken

Hi,

I have a cheap remote control that misreports itself as a single key keyboard.  There's a module available that works around the problem here that I've been using without issues for a while now.  After a kernel update normally I recompile and install the module and all's well again.

After the last kernel update (last night to 2.6.37-5) the module compiles and installs but when it's added during boot I get:

BUG: unable to handle kernel NULL pointer dereference at 00000....00078

(the 000....000 is truncated in this post only not in the error log, just to save me counting).

The module is in the modules array in the rc.conf before USBHID, as it has always been, in order to perform it's job.

I've not done C for years and never worked on Linux programming but I guess the problem is occuring in the hid-aureal.c file in the aureal_report_fixup function, any ideas what I can do to investigate/fix please?

Last edited by Velophile (2011-02-01 17:44:47)

Offline

#2 2011-02-01 14:08:38

Velophile
Member
Registered: 2009-12-15
Posts: 48

Re: [SOLVED] hid-aureal workaround broken

Might have spotted something; looking at the hid-sunplus.c code that this modules based on :

dev_info(&hdev->dev, "fixing up Sunplus Wireless Desktop "
                                 "report descriptor\n");

has become

hid_info(hdev, "fixing up Sunplus Wireless Desktop report descriptor\n");

from version linux-2.6.37-ccs-1.8.0 to linux-2.6.38-rc3-ccs-1.8.0.

Offline

#3 2011-02-01 17:44:21

Velophile
Member
Registered: 2009-12-15
Posts: 48

Re: [SOLVED] hid-aureal workaround broken

Got it working by amending the following function in hid-aureal.c:

static __u8 *aureal_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize)
{
        if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) {
                dev_info(&hdev->dev, "fixing Aureal Cy se W-01RN USB_V3.1 report descriptor. Keyboard Logical Maximum = 101\n");
                rdesc[53] = 0x65;
        }
        return rdesc;
}

Offline

#4 2011-03-22 05:43:21

mekh
Member
Registered: 2011-01-31
Posts: 11

Re: [SOLVED] hid-aureal workaround broken

Dear Velophile,
Could you show us your /etc/lirc/lircd.conf, /etc/conf.d/lircd.conf and /etc/rc.d/lircd?
You code works great, but I can't make the remote works with mplayer. Also, there is no any reaction on key pressing in irw.

Last edited by mekh (2011-03-22 05:47:50)

Offline

#5 2011-03-22 08:26:06

Velophile
Member
Registered: 2009-12-15
Posts: 48

Re: [SOLVED] hid-aureal workaround broken

Hi mekh, I don't have lirc installed so I can help there I'm afraid.  I use the remote on my htpc which runs xbmc and the keyboard mode of the remote works fine (aside from the power button) with that so I never investigated getting lirc running.  Sorry.

I did manage to get some output from irw when I first started investigating this thing though, unfortunately I can't remember what I had to do to get it to work but it did involve telling irw what socket to listen to, think that involved looking at /dev/input/by-id and working out which one was being used (somehow) the pointing irw at it.

Offline

Board footer

Powered by FluxBB