[media] cx23885: Initial support for the MPX-885 mini-card
authorSteven Toth <stoth@kernellabs.com>
Mon, 10 Oct 2011 14:09:55 +0000 (11:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 14 Oct 2011 20:19:27 +0000 (17:19 -0300)
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx23885/cx23885-cards.c
drivers/media/video/cx23885/cx23885-video.c
drivers/media/video/cx23885/cx23885.h

index 969a9a336ac8e8efe160e7630e95c9bc211471a2..c3cf08945e4cf853f2acb959b64ab7eaac8291f7 100644 (file)
@@ -413,6 +413,31 @@ struct cx23885_board cx23885_boards[] = {
                                .vmux   = CX25840_COMPOSITE1,
                } },
        },
+       [CX23885_BOARD_MPX885] = {
+               .name           = "MPX-885",
+               .porta          = CX23885_ANALOG_VIDEO,
+               .input          = {{
+                       .type   = CX23885_VMUX_COMPOSITE1,
+                       .vmux   = CX25840_COMPOSITE1,
+                       .amux   = CX25840_AUDIO6,
+                       .gpio0  = 0,
+               }, {
+                       .type   = CX23885_VMUX_COMPOSITE2,
+                       .vmux   = CX25840_COMPOSITE2,
+                       .amux   = CX25840_AUDIO6,
+                       .gpio0  = 0,
+               }, {
+                       .type   = CX23885_VMUX_COMPOSITE3,
+                       .vmux   = CX25840_COMPOSITE3,
+                       .amux   = CX25840_AUDIO7,
+                       .gpio0  = 0,
+               }, {
+                       .type   = CX23885_VMUX_COMPOSITE4,
+                       .vmux   = CX25840_COMPOSITE4,
+                       .amux   = CX25840_AUDIO7,
+                       .gpio0  = 0,
+               } },
+       },
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 
@@ -1442,6 +1467,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
        case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200:
        case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID:
        case CX23885_BOARD_HAUPPAUGE_HVR1500:
+       case CX23885_BOARD_MPX885:
                dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
                                &dev->i2c_bus[2].i2c_adap,
                                "cx25840", 0x88 >> 1, NULL);
index adc8f78d4c58bde9621d8dd9b90667d8afbb0dc7..f13c40e653c19b0d1a00987543808d4a874d03c4 100644 (file)
@@ -502,7 +502,8 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
        v4l2_subdev_call(dev->sd_cx25840, video, s_routing,
                        INPUT(input)->vmux, 0, 0);
 
-       if (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1800) {
+       if ((dev->board == CX23885_BOARD_HAUPPAUGE_HVR1800) ||
+               (dev->board == CX23885_BOARD_MPX885)) {
                /* Configure audio routing */
                v4l2_subdev_call(dev->sd_cx25840, audio, s_routing,
                        INPUT(input)->amux, 0, 0);
index 2978e97ee039fc9c201070af39dc90a2dda5e55d..b205e3263b46d7a98131b726dd40734ad2868e89 100644 (file)
@@ -86,6 +86,7 @@
 #define CX23885_BOARD_GOTVIEW_X5_3D_HYBRID     29
 #define CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF 30
 #define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000 31
+#define CX23885_BOARD_MPX885                   32
 
 #define GPIO_0 0x00000001
 #define GPIO_1 0x00000002