Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *  Copyright (C) 2007 Mike Isely <isely@pobox.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) This source file should encompass ALL per-device type information for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) driver.  To define a new device, add elements to the pvr2_device_table and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) pvr2_device_desc structures.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include "pvrusb2-devattr.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include <linux/usb.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) /* This is needed in order to pull in tuner type ids... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #include <linux/i2c.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #include <media/tuner.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #include "pvrusb2-hdw-internal.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) #include "lgdt330x.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #include "s5h1409.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #include "s5h1411.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) #include "tda10048.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #include "tda18271.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #include "tda8290.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #include "tuner-simple.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #include "si2157.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #include "lgdt3306a.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) #include "si2168.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) /* Hauppauge PVR-USB2 Model 29xxx */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) static const struct pvr2_device_client_desc pvr2_cli_29xxx[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	{ .module_id = PVR2_CLIENT_ID_SAA7115 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	{ .module_id = PVR2_CLIENT_ID_MSP3400 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	{ .module_id = PVR2_CLIENT_ID_TUNER },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	{ .module_id = PVR2_CLIENT_ID_DEMOD },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) #define PVR2_FIRMWARE_29xxx "v4l-pvrusb2-29xxx-01.fw"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) static const char *pvr2_fw1_names_29xxx[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 		PVR2_FIRMWARE_29xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) static const struct pvr2_device_desc pvr2_device_29xxx = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		.description = "WinTV PVR USB2 Model 29xxx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 		.shortname = "29xxx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 		.client_table.lst = pvr2_cli_29xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_29xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 		.fx2_firmware.lst = pvr2_fw1_names_29xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		.flag_has_hauppauge_rom = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 		.flag_has_analogtuner = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		.flag_has_fmradio = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		.flag_has_composite = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		.flag_has_svideo = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 		.led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 		.ir_scheme = PVR2_IR_SCHEME_29XXX,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) /* Hauppauge PVR-USB2 Model 24xxx */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) static const struct pvr2_device_client_desc pvr2_cli_24xxx[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	{ .module_id = PVR2_CLIENT_ID_CX25840 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	{ .module_id = PVR2_CLIENT_ID_TUNER },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	{ .module_id = PVR2_CLIENT_ID_WM8775 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	{ .module_id = PVR2_CLIENT_ID_DEMOD },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) #define PVR2_FIRMWARE_24xxx "v4l-pvrusb2-24xxx-01.fw"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) static const char *pvr2_fw1_names_24xxx[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		PVR2_FIRMWARE_24xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) static const struct pvr2_device_desc pvr2_device_24xxx = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		.description = "WinTV PVR USB2 Model 24xxx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 		.shortname = "24xxx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 		.client_table.lst = pvr2_cli_24xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_24xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 		.fx2_firmware.lst = pvr2_fw1_names_24xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 		.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 		.flag_has_cx25840 = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		.flag_has_wm8775 = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 		.flag_has_hauppauge_rom = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 		.flag_has_analogtuner = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		.flag_has_fmradio = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 		.flag_has_composite = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 		.flag_has_svideo = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 		.led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 		.ir_scheme = PVR2_IR_SCHEME_24XXX,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) /* GOTVIEW USB2.0 DVD2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) static const struct pvr2_device_client_desc pvr2_cli_gotview_2[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	{ .module_id = PVR2_CLIENT_ID_CX25840 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	{ .module_id = PVR2_CLIENT_ID_TUNER },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	{ .module_id = PVR2_CLIENT_ID_DEMOD },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) static const struct pvr2_device_desc pvr2_device_gotview_2 = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 		.description = "Gotview USB 2.0 DVD 2",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 		.shortname = "gv2",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 		.client_table.lst = pvr2_cli_gotview_2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_gotview_2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 		.flag_has_cx25840 = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 		.default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		.flag_has_analogtuner = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		.flag_has_fmradio = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 		.flag_has_composite = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 		.flag_has_svideo = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) /* GOTVIEW USB2.0 DVD Deluxe */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) /* (same module list as gotview_2) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) static const struct pvr2_device_desc pvr2_device_gotview_2d = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 		.description = "Gotview USB 2.0 DVD Deluxe",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 		.shortname = "gv2d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		.client_table.lst = pvr2_cli_gotview_2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_gotview_2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 		.flag_has_cx25840 = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		.default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		.flag_has_analogtuner = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 		.flag_has_composite = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 		.flag_has_svideo = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) /* Terratec Grabster AV400 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) static const struct pvr2_device_client_desc pvr2_cli_av400[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	{ .module_id = PVR2_CLIENT_ID_CX25840 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) static const struct pvr2_device_desc pvr2_device_av400 = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 		.description = "Terratec Grabster AV400",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 		.shortname = "av400",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		.flag_is_experimental = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		.client_table.lst = pvr2_cli_av400,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_av400),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 		.flag_has_cx25840 = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 		.flag_has_analogtuner = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		.flag_has_composite = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 		.flag_has_svideo = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_AV400,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) /* OnAir Creator */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) static struct lgdt330x_config pvr2_lgdt3303_config = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	.demod_chip          = LGDT3303,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	.clock_polarity_flip = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) static int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	adap->fe[0] = dvb_attach(lgdt330x_attach, &pvr2_lgdt3303_config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 				 0x0e,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 				 &adap->channel.hdw->i2c_adap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	if (adap->fe[0])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	return -EIO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) static int pvr2_lgh06xf_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	dvb_attach(simple_tuner_attach, adap->fe[0],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		   &adap->channel.hdw->i2c_adap, 0x61,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 		   TUNER_LG_TDVS_H06XF);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) static const struct pvr2_dvb_props pvr2_onair_creator_fe_props = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	.frontend_attach = pvr2_lgdt3303_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	.tuner_attach    = pvr2_lgh06xf_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) static const struct pvr2_device_client_desc pvr2_cli_onair_creator[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	{ .module_id = PVR2_CLIENT_ID_SAA7115 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	{ .module_id = PVR2_CLIENT_ID_CS53L32A },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	{ .module_id = PVR2_CLIENT_ID_TUNER },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) static const struct pvr2_device_desc pvr2_device_onair_creator = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 		.description = "OnAir Creator Hybrid USB tuner",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 		.shortname = "oac",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 		.client_table.lst = pvr2_cli_onair_creator,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_onair_creator),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 		.default_tuner_type = TUNER_LG_TDVS_H06XF,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 		.flag_has_analogtuner = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 		.flag_has_composite = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 		.flag_has_svideo = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 		.flag_digital_requires_cx23416 = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_ONAIR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 		.digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 		.default_std_mask = V4L2_STD_NTSC_M,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 		.dvb_props = &pvr2_onair_creator_fe_props,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) /* OnAir USB 2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) static struct lgdt330x_config pvr2_lgdt3302_config = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 	.demod_chip          = LGDT3302,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) static int pvr2_lgdt3302_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	adap->fe[0] = dvb_attach(lgdt330x_attach, &pvr2_lgdt3302_config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 				 0x0e,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 				 &adap->channel.hdw->i2c_adap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 	if (adap->fe[0])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	return -EIO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) static int pvr2_fcv1236d_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 	dvb_attach(simple_tuner_attach, adap->fe[0],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 		   &adap->channel.hdw->i2c_adap, 0x61,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 		   TUNER_PHILIPS_FCV1236D);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) static const struct pvr2_dvb_props pvr2_onair_usb2_fe_props = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 	.frontend_attach = pvr2_lgdt3302_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 	.tuner_attach    = pvr2_fcv1236d_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) static const struct pvr2_device_client_desc pvr2_cli_onair_usb2[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 	{ .module_id = PVR2_CLIENT_ID_SAA7115 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	{ .module_id = PVR2_CLIENT_ID_CS53L32A },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 	{ .module_id = PVR2_CLIENT_ID_TUNER },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 		.description = "OnAir USB2 Hybrid USB tuner",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 		.shortname = "oa2",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 		.client_table.lst = pvr2_cli_onair_usb2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_onair_usb2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 		.default_tuner_type = TUNER_PHILIPS_FCV1236D,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 		.flag_has_analogtuner = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 		.flag_has_composite = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 		.flag_has_svideo = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 		.flag_digital_requires_cx23416 = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_ONAIR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 		.digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 		.default_std_mask = V4L2_STD_NTSC_M,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 		.dvb_props = &pvr2_onair_usb2_fe_props,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) /* Hauppauge PVR-USB2 Model 73xxx */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) static struct tda10048_config hauppauge_tda10048_config = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 	.demod_address  = 0x10 >> 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 	.output_mode    = TDA10048_PARALLEL_OUTPUT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 	.fwbulkwritelen = TDA10048_BULKWRITE_50,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 	.inversion      = TDA10048_INVERSION_ON,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 	.dtv6_if_freq_khz = TDA10048_IF_3300,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	.dtv7_if_freq_khz = TDA10048_IF_3800,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 	.dtv8_if_freq_khz = TDA10048_IF_4300,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 	.clk_freq_khz   = TDA10048_CLK_16000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 	.disable_gate_access = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) static struct tda829x_config tda829x_no_probe = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 	.probe_tuner = TDA829X_DONT_PROBE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) static struct tda18271_std_map hauppauge_tda18271_dvbt_std_map = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 	.dvbt_6   = { .if_freq = 3300, .agc_mode = 3, .std = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 		      .if_lvl = 1, .rfagc_top = 0x37, },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 	.dvbt_7   = { .if_freq = 3800, .agc_mode = 3, .std = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 		      .if_lvl = 1, .rfagc_top = 0x37, },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 	.dvbt_8   = { .if_freq = 4300, .agc_mode = 3, .std = 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 		      .if_lvl = 1, .rfagc_top = 0x37, },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) static struct tda18271_config hauppauge_tda18271_dvb_config = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 	.std_map = &hauppauge_tda18271_dvbt_std_map,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 	.gate    = TDA18271_GATE_ANALOG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 	.output_opt = TDA18271_OUTPUT_LT_OFF,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) static int pvr2_tda10048_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 	adap->fe[0] = dvb_attach(tda10048_attach, &hauppauge_tda10048_config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 				 &adap->channel.hdw->i2c_adap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 	if (adap->fe[0])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 	return -EIO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) static int pvr2_73xxx_tda18271_8295_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) 	dvb_attach(tda829x_attach, adap->fe[0],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) 		   &adap->channel.hdw->i2c_adap, 0x42,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 		   &tda829x_no_probe);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 	dvb_attach(tda18271_attach, adap->fe[0], 0x60,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 		   &adap->channel.hdw->i2c_adap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 		   &hauppauge_tda18271_dvb_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) static const struct pvr2_dvb_props pvr2_73xxx_dvb_props = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) 	.frontend_attach = pvr2_tda10048_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 	.tuner_attach    = pvr2_73xxx_tda18271_8295_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) static const struct pvr2_device_client_desc pvr2_cli_73xxx[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) 	{ .module_id = PVR2_CLIENT_ID_CX25840 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) 	{ .module_id = PVR2_CLIENT_ID_TUNER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) 	  .i2c_address_list = "\x42"},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) #define PVR2_FIRMWARE_73xxx "v4l-pvrusb2-73xxx-01.fw"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) static const char *pvr2_fw1_names_73xxx[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 		PVR2_FIRMWARE_73xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) static const struct pvr2_device_desc pvr2_device_73xxx = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) 		.description = "WinTV HVR-1900 Model 73xxx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) 		.shortname = "73xxx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 		.client_table.lst = pvr2_cli_73xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) 		.fx2_firmware.lst = pvr2_fw1_names_73xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 		.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) 		.flag_has_cx25840 = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) 		.flag_has_hauppauge_rom = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) 		.flag_has_analogtuner = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) 		.flag_has_composite = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) 		.flag_has_svideo = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 		.flag_fx2_16kb = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 		.digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) 		.led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) 		.ir_scheme = PVR2_IR_SCHEME_ZILOG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) 		.dvb_props = &pvr2_73xxx_dvb_props,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) /* Hauppauge PVR-USB2 Model 75xxx */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) static struct s5h1409_config pvr2_s5h1409_config = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) 	.demod_address = 0x32 >> 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) 	.output_mode   = S5H1409_PARALLEL_OUTPUT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) 	.gpio          = S5H1409_GPIO_OFF,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) 	.qam_if        = 4000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) 	.inversion     = S5H1409_INVERSION_ON,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) 	.status_mode   = S5H1409_DEMODLOCKING,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) static struct s5h1411_config pvr2_s5h1411_config = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) 	.output_mode   = S5H1411_PARALLEL_OUTPUT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) 	.gpio          = S5H1411_GPIO_OFF,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) 	.vsb_if        = S5H1411_IF_44000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 	.qam_if        = S5H1411_IF_4000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) 	.inversion     = S5H1411_INVERSION_ON,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) 	.status_mode   = S5H1411_DEMODLOCKING,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) static struct tda18271_std_map hauppauge_tda18271_std_map = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) 	.atsc_6   = { .if_freq = 5380, .agc_mode = 3, .std = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) 		      .if_lvl = 6, .rfagc_top = 0x37, },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) 	.qam_6    = { .if_freq = 4000, .agc_mode = 3, .std = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) 		      .if_lvl = 6, .rfagc_top = 0x37, },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) static struct tda18271_config hauppauge_tda18271_config = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) 	.std_map = &hauppauge_tda18271_std_map,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) 	.gate    = TDA18271_GATE_ANALOG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) 	.output_opt = TDA18271_OUTPUT_LT_OFF,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) static int pvr2_s5h1409_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) 	adap->fe[0] = dvb_attach(s5h1409_attach, &pvr2_s5h1409_config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) 				 &adap->channel.hdw->i2c_adap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) 	if (adap->fe[0])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) 	return -EIO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) static int pvr2_s5h1411_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) 	adap->fe[0] = dvb_attach(s5h1411_attach, &pvr2_s5h1411_config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) 				 &adap->channel.hdw->i2c_adap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) 	if (adap->fe[0])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) 	return -EIO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) static int pvr2_tda18271_8295_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) 	dvb_attach(tda829x_attach, adap->fe[0],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) 		   &adap->channel.hdw->i2c_adap, 0x42,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) 		   &tda829x_no_probe);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) 	dvb_attach(tda18271_attach, adap->fe[0], 0x60,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) 		   &adap->channel.hdw->i2c_adap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) 		   &hauppauge_tda18271_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) static const struct pvr2_dvb_props pvr2_750xx_dvb_props = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) 	.frontend_attach = pvr2_s5h1409_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) 	.tuner_attach    = pvr2_tda18271_8295_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) static const struct pvr2_dvb_props pvr2_751xx_dvb_props = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) 	.frontend_attach = pvr2_s5h1411_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) 	.tuner_attach    = pvr2_tda18271_8295_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) #define PVR2_FIRMWARE_75xxx "v4l-pvrusb2-73xxx-01.fw"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) static const char *pvr2_fw1_names_75xxx[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) 		PVR2_FIRMWARE_75xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) static const struct pvr2_device_desc pvr2_device_750xx = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) 		.description = "WinTV HVR-1950 Model 750xx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) 		.shortname = "750xx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) 		.client_table.lst = pvr2_cli_73xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) 		.fx2_firmware.lst = pvr2_fw1_names_75xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) 		.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) 		.flag_has_cx25840 = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) 		.flag_has_hauppauge_rom = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) 		.flag_has_analogtuner = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) 		.flag_has_composite = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) 		.flag_has_svideo = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) 		.flag_fx2_16kb = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) 		.digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) 		.default_std_mask = V4L2_STD_NTSC_M,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) 		.led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) 		.ir_scheme = PVR2_IR_SCHEME_ZILOG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) 		.dvb_props = &pvr2_750xx_dvb_props,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) static const struct pvr2_device_desc pvr2_device_751xx = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) 		.description = "WinTV HVR-1950 Model 751xx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) 		.shortname = "751xx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) 		.client_table.lst = pvr2_cli_73xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) 		.fx2_firmware.lst = pvr2_fw1_names_75xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) 		.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) 		.flag_has_cx25840 = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) 		.flag_has_hauppauge_rom = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) 		.flag_has_analogtuner = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) 		.flag_has_composite = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) 		.flag_has_svideo = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) 		.flag_fx2_16kb = !0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) 		.digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) 		.default_std_mask = V4L2_STD_NTSC_M,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) 		.led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) 		.ir_scheme = PVR2_IR_SCHEME_ZILOG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) 		.dvb_props = &pvr2_751xx_dvb_props,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522) /*    Hauppauge PVR-USB2 Model 160000 / 160111 -- HVR-1955 / HVR-1975     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) static int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530) static const struct pvr2_dvb_props pvr2_160000_dvb_props = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) 	.frontend_attach = pvr2_dual_fe_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532) 	.tuner_attach    = pvr2_si2157_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) static const struct pvr2_dvb_props pvr2_160111_dvb_props = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) 	.frontend_attach = pvr2_lgdt3306a_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) 	.tuner_attach    = pvr2_si2157_attach,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) static int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) 	struct si2157_config si2157_config = {};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) 	si2157_config.inversion = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) 	si2157_config.fe = adap->fe[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) 	adap->i2c_client_tuner = dvb_module_probe("si2157", "si2177",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548) 						  &adap->channel.hdw->i2c_adap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549) 						  0x60, &si2157_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551) 	if (!adap->i2c_client_tuner)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552) 		return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557) static int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559) 	struct si2168_config si2168_config = {};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560) 	struct i2c_adapter *adapter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562) 	pr_debug("%s()\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) 	si2168_config.fe = &adap->fe[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) 	si2168_config.i2c_adapter = &adapter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) 	si2168_config.ts_mode = SI2168_TS_PARALLEL; /*2, 1-serial, 2-parallel.*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) 	si2168_config.ts_clock_gapped = 1; /*0-disabled, 1-enabled.*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) 	si2168_config.ts_clock_inv = 0; /*0-not-invert, 1-invert*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569) 	si2168_config.spectral_inversion = 1; /*0-not-invert, 1-invert*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) 	adap->i2c_client_demod[1] = dvb_module_probe("si2168", NULL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) 						     &adap->channel.hdw->i2c_adap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) 						     0x64, &si2168_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) 	if (!adap->i2c_client_demod[1])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) 		return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) static int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) 	struct lgdt3306a_config lgdt3306a_config;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) 	struct i2c_adapter *adapter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) 	pr_debug("%s()\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) 	lgdt3306a_config.fe = &adap->fe[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589) 	lgdt3306a_config.i2c_adapter = &adapter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) 	lgdt3306a_config.deny_i2c_rptr = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591) 	lgdt3306a_config.spectral_inversion = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) 	lgdt3306a_config.qam_if_khz = 4000;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593) 	lgdt3306a_config.vsb_if_khz = 3250;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) 	lgdt3306a_config.mpeg_mode = LGDT3306A_MPEG_PARALLEL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595) 	lgdt3306a_config.tpclk_edge = LGDT3306A_TPCLK_FALLING_EDGE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) 	lgdt3306a_config.tpvalid_polarity = LGDT3306A_TP_VALID_LOW;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) 	lgdt3306a_config.xtalMHz = 25, /* demod clock MHz; 24/25 supported */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) 	adap->i2c_client_demod[0] = dvb_module_probe("lgdt3306a", NULL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) 						     &adap->channel.hdw->i2c_adap,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) 						     0x59, &lgdt3306a_config);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603) 	if (!adap->i2c_client_demod[0])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604) 		return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609) static int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) 	pr_debug("%s()\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) 	if (pvr2_lgdt3306a_attach(adap) != 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) 		return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616) 	if (pvr2_si2168_attach(adap) != 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) 		dvb_module_release(adap->i2c_client_demod[0]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) 		return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625) #define PVR2_FIRMWARE_160xxx "v4l-pvrusb2-160xxx-01.fw"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) static const char *pvr2_fw1_names_160xxx[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627) 		PVR2_FIRMWARE_160xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630) static const struct pvr2_device_client_desc pvr2_cli_160xxx[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) 	{ .module_id = PVR2_CLIENT_ID_CX25840 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) static const struct pvr2_device_desc pvr2_device_160000 = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635) 		.description = "WinTV HVR-1975 Model 160000",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) 		.shortname = "160000",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637) 		.client_table.lst = pvr2_cli_160xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_160xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639) 		.fx2_firmware.lst = pvr2_fw1_names_160xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) 		.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_160xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641) 		.default_tuner_type = TUNER_ABSENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642) 		.flag_has_cx25840 = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) 		.flag_has_hauppauge_rom = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) 		.flag_has_analogtuner = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) 		.flag_has_composite = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646) 		.flag_has_svideo = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647) 		.flag_fx2_16kb = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) 		.digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650) 		.default_std_mask = V4L2_STD_NTSC_M,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) 		.led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652) 		.ir_scheme = PVR2_IR_SCHEME_ZILOG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654) 		.dvb_props = &pvr2_160000_dvb_props,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658) static const struct pvr2_device_desc pvr2_device_160111 = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659) 		.description = "WinTV HVR-1955 Model 160111",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660) 		.shortname = "160111",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661) 		.client_table.lst = pvr2_cli_160xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662) 		.client_table.cnt = ARRAY_SIZE(pvr2_cli_160xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663) 		.fx2_firmware.lst = pvr2_fw1_names_160xxx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664) 		.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_160xxx),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665) 		.default_tuner_type = TUNER_ABSENT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666) 		.flag_has_cx25840 = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667) 		.flag_has_hauppauge_rom = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668) 		.flag_has_analogtuner = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669) 		.flag_has_composite = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670) 		.flag_has_svideo = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) 		.flag_fx2_16kb = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672) 		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) 		.digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674) 		.default_std_mask = V4L2_STD_NTSC_M,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675) 		.led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676) 		.ir_scheme = PVR2_IR_SCHEME_ZILOG,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677) #ifdef CONFIG_VIDEO_PVRUSB2_DVB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678) 		.dvb_props = &pvr2_160111_dvb_props,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682) /*------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684) struct usb_device_id pvr2_device_table[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685) 	{ USB_DEVICE(0x2040, 0x2900),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686) 	  .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687) 	{ USB_DEVICE(0x2040, 0x2950), /* Logically identical to 2900 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688) 	  .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689) 	{ USB_DEVICE(0x2040, 0x2400),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690) 	  .driver_info = (kernel_ulong_t)&pvr2_device_24xxx},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691) 	{ USB_DEVICE(0x1164, 0x0622),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692) 	  .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693) 	{ USB_DEVICE(0x1164, 0x0602),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694) 	  .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2d},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695) 	{ USB_DEVICE(0x11ba, 0x1003),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696) 	  .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697) 	{ USB_DEVICE(0x11ba, 0x1001),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698) 	  .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699) 	{ USB_DEVICE(0x2040, 0x7300),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700) 	  .driver_info = (kernel_ulong_t)&pvr2_device_73xxx},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701) 	{ USB_DEVICE(0x2040, 0x7500),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702) 	  .driver_info = (kernel_ulong_t)&pvr2_device_750xx},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703) 	{ USB_DEVICE(0x2040, 0x7501),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704) 	  .driver_info = (kernel_ulong_t)&pvr2_device_751xx},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705) 	{ USB_DEVICE(0x0ccd, 0x0039),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706) 	  .driver_info = (kernel_ulong_t)&pvr2_device_av400},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707) 	{ USB_DEVICE(0x2040, 0x7502),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708) 	  .driver_info = (kernel_ulong_t)&pvr2_device_160111},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709) 	{ USB_DEVICE(0x2040, 0x7510),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710) 	  .driver_info = (kernel_ulong_t)&pvr2_device_160000},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711) 	{ }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714) MODULE_DEVICE_TABLE(usb, pvr2_device_table);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715) MODULE_FIRMWARE(PVR2_FIRMWARE_29xxx);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716) MODULE_FIRMWARE(PVR2_FIRMWARE_24xxx);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717) MODULE_FIRMWARE(PVR2_FIRMWARE_73xxx);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718) MODULE_FIRMWARE(PVR2_FIRMWARE_75xxx);