Return to the homepage

Kernel Wrestling

How to stop the kernel from asking the display for its HID reports: It turns out that this is not easy. The simple way would be to add the display VID and PID to the kernel blacklist and recompile the kernel - not an option for me as the Myth box IS our TV, potentially putting it out of action would be a hanging offence. Also I have no kernel source and therefore the rest of the MythDora community will be in the same boat.

My solution is to write a kernel module that will install and then stop the kernel from messing with our display.

A bit of kernel hacking: in "/boot" there is "System.map" that has all the kernel symbols, the one I want is "usbhid_modify_dquirk()". Unfortunately the kernel does not export this symbol so we have to hard code the address of the symbol and call the function with the VID and PID of the display. The code is here

Next Steps

The module needs to be loaded once after system start like this "insmod futabaquirks.ko" it will stick a message into the system log to say that it has done its stuff.

Now we need an application to drive the display. I chose to do this in user space, I do have the beginnings of a kernel module that drives it but I cannot find a way in "module land" to kick off the kernel HID driver - I can, however do this in user space.

I used libusb which is a library for writing USB stuff.

The result is some simple code that sets up the display and displays time on the VFD and system load on the volume bar.

You will need libusb installed in order to compile this.

The program is started like this "./futaba -r" - It will not work without the "-r"

Help Please


In order to take this further I need some help. I would like to integrate this stuff into Mythtv which is able to drive an LCD display using lcdproc. However our display is limited in what it can show and I cannot get Myth to send volume information - it just does not work. My intention was to show the time, then channel together with a volume bar.

This code is made available here as open source, please make any enhancements available in the same way - thanks.

Downloads

Quirks fix module
User-space Driver
Experimental kernel space driver module



Previous Page