diff options
-rw-r--r-- | drivers/media/IR/keymaps/Makefile | 1 | ||||
-rw-r--r-- | drivers/media/IR/keymaps/rc-twinhan1027.c | 87 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 23 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 61 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 6 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 1 | ||||
-rw-r--r-- | include/media/rc-map.h | 1 |
7 files changed, 171 insertions, 9 deletions
diff --git a/drivers/media/IR/keymaps/Makefile b/drivers/media/IR/keymaps/Makefile index 11688dd740ca..6083453f4715 100644 --- a/drivers/media/IR/keymaps/Makefile +++ b/drivers/media/IR/keymaps/Makefile | |||
@@ -77,6 +77,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ | |||
77 | rc-total-media-in-hand.o \ | 77 | rc-total-media-in-hand.o \ |
78 | rc-trekstor.o \ | 78 | rc-trekstor.o \ |
79 | rc-tt-1500.o \ | 79 | rc-tt-1500.o \ |
80 | rc-twinhan1027.o \ | ||
80 | rc-videomate-s350.o \ | 81 | rc-videomate-s350.o \ |
81 | rc-videomate-tv-pvr.o \ | 82 | rc-videomate-tv-pvr.o \ |
82 | rc-winfast.o \ | 83 | rc-winfast.o \ |
diff --git a/drivers/media/IR/keymaps/rc-twinhan1027.c b/drivers/media/IR/keymaps/rc-twinhan1027.c new file mode 100644 index 000000000000..0b5d356c2d84 --- /dev/null +++ b/drivers/media/IR/keymaps/rc-twinhan1027.c | |||
@@ -0,0 +1,87 @@ | |||
1 | #include <media/rc-map.h> | ||
2 | |||
3 | static struct ir_scancode twinhan_vp1027[] = { | ||
4 | { 0x16, KEY_POWER2 }, | ||
5 | { 0x17, KEY_FAVORITES }, | ||
6 | { 0x0f, KEY_TEXT }, | ||
7 | { 0x48, KEY_INFO}, | ||
8 | { 0x1c, KEY_EPG }, | ||
9 | { 0x04, KEY_LIST }, | ||
10 | |||
11 | { 0x03, KEY_1 }, | ||
12 | { 0x01, KEY_2 }, | ||
13 | { 0x06, KEY_3 }, | ||
14 | { 0x09, KEY_4 }, | ||
15 | { 0x1d, KEY_5 }, | ||
16 | { 0x1f, KEY_6 }, | ||
17 | { 0x0d, KEY_7 }, | ||
18 | { 0x19, KEY_8 }, | ||
19 | { 0x1b, KEY_9 }, | ||
20 | { 0x15, KEY_0 }, | ||
21 | |||
22 | { 0x0c, KEY_CANCEL }, | ||
23 | { 0x4a, KEY_CLEAR }, | ||
24 | { 0x13, KEY_BACKSPACE }, | ||
25 | { 0x00, KEY_TAB }, | ||
26 | |||
27 | { 0x4b, KEY_UP }, | ||
28 | { 0x51, KEY_DOWN }, | ||
29 | { 0x4e, KEY_LEFT }, | ||
30 | { 0x52, KEY_RIGHT }, | ||
31 | { 0x4f, KEY_ENTER }, | ||
32 | |||
33 | { 0x1e, KEY_VOLUMEUP }, | ||
34 | { 0x0a, KEY_VOLUMEDOWN }, | ||
35 | { 0x02, KEY_CHANNELDOWN }, | ||
36 | { 0x05, KEY_CHANNELUP }, | ||
37 | { 0x11, KEY_RECORD }, | ||
38 | |||
39 | { 0x14, KEY_PLAY }, | ||
40 | { 0x4c, KEY_PAUSE }, | ||
41 | { 0x1a, KEY_STOP }, | ||
42 | { 0x40, KEY_REWIND }, | ||
43 | { 0x12, KEY_FASTFORWARD }, | ||
44 | { 0x41, KEY_PREVIOUSSONG }, | ||
45 | { 0x42, KEY_NEXTSONG }, | ||
46 | { 0x54, KEY_SAVE }, | ||
47 | { 0x50, KEY_LANGUAGE }, | ||
48 | { 0x47, KEY_MEDIA }, | ||
49 | { 0x4d, KEY_SCREEN }, | ||
50 | { 0x43, KEY_SUBTITLE }, | ||
51 | { 0x10, KEY_MUTE }, | ||
52 | { 0x49, KEY_AUDIO }, | ||
53 | { 0x07, KEY_SLEEP }, | ||
54 | { 0x08, KEY_VIDEO }, | ||
55 | { 0x0e, KEY_AGAIN }, | ||
56 | { 0x45, KEY_EQUAL }, | ||
57 | { 0x46, KEY_MINUS }, | ||
58 | { 0x18, KEY_RED }, | ||
59 | { 0x53, KEY_GREEN }, | ||
60 | { 0x5e, KEY_YELLOW }, | ||
61 | { 0x5f, KEY_BLUE }, | ||
62 | }; | ||
63 | |||
64 | static struct rc_keymap twinhan_vp1027_map = { | ||
65 | .map = { | ||
66 | .scan = twinhan_vp1027, | ||
67 | .size = ARRAY_SIZE(twinhan_vp1027), | ||
68 | .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */ | ||
69 | .name = RC_MAP_TWINHAN_VP1027_DVBS, | ||
70 | } | ||
71 | }; | ||
72 | |||
73 | static int __init init_rc_map_twinhan_vp1027(void) | ||
74 | { | ||
75 | return ir_register_map(&twinhan_vp1027_map); | ||
76 | } | ||
77 | |||
78 | static void __exit exit_rc_map_twinhan_vp1027(void) | ||
79 | { | ||
80 | ir_unregister_map(&twinhan_vp1027_map); | ||
81 | } | ||
82 | |||
83 | module_init(init_rc_map_twinhan_vp1027) | ||
84 | module_exit(exit_rc_map_twinhan_vp1027) | ||
85 | |||
86 | MODULE_LICENSE("GPL"); | ||
87 | MODULE_AUTHOR("Sergey Ivanov <123kash@gmail.com>"); | ||
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index 97672cb49b51..f220fa2e10d8 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -2104,6 +2104,18 @@ static const struct cx88_board cx88_boards[] = { | |||
2104 | } }, | 2104 | } }, |
2105 | .mpeg = CX88_MPEG_DVB, | 2105 | .mpeg = CX88_MPEG_DVB, |
2106 | }, | 2106 | }, |
2107 | [CX88_BOARD_TWINHAN_VP1027_DVBS] = { | ||
2108 | .name = "Twinhan VP-1027 DVB-S", | ||
2109 | .tuner_type = TUNER_ABSENT, | ||
2110 | .radio_type = UNSET, | ||
2111 | .tuner_addr = ADDR_UNSET, | ||
2112 | .radio_addr = ADDR_UNSET, | ||
2113 | .input = {{ | ||
2114 | .type = CX88_VMUX_DVB, | ||
2115 | .vmux = 0, | ||
2116 | } }, | ||
2117 | .mpeg = CX88_MPEG_DVB, | ||
2118 | }, | ||
2107 | }; | 2119 | }; |
2108 | 2120 | ||
2109 | /* ------------------------------------------------------------------ */ | 2121 | /* ------------------------------------------------------------------ */ |
@@ -2576,6 +2588,10 @@ static const struct cx88_subid cx88_subids[] = { | |||
2576 | .subvendor = 0xb034, | 2588 | .subvendor = 0xb034, |
2577 | .subdevice = 0x3034, | 2589 | .subdevice = 0x3034, |
2578 | .card = CX88_BOARD_PROF_7301, | 2590 | .card = CX88_BOARD_PROF_7301, |
2591 | }, { | ||
2592 | .subvendor = 0x1822, | ||
2593 | .subdevice = 0x0023, | ||
2594 | .card = CX88_BOARD_TWINHAN_VP1027_DVBS, | ||
2579 | }, | 2595 | }, |
2580 | }; | 2596 | }; |
2581 | 2597 | ||
@@ -3070,6 +3086,13 @@ static void cx88_card_setup_pre_i2c(struct cx88_core *core) | |||
3070 | cx_set(MO_GP1_IO, 0x10); | 3086 | cx_set(MO_GP1_IO, 0x10); |
3071 | mdelay(50); | 3087 | mdelay(50); |
3072 | break; | 3088 | break; |
3089 | |||
3090 | case CX88_BOARD_TWINHAN_VP1027_DVBS: | ||
3091 | cx_write(MO_GP0_IO, 0x00003230); | ||
3092 | cx_write(MO_GP0_IO, 0x00003210); | ||
3093 | msleep(1); | ||
3094 | cx_write(MO_GP0_IO, 0x00001230); | ||
3095 | break; | ||
3073 | } | 3096 | } |
3074 | } | 3097 | } |
3075 | 3098 | ||
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index a037e925ceb9..367a653f4c95 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include "stv0900.h" | 56 | #include "stv0900.h" |
57 | #include "stb6100.h" | 57 | #include "stb6100.h" |
58 | #include "stb6100_proc.h" | 58 | #include "stb6100_proc.h" |
59 | #include "mb86a16.h" | ||
59 | 60 | ||
60 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); | 61 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); |
61 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); | 62 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); |
@@ -250,6 +251,10 @@ static const struct zl10353_config cx88_terratec_cinergy_ht_pci_mkii_config = { | |||
250 | .if2 = 45600, | 251 | .if2 = 45600, |
251 | }; | 252 | }; |
252 | 253 | ||
254 | static struct mb86a16_config twinhan_vp1027 = { | ||
255 | .demod_address = 0x08, | ||
256 | }; | ||
257 | |||
253 | #if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE)) | 258 | #if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE)) |
254 | static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe) | 259 | static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe) |
255 | { | 260 | { |
@@ -429,15 +434,41 @@ static int tevii_dvbs_set_voltage(struct dvb_frontend *fe, | |||
429 | 434 | ||
430 | cx_set(MO_GP0_IO, 0x6040); | 435 | cx_set(MO_GP0_IO, 0x6040); |
431 | switch (voltage) { | 436 | switch (voltage) { |
432 | case SEC_VOLTAGE_13: | 437 | case SEC_VOLTAGE_13: |
433 | cx_clear(MO_GP0_IO, 0x20); | 438 | cx_clear(MO_GP0_IO, 0x20); |
434 | break; | 439 | break; |
435 | case SEC_VOLTAGE_18: | 440 | case SEC_VOLTAGE_18: |
436 | cx_set(MO_GP0_IO, 0x20); | 441 | cx_set(MO_GP0_IO, 0x20); |
437 | break; | 442 | break; |
438 | case SEC_VOLTAGE_OFF: | 443 | case SEC_VOLTAGE_OFF: |
439 | cx_clear(MO_GP0_IO, 0x20); | 444 | cx_clear(MO_GP0_IO, 0x20); |
440 | break; | 445 | break; |
446 | } | ||
447 | |||
448 | if (core->prev_set_voltage) | ||
449 | return core->prev_set_voltage(fe, voltage); | ||
450 | return 0; | ||
451 | } | ||
452 | |||
453 | static int vp1027_set_voltage(struct dvb_frontend *fe, | ||
454 | fe_sec_voltage_t voltage) | ||
455 | { | ||
456 | struct cx8802_dev *dev = fe->dvb->priv; | ||
457 | struct cx88_core *core = dev->core; | ||
458 | |||
459 | switch (voltage) { | ||
460 | case SEC_VOLTAGE_13: | ||
461 | dprintk(1, "LNB SEC Voltage=13\n"); | ||
462 | cx_write(MO_GP0_IO, 0x00001220); | ||
463 | break; | ||
464 | case SEC_VOLTAGE_18: | ||
465 | dprintk(1, "LNB SEC Voltage=18\n"); | ||
466 | cx_write(MO_GP0_IO, 0x00001222); | ||
467 | break; | ||
468 | case SEC_VOLTAGE_OFF: | ||
469 | dprintk(1, "LNB Voltage OFF\n"); | ||
470 | cx_write(MO_GP0_IO, 0x00001230); | ||
471 | break; | ||
441 | } | 472 | } |
442 | 473 | ||
443 | if (core->prev_set_voltage) | 474 | if (core->prev_set_voltage) |
@@ -1416,6 +1447,18 @@ static int dvb_register(struct cx8802_dev *dev) | |||
1416 | } | 1447 | } |
1417 | 1448 | ||
1418 | break; | 1449 | break; |
1450 | case CX88_BOARD_TWINHAN_VP1027_DVBS: | ||
1451 | dev->ts_gen_cntrl = 0x00; | ||
1452 | fe0->dvb.frontend = dvb_attach(mb86a16_attach, | ||
1453 | &twinhan_vp1027, | ||
1454 | &core->i2c_adap); | ||
1455 | if (fe0->dvb.frontend) { | ||
1456 | core->prev_set_voltage = | ||
1457 | fe0->dvb.frontend->ops.set_voltage; | ||
1458 | fe0->dvb.frontend->ops.set_voltage = | ||
1459 | vp1027_set_voltage; | ||
1460 | } | ||
1461 | break; | ||
1419 | 1462 | ||
1420 | default: | 1463 | default: |
1421 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", | 1464 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", |
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index d52ce0e3bec9..fc777bc6e716 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -405,6 +405,11 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
405 | ir->mask_keycode = 0x7e; | 405 | ir->mask_keycode = 0x7e; |
406 | ir->polling = 100; /* ms */ | 406 | ir->polling = 100; /* ms */ |
407 | break; | 407 | break; |
408 | case CX88_BOARD_TWINHAN_VP1027_DVBS: | ||
409 | ir_codes = RC_MAP_TWINHAN_VP1027_DVBS; | ||
410 | ir_type = IR_TYPE_NEC; | ||
411 | ir->sampling = 0xff00; /* address */ | ||
412 | break; | ||
408 | } | 413 | } |
409 | 414 | ||
410 | if (NULL == ir_codes) { | 415 | if (NULL == ir_codes) { |
@@ -530,6 +535,7 @@ void cx88_ir_irq(struct cx88_core *core) | |||
530 | case CX88_BOARD_PROF_7300: | 535 | case CX88_BOARD_PROF_7300: |
531 | case CX88_BOARD_PROF_7301: | 536 | case CX88_BOARD_PROF_7301: |
532 | case CX88_BOARD_PROF_6200: | 537 | case CX88_BOARD_PROF_6200: |
538 | case CX88_BOARD_TWINHAN_VP1027_DVBS: | ||
533 | ircode = ir_decode_pulsedistance(ir->samples, ir->scount, 1, 4); | 539 | ircode = ir_decode_pulsedistance(ir->samples, ir->scount, 1, 4); |
534 | 540 | ||
535 | if (ircode == 0xffffffff) { /* decoding error */ | 541 | if (ircode == 0xffffffff) { /* decoding error */ |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index 127118f4b650..c9981e77416a 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -239,6 +239,7 @@ extern const struct sram_channel const cx88_sram_channels[]; | |||
239 | #define CX88_BOARD_WINFAST_DTV2000H_J 82 | 239 | #define CX88_BOARD_WINFAST_DTV2000H_J 82 |
240 | #define CX88_BOARD_PROF_7301 83 | 240 | #define CX88_BOARD_PROF_7301 83 |
241 | #define CX88_BOARD_SAMSUNG_SMT_7020 84 | 241 | #define CX88_BOARD_SAMSUNG_SMT_7020 84 |
242 | #define CX88_BOARD_TWINHAN_VP1027_DVBS 85 | ||
242 | 243 | ||
243 | enum cx88_itype { | 244 | enum cx88_itype { |
244 | CX88_VMUX_COMPOSITE1 = 1, | 245 | CX88_VMUX_COMPOSITE1 = 1, |
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index d1bff027297e..74a00a93dcf1 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -134,6 +134,7 @@ void rc_map_init(void); | |||
134 | #define RC_MAP_TOTAL_MEDIA_IN_HAND "rc-total-media-in-hand" | 134 | #define RC_MAP_TOTAL_MEDIA_IN_HAND "rc-total-media-in-hand" |
135 | #define RC_MAP_TREKSTOR "rc-trekstor" | 135 | #define RC_MAP_TREKSTOR "rc-trekstor" |
136 | #define RC_MAP_TT_1500 "rc-tt-1500" | 136 | #define RC_MAP_TT_1500 "rc-tt-1500" |
137 | #define RC_MAP_TWINHAN_VP1027_DVBS "rc-twinhan1027" | ||
137 | #define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350" | 138 | #define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350" |
138 | #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" | 139 | #define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr" |
139 | #define RC_MAP_WINFAST "rc-winfast" | 140 | #define RC_MAP_WINFAST "rc-winfast" |