]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: cx23885: Add support for AVerMedia CE310B
authorForest Crossman <cyrozap@gmail.com>
Sat, 16 Nov 2019 22:38:40 +0000 (23:38 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 13 Dec 2019 08:19:08 +0000 (09:19 +0100)
The AVerMedia CE310B is a simple composite + S-Video + stereo audio
capture card, and uses only the CX23888 to perform all of these
functions.

I've tested both video inputs and the audio interface and confirmed that
they're all working. However, there are some issues:

* Sometimes when I switch inputs the video signal turns black and can't
  be recovered until the system is rebooted. I haven't been able to
  determine the cause of this behavior, nor have I found a solution to
  fix it or any workarounds other than rebooting.
* The card sometimes seems to have trouble syncing to the video signal,
  and some of the VBI data appears as noise at the top of the frame, but
  I assume that to be a result of my very noisy RF environment and the
  card's unshielded input traces rather than a configuration issue.

Signed-off-by: Forest Crossman <cyrozap@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/pci/cx23885/cx23885-cards.c
drivers/media/pci/cx23885/cx23885-video.c
drivers/media/pci/cx23885/cx23885.h

index 8644205d3cd3381e6ad39f9f0ae45fff3000c113..8e5a2c580821ea51d0769e716581ae5e5ae0b517 100644 (file)
@@ -801,6 +801,25 @@ struct cx23885_board cx23885_boards[] = {
                .name           = "Hauppauge WinTV-Starburst2",
                .portb          = CX23885_MPEG_DVB,
        },
+       [CX23885_BOARD_AVERMEDIA_CE310B] = {
+               .name           = "AVerMedia CE310B",
+               .porta          = CX23885_ANALOG_VIDEO,
+               .force_bff      = 1,
+               .input          = {{
+                       .type   = CX23885_VMUX_COMPOSITE1,
+                       .vmux   = CX25840_VIN1_CH1 |
+                                 CX25840_NONE_CH2 |
+                                 CX25840_NONE0_CH3,
+                       .amux   = CX25840_AUDIO7,
+               }, {
+                       .type   = CX23885_VMUX_SVIDEO,
+                       .vmux   = CX25840_VIN8_CH1 |
+                                 CX25840_NONE_CH2 |
+                                 CX25840_VIN7_CH3 |
+                                 CX25840_SVIDEO_ON,
+                       .amux   = CX25840_AUDIO7,
+               } },
+       },
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 
@@ -1124,6 +1143,10 @@ struct cx23885_subid cx23885_subids[] = {
                .subvendor = 0x0070,
                .subdevice = 0xf02a,
                .card      = CX23885_BOARD_HAUPPAUGE_STARBURST2,
+       }, {
+               .subvendor = 0x1461,
+               .subdevice = 0x3100,
+               .card      = CX23885_BOARD_AVERMEDIA_CE310B,
        },
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -2348,6 +2371,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
        case CX23885_BOARD_DVBSKY_T982:
        case CX23885_BOARD_VIEWCAST_260E:
        case CX23885_BOARD_VIEWCAST_460E:
+       case CX23885_BOARD_AVERMEDIA_CE310B:
                dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
                                &dev->i2c_bus[2].i2c_adap,
                                "cx25840", 0x88 >> 1, NULL);
index 8098b15493de92756d90e71c27f7d8a43d75c4a6..7fc408ee4934ffd8fecf7284c5199ac85f90b443 100644 (file)
@@ -257,7 +257,8 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
                (dev->board == CX23885_BOARD_MYGICA_X8507) ||
                (dev->board == CX23885_BOARD_AVERMEDIA_HC81R) ||
                (dev->board == CX23885_BOARD_VIEWCAST_260E) ||
-               (dev->board == CX23885_BOARD_VIEWCAST_460E)) {
+               (dev->board == CX23885_BOARD_VIEWCAST_460E) ||
+               (dev->board == CX23885_BOARD_AVERMEDIA_CE310B)) {
                /* Configure audio routing */
                v4l2_subdev_call(dev->sd_cx25840, audio, s_routing,
                        INPUT(input)->amux, 0, 0);
index a95a2e4c6a0d3f6bb94b62fbcf40966c0745441b..c472498e57c4eba40a8bc85113870b8ec22535f4 100644 (file)
 #define CX23885_BOARD_HAUPPAUGE_STARBURST2     59
 #define CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885 60
 #define CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885 61
+#define CX23885_BOARD_AVERMEDIA_CE310B         62
 
 #define GPIO_0 0x00000001
 #define GPIO_1 0x00000002