1
linux/drivers/media/video/cx18
Mauro Carvalho Chehab 715a223323 V4L/DVB (12595): common/ir: use a struct for keycode tables
Currently, V4L uses a scancode table whose index is the scancode and
the value is the keycode. While this works, it has some drawbacks:

1) It requires that the scancode to be at the range 00-7f;

2) keycodes should be masked on 7 bits in order for it to work;

3) due to the 7 bits approach, sometimes it is not possible to replace
the default keyboard to another one with a different encoding rule;

4) it is different than what is done with dvb-usb approach;

5) it requires a typedef for it to work. This is not a recommended
Linux CodingStyle.

This patch is part of a larger series of IR changes. It basically
replaces the IR_KEYTAB_TYPE tables by a structured table:
struct ir_scancode {
       u16     scancode;
       u32     keycode;
};

This is very close to what dvb does. So, a further integration with DVB
code will be easy.

While we've changed the tables, for now, the IR keycode handling is still
based on the old approach.

The only notable effect is the redution of about 35% of the ir-common
module size:

   text    data     bss     dec     hex filename
   6721   29208       4   35933    8c5d old/ir-common.ko
   5756   18040       4   23800    5cf8 new/ir-common.ko

In thesis, we could be using above u8 for scancode, reducing even more the size
of the module, but defining it as u16 is more convenient, since, on dvb, each
scancode has up to 16 bits, and we currently have a few troubles with rc5, as their
scancodes are defined with more than 8 bits.

This patch itself shouldn't be doing any functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:47 -03:00
..
cx18-audio.c V4L/DVB (11624): cx18: Toggle the AI1 mux when changing the CX18_AUDIO_ENABLE register 2009-06-16 18:20:45 -03:00
cx18-audio.h
cx18-av-audio.c
cx18-av-core.c V4L/DVB (11898): cx18: Perform 64 bit divide so it works for 32 bit systems 2009-06-16 18:21:16 -03:00
cx18-av-core.h
cx18-av-firmware.c V4L/DVB (11624): cx18: Toggle the AI1 mux when changing the CX18_AUDIO_ENABLE register 2009-06-16 18:20:45 -03:00
cx18-av-vbi.c V4L/DVB (11864): cx18: Complete support for Sliced and Raw VBI for 625 line systems 2009-06-16 18:21:14 -03:00
cx18-cards.c V4L/DVB (12367): cx18: Add i2c initialization for Z8F0811/Hauppage IR transceivers 2009-09-12 12:18:25 -03:00
cx18-cards.h V4L/DVB (12367): cx18: Add i2c initialization for Z8F0811/Hauppage IR transceivers 2009-09-12 12:18:25 -03:00
cx18-controls.c V4L/DVB (12338): cx18: Read buffer overflow 2009-08-13 20:39:02 -03:00
cx18-controls.h
cx18-driver.c V4L/DVB (12207): cx18: Add an EEPROM dump routine for the Yuan MPC718 and future cards 2009-09-12 12:17:26 -03:00
cx18-driver.h V4L/DVB (11950): cx18: Split LeadTek PVR2100 and DVR3100 H into 2 separate card entries 2009-06-16 19:07:33 -03:00
cx18-dvb.c V4L/DVB (12182): cx18: Add DVB-T support for Yuan MPC-718 cards with an MT352 or ZL10353 2009-07-05 14:29:59 -03:00
cx18-dvb.h
cx18-fileops.c V4L/DVB (12196): cx18-fileops.c: Remove unnecessary semicolons 2009-09-12 12:17:22 -03:00
cx18-fileops.h
cx18-firmware.c
cx18-firmware.h
cx18-gpio.c
cx18-gpio.h
cx18-i2c.c V4L/DVB (12595): common/ir: use a struct for keycode tables 2009-09-12 12:19:47 -03:00
cx18-i2c.h
cx18-io.c
cx18-io.h
cx18-ioctl.c V4L/DVB (12199): remove redundant tests on unsigned 2009-09-12 12:17:23 -03:00
cx18-ioctl.h
cx18-irq.c
cx18-irq.h
cx18-mailbox.c V4L/DVB (11618): cx18: Convert per stream mutex locks to per queue spin locks 2009-06-16 18:20:44 -03:00
cx18-mailbox.h
cx18-queue.c V4L/DVB (11619): cx18: Simplify the work handler for outgoing mailbox commands 2009-06-16 18:20:44 -03:00
cx18-queue.h
cx18-scb.c
cx18-scb.h
cx18-streams.c V4L/DVB (11864): cx18: Complete support for Sliced and Raw VBI for 625 line systems 2009-06-16 18:21:14 -03:00
cx18-streams.h V4L/DVB (11619): cx18: Simplify the work handler for outgoing mailbox commands 2009-06-16 18:20:44 -03:00
cx18-vbi.c
cx18-vbi.h
cx18-version.h V4L/DVB (11620): cx18: Increment version due to significant buffer handling changes 2009-06-16 18:20:45 -03:00
cx18-video.c
cx18-video.h
cx23418.h
Kconfig
Makefile