media: cx23885: Add support for new Hauppauge QuadHD (885)
authorBrad Love <brad@nextdimension.cc>
Sat, 6 Jan 2018 00:48:22 +0000 (19:48 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Mar 2018 11:04:36 +0000 (06:04 -0500)
Add new QuadHD digital only PCIe boards to driver list.
Differentiate them from 888 digital/analog QuadHD models.

Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/cx23885/cx23885-cards.c
drivers/media/pci/cx23885/cx23885-core.c
drivers/media/pci/cx23885/cx23885-dvb.c
drivers/media/pci/cx23885/cx23885.h

index 5208d6d0669e14f06b81385025f0782acd18000c..831b066cdfe1c2b49f6c66c1ee32730077536ea6 100644 (file)
@@ -771,11 +771,21 @@ struct cx23885_board cx23885_boards[] = {
                .portb        = CX23885_MPEG_DVB,
                .portc        = CX23885_MPEG_DVB,
        },
+       [CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885] = {
+               .name       = "Hauppauge WinTV-QuadHD-DVB(885)",
+               .portb        = CX23885_MPEG_DVB,
+               .portc        = CX23885_MPEG_DVB,
+       },
        [CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC] = {
                .name        = "Hauppauge WinTV-QuadHD-ATSC",
                .portb        = CX23885_MPEG_DVB,
                .portc        = CX23885_MPEG_DVB,
        },
+       [CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885] = {
+               .name       = "Hauppauge WinTV-QuadHD-ATSC(885)",
+               .portb        = CX23885_MPEG_DVB,
+               .portc        = CX23885_MPEG_DVB,
+       },
        [CX23885_BOARD_HAUPPAUGE_HVR1265_K4] = {
                .name           = "Hauppauge WinTV-HVR-1265(161111)",
                .portc          = CX23885_MPEG_DVB,
@@ -1311,25 +1321,25 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)
        case 161111:
                /* WinTV-HVR-1265 K4 (PCIe, Analog/ATSC/QAM-B) */
                break;
-       case 166100:
+       case 166100: /* 888 version, hybrid */
+       case 166200: /* 885 version, DVB only */
                /* WinTV-QuadHD (DVB) Tuner Pair 1 (PCIe, IR, half height,
                   DVB-T/T2/C, DVB-T/T2/C */
                break;
-       case 166101:
+       case 166101: /* 888 version, hybrid */
+       case 166201: /* 885 version, DVB only */
                /* WinTV-QuadHD (DVB) Tuner Pair 2 (PCIe, IR, half height,
                   DVB-T/T2/C, DVB-T/T2/C */
                break;
-       case 165100:
-               /*
-                * WinTV-QuadHD (ATSC) Tuner Pair 1 (PCIe, IR, half height,
-                * ATSC, ATSC
-                */
+       case 165100: /* 888 version, hybrid */
+       case 165200: /* 885 version, digital only */
+               /* WinTV-QuadHD (ATSC) Tuner Pair 1 (PCIe, IR, half height,
+                * ATSC/QAM-B, ATSC/QAM-B */
                break;
-       case 165101:
-               /*
-                * WinTV-QuadHD (DVB) Tuner Pair 2 (PCIe, IR, half height,
-                * ATSC, ATSC
-                */
+       case 165101: /* 888 version, hybrid */
+       case 165201: /* 885 version, digital only */
+               /* WinTV-QuadHD (ATSC) Tuner Pair 2 (PCIe, IR, half height,
+                * ATSC/QAM-B, ATSC/QAM-B */
                break;
        default:
                pr_warn("%s: warning: unknown hauppauge model #%d\n",
@@ -1835,6 +1845,8 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
                 */
                break;
        case CX23885_BOARD_HAUPPAUGE_HVR1265_K4:
+       case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885:
+       case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885:
                /*
                 * GPIO-08 TER1_RESN
                 * GPIO-09 TER2_RESN
@@ -2094,7 +2106,9 @@ void cx23885_card_setup(struct cx23885_dev *dev)
        case CX23885_BOARD_HAUPPAUGE_HVR1265_K4:
        case CX23885_BOARD_HAUPPAUGE_STARBURST2:
        case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
+       case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885:
        case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC:
+       case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885:
                if (dev->i2c_bus[0].i2c_rc == 0)
                        hauppauge_eeprom(dev, eeprom+0xc0);
                break;
@@ -2243,7 +2257,9 @@ void cx23885_card_setup(struct cx23885_dev *dev)
                break;
        case CX23885_BOARD_HAUPPAUGE_HVR1265_K4:
        case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
+       case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885:
        case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC:
+       case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885:
                ts1->gen_ctrl_val  = 0xc; /* Serial bus + punctured clock */
                ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
                ts1->src_sel_val   = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
@@ -2301,6 +2317,8 @@ void cx23885_card_setup(struct cx23885_dev *dev)
        case CX23885_BOARD_HAUPPAUGE_HVR1255:
        case CX23885_BOARD_HAUPPAUGE_HVR1255_22111:
        case CX23885_BOARD_HAUPPAUGE_HVR1265_K4:
+       case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
+       case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC:
        case CX23885_BOARD_HAUPPAUGE_HVR1270:
        case CX23885_BOARD_HAUPPAUGE_HVR1850:
        case CX23885_BOARD_MYGICA_X8506:
index 8f63df1cb418767e1a6627872cb461d477de404f..8afddd6795aa6e0f938f6c35f07bc983b39169a3 100644 (file)
@@ -869,6 +869,14 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
                cx23885_card_list(dev);
        }
 
+       if (dev->pci->device == 0x8852) {
+               /* no DIF on cx23885, so no analog tuner support possible */
+               if (dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC)
+                       dev->board = CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885;
+               else if (dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_DVB)
+                       dev->board = CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885;
+       }
+
        /* If the user specific a clk freq override, apply it */
        if (cx23885_boards[dev->board].clk_freq > 0)
                dev->clk_freq = cx23885_boards[dev->board].clk_freq;
index f2b204ae08e546c79d1a89f01f4e00a5a067833c..7bb1febb1cb20088723a5360a9fec27dbb2d04bc 100644 (file)
@@ -2333,6 +2333,9 @@ static int dvb_register(struct cx23885_tsport *port)
                }
                break;
        case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
+       case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885:
+               pr_info("%s(): board=%d port=%d\n", __func__,
+                       dev->board, port->nr);
                switch (port->nr) {
                /* port b - Terrestrial/cable */
                case 1:
@@ -2430,6 +2433,9 @@ static int dvb_register(struct cx23885_tsport *port)
                }
                break;
        case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC:
+       case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885:
+               pr_info("%s(): board=%d port=%d\n", __func__,
+                       dev->board, port->nr);
                switch (port->nr) {
                /* port b - Terrestrial/cable */
                case 1:
index 197fe64da46b11d603a7952b5e8d5366fd63da49..d54c7ee1ab218f003178b37240a80ba1ee74e277 100644 (file)
 #define CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC    57
 #define CX23885_BOARD_HAUPPAUGE_HVR1265_K4     58
 #define CX23885_BOARD_HAUPPAUGE_STARBURST2     59
+#define CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885 60
+#define CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885 61
 
 #define GPIO_0 0x00000001
 #define GPIO_1 0x00000002