18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (C) 2007 Mike Isely <isely@pobox.com> 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciThis source file should encompass ALL per-device type information for the 108c2ecf20Sopenharmony_cidriver. To define a new device, add elements to the pvr2_device_table and 118c2ecf20Sopenharmony_cipvr2_device_desc structures. 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci*/ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include "pvrusb2-devattr.h" 168c2ecf20Sopenharmony_ci#include <linux/usb.h> 178c2ecf20Sopenharmony_ci#include <linux/module.h> 188c2ecf20Sopenharmony_ci/* This is needed in order to pull in tuner type ids... */ 198c2ecf20Sopenharmony_ci#include <linux/i2c.h> 208c2ecf20Sopenharmony_ci#include <media/tuner.h> 218c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 228c2ecf20Sopenharmony_ci#include "pvrusb2-hdw-internal.h" 238c2ecf20Sopenharmony_ci#include "lgdt330x.h" 248c2ecf20Sopenharmony_ci#include "s5h1409.h" 258c2ecf20Sopenharmony_ci#include "s5h1411.h" 268c2ecf20Sopenharmony_ci#include "tda10048.h" 278c2ecf20Sopenharmony_ci#include "tda18271.h" 288c2ecf20Sopenharmony_ci#include "tda8290.h" 298c2ecf20Sopenharmony_ci#include "tuner-simple.h" 308c2ecf20Sopenharmony_ci#include "si2157.h" 318c2ecf20Sopenharmony_ci#include "lgdt3306a.h" 328c2ecf20Sopenharmony_ci#include "si2168.h" 338c2ecf20Sopenharmony_ci#endif 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 378c2ecf20Sopenharmony_ci/* Hauppauge PVR-USB2 Model 29xxx */ 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_cistatic const struct pvr2_device_client_desc pvr2_cli_29xxx[] = { 408c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_SAA7115 }, 418c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_MSP3400 }, 428c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_TUNER }, 438c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_DEMOD }, 448c2ecf20Sopenharmony_ci}; 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#define PVR2_FIRMWARE_29xxx "v4l-pvrusb2-29xxx-01.fw" 478c2ecf20Sopenharmony_cistatic const char *pvr2_fw1_names_29xxx[] = { 488c2ecf20Sopenharmony_ci PVR2_FIRMWARE_29xxx, 498c2ecf20Sopenharmony_ci}; 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_29xxx = { 528c2ecf20Sopenharmony_ci .description = "WinTV PVR USB2 Model 29xxx", 538c2ecf20Sopenharmony_ci .shortname = "29xxx", 548c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_29xxx, 558c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_29xxx), 568c2ecf20Sopenharmony_ci .fx2_firmware.lst = pvr2_fw1_names_29xxx, 578c2ecf20Sopenharmony_ci .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx), 588c2ecf20Sopenharmony_ci .flag_has_hauppauge_rom = !0, 598c2ecf20Sopenharmony_ci .flag_has_analogtuner = !0, 608c2ecf20Sopenharmony_ci .flag_has_fmradio = !0, 618c2ecf20Sopenharmony_ci .flag_has_composite = !0, 628c2ecf20Sopenharmony_ci .flag_has_svideo = !0, 638c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 648c2ecf20Sopenharmony_ci .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, 658c2ecf20Sopenharmony_ci .ir_scheme = PVR2_IR_SCHEME_29XXX, 668c2ecf20Sopenharmony_ci}; 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 718c2ecf20Sopenharmony_ci/* Hauppauge PVR-USB2 Model 24xxx */ 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_cistatic const struct pvr2_device_client_desc pvr2_cli_24xxx[] = { 748c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_CX25840 }, 758c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_TUNER }, 768c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_WM8775 }, 778c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_DEMOD }, 788c2ecf20Sopenharmony_ci}; 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci#define PVR2_FIRMWARE_24xxx "v4l-pvrusb2-24xxx-01.fw" 818c2ecf20Sopenharmony_cistatic const char *pvr2_fw1_names_24xxx[] = { 828c2ecf20Sopenharmony_ci PVR2_FIRMWARE_24xxx, 838c2ecf20Sopenharmony_ci}; 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_24xxx = { 868c2ecf20Sopenharmony_ci .description = "WinTV PVR USB2 Model 24xxx", 878c2ecf20Sopenharmony_ci .shortname = "24xxx", 888c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_24xxx, 898c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_24xxx), 908c2ecf20Sopenharmony_ci .fx2_firmware.lst = pvr2_fw1_names_24xxx, 918c2ecf20Sopenharmony_ci .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx), 928c2ecf20Sopenharmony_ci .flag_has_cx25840 = !0, 938c2ecf20Sopenharmony_ci .flag_has_wm8775 = !0, 948c2ecf20Sopenharmony_ci .flag_has_hauppauge_rom = !0, 958c2ecf20Sopenharmony_ci .flag_has_analogtuner = !0, 968c2ecf20Sopenharmony_ci .flag_has_fmradio = !0, 978c2ecf20Sopenharmony_ci .flag_has_composite = !0, 988c2ecf20Sopenharmony_ci .flag_has_svideo = !0, 998c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 1008c2ecf20Sopenharmony_ci .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, 1018c2ecf20Sopenharmony_ci .ir_scheme = PVR2_IR_SCHEME_24XXX, 1028c2ecf20Sopenharmony_ci}; 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 1078c2ecf20Sopenharmony_ci/* GOTVIEW USB2.0 DVD2 */ 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_cistatic const struct pvr2_device_client_desc pvr2_cli_gotview_2[] = { 1108c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_CX25840 }, 1118c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_TUNER }, 1128c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_DEMOD }, 1138c2ecf20Sopenharmony_ci}; 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_gotview_2 = { 1168c2ecf20Sopenharmony_ci .description = "Gotview USB 2.0 DVD 2", 1178c2ecf20Sopenharmony_ci .shortname = "gv2", 1188c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_gotview_2, 1198c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_gotview_2), 1208c2ecf20Sopenharmony_ci .flag_has_cx25840 = !0, 1218c2ecf20Sopenharmony_ci .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3, 1228c2ecf20Sopenharmony_ci .flag_has_analogtuner = !0, 1238c2ecf20Sopenharmony_ci .flag_has_fmradio = !0, 1248c2ecf20Sopenharmony_ci .flag_has_composite = !0, 1258c2ecf20Sopenharmony_ci .flag_has_svideo = !0, 1268c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW, 1278c2ecf20Sopenharmony_ci}; 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 1328c2ecf20Sopenharmony_ci/* GOTVIEW USB2.0 DVD Deluxe */ 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci/* (same module list as gotview_2) */ 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_gotview_2d = { 1378c2ecf20Sopenharmony_ci .description = "Gotview USB 2.0 DVD Deluxe", 1388c2ecf20Sopenharmony_ci .shortname = "gv2d", 1398c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_gotview_2, 1408c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_gotview_2), 1418c2ecf20Sopenharmony_ci .flag_has_cx25840 = !0, 1428c2ecf20Sopenharmony_ci .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3, 1438c2ecf20Sopenharmony_ci .flag_has_analogtuner = !0, 1448c2ecf20Sopenharmony_ci .flag_has_composite = !0, 1458c2ecf20Sopenharmony_ci .flag_has_svideo = !0, 1468c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW, 1478c2ecf20Sopenharmony_ci}; 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 1528c2ecf20Sopenharmony_ci/* Terratec Grabster AV400 */ 1538c2ecf20Sopenharmony_ci 1548c2ecf20Sopenharmony_cistatic const struct pvr2_device_client_desc pvr2_cli_av400[] = { 1558c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_CX25840 }, 1568c2ecf20Sopenharmony_ci}; 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_av400 = { 1598c2ecf20Sopenharmony_ci .description = "Terratec Grabster AV400", 1608c2ecf20Sopenharmony_ci .shortname = "av400", 1618c2ecf20Sopenharmony_ci .flag_is_experimental = 1, 1628c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_av400, 1638c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_av400), 1648c2ecf20Sopenharmony_ci .flag_has_cx25840 = !0, 1658c2ecf20Sopenharmony_ci .flag_has_analogtuner = 0, 1668c2ecf20Sopenharmony_ci .flag_has_composite = !0, 1678c2ecf20Sopenharmony_ci .flag_has_svideo = !0, 1688c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_AV400, 1698c2ecf20Sopenharmony_ci}; 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci 1728c2ecf20Sopenharmony_ci 1738c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 1748c2ecf20Sopenharmony_ci/* OnAir Creator */ 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 1778c2ecf20Sopenharmony_cistatic struct lgdt330x_config pvr2_lgdt3303_config = { 1788c2ecf20Sopenharmony_ci .demod_chip = LGDT3303, 1798c2ecf20Sopenharmony_ci .clock_polarity_flip = 1, 1808c2ecf20Sopenharmony_ci}; 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_cistatic int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter *adap) 1838c2ecf20Sopenharmony_ci{ 1848c2ecf20Sopenharmony_ci adap->fe[0] = dvb_attach(lgdt330x_attach, &pvr2_lgdt3303_config, 1858c2ecf20Sopenharmony_ci 0x0e, 1868c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap); 1878c2ecf20Sopenharmony_ci if (adap->fe[0]) 1888c2ecf20Sopenharmony_ci return 0; 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci return -EIO; 1918c2ecf20Sopenharmony_ci} 1928c2ecf20Sopenharmony_ci 1938c2ecf20Sopenharmony_cistatic int pvr2_lgh06xf_attach(struct pvr2_dvb_adapter *adap) 1948c2ecf20Sopenharmony_ci{ 1958c2ecf20Sopenharmony_ci dvb_attach(simple_tuner_attach, adap->fe[0], 1968c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap, 0x61, 1978c2ecf20Sopenharmony_ci TUNER_LG_TDVS_H06XF); 1988c2ecf20Sopenharmony_ci 1998c2ecf20Sopenharmony_ci return 0; 2008c2ecf20Sopenharmony_ci} 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_cistatic const struct pvr2_dvb_props pvr2_onair_creator_fe_props = { 2038c2ecf20Sopenharmony_ci .frontend_attach = pvr2_lgdt3303_attach, 2048c2ecf20Sopenharmony_ci .tuner_attach = pvr2_lgh06xf_attach, 2058c2ecf20Sopenharmony_ci}; 2068c2ecf20Sopenharmony_ci#endif 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_cistatic const struct pvr2_device_client_desc pvr2_cli_onair_creator[] = { 2098c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_SAA7115 }, 2108c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_CS53L32A }, 2118c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_TUNER }, 2128c2ecf20Sopenharmony_ci}; 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_onair_creator = { 2158c2ecf20Sopenharmony_ci .description = "OnAir Creator Hybrid USB tuner", 2168c2ecf20Sopenharmony_ci .shortname = "oac", 2178c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_onair_creator, 2188c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_onair_creator), 2198c2ecf20Sopenharmony_ci .default_tuner_type = TUNER_LG_TDVS_H06XF, 2208c2ecf20Sopenharmony_ci .flag_has_analogtuner = !0, 2218c2ecf20Sopenharmony_ci .flag_has_composite = !0, 2228c2ecf20Sopenharmony_ci .flag_has_svideo = !0, 2238c2ecf20Sopenharmony_ci .flag_digital_requires_cx23416 = !0, 2248c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_ONAIR, 2258c2ecf20Sopenharmony_ci .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR, 2268c2ecf20Sopenharmony_ci .default_std_mask = V4L2_STD_NTSC_M, 2278c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 2288c2ecf20Sopenharmony_ci .dvb_props = &pvr2_onair_creator_fe_props, 2298c2ecf20Sopenharmony_ci#endif 2308c2ecf20Sopenharmony_ci}; 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 2358c2ecf20Sopenharmony_ci/* OnAir USB 2.0 */ 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 2388c2ecf20Sopenharmony_cistatic struct lgdt330x_config pvr2_lgdt3302_config = { 2398c2ecf20Sopenharmony_ci .demod_chip = LGDT3302, 2408c2ecf20Sopenharmony_ci}; 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_cistatic int pvr2_lgdt3302_attach(struct pvr2_dvb_adapter *adap) 2438c2ecf20Sopenharmony_ci{ 2448c2ecf20Sopenharmony_ci adap->fe[0] = dvb_attach(lgdt330x_attach, &pvr2_lgdt3302_config, 2458c2ecf20Sopenharmony_ci 0x0e, 2468c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap); 2478c2ecf20Sopenharmony_ci if (adap->fe[0]) 2488c2ecf20Sopenharmony_ci return 0; 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci return -EIO; 2518c2ecf20Sopenharmony_ci} 2528c2ecf20Sopenharmony_ci 2538c2ecf20Sopenharmony_cistatic int pvr2_fcv1236d_attach(struct pvr2_dvb_adapter *adap) 2548c2ecf20Sopenharmony_ci{ 2558c2ecf20Sopenharmony_ci dvb_attach(simple_tuner_attach, adap->fe[0], 2568c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap, 0x61, 2578c2ecf20Sopenharmony_ci TUNER_PHILIPS_FCV1236D); 2588c2ecf20Sopenharmony_ci 2598c2ecf20Sopenharmony_ci return 0; 2608c2ecf20Sopenharmony_ci} 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_cistatic const struct pvr2_dvb_props pvr2_onair_usb2_fe_props = { 2638c2ecf20Sopenharmony_ci .frontend_attach = pvr2_lgdt3302_attach, 2648c2ecf20Sopenharmony_ci .tuner_attach = pvr2_fcv1236d_attach, 2658c2ecf20Sopenharmony_ci}; 2668c2ecf20Sopenharmony_ci#endif 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_cistatic const struct pvr2_device_client_desc pvr2_cli_onair_usb2[] = { 2698c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_SAA7115 }, 2708c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_CS53L32A }, 2718c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_TUNER }, 2728c2ecf20Sopenharmony_ci}; 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_onair_usb2 = { 2758c2ecf20Sopenharmony_ci .description = "OnAir USB2 Hybrid USB tuner", 2768c2ecf20Sopenharmony_ci .shortname = "oa2", 2778c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_onair_usb2, 2788c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_onair_usb2), 2798c2ecf20Sopenharmony_ci .default_tuner_type = TUNER_PHILIPS_FCV1236D, 2808c2ecf20Sopenharmony_ci .flag_has_analogtuner = !0, 2818c2ecf20Sopenharmony_ci .flag_has_composite = !0, 2828c2ecf20Sopenharmony_ci .flag_has_svideo = !0, 2838c2ecf20Sopenharmony_ci .flag_digital_requires_cx23416 = !0, 2848c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_ONAIR, 2858c2ecf20Sopenharmony_ci .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR, 2868c2ecf20Sopenharmony_ci .default_std_mask = V4L2_STD_NTSC_M, 2878c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 2888c2ecf20Sopenharmony_ci .dvb_props = &pvr2_onair_usb2_fe_props, 2898c2ecf20Sopenharmony_ci#endif 2908c2ecf20Sopenharmony_ci}; 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ci 2938c2ecf20Sopenharmony_ci 2948c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 2958c2ecf20Sopenharmony_ci/* Hauppauge PVR-USB2 Model 73xxx */ 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 2988c2ecf20Sopenharmony_cistatic struct tda10048_config hauppauge_tda10048_config = { 2998c2ecf20Sopenharmony_ci .demod_address = 0x10 >> 1, 3008c2ecf20Sopenharmony_ci .output_mode = TDA10048_PARALLEL_OUTPUT, 3018c2ecf20Sopenharmony_ci .fwbulkwritelen = TDA10048_BULKWRITE_50, 3028c2ecf20Sopenharmony_ci .inversion = TDA10048_INVERSION_ON, 3038c2ecf20Sopenharmony_ci .dtv6_if_freq_khz = TDA10048_IF_3300, 3048c2ecf20Sopenharmony_ci .dtv7_if_freq_khz = TDA10048_IF_3800, 3058c2ecf20Sopenharmony_ci .dtv8_if_freq_khz = TDA10048_IF_4300, 3068c2ecf20Sopenharmony_ci .clk_freq_khz = TDA10048_CLK_16000, 3078c2ecf20Sopenharmony_ci .disable_gate_access = 1, 3088c2ecf20Sopenharmony_ci}; 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_cistatic struct tda829x_config tda829x_no_probe = { 3118c2ecf20Sopenharmony_ci .probe_tuner = TDA829X_DONT_PROBE, 3128c2ecf20Sopenharmony_ci}; 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_cistatic struct tda18271_std_map hauppauge_tda18271_dvbt_std_map = { 3158c2ecf20Sopenharmony_ci .dvbt_6 = { .if_freq = 3300, .agc_mode = 3, .std = 4, 3168c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, 3178c2ecf20Sopenharmony_ci .dvbt_7 = { .if_freq = 3800, .agc_mode = 3, .std = 5, 3188c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, 3198c2ecf20Sopenharmony_ci .dvbt_8 = { .if_freq = 4300, .agc_mode = 3, .std = 6, 3208c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, 3218c2ecf20Sopenharmony_ci}; 3228c2ecf20Sopenharmony_ci 3238c2ecf20Sopenharmony_cistatic struct tda18271_config hauppauge_tda18271_dvb_config = { 3248c2ecf20Sopenharmony_ci .std_map = &hauppauge_tda18271_dvbt_std_map, 3258c2ecf20Sopenharmony_ci .gate = TDA18271_GATE_ANALOG, 3268c2ecf20Sopenharmony_ci .output_opt = TDA18271_OUTPUT_LT_OFF, 3278c2ecf20Sopenharmony_ci}; 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_cistatic int pvr2_tda10048_attach(struct pvr2_dvb_adapter *adap) 3308c2ecf20Sopenharmony_ci{ 3318c2ecf20Sopenharmony_ci adap->fe[0] = dvb_attach(tda10048_attach, &hauppauge_tda10048_config, 3328c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap); 3338c2ecf20Sopenharmony_ci if (adap->fe[0]) 3348c2ecf20Sopenharmony_ci return 0; 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_ci return -EIO; 3378c2ecf20Sopenharmony_ci} 3388c2ecf20Sopenharmony_ci 3398c2ecf20Sopenharmony_cistatic int pvr2_73xxx_tda18271_8295_attach(struct pvr2_dvb_adapter *adap) 3408c2ecf20Sopenharmony_ci{ 3418c2ecf20Sopenharmony_ci dvb_attach(tda829x_attach, adap->fe[0], 3428c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap, 0x42, 3438c2ecf20Sopenharmony_ci &tda829x_no_probe); 3448c2ecf20Sopenharmony_ci dvb_attach(tda18271_attach, adap->fe[0], 0x60, 3458c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap, 3468c2ecf20Sopenharmony_ci &hauppauge_tda18271_dvb_config); 3478c2ecf20Sopenharmony_ci 3488c2ecf20Sopenharmony_ci return 0; 3498c2ecf20Sopenharmony_ci} 3508c2ecf20Sopenharmony_ci 3518c2ecf20Sopenharmony_cistatic const struct pvr2_dvb_props pvr2_73xxx_dvb_props = { 3528c2ecf20Sopenharmony_ci .frontend_attach = pvr2_tda10048_attach, 3538c2ecf20Sopenharmony_ci .tuner_attach = pvr2_73xxx_tda18271_8295_attach, 3548c2ecf20Sopenharmony_ci}; 3558c2ecf20Sopenharmony_ci#endif 3568c2ecf20Sopenharmony_ci 3578c2ecf20Sopenharmony_cistatic const struct pvr2_device_client_desc pvr2_cli_73xxx[] = { 3588c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_CX25840 }, 3598c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_TUNER, 3608c2ecf20Sopenharmony_ci .i2c_address_list = "\x42"}, 3618c2ecf20Sopenharmony_ci}; 3628c2ecf20Sopenharmony_ci 3638c2ecf20Sopenharmony_ci#define PVR2_FIRMWARE_73xxx "v4l-pvrusb2-73xxx-01.fw" 3648c2ecf20Sopenharmony_cistatic const char *pvr2_fw1_names_73xxx[] = { 3658c2ecf20Sopenharmony_ci PVR2_FIRMWARE_73xxx, 3668c2ecf20Sopenharmony_ci}; 3678c2ecf20Sopenharmony_ci 3688c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_73xxx = { 3698c2ecf20Sopenharmony_ci .description = "WinTV HVR-1900 Model 73xxx", 3708c2ecf20Sopenharmony_ci .shortname = "73xxx", 3718c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_73xxx, 3728c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx), 3738c2ecf20Sopenharmony_ci .fx2_firmware.lst = pvr2_fw1_names_73xxx, 3748c2ecf20Sopenharmony_ci .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx), 3758c2ecf20Sopenharmony_ci .flag_has_cx25840 = !0, 3768c2ecf20Sopenharmony_ci .flag_has_hauppauge_rom = !0, 3778c2ecf20Sopenharmony_ci .flag_has_analogtuner = !0, 3788c2ecf20Sopenharmony_ci .flag_has_composite = !0, 3798c2ecf20Sopenharmony_ci .flag_has_svideo = !0, 3808c2ecf20Sopenharmony_ci .flag_fx2_16kb = !0, 3818c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 3828c2ecf20Sopenharmony_ci .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, 3838c2ecf20Sopenharmony_ci .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, 3848c2ecf20Sopenharmony_ci .ir_scheme = PVR2_IR_SCHEME_ZILOG, 3858c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 3868c2ecf20Sopenharmony_ci .dvb_props = &pvr2_73xxx_dvb_props, 3878c2ecf20Sopenharmony_ci#endif 3888c2ecf20Sopenharmony_ci}; 3898c2ecf20Sopenharmony_ci 3908c2ecf20Sopenharmony_ci 3918c2ecf20Sopenharmony_ci 3928c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 3938c2ecf20Sopenharmony_ci/* Hauppauge PVR-USB2 Model 75xxx */ 3948c2ecf20Sopenharmony_ci 3958c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 3968c2ecf20Sopenharmony_cistatic struct s5h1409_config pvr2_s5h1409_config = { 3978c2ecf20Sopenharmony_ci .demod_address = 0x32 >> 1, 3988c2ecf20Sopenharmony_ci .output_mode = S5H1409_PARALLEL_OUTPUT, 3998c2ecf20Sopenharmony_ci .gpio = S5H1409_GPIO_OFF, 4008c2ecf20Sopenharmony_ci .qam_if = 4000, 4018c2ecf20Sopenharmony_ci .inversion = S5H1409_INVERSION_ON, 4028c2ecf20Sopenharmony_ci .status_mode = S5H1409_DEMODLOCKING, 4038c2ecf20Sopenharmony_ci}; 4048c2ecf20Sopenharmony_ci 4058c2ecf20Sopenharmony_cistatic struct s5h1411_config pvr2_s5h1411_config = { 4068c2ecf20Sopenharmony_ci .output_mode = S5H1411_PARALLEL_OUTPUT, 4078c2ecf20Sopenharmony_ci .gpio = S5H1411_GPIO_OFF, 4088c2ecf20Sopenharmony_ci .vsb_if = S5H1411_IF_44000, 4098c2ecf20Sopenharmony_ci .qam_if = S5H1411_IF_4000, 4108c2ecf20Sopenharmony_ci .inversion = S5H1411_INVERSION_ON, 4118c2ecf20Sopenharmony_ci .status_mode = S5H1411_DEMODLOCKING, 4128c2ecf20Sopenharmony_ci}; 4138c2ecf20Sopenharmony_ci 4148c2ecf20Sopenharmony_cistatic struct tda18271_std_map hauppauge_tda18271_std_map = { 4158c2ecf20Sopenharmony_ci .atsc_6 = { .if_freq = 5380, .agc_mode = 3, .std = 3, 4168c2ecf20Sopenharmony_ci .if_lvl = 6, .rfagc_top = 0x37, }, 4178c2ecf20Sopenharmony_ci .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0, 4188c2ecf20Sopenharmony_ci .if_lvl = 6, .rfagc_top = 0x37, }, 4198c2ecf20Sopenharmony_ci}; 4208c2ecf20Sopenharmony_ci 4218c2ecf20Sopenharmony_cistatic struct tda18271_config hauppauge_tda18271_config = { 4228c2ecf20Sopenharmony_ci .std_map = &hauppauge_tda18271_std_map, 4238c2ecf20Sopenharmony_ci .gate = TDA18271_GATE_ANALOG, 4248c2ecf20Sopenharmony_ci .output_opt = TDA18271_OUTPUT_LT_OFF, 4258c2ecf20Sopenharmony_ci}; 4268c2ecf20Sopenharmony_ci 4278c2ecf20Sopenharmony_cistatic int pvr2_s5h1409_attach(struct pvr2_dvb_adapter *adap) 4288c2ecf20Sopenharmony_ci{ 4298c2ecf20Sopenharmony_ci adap->fe[0] = dvb_attach(s5h1409_attach, &pvr2_s5h1409_config, 4308c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap); 4318c2ecf20Sopenharmony_ci if (adap->fe[0]) 4328c2ecf20Sopenharmony_ci return 0; 4338c2ecf20Sopenharmony_ci 4348c2ecf20Sopenharmony_ci return -EIO; 4358c2ecf20Sopenharmony_ci} 4368c2ecf20Sopenharmony_ci 4378c2ecf20Sopenharmony_cistatic int pvr2_s5h1411_attach(struct pvr2_dvb_adapter *adap) 4388c2ecf20Sopenharmony_ci{ 4398c2ecf20Sopenharmony_ci adap->fe[0] = dvb_attach(s5h1411_attach, &pvr2_s5h1411_config, 4408c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap); 4418c2ecf20Sopenharmony_ci if (adap->fe[0]) 4428c2ecf20Sopenharmony_ci return 0; 4438c2ecf20Sopenharmony_ci 4448c2ecf20Sopenharmony_ci return -EIO; 4458c2ecf20Sopenharmony_ci} 4468c2ecf20Sopenharmony_ci 4478c2ecf20Sopenharmony_cistatic int pvr2_tda18271_8295_attach(struct pvr2_dvb_adapter *adap) 4488c2ecf20Sopenharmony_ci{ 4498c2ecf20Sopenharmony_ci dvb_attach(tda829x_attach, adap->fe[0], 4508c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap, 0x42, 4518c2ecf20Sopenharmony_ci &tda829x_no_probe); 4528c2ecf20Sopenharmony_ci dvb_attach(tda18271_attach, adap->fe[0], 0x60, 4538c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap, 4548c2ecf20Sopenharmony_ci &hauppauge_tda18271_config); 4558c2ecf20Sopenharmony_ci 4568c2ecf20Sopenharmony_ci return 0; 4578c2ecf20Sopenharmony_ci} 4588c2ecf20Sopenharmony_ci 4598c2ecf20Sopenharmony_cistatic const struct pvr2_dvb_props pvr2_750xx_dvb_props = { 4608c2ecf20Sopenharmony_ci .frontend_attach = pvr2_s5h1409_attach, 4618c2ecf20Sopenharmony_ci .tuner_attach = pvr2_tda18271_8295_attach, 4628c2ecf20Sopenharmony_ci}; 4638c2ecf20Sopenharmony_ci 4648c2ecf20Sopenharmony_cistatic const struct pvr2_dvb_props pvr2_751xx_dvb_props = { 4658c2ecf20Sopenharmony_ci .frontend_attach = pvr2_s5h1411_attach, 4668c2ecf20Sopenharmony_ci .tuner_attach = pvr2_tda18271_8295_attach, 4678c2ecf20Sopenharmony_ci}; 4688c2ecf20Sopenharmony_ci#endif 4698c2ecf20Sopenharmony_ci 4708c2ecf20Sopenharmony_ci#define PVR2_FIRMWARE_75xxx "v4l-pvrusb2-73xxx-01.fw" 4718c2ecf20Sopenharmony_cistatic const char *pvr2_fw1_names_75xxx[] = { 4728c2ecf20Sopenharmony_ci PVR2_FIRMWARE_75xxx, 4738c2ecf20Sopenharmony_ci}; 4748c2ecf20Sopenharmony_ci 4758c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_750xx = { 4768c2ecf20Sopenharmony_ci .description = "WinTV HVR-1950 Model 750xx", 4778c2ecf20Sopenharmony_ci .shortname = "750xx", 4788c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_73xxx, 4798c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx), 4808c2ecf20Sopenharmony_ci .fx2_firmware.lst = pvr2_fw1_names_75xxx, 4818c2ecf20Sopenharmony_ci .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx), 4828c2ecf20Sopenharmony_ci .flag_has_cx25840 = !0, 4838c2ecf20Sopenharmony_ci .flag_has_hauppauge_rom = !0, 4848c2ecf20Sopenharmony_ci .flag_has_analogtuner = !0, 4858c2ecf20Sopenharmony_ci .flag_has_composite = !0, 4868c2ecf20Sopenharmony_ci .flag_has_svideo = !0, 4878c2ecf20Sopenharmony_ci .flag_fx2_16kb = !0, 4888c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 4898c2ecf20Sopenharmony_ci .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, 4908c2ecf20Sopenharmony_ci .default_std_mask = V4L2_STD_NTSC_M, 4918c2ecf20Sopenharmony_ci .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, 4928c2ecf20Sopenharmony_ci .ir_scheme = PVR2_IR_SCHEME_ZILOG, 4938c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 4948c2ecf20Sopenharmony_ci .dvb_props = &pvr2_750xx_dvb_props, 4958c2ecf20Sopenharmony_ci#endif 4968c2ecf20Sopenharmony_ci}; 4978c2ecf20Sopenharmony_ci 4988c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_751xx = { 4998c2ecf20Sopenharmony_ci .description = "WinTV HVR-1950 Model 751xx", 5008c2ecf20Sopenharmony_ci .shortname = "751xx", 5018c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_73xxx, 5028c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx), 5038c2ecf20Sopenharmony_ci .fx2_firmware.lst = pvr2_fw1_names_75xxx, 5048c2ecf20Sopenharmony_ci .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx), 5058c2ecf20Sopenharmony_ci .flag_has_cx25840 = !0, 5068c2ecf20Sopenharmony_ci .flag_has_hauppauge_rom = !0, 5078c2ecf20Sopenharmony_ci .flag_has_analogtuner = !0, 5088c2ecf20Sopenharmony_ci .flag_has_composite = !0, 5098c2ecf20Sopenharmony_ci .flag_has_svideo = !0, 5108c2ecf20Sopenharmony_ci .flag_fx2_16kb = !0, 5118c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 5128c2ecf20Sopenharmony_ci .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, 5138c2ecf20Sopenharmony_ci .default_std_mask = V4L2_STD_NTSC_M, 5148c2ecf20Sopenharmony_ci .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, 5158c2ecf20Sopenharmony_ci .ir_scheme = PVR2_IR_SCHEME_ZILOG, 5168c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 5178c2ecf20Sopenharmony_ci .dvb_props = &pvr2_751xx_dvb_props, 5188c2ecf20Sopenharmony_ci#endif 5198c2ecf20Sopenharmony_ci}; 5208c2ecf20Sopenharmony_ci 5218c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 5228c2ecf20Sopenharmony_ci/* Hauppauge PVR-USB2 Model 160000 / 160111 -- HVR-1955 / HVR-1975 */ 5238c2ecf20Sopenharmony_ci 5248c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 5258c2ecf20Sopenharmony_cistatic int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap); 5268c2ecf20Sopenharmony_cistatic int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap); 5278c2ecf20Sopenharmony_cistatic int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap); 5288c2ecf20Sopenharmony_cistatic int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap); 5298c2ecf20Sopenharmony_ci 5308c2ecf20Sopenharmony_cistatic const struct pvr2_dvb_props pvr2_160000_dvb_props = { 5318c2ecf20Sopenharmony_ci .frontend_attach = pvr2_dual_fe_attach, 5328c2ecf20Sopenharmony_ci .tuner_attach = pvr2_si2157_attach, 5338c2ecf20Sopenharmony_ci}; 5348c2ecf20Sopenharmony_ci 5358c2ecf20Sopenharmony_cistatic const struct pvr2_dvb_props pvr2_160111_dvb_props = { 5368c2ecf20Sopenharmony_ci .frontend_attach = pvr2_lgdt3306a_attach, 5378c2ecf20Sopenharmony_ci .tuner_attach = pvr2_si2157_attach, 5388c2ecf20Sopenharmony_ci}; 5398c2ecf20Sopenharmony_ci 5408c2ecf20Sopenharmony_cistatic int pvr2_si2157_attach(struct pvr2_dvb_adapter *adap) 5418c2ecf20Sopenharmony_ci{ 5428c2ecf20Sopenharmony_ci struct si2157_config si2157_config = {}; 5438c2ecf20Sopenharmony_ci 5448c2ecf20Sopenharmony_ci si2157_config.inversion = 1; 5458c2ecf20Sopenharmony_ci si2157_config.fe = adap->fe[0]; 5468c2ecf20Sopenharmony_ci 5478c2ecf20Sopenharmony_ci adap->i2c_client_tuner = dvb_module_probe("si2157", "si2177", 5488c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap, 5498c2ecf20Sopenharmony_ci 0x60, &si2157_config); 5508c2ecf20Sopenharmony_ci 5518c2ecf20Sopenharmony_ci if (!adap->i2c_client_tuner) 5528c2ecf20Sopenharmony_ci return -ENODEV; 5538c2ecf20Sopenharmony_ci 5548c2ecf20Sopenharmony_ci return 0; 5558c2ecf20Sopenharmony_ci} 5568c2ecf20Sopenharmony_ci 5578c2ecf20Sopenharmony_cistatic int pvr2_si2168_attach(struct pvr2_dvb_adapter *adap) 5588c2ecf20Sopenharmony_ci{ 5598c2ecf20Sopenharmony_ci struct si2168_config si2168_config = {}; 5608c2ecf20Sopenharmony_ci struct i2c_adapter *adapter; 5618c2ecf20Sopenharmony_ci 5628c2ecf20Sopenharmony_ci pr_debug("%s()\n", __func__); 5638c2ecf20Sopenharmony_ci 5648c2ecf20Sopenharmony_ci si2168_config.fe = &adap->fe[1]; 5658c2ecf20Sopenharmony_ci si2168_config.i2c_adapter = &adapter; 5668c2ecf20Sopenharmony_ci si2168_config.ts_mode = SI2168_TS_PARALLEL; /*2, 1-serial, 2-parallel.*/ 5678c2ecf20Sopenharmony_ci si2168_config.ts_clock_gapped = 1; /*0-disabled, 1-enabled.*/ 5688c2ecf20Sopenharmony_ci si2168_config.ts_clock_inv = 0; /*0-not-invert, 1-invert*/ 5698c2ecf20Sopenharmony_ci si2168_config.spectral_inversion = 1; /*0-not-invert, 1-invert*/ 5708c2ecf20Sopenharmony_ci 5718c2ecf20Sopenharmony_ci adap->i2c_client_demod[1] = dvb_module_probe("si2168", NULL, 5728c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap, 5738c2ecf20Sopenharmony_ci 0x64, &si2168_config); 5748c2ecf20Sopenharmony_ci 5758c2ecf20Sopenharmony_ci if (!adap->i2c_client_demod[1]) 5768c2ecf20Sopenharmony_ci return -ENODEV; 5778c2ecf20Sopenharmony_ci 5788c2ecf20Sopenharmony_ci return 0; 5798c2ecf20Sopenharmony_ci} 5808c2ecf20Sopenharmony_ci 5818c2ecf20Sopenharmony_cistatic int pvr2_lgdt3306a_attach(struct pvr2_dvb_adapter *adap) 5828c2ecf20Sopenharmony_ci{ 5838c2ecf20Sopenharmony_ci struct lgdt3306a_config lgdt3306a_config; 5848c2ecf20Sopenharmony_ci struct i2c_adapter *adapter; 5858c2ecf20Sopenharmony_ci 5868c2ecf20Sopenharmony_ci pr_debug("%s()\n", __func__); 5878c2ecf20Sopenharmony_ci 5888c2ecf20Sopenharmony_ci lgdt3306a_config.fe = &adap->fe[0]; 5898c2ecf20Sopenharmony_ci lgdt3306a_config.i2c_adapter = &adapter; 5908c2ecf20Sopenharmony_ci lgdt3306a_config.deny_i2c_rptr = 1; 5918c2ecf20Sopenharmony_ci lgdt3306a_config.spectral_inversion = 1; 5928c2ecf20Sopenharmony_ci lgdt3306a_config.qam_if_khz = 4000; 5938c2ecf20Sopenharmony_ci lgdt3306a_config.vsb_if_khz = 3250; 5948c2ecf20Sopenharmony_ci lgdt3306a_config.mpeg_mode = LGDT3306A_MPEG_PARALLEL; 5958c2ecf20Sopenharmony_ci lgdt3306a_config.tpclk_edge = LGDT3306A_TPCLK_FALLING_EDGE; 5968c2ecf20Sopenharmony_ci lgdt3306a_config.tpvalid_polarity = LGDT3306A_TP_VALID_LOW; 5978c2ecf20Sopenharmony_ci lgdt3306a_config.xtalMHz = 25, /* demod clock MHz; 24/25 supported */ 5988c2ecf20Sopenharmony_ci 5998c2ecf20Sopenharmony_ci adap->i2c_client_demod[0] = dvb_module_probe("lgdt3306a", NULL, 6008c2ecf20Sopenharmony_ci &adap->channel.hdw->i2c_adap, 6018c2ecf20Sopenharmony_ci 0x59, &lgdt3306a_config); 6028c2ecf20Sopenharmony_ci 6038c2ecf20Sopenharmony_ci if (!adap->i2c_client_demod[0]) 6048c2ecf20Sopenharmony_ci return -ENODEV; 6058c2ecf20Sopenharmony_ci 6068c2ecf20Sopenharmony_ci return 0; 6078c2ecf20Sopenharmony_ci} 6088c2ecf20Sopenharmony_ci 6098c2ecf20Sopenharmony_cistatic int pvr2_dual_fe_attach(struct pvr2_dvb_adapter *adap) 6108c2ecf20Sopenharmony_ci{ 6118c2ecf20Sopenharmony_ci pr_debug("%s()\n", __func__); 6128c2ecf20Sopenharmony_ci 6138c2ecf20Sopenharmony_ci if (pvr2_lgdt3306a_attach(adap) != 0) 6148c2ecf20Sopenharmony_ci return -ENODEV; 6158c2ecf20Sopenharmony_ci 6168c2ecf20Sopenharmony_ci if (pvr2_si2168_attach(adap) != 0) { 6178c2ecf20Sopenharmony_ci dvb_module_release(adap->i2c_client_demod[0]); 6188c2ecf20Sopenharmony_ci return -ENODEV; 6198c2ecf20Sopenharmony_ci } 6208c2ecf20Sopenharmony_ci 6218c2ecf20Sopenharmony_ci return 0; 6228c2ecf20Sopenharmony_ci} 6238c2ecf20Sopenharmony_ci#endif 6248c2ecf20Sopenharmony_ci 6258c2ecf20Sopenharmony_ci#define PVR2_FIRMWARE_160xxx "v4l-pvrusb2-160xxx-01.fw" 6268c2ecf20Sopenharmony_cistatic const char *pvr2_fw1_names_160xxx[] = { 6278c2ecf20Sopenharmony_ci PVR2_FIRMWARE_160xxx, 6288c2ecf20Sopenharmony_ci}; 6298c2ecf20Sopenharmony_ci 6308c2ecf20Sopenharmony_cistatic const struct pvr2_device_client_desc pvr2_cli_160xxx[] = { 6318c2ecf20Sopenharmony_ci { .module_id = PVR2_CLIENT_ID_CX25840 }, 6328c2ecf20Sopenharmony_ci}; 6338c2ecf20Sopenharmony_ci 6348c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_160000 = { 6358c2ecf20Sopenharmony_ci .description = "WinTV HVR-1975 Model 160000", 6368c2ecf20Sopenharmony_ci .shortname = "160000", 6378c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_160xxx, 6388c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_160xxx), 6398c2ecf20Sopenharmony_ci .fx2_firmware.lst = pvr2_fw1_names_160xxx, 6408c2ecf20Sopenharmony_ci .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_160xxx), 6418c2ecf20Sopenharmony_ci .default_tuner_type = TUNER_ABSENT, 6428c2ecf20Sopenharmony_ci .flag_has_cx25840 = 1, 6438c2ecf20Sopenharmony_ci .flag_has_hauppauge_rom = 1, 6448c2ecf20Sopenharmony_ci .flag_has_analogtuner = 1, 6458c2ecf20Sopenharmony_ci .flag_has_composite = 1, 6468c2ecf20Sopenharmony_ci .flag_has_svideo = 1, 6478c2ecf20Sopenharmony_ci .flag_fx2_16kb = 1, 6488c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 6498c2ecf20Sopenharmony_ci .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, 6508c2ecf20Sopenharmony_ci .default_std_mask = V4L2_STD_NTSC_M, 6518c2ecf20Sopenharmony_ci .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, 6528c2ecf20Sopenharmony_ci .ir_scheme = PVR2_IR_SCHEME_ZILOG, 6538c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 6548c2ecf20Sopenharmony_ci .dvb_props = &pvr2_160000_dvb_props, 6558c2ecf20Sopenharmony_ci#endif 6568c2ecf20Sopenharmony_ci}; 6578c2ecf20Sopenharmony_ci 6588c2ecf20Sopenharmony_cistatic const struct pvr2_device_desc pvr2_device_160111 = { 6598c2ecf20Sopenharmony_ci .description = "WinTV HVR-1955 Model 160111", 6608c2ecf20Sopenharmony_ci .shortname = "160111", 6618c2ecf20Sopenharmony_ci .client_table.lst = pvr2_cli_160xxx, 6628c2ecf20Sopenharmony_ci .client_table.cnt = ARRAY_SIZE(pvr2_cli_160xxx), 6638c2ecf20Sopenharmony_ci .fx2_firmware.lst = pvr2_fw1_names_160xxx, 6648c2ecf20Sopenharmony_ci .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_160xxx), 6658c2ecf20Sopenharmony_ci .default_tuner_type = TUNER_ABSENT, 6668c2ecf20Sopenharmony_ci .flag_has_cx25840 = 1, 6678c2ecf20Sopenharmony_ci .flag_has_hauppauge_rom = 1, 6688c2ecf20Sopenharmony_ci .flag_has_analogtuner = 1, 6698c2ecf20Sopenharmony_ci .flag_has_composite = 1, 6708c2ecf20Sopenharmony_ci .flag_has_svideo = 1, 6718c2ecf20Sopenharmony_ci .flag_fx2_16kb = 1, 6728c2ecf20Sopenharmony_ci .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, 6738c2ecf20Sopenharmony_ci .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, 6748c2ecf20Sopenharmony_ci .default_std_mask = V4L2_STD_NTSC_M, 6758c2ecf20Sopenharmony_ci .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, 6768c2ecf20Sopenharmony_ci .ir_scheme = PVR2_IR_SCHEME_ZILOG, 6778c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_PVRUSB2_DVB 6788c2ecf20Sopenharmony_ci .dvb_props = &pvr2_160111_dvb_props, 6798c2ecf20Sopenharmony_ci#endif 6808c2ecf20Sopenharmony_ci}; 6818c2ecf20Sopenharmony_ci 6828c2ecf20Sopenharmony_ci/*------------------------------------------------------------------------*/ 6838c2ecf20Sopenharmony_ci 6848c2ecf20Sopenharmony_cistruct usb_device_id pvr2_device_table[] = { 6858c2ecf20Sopenharmony_ci { USB_DEVICE(0x2040, 0x2900), 6868c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_29xxx}, 6878c2ecf20Sopenharmony_ci { USB_DEVICE(0x2040, 0x2950), /* Logically identical to 2900 */ 6888c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_29xxx}, 6898c2ecf20Sopenharmony_ci { USB_DEVICE(0x2040, 0x2400), 6908c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_24xxx}, 6918c2ecf20Sopenharmony_ci { USB_DEVICE(0x1164, 0x0622), 6928c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2}, 6938c2ecf20Sopenharmony_ci { USB_DEVICE(0x1164, 0x0602), 6948c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2d}, 6958c2ecf20Sopenharmony_ci { USB_DEVICE(0x11ba, 0x1003), 6968c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator}, 6978c2ecf20Sopenharmony_ci { USB_DEVICE(0x11ba, 0x1001), 6988c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2}, 6998c2ecf20Sopenharmony_ci { USB_DEVICE(0x2040, 0x7300), 7008c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_73xxx}, 7018c2ecf20Sopenharmony_ci { USB_DEVICE(0x2040, 0x7500), 7028c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_750xx}, 7038c2ecf20Sopenharmony_ci { USB_DEVICE(0x2040, 0x7501), 7048c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_751xx}, 7058c2ecf20Sopenharmony_ci { USB_DEVICE(0x0ccd, 0x0039), 7068c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_av400}, 7078c2ecf20Sopenharmony_ci { USB_DEVICE(0x2040, 0x7502), 7088c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_160111}, 7098c2ecf20Sopenharmony_ci { USB_DEVICE(0x2040, 0x7510), 7108c2ecf20Sopenharmony_ci .driver_info = (kernel_ulong_t)&pvr2_device_160000}, 7118c2ecf20Sopenharmony_ci { } 7128c2ecf20Sopenharmony_ci}; 7138c2ecf20Sopenharmony_ci 7148c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(usb, pvr2_device_table); 7158c2ecf20Sopenharmony_ciMODULE_FIRMWARE(PVR2_FIRMWARE_29xxx); 7168c2ecf20Sopenharmony_ciMODULE_FIRMWARE(PVR2_FIRMWARE_24xxx); 7178c2ecf20Sopenharmony_ciMODULE_FIRMWARE(PVR2_FIRMWARE_73xxx); 7188c2ecf20Sopenharmony_ciMODULE_FIRMWARE(PVR2_FIRMWARE_75xxx); 719