forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/pci/cx88/cx88-cards.c
....@@ -1,18 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * device driver for Conexant 2388x based TV cards
34 * card-specific stuff.
45 *
56 * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
167 */
178
189 #include "cx88.h"
....@@ -1790,6 +1781,41 @@
17901781 },
17911782 .mpeg = CX88_MPEG_DVB,
17921783 },
1784
+ [CX88_BOARD_NOTONLYTV_LV3H] = {
1785
+ .name = "NotOnlyTV LV3H",
1786
+ .tuner_type = TUNER_XC2028,
1787
+ .radio_type = UNSET,
1788
+ .tuner_addr = 0x61,
1789
+ .radio_addr = ADDR_UNSET,
1790
+ /* if gpio1:bit9 is enabled, DVB-T won't work */
1791
+
1792
+ .input = { {
1793
+ .type = CX88_VMUX_TELEVISION,
1794
+ .vmux = 0,
1795
+ .gpio0 = 0x0000,
1796
+ .gpio1 = 0xa141,
1797
+ .gpio2 = 0x0000,
1798
+ }, {
1799
+ .type = CX88_VMUX_COMPOSITE1,
1800
+ .vmux = 1,
1801
+ .gpio0 = 0x0000,
1802
+ .gpio1 = 0xa161,
1803
+ .gpio2 = 0x0000,
1804
+ }, {
1805
+ .type = CX88_VMUX_SVIDEO,
1806
+ .vmux = 2,
1807
+ .gpio0 = 0x0000,
1808
+ .gpio1 = 0xa161,
1809
+ .gpio2 = 0x0000,
1810
+ } },
1811
+ .radio = {
1812
+ .type = CX88_RADIO,
1813
+ .gpio0 = 0x0000,
1814
+ .gpio1 = 0xa141,
1815
+ .gpio2 = 0x0000,
1816
+ },
1817
+ .mpeg = CX88_MPEG_DVB,
1818
+ },
17931819 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
17941820 .name = "DViCO FusionHDTV DVB-T PRO",
17951821 .tuner_type = TUNER_XC2028,
....@@ -2663,6 +2689,7 @@
26632689 .subdevice = 0x6f18,
26642690 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
26652691 }, {
2692
+ /* Also NotOnlyTV LV3H (version 1.11 is silkscreened on the board) */
26662693 .subvendor = 0x14f1,
26672694 .subdevice = 0x8852,
26682695 .card = CX88_BOARD_GENIATECH_X8000_MT,
....@@ -3130,6 +3157,7 @@
31303157 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
31313158 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
31323159 return cx88_dvico_xc2028_callback(core, command, arg);
3160
+ case CX88_BOARD_NOTONLYTV_LV3H:
31333161 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
31343162 case CX88_BOARD_WINFAST_DTV1800H:
31353163 return cx88_xc3028_winfast1800h_callback(core, command, arg);
....@@ -3331,6 +3359,7 @@
33313359 udelay(1000);
33323360 break;
33333361
3362
+ case CX88_BOARD_NOTONLYTV_LV3H:
33343363 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
33353364 case CX88_BOARD_WINFAST_DTV1800H:
33363365 cx88_xc3028_winfast1800h_callback(core, XC2028_TUNER_RESET, 0);
....@@ -3386,6 +3415,11 @@
33863415 * power management for now
33873416 */
33883417 ctl->disable_power_mgmt = 1;
3418
+ break;
3419
+ case CX88_BOARD_NOTONLYTV_LV3H:
3420
+ ctl->demod = XC3028_FE_ZARLINK456;
3421
+ ctl->fname = XC3028L_DEFAULT_FIRMWARE;
3422
+ ctl->read_not_reliable = 1;
33893423 break;
33903424 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
33913425 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
....@@ -3465,7 +3499,7 @@
34653499 cx_clear(MO_GP0_IO, 0x00000040);
34663500 msleep(1000);
34673501 cx_set(MO_GP0_IO, 0x00004040);
3468
- /* FALLTHROUGH */
3502
+ fallthrough;
34693503 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
34703504 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
34713505 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
....@@ -3693,7 +3727,7 @@
36933727 core->height = 240;
36943728 core->field = V4L2_FIELD_INTERLACED;
36953729
3696
- strcpy(core->v4l2_dev.name, core->name);
3730
+ strscpy(core->v4l2_dev.name, core->name, sizeof(core->v4l2_dev.name));
36973731 if (v4l2_device_register(NULL, &core->v4l2_dev)) {
36983732 kfree(core);
36993733 return NULL;