diff options
| author | Igor M. Liplianin <liplianin@me.by> | 2009-09-19 08:51:12 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:40:29 -0500 |
| commit | d8d8622552088ca94fab4e4997f948514d0bdc27 (patch) | |
| tree | b0484f3c1ac803ae839eb9dd88510eafd0052565 | |
| parent | 8f37cf25badd0ba9de7cd05c3f1d5362607c1bf9 (diff) | |
V4L/DVB (13134): Add support for TBS-likes remotes
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>
| -rw-r--r-- | drivers/media/common/ir-keymaps.c | 40 | ||||
| -rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 24 | ||||
| -rw-r--r-- | include/media/ir-common.h | 1 |
3 files changed, 65 insertions, 0 deletions
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c index f6790172736a..a2c80a7a3ae4 100644 --- a/drivers/media/common/ir-keymaps.c +++ b/drivers/media/common/ir-keymaps.c | |||
| @@ -2964,6 +2964,46 @@ struct ir_scancode_table ir_codes_dm1105_nec_table = { | |||
| 2964 | }; | 2964 | }; |
| 2965 | EXPORT_SYMBOL_GPL(ir_codes_dm1105_nec_table); | 2965 | EXPORT_SYMBOL_GPL(ir_codes_dm1105_nec_table); |
| 2966 | 2966 | ||
| 2967 | static struct ir_scancode ir_codes_tbs_nec[] = { | ||
| 2968 | { 0x04, KEY_POWER2}, /*power*/ | ||
| 2969 | { 0x14, KEY_MUTE}, /*mute*/ | ||
| 2970 | { 0x07, KEY_1}, | ||
| 2971 | { 0x06, KEY_2}, | ||
| 2972 | { 0x05, KEY_3}, | ||
| 2973 | { 0x0b, KEY_4}, | ||
| 2974 | { 0x0a, KEY_5}, | ||
| 2975 | { 0x09, KEY_6}, | ||
| 2976 | { 0x0f, KEY_7}, | ||
| 2977 | { 0x0e, KEY_8}, | ||
| 2978 | { 0x0d, KEY_9}, | ||
| 2979 | { 0x12, KEY_0}, | ||
| 2980 | { 0x16, KEY_CHANNELUP}, /*ch+*/ | ||
| 2981 | { 0x11, KEY_CHANNELDOWN},/*ch-*/ | ||
| 2982 | { 0x13, KEY_VOLUMEUP}, /*vol+*/ | ||
| 2983 | { 0x0c, KEY_VOLUMEDOWN},/*vol-*/ | ||
| 2984 | { 0x03, KEY_RECORD}, /*rec*/ | ||
| 2985 | { 0x18, KEY_PAUSE}, /*pause*/ | ||
| 2986 | { 0x19, KEY_OK}, /*ok*/ | ||
| 2987 | { 0x1a, KEY_CAMERA}, /* snapshot */ | ||
| 2988 | { 0x01, KEY_UP}, | ||
| 2989 | { 0x10, KEY_LEFT}, | ||
| 2990 | { 0x02, KEY_RIGHT}, | ||
| 2991 | { 0x08, KEY_DOWN}, | ||
| 2992 | { 0x15, KEY_FAVORITES}, | ||
| 2993 | { 0x17, KEY_SUBTITLE}, | ||
| 2994 | { 0x1d, KEY_ZOOM}, | ||
| 2995 | { 0x1f, KEY_EXIT}, | ||
| 2996 | { 0x1e, KEY_MENU}, | ||
| 2997 | { 0x1c, KEY_EPG}, | ||
| 2998 | { 0x00, KEY_PREVIOUS}, | ||
| 2999 | { 0x1b, KEY_MODE}, | ||
| 3000 | }; | ||
| 3001 | struct ir_scancode_table ir_codes_tbs_nec_table = { | ||
| 3002 | .scan = ir_codes_tbs_nec, | ||
| 3003 | .size = ARRAY_SIZE(ir_codes_tbs_nec), | ||
| 3004 | }; | ||
| 3005 | EXPORT_SYMBOL_GPL(ir_codes_tbs_nec_table); | ||
| 3006 | |||
| 2967 | /* Terratec Cinergy Hybrid T USB XS | 3007 | /* Terratec Cinergy Hybrid T USB XS |
| 2968 | Devin Heitmueller <dheitmueller@linuxtv.org> | 3008 | Devin Heitmueller <dheitmueller@linuxtv.org> |
| 2969 | */ | 3009 | */ |
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index 78b3635178af..33437e403144 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
| @@ -303,6 +303,22 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
| 303 | ir->mask_keydown = 0x02; | 303 | ir->mask_keydown = 0x02; |
| 304 | ir->polling = 50; /* ms */ | 304 | ir->polling = 50; /* ms */ |
| 305 | break; | 305 | break; |
| 306 | case CX88_BOARD_OMICOM_SS4_PCI: | ||
| 307 | case CX88_BOARD_SATTRADE_ST4200: | ||
| 308 | case CX88_BOARD_TBS_8920: | ||
| 309 | case CX88_BOARD_TBS_8910: | ||
| 310 | case CX88_BOARD_PROF_7300: | ||
| 311 | case CX88_BOARD_PROF_6200: | ||
| 312 | ir_codes = &ir_codes_tbs_nec_table; | ||
| 313 | ir_type = IR_TYPE_PD; | ||
| 314 | ir->sampling = 0xff00; /* address */ | ||
| 315 | break; | ||
| 316 | case CX88_BOARD_TEVII_S460: | ||
| 317 | case CX88_BOARD_TEVII_S420: | ||
| 318 | ir_codes = &ir_codes_dm1105_nec_table; | ||
| 319 | ir_type = IR_TYPE_PD; | ||
| 320 | ir->sampling = 0xff00; /* address */ | ||
| 321 | break; | ||
| 306 | case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: | 322 | case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: |
| 307 | ir_codes = &ir_codes_dntv_live_dvbt_pro_table; | 323 | ir_codes = &ir_codes_dntv_live_dvbt_pro_table; |
| 308 | ir_type = IR_TYPE_PD; | 324 | ir_type = IR_TYPE_PD; |
| @@ -432,8 +448,16 @@ void cx88_ir_irq(struct cx88_core *core) | |||
| 432 | 448 | ||
| 433 | /* decode it */ | 449 | /* decode it */ |
| 434 | switch (core->boardnr) { | 450 | switch (core->boardnr) { |
| 451 | case CX88_BOARD_TEVII_S460: | ||
| 452 | case CX88_BOARD_TEVII_S420: | ||
| 435 | case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: | 453 | case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: |
| 436 | case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: | 454 | case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: |
| 455 | case CX88_BOARD_OMICOM_SS4_PCI: | ||
| 456 | case CX88_BOARD_SATTRADE_ST4200: | ||
| 457 | case CX88_BOARD_TBS_8920: | ||
| 458 | case CX88_BOARD_TBS_8910: | ||
| 459 | case CX88_BOARD_PROF_7300: | ||
| 460 | case CX88_BOARD_PROF_6200: | ||
| 437 | ircode = ir_decode_pulsedistance(ir->samples, ir->scount, 1, 4); | 461 | ircode = ir_decode_pulsedistance(ir->samples, ir->scount, 1, 4); |
| 438 | 462 | ||
| 439 | if (ircode == 0xffffffff) { /* decoding error */ | 463 | if (ircode == 0xffffffff) { /* decoding error */ |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index af3257e6b808..c2d515dd94d2 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
| @@ -173,6 +173,7 @@ extern struct ir_scancode_table ir_codes_ati_tv_wonder_hd_600_table; | |||
| 173 | extern struct ir_scancode_table ir_codes_kworld_plus_tv_analog_table; | 173 | extern struct ir_scancode_table ir_codes_kworld_plus_tv_analog_table; |
| 174 | extern struct ir_scancode_table ir_codes_kaiomy_table; | 174 | extern struct ir_scancode_table ir_codes_kaiomy_table; |
| 175 | extern struct ir_scancode_table ir_codes_dm1105_nec_table; | 175 | extern struct ir_scancode_table ir_codes_dm1105_nec_table; |
| 176 | extern struct ir_scancode_table ir_codes_tbs_nec_table; | ||
| 176 | extern struct ir_scancode_table ir_codes_evga_indtube_table; | 177 | extern struct ir_scancode_table ir_codes_evga_indtube_table; |
| 177 | extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table; | 178 | extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table; |
| 178 | extern struct ir_scancode_table ir_codes_videomate_s350_table; | 179 | extern struct ir_scancode_table ir_codes_videomate_s350_table; |
