V4L/DVB (13134): Add support for TBS-likes remotes
authorIgor M. Liplianin <liplianin@me.by>
Sat, 19 Sep 2009 12:51:12 +0000 (09:51 -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; Omicom SS4; SatTrade ST4200;
TBS 8920,8910; Prof 7300,6200.

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 f6790172736a07482eb8ccc4a08a9e32032ae2d3..a2c80a7a3ae4fdb4a2ce4f9b098facfa2f337ab0 100644 (file)
@@ -2964,6 +2964,46 @@ struct ir_scancode_table ir_codes_dm1105_nec_table = {
 };
 EXPORT_SYMBOL_GPL(ir_codes_dm1105_nec_table);
 
+static struct ir_scancode ir_codes_tbs_nec[] = {
+       { 0x04, KEY_POWER2},    /*power*/
+       { 0x14, KEY_MUTE},      /*mute*/
+       { 0x07, KEY_1},
+       { 0x06, KEY_2},
+       { 0x05, KEY_3},
+       { 0x0b, KEY_4},
+       { 0x0a, KEY_5},
+       { 0x09, KEY_6},
+       { 0x0f, KEY_7},
+       { 0x0e, KEY_8},
+       { 0x0d, KEY_9},
+       { 0x12, KEY_0},
+       { 0x16, KEY_CHANNELUP}, /*ch+*/
+       { 0x11, KEY_CHANNELDOWN},/*ch-*/
+       { 0x13, KEY_VOLUMEUP},  /*vol+*/
+       { 0x0c, KEY_VOLUMEDOWN},/*vol-*/
+       { 0x03, KEY_RECORD},    /*rec*/
+       { 0x18, KEY_PAUSE},     /*pause*/
+       { 0x19, KEY_OK},        /*ok*/
+       { 0x1a, KEY_CAMERA},    /* snapshot */
+       { 0x01, KEY_UP},
+       { 0x10, KEY_LEFT},
+       { 0x02, KEY_RIGHT},
+       { 0x08, KEY_DOWN},
+       { 0x15, KEY_FAVORITES},
+       { 0x17, KEY_SUBTITLE},
+       { 0x1d, KEY_ZOOM},
+       { 0x1f, KEY_EXIT},
+       { 0x1e, KEY_MENU},
+       { 0x1c, KEY_EPG},
+       { 0x00, KEY_PREVIOUS},
+       { 0x1b, KEY_MODE},
+};
+struct ir_scancode_table ir_codes_tbs_nec_table = {
+       .scan = ir_codes_tbs_nec,
+       .size = ARRAY_SIZE(ir_codes_tbs_nec),
+};
+EXPORT_SYMBOL_GPL(ir_codes_tbs_nec_table);
+
 /* Terratec Cinergy Hybrid T USB XS
    Devin Heitmueller <dheitmueller@linuxtv.org>
  */
index 78b3635178afe33584256e516211acbf60555a30..33437e403144970705ecd3e0780bc17c56411d3d 100644 (file)
@@ -303,6 +303,22 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
                ir->mask_keydown = 0x02;
                ir->polling      = 50; /* ms */
                break;
+       case CX88_BOARD_OMICOM_SS4_PCI:
+       case CX88_BOARD_SATTRADE_ST4200:
+       case CX88_BOARD_TBS_8920:
+       case CX88_BOARD_TBS_8910:
+       case CX88_BOARD_PROF_7300:
+       case CX88_BOARD_PROF_6200:
+               ir_codes = &ir_codes_tbs_nec_table;
+               ir_type = IR_TYPE_PD;
+               ir->sampling = 0xff00; /* address */
+               break;
+       case CX88_BOARD_TEVII_S460:
+       case CX88_BOARD_TEVII_S420:
+               ir_codes = &ir_codes_dm1105_nec_table;
+               ir_type = IR_TYPE_PD;
+               ir->sampling = 0xff00; /* address */
+               break;
        case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
                ir_codes         = &ir_codes_dntv_live_dvbt_pro_table;
                ir_type          = IR_TYPE_PD;
@@ -432,8 +448,16 @@ void cx88_ir_irq(struct cx88_core *core)
 
        /* decode it */
        switch (core->boardnr) {
+       case CX88_BOARD_TEVII_S460:
+       case CX88_BOARD_TEVII_S420:
        case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1:
        case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
+       case CX88_BOARD_OMICOM_SS4_PCI:
+       case CX88_BOARD_SATTRADE_ST4200:
+       case CX88_BOARD_TBS_8920:
+       case CX88_BOARD_TBS_8910:
+       case CX88_BOARD_PROF_7300:
+       case CX88_BOARD_PROF_6200:
                ircode = ir_decode_pulsedistance(ir->samples, ir->scount, 1, 4);
 
                if (ircode == 0xffffffff) { /* decoding error */
index af3257e6b808ecb533b750b84b810d2a8c1b2f0b..c2d515dd94d2185fa1fc2524fb88d948f2f54037 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_tbs_nec_table;
 extern struct ir_scancode_table ir_codes_evga_indtube_table;
 extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table;
 extern struct ir_scancode_table ir_codes_videomate_s350_table;