aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlfredo Jesús Delaiti <alfredodelaiti@netscape.net>2011-11-09 13:13:00 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-24 12:51:39 -0500
commit8798875369ca5a1862c96425ab43b67ccbccccd0 (patch)
treeb5aadab6fb7c35a091a2954d36fd71fb3843d27d
parenta824f0f445ad2c86a40b4bf43acba26dfd0a98a9 (diff)
[media] cx23885: add support for Mygica X8507
This patch supports card Mygica X8507 (analog part) This controller is a copy of driver card Mygica X8506 This patch depends on patch cx23885-alsa To do: FM, ISDB-t, remote control, audio for composite1, S-Video and video component. Signed-off-by: Alfredo J. Delaiti <alfredodelaiti@netscape.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c36
-rw-r--r--drivers/media/video/cx23885/cx23885-video.c3
-rw-r--r--drivers/media/video/cx23885/cx23885.h1
3 files changed, 39 insertions, 1 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index c3cf08945e4c..ac03c26d7a63 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -438,6 +438,36 @@ struct cx23885_board cx23885_boards[] = {
438 .gpio0 = 0, 438 .gpio0 = 0,
439 } }, 439 } },
440 }, 440 },
441 [CX23885_BOARD_MYGICA_X8507] = {
442 .name = "Mygica X8507",
443 .tuner_type = TUNER_XC5000,
444 .tuner_addr = 0x61,
445 .tuner_bus = 1,
446 .porta = CX23885_ANALOG_VIDEO,
447 .input = {
448 {
449 .type = CX23885_VMUX_TELEVISION,
450 .vmux = CX25840_COMPOSITE2,
451 .amux = CX25840_AUDIO8,
452 },
453 {
454 .type = CX23885_VMUX_COMPOSITE1,
455 .vmux = CX25840_COMPOSITE8,
456 },
457 {
458 .type = CX23885_VMUX_SVIDEO,
459 .vmux = CX25840_SVIDEO_LUMA3 |
460 CX25840_SVIDEO_CHROMA4,
461 },
462 {
463 .type = CX23885_VMUX_COMPONENT,
464 .vmux = CX25840_COMPONENT_ON |
465 CX25840_VIN1_CH1 |
466 CX25840_VIN6_CH2 |
467 CX25840_VIN7_CH3,
468 },
469 },
470 }
441}; 471};
442const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); 472const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
443 473
@@ -637,6 +667,10 @@ struct cx23885_subid cx23885_subids[] = {
637 .subvendor = 0x1b55, 667 .subvendor = 0x1b55,
638 .subdevice = 0xe2e4, 668 .subdevice = 0xe2e4,
639 .card = CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF, 669 .card = CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF,
670 }, {
671 .subvendor = 0x14f1,
672 .subdevice = 0x8502,
673 .card = CX23885_BOARD_MYGICA_X8507,
640 }, 674 },
641}; 675};
642const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); 676const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -1068,6 +1102,7 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
1068 break; 1102 break;
1069 case CX23885_BOARD_MYGICA_X8506: 1103 case CX23885_BOARD_MYGICA_X8506:
1070 case CX23885_BOARD_MAGICPRO_PROHDTVE2: 1104 case CX23885_BOARD_MAGICPRO_PROHDTVE2:
1105 case CX23885_BOARD_MYGICA_X8507:
1071 /* GPIO-0 (0)Analog / (1)Digital TV */ 1106 /* GPIO-0 (0)Analog / (1)Digital TV */
1072 /* GPIO-1 reset XC5000 */ 1107 /* GPIO-1 reset XC5000 */
1073 /* GPIO-2 reset LGS8GL5 / LGS8G75 */ 1108 /* GPIO-2 reset LGS8GL5 / LGS8G75 */
@@ -1468,6 +1503,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
1468 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID: 1503 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID:
1469 case CX23885_BOARD_HAUPPAUGE_HVR1500: 1504 case CX23885_BOARD_HAUPPAUGE_HVR1500:
1470 case CX23885_BOARD_MPX885: 1505 case CX23885_BOARD_MPX885:
1506 case CX23885_BOARD_MYGICA_X8507:
1471 dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, 1507 dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
1472 &dev->i2c_bus[2].i2c_adap, 1508 &dev->i2c_bus[2].i2c_adap,
1473 "cx25840", 0x88 >> 1, NULL); 1509 "cx25840", 0x88 >> 1, NULL);
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c
index e730b9263016..7415524e8777 100644
--- a/drivers/media/video/cx23885/cx23885-video.c
+++ b/drivers/media/video/cx23885/cx23885-video.c
@@ -492,7 +492,8 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
492 dev->input = input; 492 dev->input = input;
493 493
494 if (dev->board == CX23885_BOARD_MYGICA_X8506 || 494 if (dev->board == CX23885_BOARD_MYGICA_X8506 ||
495 dev->board == CX23885_BOARD_MAGICPRO_PROHDTVE2) { 495 dev->board == CX23885_BOARD_MAGICPRO_PROHDTVE2 ||
496 dev->board == CX23885_BOARD_MYGICA_X8507) {
496 /* Select Analog TV */ 497 /* Select Analog TV */
497 if (INPUT(input)->type == CX23885_VMUX_TELEVISION) 498 if (INPUT(input)->type == CX23885_VMUX_TELEVISION)
498 cx23885_gpio_clear(dev, GPIO_0); 499 cx23885_gpio_clear(dev, GPIO_0);
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h
index b49036fe3ffd..519f40d2af5d 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -87,6 +87,7 @@
87#define CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF 30 87#define CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF 30
88#define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000 31 88#define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000 31
89#define CX23885_BOARD_MPX885 32 89#define CX23885_BOARD_MPX885 32
90#define CX23885_BOARD_MYGICA_X8507 33
90 91
91#define GPIO_0 0x00000001 92#define GPIO_0 0x00000001
92#define GPIO_1 0x00000002 93#define GPIO_1 0x00000002