
Hello, Trying to get inputlirc going with Linux 3.0 in Ubuntu 11.10 It works fine if I boot 2.6.28 left over from Ubuntu 11.04, everything works perfectly Problem seems to be that the kernel isn't decoding the scan codes into key presses: root@oncilla:~# ir-keytable -t Testing events. Please, press CTRL-C to abort. 1324089674.313994: event MSC: scancode = 1f21 1324089674.313995: event sync 1324089674.689301: event MSC: scancode = 1f21 1324089674.689303: event sync 1324089674.948084: event MSC: scancode = 1f21 1324089674.948085: event sync 1324089675.230977: event MSC: scancode = 1f21 1324089675.230978: event sync 1324089675.489673: event MSC: scancode = 1f21 1324089675.489674: event sync 1324089675.806055: event MSC: scancode = 1f21 1324089675.806057: event sync If I look at the table, I think I can see why: root@oncilla:~# ir-keytable -r scancode 0x0000 = KEY_0 (0x0b) scancode 0x0001 = KEY_1 (0x02) scancode 0x0002 = KEY_2 (0x03) scancode 0x0003 = KEY_3 (0x04) scancode 0x0004 = KEY_4 (0x05) scancode 0x0005 = KEY_5 (0x06) scancode 0x0006 = KEY_6 (0x07) scancode 0x0007 = KEY_7 (0x08) scancode 0x0008 = KEY_8 (0x09) scancode 0x0009 = KEY_9 (0x0a) scancode 0x000a = KEY_TEXT (0x184) scancode 0x000b = KEY_RED (0x18e) scancode 0x000c = KEY_RADIO (0x181) scancode 0x000d = KEY_MUTE (0x71) scancode 0x000e = KEY_SUBTITLE (0x172) scancode 0x000f = KEY_MUTE (0x71) scancode 0x0010 = KEY_VOLUMEUP (0x73) scancode 0x0011 = KEY_VOLUMEDOWN (0x72) scancode 0x0012 = KEY_PREVIOUS (0x19c) scancode 0x0014 = KEY_UP (0x67) scancode 0x0015 = KEY_DOWN (0x6c) scancode 0x0016 = KEY_LEFT (0x69) scancode 0x0017 = KEY_RIGHT (0x6a) scancode 0x0018 = KEY_VIDEO (0x189) scancode 0x0019 = KEY_AUDIO (0x188) scancode 0x001a = KEY_CAMERA (0xd4) scancode 0x001b = KEY_EPG (0x16d) scancode 0x001c = KEY_TV (0x179) scancode 0x001e = KEY_RED (0x18e) scancode 0x001f = KEY_TV (0x179) scancode 0x0020 = KEY_CHANNELUP (0x192) scancode 0x0021 = KEY_CHANNELDOWN (0x193) scancode 0x0022 = KEY_VIDEO (0x189) scancode 0x0024 = KEY_LAST (0x195) scancode 0x0025 = KEY_OK (0x160) scancode 0x0026 = KEY_SLEEP (0x8e) scancode 0x0029 = KEY_BLUE (0x191) scancode 0x002e = KEY_ZOOM (0x174) scancode 0x0030 = KEY_PAUSE (0x77) scancode 0x0032 = KEY_REWIND (0xa8) scancode 0x0034 = KEY_FASTFORWARD (0xd0) scancode 0x0035 = KEY_PLAY (0xcf) scancode 0x0036 = KEY_STOP (0x80) scancode 0x0037 = KEY_RECORD (0xa7) scancode 0x0038 = KEY_YELLOW (0x190) scancode 0x003b = KEY_GOTO (0x162) scancode 0x003c = KEY_ZOOM (0x174) scancode 0x003d = KEY_POWER (0x74) scancode 0x003f = KEY_HOME (0x66) Enabled protocols: Notice all the prefixes are 0x00, but the scan code the kernel produces has a prefix of 0x1f. So problem solved, right? Unfortunately, not quite that easy. If I look up the kernel table used: Found /sys/class/rc/rc0/ (/dev/input/event5) with: Driver budget_ci, table rc-hauppauge Supported protocols: Enabled protocols: Repeat delay = 500 ms, repeat period = 125 ms Then, look up rc-hauppauge in the kernel source, I find the linux-source-3.0.0/drivers/media/rc/keymaps/rc-hauppauge.c file. However, this has more entries then what is shown by "keytable -r". In particular, the kernel source has codes prefixed with 0x1e, and ox1f that don't show. I have traced the code, but can't see why the list is being filtered. So this is one aspect I don't understand. I can't set values with keytable, however. The upper bits of the scan value are set to 0. This corresponds with my reading of the code in the kernel - I can see that masks individual scan codes with 0xff when writing individual values. This code doesn't seem to apply to loading kernel the modules containing the tables however. From the kernel source: /* * Unfortunately, some hardware-based IR decoders don't provide * all bits for the complete IR code. In general, they provide only * the command part of the IR code. Yet, as it is possible to replace * the provided IR with another one, it is needed to allow loading * IR tables from other remotes. So, we support specifying a mask to * indicate the valid bits of the scancodes. */ if (dev->scanmask) scancode &= dev->scanmask; The budget-ci driver appears to set dev->scanmask to 0xff (linux-source-3.0.0/drivers/media/dvb/ttpci/budget-ci.c) file. So maybe the problem is that it is receiving the full scan code, but the table entry doesn't have the full scan code. For reasons I don't quite understand. Under the 2.6.38, the scancode always has a 0x00 prefix, everywhere, and everything works fine. -- Brian May <brian@microcomaustralia.com.au>