V4L/DVB (13135): Add support for TeVii remotes
authorIgor M. Liplianin <liplianin@me.by>
Wed, 23 Sep 2009 17:44:12 +0000 (14:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 5 Dec 2009 20:40:29 +0000 (18:40 -0200)
The patch brings infrared remote support for some cx88 based cards.
Such as TeVii S460,S420.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/common/ir-keymaps.c
drivers/media/video/cx88/cx88-input.c
include/media/ir-common.h

index a2c80a7a3ae4fdb4a2ce4f9b098facfa2f337ab0..32f765e6e5fdcd7b29bed02b4518b588c5c07aca 100644 (file)
@@ -2964,6 +2964,61 @@ struct ir_scancode_table ir_codes_dm1105_nec_table = {
 };
 EXPORT_SYMBOL_GPL(ir_codes_dm1105_nec_table);
 
+static struct ir_scancode ir_codes_tevii_nec[] = {
+       { 0x0a, KEY_POWER2},
+       { 0x0c, KEY_MUTE},
+       { 0x11, KEY_1},
+       { 0x12, KEY_2},
+       { 0x13, KEY_3},
+       { 0x14, KEY_4},
+       { 0x15, KEY_5},
+       { 0x16, KEY_6},
+       { 0x17, KEY_7},
+       { 0x18, KEY_8},
+       { 0x19, KEY_9},
+       { 0x10, KEY_0},
+       { 0x1c, KEY_MENU},
+       { 0x0f, KEY_VOLUMEDOWN},
+       { 0x1a, KEY_LAST},
+       { 0x0e, KEY_OPEN},
+       { 0x04, KEY_RECORD},
+       { 0x09, KEY_VOLUMEUP},
+       { 0x08, KEY_CHANNELUP},
+       { 0x07, KEY_PVR},
+       { 0x0b, KEY_TIME},
+       { 0x02, KEY_RIGHT},
+       { 0x03, KEY_LEFT},
+       { 0x00, KEY_UP},
+       { 0x1f, KEY_OK},
+       { 0x01, KEY_DOWN},
+       { 0x05, KEY_TUNER},
+       { 0x06, KEY_CHANNELDOWN},
+       { 0x40, KEY_PLAYPAUSE},
+       { 0x1e, KEY_REWIND},
+       { 0x1b, KEY_FAVORITES},
+       { 0x1d, KEY_BACK},
+       { 0x4d, KEY_FASTFORWARD},
+       { 0x44, KEY_EPG},
+       { 0x4c, KEY_INFO},
+       { 0x41, KEY_AB},
+       { 0x43, KEY_AUDIO},
+       { 0x45, KEY_SUBTITLE},
+       { 0x4a, KEY_LIST},
+       { 0x46, KEY_F1},
+       { 0x47, KEY_F2},
+       { 0x5e, KEY_F3},
+       { 0x5c, KEY_F4},
+       { 0x52, KEY_F5},
+       { 0x5a, KEY_F6},
+       { 0x56, KEY_MODE},
+       { 0x58, KEY_SWITCHVIDEOMODE},
+};
+struct ir_scancode_table ir_codes_tevii_nec_table = {
+       .scan = ir_codes_tevii_nec,
+       .size = ARRAY_SIZE(ir_codes_tevii_nec),
+};
+EXPORT_SYMBOL_GPL(ir_codes_tevii_nec_table);
+
 static struct ir_scancode ir_codes_tbs_nec[] = {
        { 0x04, KEY_POWER2},    /*power*/
        { 0x14, KEY_MUTE},      /*mute*/
index 33437e403144970705ecd3e0780bc17c56411d3d..c0047c1960ccebf8a2168c17166d3d463bdbf995 100644 (file)
@@ -315,7 +315,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
                break;
        case CX88_BOARD_TEVII_S460:
        case CX88_BOARD_TEVII_S420:
-               ir_codes = &ir_codes_dm1105_nec_table;
+               ir_codes = &ir_codes_tevii_nec_table;
                ir_type = IR_TYPE_PD;
                ir->sampling = 0xff00; /* address */
                break;
index c2d515dd94d2185fa1fc2524fb88d948f2f54037..5921776929e7d5edacda4691f2ab335f186e8d74 100644 (file)
@@ -173,6 +173,7 @@ extern struct ir_scancode_table ir_codes_ati_tv_wonder_hd_600_table;
 extern struct ir_scancode_table ir_codes_kworld_plus_tv_analog_table;
 extern struct ir_scancode_table ir_codes_kaiomy_table;
 extern struct ir_scancode_table ir_codes_dm1105_nec_table;
+extern struct ir_scancode_table ir_codes_tevii_nec_table;
 extern struct ir_scancode_table ir_codes_tbs_nec_table;
 extern struct ir_scancode_table ir_codes_evga_indtube_table;
 extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table;