Path: blob/master/drivers/media/video/cx88/cx88-cards.c
17710 views
/*1*2* device driver for Conexant 2388x based TV cards3* card-specific stuff.4*5* (c) 2003 Gerd Knorr <[email protected]> [SuSE Labs]6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.20*/2122#include <linux/init.h>23#include <linux/module.h>24#include <linux/pci.h>25#include <linux/delay.h>26#include <linux/slab.h>2728#include "cx88.h"29#include "tea5767.h"3031static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };32static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };33static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };3435module_param_array(tuner, int, NULL, 0444);36module_param_array(radio, int, NULL, 0444);37module_param_array(card, int, NULL, 0444);3839MODULE_PARM_DESC(tuner,"tuner type");40MODULE_PARM_DESC(radio,"radio tuner type");41MODULE_PARM_DESC(card,"card type");4243static unsigned int latency = UNSET;44module_param(latency,int,0444);45MODULE_PARM_DESC(latency,"pci latency timer");4647static int disable_ir;48module_param(disable_ir, int, 0444);49MODULE_PARM_DESC(disable_ir, "Disable IR support");5051#define info_printk(core, fmt, arg...) \52printk(KERN_INFO "%s: " fmt, core->name , ## arg)5354#define warn_printk(core, fmt, arg...) \55printk(KERN_WARNING "%s: " fmt, core->name , ## arg)5657#define err_printk(core, fmt, arg...) \58printk(KERN_ERR "%s: " fmt, core->name , ## arg)596061/* ------------------------------------------------------------------ */62/* board config info */6364/* If radio_type !=UNSET, radio_addr should be specified65*/6667static const struct cx88_board cx88_boards[] = {68[CX88_BOARD_UNKNOWN] = {69.name = "UNKNOWN/GENERIC",70.tuner_type = UNSET,71.radio_type = UNSET,72.tuner_addr = ADDR_UNSET,73.radio_addr = ADDR_UNSET,74.input = {{75.type = CX88_VMUX_COMPOSITE1,76.vmux = 0,77},{78.type = CX88_VMUX_COMPOSITE2,79.vmux = 1,80},{81.type = CX88_VMUX_COMPOSITE3,82.vmux = 2,83},{84.type = CX88_VMUX_COMPOSITE4,85.vmux = 3,86}},87},88[CX88_BOARD_HAUPPAUGE] = {89.name = "Hauppauge WinTV 34xxx models",90.tuner_type = UNSET,91.radio_type = UNSET,92.tuner_addr = ADDR_UNSET,93.radio_addr = ADDR_UNSET,94.tda9887_conf = TDA9887_PRESENT,95.input = {{96.type = CX88_VMUX_TELEVISION,97.vmux = 0,98.gpio0 = 0xff00, // internal decoder99},{100.type = CX88_VMUX_DEBUG,101.vmux = 0,102.gpio0 = 0xff01, // mono from tuner chip103},{104.type = CX88_VMUX_COMPOSITE1,105.vmux = 1,106.gpio0 = 0xff02,107},{108.type = CX88_VMUX_SVIDEO,109.vmux = 2,110.gpio0 = 0xff02,111}},112.radio = {113.type = CX88_RADIO,114.gpio0 = 0xff01,115},116},117[CX88_BOARD_GDI] = {118.name = "GDI Black Gold",119.tuner_type = UNSET,120.radio_type = UNSET,121.tuner_addr = ADDR_UNSET,122.radio_addr = ADDR_UNSET,123.input = {{124.type = CX88_VMUX_TELEVISION,125.vmux = 0,126},{127.type = CX88_VMUX_SVIDEO,128.vmux = 2,129}},130},131[CX88_BOARD_PIXELVIEW] = {132.name = "PixelView",133.tuner_type = TUNER_PHILIPS_PAL,134.radio_type = UNSET,135.tuner_addr = ADDR_UNSET,136.radio_addr = ADDR_UNSET,137.input = {{138.type = CX88_VMUX_TELEVISION,139.vmux = 0,140.gpio0 = 0xff00, // internal decoder141},{142.type = CX88_VMUX_COMPOSITE1,143.vmux = 1,144},{145.type = CX88_VMUX_SVIDEO,146.vmux = 2,147}},148.radio = {149.type = CX88_RADIO,150.gpio0 = 0xff10,151},152},153[CX88_BOARD_ATI_WONDER_PRO] = {154.name = "ATI TV Wonder Pro",155.tuner_type = TUNER_PHILIPS_4IN1,156.radio_type = UNSET,157.tuner_addr = ADDR_UNSET,158.radio_addr = ADDR_UNSET,159.tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,160.input = {{161.type = CX88_VMUX_TELEVISION,162.vmux = 0,163.gpio0 = 0x03ff,164},{165.type = CX88_VMUX_COMPOSITE1,166.vmux = 1,167.gpio0 = 0x03fe,168},{169.type = CX88_VMUX_SVIDEO,170.vmux = 2,171.gpio0 = 0x03fe,172}},173},174[CX88_BOARD_WINFAST2000XP_EXPERT] = {175.name = "Leadtek Winfast 2000XP Expert",176.tuner_type = TUNER_PHILIPS_4IN1,177.radio_type = UNSET,178.tuner_addr = ADDR_UNSET,179.radio_addr = ADDR_UNSET,180.tda9887_conf = TDA9887_PRESENT,181.input = {{182.type = CX88_VMUX_TELEVISION,183.vmux = 0,184.gpio0 = 0x00F5e700,185.gpio1 = 0x00003004,186.gpio2 = 0x00F5e700,187.gpio3 = 0x02000000,188},{189.type = CX88_VMUX_COMPOSITE1,190.vmux = 1,191.gpio0 = 0x00F5c700,192.gpio1 = 0x00003004,193.gpio2 = 0x00F5c700,194.gpio3 = 0x02000000,195},{196.type = CX88_VMUX_SVIDEO,197.vmux = 2,198.gpio0 = 0x00F5c700,199.gpio1 = 0x00003004,200.gpio2 = 0x00F5c700,201.gpio3 = 0x02000000,202}},203.radio = {204.type = CX88_RADIO,205.gpio0 = 0x00F5d700,206.gpio1 = 0x00003004,207.gpio2 = 0x00F5d700,208.gpio3 = 0x02000000,209},210},211[CX88_BOARD_AVERTV_STUDIO_303] = {212.name = "AverTV Studio 303 (M126)",213.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,214.radio_type = UNSET,215.tuner_addr = ADDR_UNSET,216.radio_addr = ADDR_UNSET,217.tda9887_conf = TDA9887_PRESENT,218.input = {{219.type = CX88_VMUX_TELEVISION,220.vmux = 0,221.gpio1 = 0xe09f,222},{223.type = CX88_VMUX_COMPOSITE1,224.vmux = 1,225.gpio1 = 0xe05f,226},{227.type = CX88_VMUX_SVIDEO,228.vmux = 2,229.gpio1 = 0xe05f,230}},231.radio = {232.gpio1 = 0xe0df,233.type = CX88_RADIO,234},235},236[CX88_BOARD_MSI_TVANYWHERE_MASTER] = {237// added gpio values thanks to Michal238// values for PAL from DScaler239.name = "MSI TV-@nywhere Master",240.tuner_type = TUNER_MT2032,241.radio_type = UNSET,242.tuner_addr = ADDR_UNSET,243.radio_addr = ADDR_UNSET,244.tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,245.input = {{246.type = CX88_VMUX_TELEVISION,247.vmux = 0,248.gpio0 = 0x000040bf,249.gpio1 = 0x000080c0,250.gpio2 = 0x0000ff40,251},{252.type = CX88_VMUX_COMPOSITE1,253.vmux = 1,254.gpio0 = 0x000040bf,255.gpio1 = 0x000080c0,256.gpio2 = 0x0000ff40,257},{258.type = CX88_VMUX_SVIDEO,259.vmux = 2,260.gpio0 = 0x000040bf,261.gpio1 = 0x000080c0,262.gpio2 = 0x0000ff40,263}},264.radio = {265.type = CX88_RADIO,266.vmux = 3,267.gpio0 = 0x000040bf,268.gpio1 = 0x000080c0,269.gpio2 = 0x0000ff20,270},271},272[CX88_BOARD_WINFAST_DV2000] = {273.name = "Leadtek Winfast DV2000",274.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,275.radio_type = UNSET,276.tuner_addr = ADDR_UNSET,277.radio_addr = ADDR_UNSET,278.tda9887_conf = TDA9887_PRESENT,279.input = {{280.type = CX88_VMUX_TELEVISION,281.vmux = 0,282.gpio0 = 0x0035e700,283.gpio1 = 0x00003004,284.gpio2 = 0x0035e700,285.gpio3 = 0x02000000,286},{287288.type = CX88_VMUX_COMPOSITE1,289.vmux = 1,290.gpio0 = 0x0035c700,291.gpio1 = 0x00003004,292.gpio2 = 0x0035c700,293.gpio3 = 0x02000000,294},{295.type = CX88_VMUX_SVIDEO,296.vmux = 2,297.gpio0 = 0x0035c700,298.gpio1 = 0x0035c700,299.gpio2 = 0x02000000,300.gpio3 = 0x02000000,301}},302.radio = {303.type = CX88_RADIO,304.gpio0 = 0x0035d700,305.gpio1 = 0x00007004,306.gpio2 = 0x0035d700,307.gpio3 = 0x02000000,308},309},310[CX88_BOARD_LEADTEK_PVR2000] = {311// gpio values for PAL version from regspy by DScaler312.name = "Leadtek PVR 2000",313.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,314.radio_type = UNSET,315.tuner_addr = ADDR_UNSET,316.radio_addr = ADDR_UNSET,317.tda9887_conf = TDA9887_PRESENT,318.input = {{319.type = CX88_VMUX_TELEVISION,320.vmux = 0,321.gpio0 = 0x0000bde2,322.audioroute = 1,323},{324.type = CX88_VMUX_COMPOSITE1,325.vmux = 1,326.gpio0 = 0x0000bde6,327.audioroute = 1,328},{329.type = CX88_VMUX_SVIDEO,330.vmux = 2,331.gpio0 = 0x0000bde6,332.audioroute = 1,333}},334.radio = {335.type = CX88_RADIO,336.gpio0 = 0x0000bd62,337.audioroute = 1,338},339.mpeg = CX88_MPEG_BLACKBIRD,340},341[CX88_BOARD_IODATA_GVVCP3PCI] = {342.name = "IODATA GV-VCP3/PCI",343.tuner_type = TUNER_ABSENT,344.radio_type = UNSET,345.tuner_addr = ADDR_UNSET,346.radio_addr = ADDR_UNSET,347.input = {{348.type = CX88_VMUX_COMPOSITE1,349.vmux = 0,350},{351.type = CX88_VMUX_COMPOSITE2,352.vmux = 1,353},{354.type = CX88_VMUX_SVIDEO,355.vmux = 2,356}},357},358[CX88_BOARD_PROLINK_PLAYTVPVR] = {359.name = "Prolink PlayTV PVR",360.tuner_type = TUNER_PHILIPS_FM1236_MK3,361.radio_type = UNSET,362.tuner_addr = ADDR_UNSET,363.radio_addr = ADDR_UNSET,364.tda9887_conf = TDA9887_PRESENT,365.input = {{366.type = CX88_VMUX_TELEVISION,367.vmux = 0,368.gpio0 = 0xbff0,369},{370.type = CX88_VMUX_COMPOSITE1,371.vmux = 1,372.gpio0 = 0xbff3,373},{374.type = CX88_VMUX_SVIDEO,375.vmux = 2,376.gpio0 = 0xbff3,377}},378.radio = {379.type = CX88_RADIO,380.gpio0 = 0xbff0,381},382},383[CX88_BOARD_ASUS_PVR_416] = {384.name = "ASUS PVR-416",385.tuner_type = TUNER_PHILIPS_FM1236_MK3,386.radio_type = UNSET,387.tuner_addr = ADDR_UNSET,388.radio_addr = ADDR_UNSET,389.tda9887_conf = TDA9887_PRESENT,390.input = {{391.type = CX88_VMUX_TELEVISION,392.vmux = 0,393.gpio0 = 0x0000fde6,394},{395.type = CX88_VMUX_SVIDEO,396.vmux = 2,397.gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?398.audioroute = 1,399}},400.radio = {401.type = CX88_RADIO,402.gpio0 = 0x0000fde2,403},404.mpeg = CX88_MPEG_BLACKBIRD,405},406[CX88_BOARD_MSI_TVANYWHERE] = {407.name = "MSI TV-@nywhere",408.tuner_type = TUNER_MT2032,409.radio_type = UNSET,410.tuner_addr = ADDR_UNSET,411.radio_addr = ADDR_UNSET,412.tda9887_conf = TDA9887_PRESENT,413.input = {{414.type = CX88_VMUX_TELEVISION,415.vmux = 0,416.gpio0 = 0x00000fbf,417.gpio2 = 0x0000fc08,418},{419.type = CX88_VMUX_COMPOSITE1,420.vmux = 1,421.gpio0 = 0x00000fbf,422.gpio2 = 0x0000fc68,423},{424.type = CX88_VMUX_SVIDEO,425.vmux = 2,426.gpio0 = 0x00000fbf,427.gpio2 = 0x0000fc68,428}},429},430[CX88_BOARD_KWORLD_DVB_T] = {431.name = "KWorld/VStream XPert DVB-T",432.tuner_type = TUNER_ABSENT,433.radio_type = UNSET,434.tuner_addr = ADDR_UNSET,435.radio_addr = ADDR_UNSET,436.input = {{437.type = CX88_VMUX_COMPOSITE1,438.vmux = 1,439.gpio0 = 0x0700,440.gpio2 = 0x0101,441},{442.type = CX88_VMUX_SVIDEO,443.vmux = 2,444.gpio0 = 0x0700,445.gpio2 = 0x0101,446}},447.mpeg = CX88_MPEG_DVB,448},449[CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {450.name = "DViCO FusionHDTV DVB-T1",451.tuner_type = TUNER_ABSENT, /* No analog tuner */452.radio_type = UNSET,453.tuner_addr = ADDR_UNSET,454.radio_addr = ADDR_UNSET,455.input = {{456.type = CX88_VMUX_COMPOSITE1,457.vmux = 1,458.gpio0 = 0x000027df,459},{460.type = CX88_VMUX_SVIDEO,461.vmux = 2,462.gpio0 = 0x000027df,463}},464.mpeg = CX88_MPEG_DVB,465},466[CX88_BOARD_KWORLD_LTV883] = {467.name = "KWorld LTV883RF",468.tuner_type = TUNER_TNF_8831BGFF,469.radio_type = UNSET,470.tuner_addr = ADDR_UNSET,471.radio_addr = ADDR_UNSET,472.input = {{473.type = CX88_VMUX_TELEVISION,474.vmux = 0,475.gpio0 = 0x07f8,476},{477.type = CX88_VMUX_DEBUG,478.vmux = 0,479.gpio0 = 0x07f9, // mono from tuner chip480},{481.type = CX88_VMUX_COMPOSITE1,482.vmux = 1,483.gpio0 = 0x000007fa,484},{485.type = CX88_VMUX_SVIDEO,486.vmux = 2,487.gpio0 = 0x000007fa,488}},489.radio = {490.type = CX88_RADIO,491.gpio0 = 0x000007f8,492},493},494[CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {495.name = "DViCO FusionHDTV 3 Gold-Q",496.tuner_type = TUNER_MICROTUNE_4042FI5,497.radio_type = UNSET,498.tuner_addr = ADDR_UNSET,499.radio_addr = ADDR_UNSET,500/*501GPIO[0] resets DT3302 DTV receiver5020 - reset asserted5031 - normal operation504GPIO[1] mutes analog audio output connector5050 - enable selected source5061 - mute507GPIO[2] selects source for analog audio output connector5080 - analog audio input connector on tab5091 - analog DAC output from CX23881 chip510GPIO[3] selects RF input connector on tuner module5110 - RF connector labeled CABLE5121 - RF connector labeled ANT513GPIO[4] selects high RF for QAM256 mode5140 - normal RF5151 - high RF516*/517.input = {{518.type = CX88_VMUX_TELEVISION,519.vmux = 0,520.gpio0 = 0x0f0d,521},{522.type = CX88_VMUX_CABLE,523.vmux = 0,524.gpio0 = 0x0f05,525},{526.type = CX88_VMUX_COMPOSITE1,527.vmux = 1,528.gpio0 = 0x0f00,529},{530.type = CX88_VMUX_SVIDEO,531.vmux = 2,532.gpio0 = 0x0f00,533}},534.mpeg = CX88_MPEG_DVB,535},536[CX88_BOARD_HAUPPAUGE_DVB_T1] = {537.name = "Hauppauge Nova-T DVB-T",538.tuner_type = TUNER_ABSENT,539.radio_type = UNSET,540.tuner_addr = ADDR_UNSET,541.radio_addr = ADDR_UNSET,542.input = {{543.type = CX88_VMUX_DVB,544.vmux = 0,545}},546.mpeg = CX88_MPEG_DVB,547},548[CX88_BOARD_CONEXANT_DVB_T1] = {549.name = "Conexant DVB-T reference design",550.tuner_type = TUNER_ABSENT,551.radio_type = UNSET,552.tuner_addr = ADDR_UNSET,553.radio_addr = ADDR_UNSET,554.input = {{555.type = CX88_VMUX_DVB,556.vmux = 0,557}},558.mpeg = CX88_MPEG_DVB,559},560[CX88_BOARD_PROVIDEO_PV259] = {561.name = "Provideo PV259",562.tuner_type = TUNER_PHILIPS_FQ1216ME,563.radio_type = UNSET,564.tuner_addr = ADDR_UNSET,565.radio_addr = ADDR_UNSET,566.input = {{567.type = CX88_VMUX_TELEVISION,568.vmux = 0,569.audioroute = 1,570}},571.mpeg = CX88_MPEG_BLACKBIRD,572},573[CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {574.name = "DViCO FusionHDTV DVB-T Plus",575.tuner_type = TUNER_ABSENT, /* No analog tuner */576.radio_type = UNSET,577.tuner_addr = ADDR_UNSET,578.radio_addr = ADDR_UNSET,579.input = {{580.type = CX88_VMUX_COMPOSITE1,581.vmux = 1,582.gpio0 = 0x000027df,583},{584.type = CX88_VMUX_SVIDEO,585.vmux = 2,586.gpio0 = 0x000027df,587}},588.mpeg = CX88_MPEG_DVB,589},590[CX88_BOARD_DNTV_LIVE_DVB_T] = {591.name = "digitalnow DNTV Live! DVB-T",592.tuner_type = TUNER_ABSENT,593.radio_type = UNSET,594.tuner_addr = ADDR_UNSET,595.radio_addr = ADDR_UNSET,596.input = {{597.type = CX88_VMUX_COMPOSITE1,598.vmux = 1,599.gpio0 = 0x00000700,600.gpio2 = 0x00000101,601},{602.type = CX88_VMUX_SVIDEO,603.vmux = 2,604.gpio0 = 0x00000700,605.gpio2 = 0x00000101,606}},607.mpeg = CX88_MPEG_DVB,608},609[CX88_BOARD_PCHDTV_HD3000] = {610.name = "pcHDTV HD3000 HDTV",611.tuner_type = TUNER_THOMSON_DTT761X,612.radio_type = UNSET,613.tuner_addr = ADDR_UNSET,614.radio_addr = ADDR_UNSET,615.tda9887_conf = TDA9887_PRESENT,616/* GPIO[2] = audio source for analog audio out connector617* 0 = analog audio input connector618* 1 = CX88 audio DACs619*620* GPIO[7] = input to CX88's audio/chroma ADC621* 0 = FM 10.7 MHz IF622* 1 = Sound 4.5 MHz IF623*624* GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively625*626* GPIO[16] = Remote control input627*/628.input = {{629.type = CX88_VMUX_TELEVISION,630.vmux = 0,631.gpio0 = 0x00008484,632},{633.type = CX88_VMUX_COMPOSITE1,634.vmux = 1,635.gpio0 = 0x00008400,636},{637.type = CX88_VMUX_SVIDEO,638.vmux = 2,639.gpio0 = 0x00008400,640}},641.radio = {642.type = CX88_RADIO,643.gpio0 = 0x00008404,644},645.mpeg = CX88_MPEG_DVB,646},647[CX88_BOARD_HAUPPAUGE_ROSLYN] = {648// entry added by Kaustubh D. Bhalerao <[email protected]>649// GPIO values obtained from regspy, courtesy Sean Covel650.name = "Hauppauge WinTV 28xxx (Roslyn) models",651.tuner_type = UNSET,652.radio_type = UNSET,653.tuner_addr = ADDR_UNSET,654.radio_addr = ADDR_UNSET,655.input = {{656.type = CX88_VMUX_TELEVISION,657.vmux = 0,658.gpio0 = 0xed1a,659.gpio2 = 0x00ff,660},{661.type = CX88_VMUX_DEBUG,662.vmux = 0,663.gpio0 = 0xff01,664},{665.type = CX88_VMUX_COMPOSITE1,666.vmux = 1,667.gpio0 = 0xff02,668},{669.type = CX88_VMUX_SVIDEO,670.vmux = 2,671.gpio0 = 0xed92,672.gpio2 = 0x00ff,673}},674.radio = {675.type = CX88_RADIO,676.gpio0 = 0xed96,677.gpio2 = 0x00ff,678},679.mpeg = CX88_MPEG_BLACKBIRD,680},681[CX88_BOARD_DIGITALLOGIC_MEC] = {682.name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",683.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,684.radio_type = UNSET,685.tuner_addr = ADDR_UNSET,686.radio_addr = ADDR_UNSET,687.tda9887_conf = TDA9887_PRESENT,688.input = {{689.type = CX88_VMUX_TELEVISION,690.vmux = 0,691.gpio0 = 0x00009d80,692.audioroute = 1,693},{694.type = CX88_VMUX_COMPOSITE1,695.vmux = 1,696.gpio0 = 0x00009d76,697.audioroute = 1,698},{699.type = CX88_VMUX_SVIDEO,700.vmux = 2,701.gpio0 = 0x00009d76,702.audioroute = 1,703}},704.radio = {705.type = CX88_RADIO,706.gpio0 = 0x00009d00,707.audioroute = 1,708},709.mpeg = CX88_MPEG_BLACKBIRD,710},711[CX88_BOARD_IODATA_GVBCTV7E] = {712.name = "IODATA GV/BCTV7E",713.tuner_type = TUNER_PHILIPS_FQ1286,714.radio_type = UNSET,715.tuner_addr = ADDR_UNSET,716.radio_addr = ADDR_UNSET,717.tda9887_conf = TDA9887_PRESENT,718.input = {{719.type = CX88_VMUX_TELEVISION,720.vmux = 1,721.gpio1 = 0x0000e03f,722},{723.type = CX88_VMUX_COMPOSITE1,724.vmux = 2,725.gpio1 = 0x0000e07f,726},{727.type = CX88_VMUX_SVIDEO,728.vmux = 3,729.gpio1 = 0x0000e07f,730}}731},732[CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {733.name = "PixelView PlayTV Ultra Pro (Stereo)",734/* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */735.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,736.radio_type = UNSET,737.tuner_addr = ADDR_UNSET,738.radio_addr = ADDR_UNSET,739/* Some variants use a tda9874 and so need the tvaudio module. */740.audio_chip = V4L2_IDENT_TVAUDIO,741.input = {{742.type = CX88_VMUX_TELEVISION,743.vmux = 0,744.gpio0 = 0xbf61, /* internal decoder */745},{746.type = CX88_VMUX_COMPOSITE1,747.vmux = 1,748.gpio0 = 0xbf63,749},{750.type = CX88_VMUX_SVIDEO,751.vmux = 2,752.gpio0 = 0xbf63,753}},754.radio = {755.type = CX88_RADIO,756.gpio0 = 0xbf60,757},758},759[CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {760.name = "DViCO FusionHDTV 3 Gold-T",761.tuner_type = TUNER_THOMSON_DTT761X,762.radio_type = UNSET,763.tuner_addr = ADDR_UNSET,764.radio_addr = ADDR_UNSET,765.tda9887_conf = TDA9887_PRESENT,766.input = {{767.type = CX88_VMUX_TELEVISION,768.vmux = 0,769.gpio0 = 0x97ed,770},{771.type = CX88_VMUX_COMPOSITE1,772.vmux = 1,773.gpio0 = 0x97e9,774},{775.type = CX88_VMUX_SVIDEO,776.vmux = 2,777.gpio0 = 0x97e9,778}},779.mpeg = CX88_MPEG_DVB,780},781[CX88_BOARD_ADSTECH_DVB_T_PCI] = {782.name = "ADS Tech Instant TV DVB-T PCI",783.tuner_type = TUNER_ABSENT,784.radio_type = UNSET,785.tuner_addr = ADDR_UNSET,786.radio_addr = ADDR_UNSET,787.input = {{788.type = CX88_VMUX_COMPOSITE1,789.vmux = 1,790.gpio0 = 0x0700,791.gpio2 = 0x0101,792},{793.type = CX88_VMUX_SVIDEO,794.vmux = 2,795.gpio0 = 0x0700,796.gpio2 = 0x0101,797}},798.mpeg = CX88_MPEG_DVB,799},800[CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {801.name = "TerraTec Cinergy 1400 DVB-T",802.tuner_type = TUNER_ABSENT,803.input = {{804.type = CX88_VMUX_DVB,805.vmux = 0,806},{807.type = CX88_VMUX_COMPOSITE1,808.vmux = 2,809},{810.type = CX88_VMUX_SVIDEO,811.vmux = 2,812}},813.mpeg = CX88_MPEG_DVB,814},815[CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {816.name = "DViCO FusionHDTV 5 Gold",817.tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */818.radio_type = UNSET,819.tuner_addr = ADDR_UNSET,820.radio_addr = ADDR_UNSET,821.tda9887_conf = TDA9887_PRESENT,822.input = {{823.type = CX88_VMUX_TELEVISION,824.vmux = 0,825.gpio0 = 0x87fd,826},{827.type = CX88_VMUX_COMPOSITE1,828.vmux = 1,829.gpio0 = 0x87f9,830},{831.type = CX88_VMUX_SVIDEO,832.vmux = 2,833.gpio0 = 0x87f9,834}},835.mpeg = CX88_MPEG_DVB,836},837[CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {838.name = "AverMedia UltraTV Media Center PCI 550",839.tuner_type = TUNER_PHILIPS_FM1236_MK3,840.radio_type = UNSET,841.tuner_addr = ADDR_UNSET,842.radio_addr = ADDR_UNSET,843.tda9887_conf = TDA9887_PRESENT,844.input = {{845.type = CX88_VMUX_COMPOSITE1,846.vmux = 0,847.gpio0 = 0x0000cd73,848.audioroute = 1,849},{850.type = CX88_VMUX_SVIDEO,851.vmux = 1,852.gpio0 = 0x0000cd73,853.audioroute = 1,854},{855.type = CX88_VMUX_TELEVISION,856.vmux = 3,857.gpio0 = 0x0000cdb3,858.audioroute = 1,859}},860.radio = {861.type = CX88_RADIO,862.vmux = 2,863.gpio0 = 0x0000cdf3,864.audioroute = 1,865},866.mpeg = CX88_MPEG_BLACKBIRD,867},868[CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {869/* Alexander Wold <[email protected]> */870.name = "Kworld V-Stream Xpert DVD",871.tuner_type = UNSET,872.input = {{873.type = CX88_VMUX_COMPOSITE1,874.vmux = 1,875.gpio0 = 0x03000000,876.gpio1 = 0x01000000,877.gpio2 = 0x02000000,878.gpio3 = 0x00100000,879},{880.type = CX88_VMUX_SVIDEO,881.vmux = 2,882.gpio0 = 0x03000000,883.gpio1 = 0x01000000,884.gpio2 = 0x02000000,885.gpio3 = 0x00100000,886}},887},888[CX88_BOARD_ATI_HDTVWONDER] = {889.name = "ATI HDTV Wonder",890.tuner_type = TUNER_PHILIPS_TUV1236D,891.radio_type = UNSET,892.tuner_addr = ADDR_UNSET,893.radio_addr = ADDR_UNSET,894.input = {{895.type = CX88_VMUX_TELEVISION,896.vmux = 0,897.gpio0 = 0x00000ff7,898.gpio1 = 0x000000ff,899.gpio2 = 0x00000001,900.gpio3 = 0x00000000,901},{902.type = CX88_VMUX_COMPOSITE1,903.vmux = 1,904.gpio0 = 0x00000ffe,905.gpio1 = 0x000000ff,906.gpio2 = 0x00000001,907.gpio3 = 0x00000000,908},{909.type = CX88_VMUX_SVIDEO,910.vmux = 2,911.gpio0 = 0x00000ffe,912.gpio1 = 0x000000ff,913.gpio2 = 0x00000001,914.gpio3 = 0x00000000,915}},916.mpeg = CX88_MPEG_DVB,917},918[CX88_BOARD_WINFAST_DTV1000] = {919.name = "WinFast DTV1000-T",920.tuner_type = TUNER_ABSENT,921.radio_type = UNSET,922.tuner_addr = ADDR_UNSET,923.radio_addr = ADDR_UNSET,924.input = {{925.type = CX88_VMUX_DVB,926.vmux = 0,927},{928.type = CX88_VMUX_COMPOSITE1,929.vmux = 1,930},{931.type = CX88_VMUX_SVIDEO,932.vmux = 2,933}},934.mpeg = CX88_MPEG_DVB,935},936[CX88_BOARD_AVERTV_303] = {937.name = "AVerTV 303 (M126)",938.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,939.radio_type = UNSET,940.tuner_addr = ADDR_UNSET,941.radio_addr = ADDR_UNSET,942.tda9887_conf = TDA9887_PRESENT,943.input = {{944.type = CX88_VMUX_TELEVISION,945.vmux = 0,946.gpio0 = 0x00ff,947.gpio1 = 0xe09f,948.gpio2 = 0x0010,949.gpio3 = 0x0000,950},{951.type = CX88_VMUX_COMPOSITE1,952.vmux = 1,953.gpio0 = 0x00ff,954.gpio1 = 0xe05f,955.gpio2 = 0x0010,956.gpio3 = 0x0000,957},{958.type = CX88_VMUX_SVIDEO,959.vmux = 2,960.gpio0 = 0x00ff,961.gpio1 = 0xe05f,962.gpio2 = 0x0010,963.gpio3 = 0x0000,964}},965},966[CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {967.name = "Hauppauge Nova-S-Plus DVB-S",968.tuner_type = TUNER_ABSENT,969.radio_type = UNSET,970.tuner_addr = ADDR_UNSET,971.radio_addr = ADDR_UNSET,972.audio_chip = V4L2_IDENT_WM8775,973.i2sinputcntl = 2,974.input = {{975.type = CX88_VMUX_DVB,976.vmux = 0,977/* 2: Line-In */978.audioroute = 2,979},{980.type = CX88_VMUX_COMPOSITE1,981.vmux = 1,982/* 2: Line-In */983.audioroute = 2,984},{985.type = CX88_VMUX_SVIDEO,986.vmux = 2,987/* 2: Line-In */988.audioroute = 2,989}},990.mpeg = CX88_MPEG_DVB,991},992[CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {993.name = "Hauppauge Nova-SE2 DVB-S",994.tuner_type = TUNER_ABSENT,995.radio_type = UNSET,996.tuner_addr = ADDR_UNSET,997.radio_addr = ADDR_UNSET,998.input = {{999.type = CX88_VMUX_DVB,1000.vmux = 0,1001}},1002.mpeg = CX88_MPEG_DVB,1003},1004[CX88_BOARD_KWORLD_DVBS_100] = {1005.name = "KWorld DVB-S 100",1006.tuner_type = TUNER_ABSENT,1007.radio_type = UNSET,1008.tuner_addr = ADDR_UNSET,1009.radio_addr = ADDR_UNSET,1010.audio_chip = V4L2_IDENT_WM8775,1011.input = {{1012.type = CX88_VMUX_DVB,1013.vmux = 0,1014/* 2: Line-In */1015.audioroute = 2,1016},{1017.type = CX88_VMUX_COMPOSITE1,1018.vmux = 1,1019/* 2: Line-In */1020.audioroute = 2,1021},{1022.type = CX88_VMUX_SVIDEO,1023.vmux = 2,1024/* 2: Line-In */1025.audioroute = 2,1026}},1027.mpeg = CX88_MPEG_DVB,1028},1029[CX88_BOARD_HAUPPAUGE_HVR1100] = {1030.name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",1031.tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,1032.radio_type = UNSET,1033.tuner_addr = ADDR_UNSET,1034.radio_addr = ADDR_UNSET,1035.tda9887_conf = TDA9887_PRESENT,1036.input = {{1037.type = CX88_VMUX_TELEVISION,1038.vmux = 0,1039},{1040.type = CX88_VMUX_COMPOSITE1,1041.vmux = 1,1042},{1043.type = CX88_VMUX_SVIDEO,1044.vmux = 2,1045}},1046/* fixme: Add radio support */1047.mpeg = CX88_MPEG_DVB,1048},1049[CX88_BOARD_HAUPPAUGE_HVR1100LP] = {1050.name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",1051.tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,1052.radio_type = UNSET,1053.tuner_addr = ADDR_UNSET,1054.radio_addr = ADDR_UNSET,1055.tda9887_conf = TDA9887_PRESENT,1056.input = {{1057.type = CX88_VMUX_TELEVISION,1058.vmux = 0,1059},{1060.type = CX88_VMUX_COMPOSITE1,1061.vmux = 1,1062}},1063/* fixme: Add radio support */1064.mpeg = CX88_MPEG_DVB,1065},1066[CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {1067.name = "digitalnow DNTV Live! DVB-T Pro",1068.tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,1069.radio_type = UNSET,1070.tuner_addr = ADDR_UNSET,1071.radio_addr = ADDR_UNSET,1072.tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |1073TDA9887_PORT2_ACTIVE,1074.input = {{1075.type = CX88_VMUX_TELEVISION,1076.vmux = 0,1077.gpio0 = 0xf80808,1078},{1079.type = CX88_VMUX_COMPOSITE1,1080.vmux = 1,1081.gpio0 = 0xf80808,1082},{1083.type = CX88_VMUX_SVIDEO,1084.vmux = 2,1085.gpio0 = 0xf80808,1086}},1087.radio = {1088.type = CX88_RADIO,1089.gpio0 = 0xf80808,1090},1091.mpeg = CX88_MPEG_DVB,1092},1093[CX88_BOARD_KWORLD_DVB_T_CX22702] = {1094/* Kworld V-stream Xpert DVB-T with Thomson tuner */1095/* DTT 7579 Conexant CX22702-19 Conexant CX2388x */1096/* Manenti Marco <[email protected]> */1097.name = "KWorld/VStream XPert DVB-T with cx22702",1098.tuner_type = TUNER_ABSENT,1099.radio_type = UNSET,1100.tuner_addr = ADDR_UNSET,1101.radio_addr = ADDR_UNSET,1102.input = {{1103.type = CX88_VMUX_COMPOSITE1,1104.vmux = 1,1105.gpio0 = 0x0700,1106.gpio2 = 0x0101,1107},{1108.type = CX88_VMUX_SVIDEO,1109.vmux = 2,1110.gpio0 = 0x0700,1111.gpio2 = 0x0101,1112}},1113.mpeg = CX88_MPEG_DVB,1114},1115[CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {1116.name = "DViCO FusionHDTV DVB-T Dual Digital",1117.tuner_type = TUNER_ABSENT, /* No analog tuner */1118.radio_type = UNSET,1119.tuner_addr = ADDR_UNSET,1120.radio_addr = ADDR_UNSET,1121.input = {{1122.type = CX88_VMUX_COMPOSITE1,1123.vmux = 1,1124.gpio0 = 0x000067df,1125},{1126.type = CX88_VMUX_SVIDEO,1127.vmux = 2,1128.gpio0 = 0x000067df,1129}},1130.mpeg = CX88_MPEG_DVB,1131},1132[CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {1133.name = "KWorld HardwareMpegTV XPert",1134.tuner_type = TUNER_PHILIPS_TDA8290,1135.radio_type = UNSET,1136.tuner_addr = ADDR_UNSET,1137.radio_addr = ADDR_UNSET,1138.input = {{1139.type = CX88_VMUX_TELEVISION,1140.vmux = 0,1141.gpio0 = 0x3de2,1142.gpio2 = 0x00ff,1143},{1144.type = CX88_VMUX_COMPOSITE1,1145.vmux = 1,1146.gpio0 = 0x3de6,1147.audioroute = 1,1148},{1149.type = CX88_VMUX_SVIDEO,1150.vmux = 2,1151.gpio0 = 0x3de6,1152.audioroute = 1,1153}},1154.radio = {1155.type = CX88_RADIO,1156.gpio0 = 0x3de6,1157.gpio2 = 0x00ff,1158},1159.mpeg = CX88_MPEG_BLACKBIRD,1160},1161[CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {1162.name = "DViCO FusionHDTV DVB-T Hybrid",1163.tuner_type = TUNER_THOMSON_FE6600,1164.radio_type = UNSET,1165.tuner_addr = ADDR_UNSET,1166.radio_addr = ADDR_UNSET,1167.input = {{1168.type = CX88_VMUX_TELEVISION,1169.vmux = 0,1170.gpio0 = 0x0000a75f,1171},{1172.type = CX88_VMUX_COMPOSITE1,1173.vmux = 1,1174.gpio0 = 0x0000a75b,1175},{1176.type = CX88_VMUX_SVIDEO,1177.vmux = 2,1178.gpio0 = 0x0000a75b,1179}},1180.mpeg = CX88_MPEG_DVB,1181},1182[CX88_BOARD_PCHDTV_HD5500] = {1183.name = "pcHDTV HD5500 HDTV",1184.tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */1185.radio_type = UNSET,1186.tuner_addr = ADDR_UNSET,1187.radio_addr = ADDR_UNSET,1188.tda9887_conf = TDA9887_PRESENT,1189.input = {{1190.type = CX88_VMUX_TELEVISION,1191.vmux = 0,1192.gpio0 = 0x87fd,1193},{1194.type = CX88_VMUX_COMPOSITE1,1195.vmux = 1,1196.gpio0 = 0x87f9,1197},{1198.type = CX88_VMUX_SVIDEO,1199.vmux = 2,1200.gpio0 = 0x87f9,1201}},1202.mpeg = CX88_MPEG_DVB,1203},1204[CX88_BOARD_KWORLD_MCE200_DELUXE] = {1205/* FIXME: tested TV input only, disabled composite,1206svideo and radio until they can be tested also. */1207.name = "Kworld MCE 200 Deluxe",1208.tuner_type = TUNER_TENA_9533_DI,1209.radio_type = UNSET,1210.tda9887_conf = TDA9887_PRESENT,1211.tuner_addr = ADDR_UNSET,1212.radio_addr = ADDR_UNSET,1213.input = {{1214.type = CX88_VMUX_TELEVISION,1215.vmux = 0,1216.gpio0 = 0x0000BDE61217}},1218.mpeg = CX88_MPEG_BLACKBIRD,1219},1220[CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {1221/* FIXME: SVideo, Composite and FM inputs are untested */1222.name = "PixelView PlayTV P7000",1223.tuner_type = TUNER_PHILIPS_FM1216ME_MK3,1224.radio_type = UNSET,1225.tuner_addr = ADDR_UNSET,1226.radio_addr = ADDR_UNSET,1227.tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |1228TDA9887_PORT2_ACTIVE,1229.input = {{1230.type = CX88_VMUX_TELEVISION,1231.vmux = 0,1232.gpio0 = 0x5da6,1233}},1234.mpeg = CX88_MPEG_BLACKBIRD,1235},1236[CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {1237.name = "NPG Tech Real TV FM Top 10",1238.tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */1239.radio_type = UNSET,1240.tuner_addr = ADDR_UNSET,1241.radio_addr = ADDR_UNSET,1242.input = {{1243.type = CX88_VMUX_TELEVISION,1244.vmux = 0,1245.gpio0 = 0x0788,1246},{1247.type = CX88_VMUX_COMPOSITE1,1248.vmux = 1,1249.gpio0 = 0x078b,1250},{1251.type = CX88_VMUX_SVIDEO,1252.vmux = 2,1253.gpio0 = 0x078b,1254}},1255.radio = {1256.type = CX88_RADIO,1257.gpio0 = 0x074a,1258},1259},1260[CX88_BOARD_WINFAST_DTV2000H] = {1261.name = "WinFast DTV2000 H",1262.tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,1263.radio_type = UNSET,1264.tuner_addr = ADDR_UNSET,1265.radio_addr = ADDR_UNSET,1266.tda9887_conf = TDA9887_PRESENT,1267.input = {{1268.type = CX88_VMUX_TELEVISION,1269.vmux = 0,1270.gpio0 = 0x00017304,1271.gpio1 = 0x00008203,1272.gpio2 = 0x00017304,1273.gpio3 = 0x02000000,1274}, {1275.type = CX88_VMUX_COMPOSITE1,1276.vmux = 1,1277.gpio0 = 0x0001d701,1278.gpio1 = 0x0000b207,1279.gpio2 = 0x0001d701,1280.gpio3 = 0x02000000,1281}, {1282.type = CX88_VMUX_COMPOSITE2,1283.vmux = 2,1284.gpio0 = 0x0001d503,1285.gpio1 = 0x0000b207,1286.gpio2 = 0x0001d503,1287.gpio3 = 0x02000000,1288}, {1289.type = CX88_VMUX_SVIDEO,1290.vmux = 3,1291.gpio0 = 0x0001d701,1292.gpio1 = 0x0000b207,1293.gpio2 = 0x0001d701,1294.gpio3 = 0x02000000,1295}},1296.radio = {1297.type = CX88_RADIO,1298.gpio0 = 0x00015702,1299.gpio1 = 0x0000f207,1300.gpio2 = 0x00015702,1301.gpio3 = 0x02000000,1302},1303.mpeg = CX88_MPEG_DVB,1304},1305[CX88_BOARD_WINFAST_DTV2000H_J] = {1306.name = "WinFast DTV2000 H rev. J",1307.tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,1308.radio_type = UNSET,1309.tuner_addr = ADDR_UNSET,1310.radio_addr = ADDR_UNSET,1311.tda9887_conf = TDA9887_PRESENT,1312.input = {{1313.type = CX88_VMUX_TELEVISION,1314.vmux = 0,1315.gpio0 = 0x00017300,1316.gpio1 = 0x00008207,1317.gpio2 = 0x00000000,1318.gpio3 = 0x02000000,1319},{1320.type = CX88_VMUX_TELEVISION,1321.vmux = 0,1322.gpio0 = 0x00018300,1323.gpio1 = 0x0000f207,1324.gpio2 = 0x00017304,1325.gpio3 = 0x02000000,1326},{1327.type = CX88_VMUX_COMPOSITE1,1328.vmux = 1,1329.gpio0 = 0x00018301,1330.gpio1 = 0x0000f207,1331.gpio2 = 0x00017304,1332.gpio3 = 0x02000000,1333},{1334.type = CX88_VMUX_SVIDEO,1335.vmux = 2,1336.gpio0 = 0x00018301,1337.gpio1 = 0x0000f207,1338.gpio2 = 0x00017304,1339.gpio3 = 0x02000000,1340}},1341.radio = {1342.type = CX88_RADIO,1343.gpio0 = 0x00015702,1344.gpio1 = 0x0000f207,1345.gpio2 = 0x00015702,1346.gpio3 = 0x02000000,1347},1348.mpeg = CX88_MPEG_DVB,1349},1350[CX88_BOARD_GENIATECH_DVBS] = {1351.name = "Geniatech DVB-S",1352.tuner_type = TUNER_ABSENT,1353.radio_type = UNSET,1354.tuner_addr = ADDR_UNSET,1355.radio_addr = ADDR_UNSET,1356.input = {{1357.type = CX88_VMUX_DVB,1358.vmux = 0,1359},{1360.type = CX88_VMUX_COMPOSITE1,1361.vmux = 1,1362}},1363.mpeg = CX88_MPEG_DVB,1364},1365[CX88_BOARD_HAUPPAUGE_HVR3000] = {1366.name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",1367.tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,1368.radio_type = UNSET,1369.tuner_addr = ADDR_UNSET,1370.radio_addr = ADDR_UNSET,1371.tda9887_conf = TDA9887_PRESENT,1372.audio_chip = V4L2_IDENT_WM8775,1373.input = {{1374.type = CX88_VMUX_TELEVISION,1375.vmux = 0,1376.gpio0 = 0x84bf,1377/* 1: TV Audio / FM Mono */1378.audioroute = 1,1379},{1380.type = CX88_VMUX_COMPOSITE1,1381.vmux = 1,1382.gpio0 = 0x84bf,1383/* 2: Line-In */1384.audioroute = 2,1385},{1386.type = CX88_VMUX_SVIDEO,1387.vmux = 2,1388.gpio0 = 0x84bf,1389/* 2: Line-In */1390.audioroute = 2,1391}},1392.radio = {1393.type = CX88_RADIO,1394.gpio0 = 0x84bf,1395/* 4: FM Stereo (untested) */1396.audioroute = 8,1397},1398.mpeg = CX88_MPEG_DVB,1399.num_frontends = 2,1400},1401[CX88_BOARD_NORWOOD_MICRO] = {1402.name = "Norwood Micro TV Tuner",1403.tuner_type = TUNER_TNF_5335MF,1404.radio_type = UNSET,1405.tuner_addr = ADDR_UNSET,1406.radio_addr = ADDR_UNSET,1407.input = {{1408.type = CX88_VMUX_TELEVISION,1409.vmux = 0,1410.gpio0 = 0x0709,1411},{1412.type = CX88_VMUX_COMPOSITE1,1413.vmux = 1,1414.gpio0 = 0x070b,1415},{1416.type = CX88_VMUX_SVIDEO,1417.vmux = 2,1418.gpio0 = 0x070b,1419}},1420},1421[CX88_BOARD_TE_DTV_250_OEM_SWANN] = {1422.name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",1423.tuner_type = TUNER_LG_PAL_NEW_TAPC,1424.radio_type = UNSET,1425.tuner_addr = ADDR_UNSET,1426.radio_addr = ADDR_UNSET,1427.input = {{1428.type = CX88_VMUX_TELEVISION,1429.vmux = 0,1430.gpio0 = 0x003fffff,1431.gpio1 = 0x00e00000,1432.gpio2 = 0x003fffff,1433.gpio3 = 0x02000000,1434},{1435.type = CX88_VMUX_COMPOSITE1,1436.vmux = 1,1437.gpio0 = 0x003fffff,1438.gpio1 = 0x00e00000,1439.gpio2 = 0x003fffff,1440.gpio3 = 0x02000000,1441},{1442.type = CX88_VMUX_SVIDEO,1443.vmux = 2,1444.gpio0 = 0x003fffff,1445.gpio1 = 0x00e00000,1446.gpio2 = 0x003fffff,1447.gpio3 = 0x02000000,1448}},1449},1450[CX88_BOARD_HAUPPAUGE_HVR1300] = {1451.name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",1452.tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,1453.radio_type = UNSET,1454.tuner_addr = ADDR_UNSET,1455.radio_addr = ADDR_UNSET,1456.tda9887_conf = TDA9887_PRESENT,1457.audio_chip = V4L2_IDENT_WM8775,1458/*1459* gpio0 as reported by Mike Crash <mike AT mikecrash.com>1460*/1461.input = {{1462.type = CX88_VMUX_TELEVISION,1463.vmux = 0,1464.gpio0 = 0xef88,1465/* 1: TV Audio / FM Mono */1466.audioroute = 1,1467},{1468.type = CX88_VMUX_COMPOSITE1,1469.vmux = 1,1470.gpio0 = 0xef88,1471/* 2: Line-In */1472.audioroute = 2,1473},{1474.type = CX88_VMUX_SVIDEO,1475.vmux = 2,1476.gpio0 = 0xef88,1477/* 2: Line-In */1478.audioroute = 2,1479}},1480.mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,1481.radio = {1482.type = CX88_RADIO,1483.gpio0 = 0xef88,1484/* 4: FM Stereo (untested) */1485.audioroute = 8,1486},1487},1488[CX88_BOARD_SAMSUNG_SMT_7020] = {1489.name = "Samsung SMT 7020 DVB-S",1490.tuner_type = TUNER_ABSENT,1491.radio_type = UNSET,1492.tuner_addr = ADDR_UNSET,1493.radio_addr = ADDR_UNSET,1494.input = { {1495.type = CX88_VMUX_DVB,1496.vmux = 0,1497} },1498.mpeg = CX88_MPEG_DVB,1499},1500[CX88_BOARD_ADSTECH_PTV_390] = {1501.name = "ADS Tech Instant Video PCI",1502.tuner_type = TUNER_ABSENT,1503.radio_type = UNSET,1504.tuner_addr = ADDR_UNSET,1505.radio_addr = ADDR_UNSET,1506.input = {{1507.type = CX88_VMUX_DEBUG,1508.vmux = 3,1509.gpio0 = 0x04ff,1510},{1511.type = CX88_VMUX_COMPOSITE1,1512.vmux = 1,1513.gpio0 = 0x07fa,1514},{1515.type = CX88_VMUX_SVIDEO,1516.vmux = 2,1517.gpio0 = 0x07fa,1518}},1519},1520[CX88_BOARD_PINNACLE_PCTV_HD_800i] = {1521.name = "Pinnacle PCTV HD 800i",1522.tuner_type = TUNER_XC5000,1523.radio_type = UNSET,1524.tuner_addr = ADDR_UNSET,1525.radio_addr = ADDR_UNSET,1526.input = {{1527.type = CX88_VMUX_TELEVISION,1528.vmux = 0,1529.gpio0 = 0x04fb,1530.gpio1 = 0x10ff,1531},{1532.type = CX88_VMUX_COMPOSITE1,1533.vmux = 1,1534.gpio0 = 0x04fb,1535.gpio1 = 0x10ef,1536.audioroute = 1,1537},{1538.type = CX88_VMUX_SVIDEO,1539.vmux = 2,1540.gpio0 = 0x04fb,1541.gpio1 = 0x10ef,1542.audioroute = 1,1543}},1544.mpeg = CX88_MPEG_DVB,1545},1546[CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {1547.name = "DViCO FusionHDTV 5 PCI nano",1548/* xc3008 tuner, digital only for now */1549.tuner_type = TUNER_ABSENT,1550.radio_type = UNSET,1551.tuner_addr = ADDR_UNSET,1552.radio_addr = ADDR_UNSET,1553.input = {{1554.type = CX88_VMUX_TELEVISION,1555.vmux = 0,1556.gpio0 = 0x000027df, /* Unconfirmed */1557}, {1558.type = CX88_VMUX_COMPOSITE1,1559.vmux = 1,1560.gpio0 = 0x000027df, /* Unconfirmed */1561.audioroute = 1,1562}, {1563.type = CX88_VMUX_SVIDEO,1564.vmux = 2,1565.gpio0 = 0x000027df, /* Unconfirmed */1566.audioroute = 1,1567} },1568.mpeg = CX88_MPEG_DVB,1569},1570[CX88_BOARD_PINNACLE_HYBRID_PCTV] = {1571.name = "Pinnacle Hybrid PCTV",1572.tuner_type = TUNER_XC2028,1573.tuner_addr = 0x61,1574.radio_type = TUNER_XC2028,1575.radio_addr = 0x61,1576.input = { {1577.type = CX88_VMUX_TELEVISION,1578.vmux = 0,1579.gpio0 = 0x004ff,1580.gpio1 = 0x010ff,1581.gpio2 = 0x00001,1582}, {1583.type = CX88_VMUX_COMPOSITE1,1584.vmux = 1,1585.gpio0 = 0x004fb,1586.gpio1 = 0x010ef,1587.audioroute = 1,1588}, {1589.type = CX88_VMUX_SVIDEO,1590.vmux = 2,1591.gpio0 = 0x004fb,1592.gpio1 = 0x010ef,1593.audioroute = 1,1594} },1595.radio = {1596.type = CX88_RADIO,1597.gpio0 = 0x004ff,1598.gpio1 = 0x010ff,1599.gpio2 = 0x0ff,1600},1601.mpeg = CX88_MPEG_DVB,1602},1603/* Terry Wu <[email protected]> */1604/* TV Audio : set GPIO 2, 18, 19 value to 0, 1, 0 */1605/* FM Audio : set GPIO 2, 18, 19 value to 0, 0, 0 */1606/* Line-in Audio : set GPIO 2, 18, 19 value to 0, 1, 1 */1607/* Mute Audio : set GPIO 2 value to 1 */1608[CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {1609.name = "Leadtek TV2000 XP Global",1610.tuner_type = TUNER_XC2028,1611.tuner_addr = 0x61,1612.radio_type = TUNER_XC2028,1613.radio_addr = 0x61,1614.input = { {1615.type = CX88_VMUX_TELEVISION,1616.vmux = 0,1617.gpio0 = 0x0400, /* pin 2 = 0 */1618.gpio1 = 0x0000,1619.gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */1620.gpio3 = 0x0000,1621}, {1622.type = CX88_VMUX_COMPOSITE1,1623.vmux = 1,1624.gpio0 = 0x0400, /* pin 2 = 0 */1625.gpio1 = 0x0000,1626.gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */1627.gpio3 = 0x0000,1628}, {1629.type = CX88_VMUX_SVIDEO,1630.vmux = 2,1631.gpio0 = 0x0400, /* pin 2 = 0 */1632.gpio1 = 0x0000,1633.gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */1634.gpio3 = 0x0000,1635} },1636.radio = {1637.type = CX88_RADIO,1638.gpio0 = 0x0400, /* pin 2 = 0 */1639.gpio1 = 0x0000,1640.gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */1641.gpio3 = 0x0000,1642},1643},1644[CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {1645.name = "PowerColor RA330", /* Long names may confuse LIRC. */1646.tuner_type = TUNER_XC2028,1647.tuner_addr = 0x61,1648.input = { {1649.type = CX88_VMUX_DEBUG,1650.vmux = 3, /* Due to the way the cx88 driver is written, */1651.gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */1652.gpio1 = 0xf39d, /* through without this entry. Furthermore, if */1653.gpio3 = 0x0000, /* the TV mux entry is first, you get audio */1654}, { /* from the tuner on boot for a little while. */1655.type = CX88_VMUX_TELEVISION,1656.vmux = 0,1657.gpio0 = 0x00ff,1658.gpio1 = 0xf35d,1659.gpio3 = 0x0000,1660}, {1661.type = CX88_VMUX_COMPOSITE1,1662.vmux = 1,1663.gpio0 = 0x00ff,1664.gpio1 = 0xf37d,1665.gpio3 = 0x0000,1666}, {1667.type = CX88_VMUX_SVIDEO,1668.vmux = 2,1669.gpio0 = 0x000ff,1670.gpio1 = 0x0f37d,1671.gpio3 = 0x00000,1672} },1673.radio = {1674.type = CX88_RADIO,1675.gpio0 = 0x000ff,1676.gpio1 = 0x0f35d,1677.gpio3 = 0x00000,1678},1679},1680[CX88_BOARD_GENIATECH_X8000_MT] = {1681/* Also PowerColor Real Angel 330 and Geniatech X800 OEM */1682.name = "Geniatech X8000-MT DVBT",1683.tuner_type = TUNER_XC2028,1684.tuner_addr = 0x61,1685.input = { {1686.type = CX88_VMUX_TELEVISION,1687.vmux = 0,1688.gpio0 = 0x00000000,1689.gpio1 = 0x00e3e341,1690.gpio2 = 0x00000000,1691.gpio3 = 0x00000000,1692}, {1693.type = CX88_VMUX_COMPOSITE1,1694.vmux = 1,1695.gpio0 = 0x00000000,1696.gpio1 = 0x00e3e361,1697.gpio2 = 0x00000000,1698.gpio3 = 0x00000000,1699}, {1700.type = CX88_VMUX_SVIDEO,1701.vmux = 2,1702.gpio0 = 0x00000000,1703.gpio1 = 0x00e3e361,1704.gpio2 = 0x00000000,1705.gpio3 = 0x00000000,1706} },1707.radio = {1708.type = CX88_RADIO,1709.gpio0 = 0x00000000,1710.gpio1 = 0x00e3e341,1711.gpio2 = 0x00000000,1712.gpio3 = 0x00000000,1713},1714.mpeg = CX88_MPEG_DVB,1715},1716[CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {1717.name = "DViCO FusionHDTV DVB-T PRO",1718.tuner_type = TUNER_XC2028,1719.tuner_addr = 0x61,1720.radio_type = UNSET,1721.radio_addr = ADDR_UNSET,1722.input = { {1723.type = CX88_VMUX_COMPOSITE1,1724.vmux = 1,1725.gpio0 = 0x000067df,1726}, {1727.type = CX88_VMUX_SVIDEO,1728.vmux = 2,1729.gpio0 = 0x000067df,1730} },1731.mpeg = CX88_MPEG_DVB,1732},1733[CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {1734.name = "DViCO FusionHDTV 7 Gold",1735.tuner_type = TUNER_XC5000,1736.radio_type = UNSET,1737.tuner_addr = ADDR_UNSET,1738.radio_addr = ADDR_UNSET,1739.input = {{1740.type = CX88_VMUX_TELEVISION,1741.vmux = 0,1742.gpio0 = 0x10df,1743},{1744.type = CX88_VMUX_COMPOSITE1,1745.vmux = 1,1746.gpio0 = 0x16d9,1747},{1748.type = CX88_VMUX_SVIDEO,1749.vmux = 2,1750.gpio0 = 0x16d9,1751}},1752.mpeg = CX88_MPEG_DVB,1753},1754[CX88_BOARD_PROLINK_PV_8000GT] = {1755.name = "Prolink Pixelview MPEG 8000GT",1756.tuner_type = TUNER_XC2028,1757.tuner_addr = 0x61,1758.input = { {1759.type = CX88_VMUX_TELEVISION,1760.vmux = 0,1761.gpio0 = 0x0ff,1762.gpio2 = 0x0cfb,1763}, {1764.type = CX88_VMUX_COMPOSITE1,1765.vmux = 1,1766.gpio2 = 0x0cfb,1767}, {1768.type = CX88_VMUX_SVIDEO,1769.vmux = 2,1770.gpio2 = 0x0cfb,1771} },1772.radio = {1773.type = CX88_RADIO,1774.gpio2 = 0x0cfb,1775},1776},1777[CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {1778.name = "Prolink Pixelview Global Extreme",1779.tuner_type = TUNER_XC2028,1780.tuner_addr = 0x61,1781.input = { {1782.type = CX88_VMUX_TELEVISION,1783.vmux = 0,1784.gpio0 = 0x04fb,1785.gpio1 = 0x04080,1786.gpio2 = 0x0cf7,1787}, {1788.type = CX88_VMUX_COMPOSITE1,1789.vmux = 1,1790.gpio0 = 0x04fb,1791.gpio1 = 0x04080,1792.gpio2 = 0x0cfb,1793}, {1794.type = CX88_VMUX_SVIDEO,1795.vmux = 2,1796.gpio0 = 0x04fb,1797.gpio1 = 0x04080,1798.gpio2 = 0x0cfb,1799} },1800.radio = {1801.type = CX88_RADIO,1802.gpio0 = 0x04ff,1803.gpio1 = 0x04080,1804.gpio2 = 0x0cf7,1805},1806},1807/* Both radio, analog and ATSC work with this board.1808However, for analog to work, s5h1409 gate should be open,1809otherwise, tuner-xc3028 won't be detected.1810A proper fix require using the newer i2c methods to add1811tuner-xc3028 without doing an i2c probe.1812*/1813[CX88_BOARD_KWORLD_ATSC_120] = {1814.name = "Kworld PlusTV HD PCI 120 (ATSC 120)",1815.tuner_type = TUNER_XC2028,1816.radio_type = UNSET,1817.tuner_addr = ADDR_UNSET,1818.radio_addr = ADDR_UNSET,1819.input = { {1820.type = CX88_VMUX_TELEVISION,1821.vmux = 0,1822.gpio0 = 0x000000ff,1823.gpio1 = 0x0000f35d,1824.gpio2 = 0x00000000,1825}, {1826.type = CX88_VMUX_COMPOSITE1,1827.vmux = 1,1828.gpio0 = 0x000000ff,1829.gpio1 = 0x0000f37e,1830.gpio2 = 0x00000000,1831}, {1832.type = CX88_VMUX_SVIDEO,1833.vmux = 2,1834.gpio0 = 0x000000ff,1835.gpio1 = 0x0000f37e,1836.gpio2 = 0x00000000,1837} },1838.radio = {1839.type = CX88_RADIO,1840.gpio0 = 0x000000ff,1841.gpio1 = 0x0000f35d,1842.gpio2 = 0x00000000,1843},1844.mpeg = CX88_MPEG_DVB,1845},1846[CX88_BOARD_HAUPPAUGE_HVR4000] = {1847.name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",1848.tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,1849.radio_type = UNSET,1850.tuner_addr = ADDR_UNSET,1851.radio_addr = ADDR_UNSET,1852.tda9887_conf = TDA9887_PRESENT,1853.audio_chip = V4L2_IDENT_WM8775,1854/*1855* GPIO0 (WINTV2000)1856*1857* Analogue SAT DVB-T1858* Antenna 0xc4bf 0xc4bb1859* Composite 0xc4bf 0xc4bb1860* S-Video 0xc4bf 0xc4bb1861* Composite1 0xc4ff 0xc4fb1862* S-Video1 0xc4ff 0xc4fb1863*1864* BIT VALUE FUNCTION GP{x}_IO1865* 0 1 I:?1866* 1 1 I:?1867* 2 1 O:MPEG PORT 0=DVB-T 1=DVB-S1868* 3 1 I:?1869* 4 1 I:?1870* 5 1 I:?1871* 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION1872* 7 1 O:DVB-T DEMOD RESET LOW1873*1874* BIT VALUE FUNCTION GP{x}_OE1875* 8 0 I1876* 9 0 I1877* a 1 O1878* b 0 I1879* c 0 I1880* d 0 I1881* e 1 O1882* f 1 O1883*1884* WM8775 ADC1885*1886* 1: TV Audio / FM Mono1887* 2: Line-In1888* 3: Line-In Expansion1889* 4: FM Stereo1890*/1891.input = {{1892.type = CX88_VMUX_TELEVISION,1893.vmux = 0,1894.gpio0 = 0xc4bf,1895/* 1: TV Audio / FM Mono */1896.audioroute = 1,1897}, {1898.type = CX88_VMUX_COMPOSITE1,1899.vmux = 1,1900.gpio0 = 0xc4bf,1901/* 2: Line-In */1902.audioroute = 2,1903}, {1904.type = CX88_VMUX_SVIDEO,1905.vmux = 2,1906.gpio0 = 0xc4bf,1907/* 2: Line-In */1908.audioroute = 2,1909} },1910.radio = {1911.type = CX88_RADIO,1912.gpio0 = 0xc4bf,1913/* 4: FM Stereo */1914.audioroute = 8,1915},1916.mpeg = CX88_MPEG_DVB,1917.num_frontends = 2,1918},1919[CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {1920.name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",1921.tuner_type = UNSET,1922.radio_type = UNSET,1923.tuner_addr = ADDR_UNSET,1924.radio_addr = ADDR_UNSET,1925.input = {{1926.type = CX88_VMUX_DVB,1927.vmux = 0,1928} },1929.mpeg = CX88_MPEG_DVB,1930},1931[CX88_BOARD_TEVII_S420] = {1932.name = "TeVii S420 DVB-S",1933.tuner_type = UNSET,1934.radio_type = UNSET,1935.tuner_addr = ADDR_UNSET,1936.radio_addr = ADDR_UNSET,1937.input = {{1938.type = CX88_VMUX_DVB,1939.vmux = 0,1940} },1941.mpeg = CX88_MPEG_DVB,1942},1943[CX88_BOARD_TEVII_S460] = {1944.name = "TeVii S460 DVB-S/S2",1945.tuner_type = UNSET,1946.radio_type = UNSET,1947.tuner_addr = ADDR_UNSET,1948.radio_addr = ADDR_UNSET,1949.input = {{1950.type = CX88_VMUX_DVB,1951.vmux = 0,1952} },1953.mpeg = CX88_MPEG_DVB,1954},1955[CX88_BOARD_TEVII_S464] = {1956.name = "TeVii S464 DVB-S/S2",1957.tuner_type = UNSET,1958.radio_type = UNSET,1959.tuner_addr = ADDR_UNSET,1960.radio_addr = ADDR_UNSET,1961.input = {{1962.type = CX88_VMUX_DVB,1963.vmux = 0,1964} },1965.mpeg = CX88_MPEG_DVB,1966},1967[CX88_BOARD_OMICOM_SS4_PCI] = {1968.name = "Omicom SS4 DVB-S/S2 PCI",1969.tuner_type = UNSET,1970.radio_type = UNSET,1971.tuner_addr = ADDR_UNSET,1972.radio_addr = ADDR_UNSET,1973.input = {{1974.type = CX88_VMUX_DVB,1975.vmux = 0,1976} },1977.mpeg = CX88_MPEG_DVB,1978},1979[CX88_BOARD_TBS_8910] = {1980.name = "TBS 8910 DVB-S",1981.tuner_type = UNSET,1982.radio_type = UNSET,1983.tuner_addr = ADDR_UNSET,1984.radio_addr = ADDR_UNSET,1985.input = {{1986.type = CX88_VMUX_DVB,1987.vmux = 0,1988} },1989.mpeg = CX88_MPEG_DVB,1990},1991[CX88_BOARD_TBS_8920] = {1992.name = "TBS 8920 DVB-S/S2",1993.tuner_type = TUNER_ABSENT,1994.radio_type = UNSET,1995.tuner_addr = ADDR_UNSET,1996.radio_addr = ADDR_UNSET,1997.input = {{1998.type = CX88_VMUX_DVB,1999.vmux = 0,2000.gpio0 = 0x8080,2001} },2002.mpeg = CX88_MPEG_DVB,2003},2004[CX88_BOARD_PROF_6200] = {2005.name = "Prof 6200 DVB-S",2006.tuner_type = UNSET,2007.radio_type = UNSET,2008.tuner_addr = ADDR_UNSET,2009.radio_addr = ADDR_UNSET,2010.input = {{2011.type = CX88_VMUX_DVB,2012.vmux = 0,2013} },2014.mpeg = CX88_MPEG_DVB,2015},2016[CX88_BOARD_PROF_7300] = {2017.name = "PROF 7300 DVB-S/S2",2018.tuner_type = UNSET,2019.radio_type = UNSET,2020.tuner_addr = ADDR_UNSET,2021.radio_addr = ADDR_UNSET,2022.input = {{2023.type = CX88_VMUX_DVB,2024.vmux = 0,2025} },2026.mpeg = CX88_MPEG_DVB,2027},2028[CX88_BOARD_SATTRADE_ST4200] = {2029.name = "SATTRADE ST4200 DVB-S/S2",2030.tuner_type = UNSET,2031.radio_type = UNSET,2032.tuner_addr = ADDR_UNSET,2033.radio_addr = ADDR_UNSET,2034.input = {{2035.type = CX88_VMUX_DVB,2036.vmux = 0,2037} },2038.mpeg = CX88_MPEG_DVB,2039},2040[CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII] = {2041.name = "Terratec Cinergy HT PCI MKII",2042.tuner_type = TUNER_XC2028,2043.tuner_addr = 0x61,2044.radio_type = TUNER_XC2028,2045.radio_addr = 0x61,2046.input = { {2047.type = CX88_VMUX_TELEVISION,2048.vmux = 0,2049.gpio0 = 0x004ff,2050.gpio1 = 0x010ff,2051.gpio2 = 0x00001,2052}, {2053.type = CX88_VMUX_COMPOSITE1,2054.vmux = 1,2055.gpio0 = 0x004fb,2056.gpio1 = 0x010ef,2057.audioroute = 1,2058}, {2059.type = CX88_VMUX_SVIDEO,2060.vmux = 2,2061.gpio0 = 0x004fb,2062.gpio1 = 0x010ef,2063.audioroute = 1,2064} },2065.radio = {2066.type = CX88_RADIO,2067.gpio0 = 0x004ff,2068.gpio1 = 0x010ff,2069.gpio2 = 0x0ff,2070},2071.mpeg = CX88_MPEG_DVB,2072},2073[CX88_BOARD_HAUPPAUGE_IRONLY] = {2074.name = "Hauppauge WinTV-IR Only",2075.tuner_type = UNSET,2076.radio_type = UNSET,2077.tuner_addr = ADDR_UNSET,2078.radio_addr = ADDR_UNSET,2079},2080[CX88_BOARD_WINFAST_DTV1800H] = {2081.name = "Leadtek WinFast DTV1800 Hybrid",2082.tuner_type = TUNER_XC2028,2083.radio_type = TUNER_XC2028,2084.tuner_addr = 0x61,2085.radio_addr = 0x61,2086/*2087* GPIO setting2088*2089* 2: mute (0=off,1=on)2090* 12: tuner reset pin2091* 13: audio source (0=tuner audio,1=line in)2092* 14: FM (0=on,1=off ???)2093*/2094.input = {{2095.type = CX88_VMUX_TELEVISION,2096.vmux = 0,2097.gpio0 = 0x0400, /* pin 2 = 0 */2098.gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */2099.gpio2 = 0x0000,2100}, {2101.type = CX88_VMUX_COMPOSITE1,2102.vmux = 1,2103.gpio0 = 0x0400, /* pin 2 = 0 */2104.gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */2105.gpio2 = 0x0000,2106}, {2107.type = CX88_VMUX_SVIDEO,2108.vmux = 2,2109.gpio0 = 0x0400, /* pin 2 = 0 */2110.gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */2111.gpio2 = 0x0000,2112} },2113.radio = {2114.type = CX88_RADIO,2115.gpio0 = 0x0400, /* pin 2 = 0 */2116.gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */2117.gpio2 = 0x0000,2118},2119.mpeg = CX88_MPEG_DVB,2120},2121[CX88_BOARD_PROF_7301] = {2122.name = "Prof 7301 DVB-S/S2",2123.tuner_type = UNSET,2124.radio_type = UNSET,2125.tuner_addr = ADDR_UNSET,2126.radio_addr = ADDR_UNSET,2127.input = { {2128.type = CX88_VMUX_DVB,2129.vmux = 0,2130} },2131.mpeg = CX88_MPEG_DVB,2132},2133[CX88_BOARD_TWINHAN_VP1027_DVBS] = {2134.name = "Twinhan VP-1027 DVB-S",2135.tuner_type = TUNER_ABSENT,2136.radio_type = UNSET,2137.tuner_addr = ADDR_UNSET,2138.radio_addr = ADDR_UNSET,2139.input = {{2140.type = CX88_VMUX_DVB,2141.vmux = 0,2142} },2143.mpeg = CX88_MPEG_DVB,2144},2145};21462147/* ------------------------------------------------------------------ */2148/* PCI subsystem IDs */21492150static const struct cx88_subid cx88_subids[] = {2151{2152.subvendor = 0x0070,2153.subdevice = 0x3400,2154.card = CX88_BOARD_HAUPPAUGE,2155},{2156.subvendor = 0x0070,2157.subdevice = 0x3401,2158.card = CX88_BOARD_HAUPPAUGE,2159},{2160.subvendor = 0x14c7,2161.subdevice = 0x0106,2162.card = CX88_BOARD_GDI,2163},{2164.subvendor = 0x14c7,2165.subdevice = 0x0107, /* with mpeg encoder */2166.card = CX88_BOARD_GDI,2167},{2168.subvendor = PCI_VENDOR_ID_ATI,2169.subdevice = 0x00f8,2170.card = CX88_BOARD_ATI_WONDER_PRO,2171}, {2172.subvendor = PCI_VENDOR_ID_ATI,2173.subdevice = 0x00f9,2174.card = CX88_BOARD_ATI_WONDER_PRO,2175}, {2176.subvendor = 0x107d,2177.subdevice = 0x6611,2178.card = CX88_BOARD_WINFAST2000XP_EXPERT,2179},{2180.subvendor = 0x107d,2181.subdevice = 0x6613, /* NTSC */2182.card = CX88_BOARD_WINFAST2000XP_EXPERT,2183},{2184.subvendor = 0x107d,2185.subdevice = 0x6620,2186.card = CX88_BOARD_WINFAST_DV2000,2187},{2188.subvendor = 0x107d,2189.subdevice = 0x663b,2190.card = CX88_BOARD_LEADTEK_PVR2000,2191},{2192.subvendor = 0x107d,2193.subdevice = 0x663c,2194.card = CX88_BOARD_LEADTEK_PVR2000,2195},{2196.subvendor = 0x1461,2197.subdevice = 0x000b,2198.card = CX88_BOARD_AVERTV_STUDIO_303,2199},{2200.subvendor = 0x1462,2201.subdevice = 0x8606,2202.card = CX88_BOARD_MSI_TVANYWHERE_MASTER,2203},{2204.subvendor = 0x10fc,2205.subdevice = 0xd003,2206.card = CX88_BOARD_IODATA_GVVCP3PCI,2207},{2208.subvendor = 0x1043,2209.subdevice = 0x4823, /* with mpeg encoder */2210.card = CX88_BOARD_ASUS_PVR_416,2211},{2212.subvendor = 0x17de,2213.subdevice = 0x08a6,2214.card = CX88_BOARD_KWORLD_DVB_T,2215},{2216.subvendor = 0x18ac,2217.subdevice = 0xd810,2218.card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,2219},{2220.subvendor = 0x18ac,2221.subdevice = 0xd820,2222.card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,2223},{2224.subvendor = 0x18ac,2225.subdevice = 0xdb00,2226.card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,2227},{2228.subvendor = 0x0070,2229.subdevice = 0x9002,2230.card = CX88_BOARD_HAUPPAUGE_DVB_T1,2231},{2232.subvendor = 0x14f1,2233.subdevice = 0x0187,2234.card = CX88_BOARD_CONEXANT_DVB_T1,2235},{2236.subvendor = 0x1540,2237.subdevice = 0x2580,2238.card = CX88_BOARD_PROVIDEO_PV259,2239},{2240.subvendor = 0x18ac,2241.subdevice = 0xdb10,2242.card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,2243},{2244.subvendor = 0x1554,2245.subdevice = 0x4811,2246.card = CX88_BOARD_PIXELVIEW,2247},{2248.subvendor = 0x7063,2249.subdevice = 0x3000, /* HD-3000 card */2250.card = CX88_BOARD_PCHDTV_HD3000,2251},{2252.subvendor = 0x17de,2253.subdevice = 0xa8a6,2254.card = CX88_BOARD_DNTV_LIVE_DVB_T,2255},{2256.subvendor = 0x0070,2257.subdevice = 0x2801,2258.card = CX88_BOARD_HAUPPAUGE_ROSLYN,2259},{2260.subvendor = 0x14f1,2261.subdevice = 0x0342,2262.card = CX88_BOARD_DIGITALLOGIC_MEC,2263},{2264.subvendor = 0x10fc,2265.subdevice = 0xd035,2266.card = CX88_BOARD_IODATA_GVBCTV7E,2267},{2268.subvendor = 0x1421,2269.subdevice = 0x0334,2270.card = CX88_BOARD_ADSTECH_DVB_T_PCI,2271},{2272.subvendor = 0x153b,2273.subdevice = 0x1166,2274.card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,2275},{2276.subvendor = 0x18ac,2277.subdevice = 0xd500,2278.card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,2279},{2280.subvendor = 0x1461,2281.subdevice = 0x8011,2282.card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,2283},{2284.subvendor = PCI_VENDOR_ID_ATI,2285.subdevice = 0xa101,2286.card = CX88_BOARD_ATI_HDTVWONDER,2287},{2288.subvendor = 0x107d,2289.subdevice = 0x665f,2290.card = CX88_BOARD_WINFAST_DTV1000,2291},{2292.subvendor = 0x1461,2293.subdevice = 0x000a,2294.card = CX88_BOARD_AVERTV_303,2295},{2296.subvendor = 0x0070,2297.subdevice = 0x9200,2298.card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,2299},{2300.subvendor = 0x0070,2301.subdevice = 0x9201,2302.card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,2303},{2304.subvendor = 0x0070,2305.subdevice = 0x9202,2306.card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,2307},{2308.subvendor = 0x17de,2309.subdevice = 0x08b2,2310.card = CX88_BOARD_KWORLD_DVBS_100,2311},{2312.subvendor = 0x0070,2313.subdevice = 0x9400,2314.card = CX88_BOARD_HAUPPAUGE_HVR1100,2315},{2316.subvendor = 0x0070,2317.subdevice = 0x9402,2318.card = CX88_BOARD_HAUPPAUGE_HVR1100,2319},{2320.subvendor = 0x0070,2321.subdevice = 0x9800,2322.card = CX88_BOARD_HAUPPAUGE_HVR1100LP,2323},{2324.subvendor = 0x0070,2325.subdevice = 0x9802,2326.card = CX88_BOARD_HAUPPAUGE_HVR1100LP,2327},{2328.subvendor = 0x0070,2329.subdevice = 0x9001,2330.card = CX88_BOARD_HAUPPAUGE_DVB_T1,2331},{2332.subvendor = 0x1822,2333.subdevice = 0x0025,2334.card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,2335},{2336.subvendor = 0x17de,2337.subdevice = 0x08a1,2338.card = CX88_BOARD_KWORLD_DVB_T_CX22702,2339},{2340.subvendor = 0x18ac,2341.subdevice = 0xdb50,2342.card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,2343},{2344.subvendor = 0x18ac,2345.subdevice = 0xdb54,2346.card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,2347/* Re-branded DViCO: DigitalNow DVB-T Dual */2348},{2349.subvendor = 0x18ac,2350.subdevice = 0xdb11,2351.card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,2352/* Re-branded DViCO: UltraView DVB-T Plus */2353}, {2354.subvendor = 0x18ac,2355.subdevice = 0xdb30,2356.card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,2357}, {2358.subvendor = 0x17de,2359.subdevice = 0x0840,2360.card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,2361},{2362.subvendor = 0x1421,2363.subdevice = 0x0305,2364.card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,2365},{2366.subvendor = 0x18ac,2367.subdevice = 0xdb40,2368.card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,2369},{2370.subvendor = 0x18ac,2371.subdevice = 0xdb44,2372.card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,2373},{2374.subvendor = 0x7063,2375.subdevice = 0x5500,2376.card = CX88_BOARD_PCHDTV_HD5500,2377},{2378.subvendor = 0x17de,2379.subdevice = 0x0841,2380.card = CX88_BOARD_KWORLD_MCE200_DELUXE,2381},{2382.subvendor = 0x1822,2383.subdevice = 0x0019,2384.card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,2385},{2386.subvendor = 0x1554,2387.subdevice = 0x4813,2388.card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,2389},{2390.subvendor = 0x14f1,2391.subdevice = 0x0842,2392.card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,2393},{2394.subvendor = 0x107d,2395.subdevice = 0x665e,2396.card = CX88_BOARD_WINFAST_DTV2000H,2397},{2398.subvendor = 0x107d,2399.subdevice = 0x6f2b,2400.card = CX88_BOARD_WINFAST_DTV2000H_J,2401},{2402.subvendor = 0x18ac,2403.subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */2404.card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,2405},{2406.subvendor = 0x14f1,2407.subdevice = 0x0084,2408.card = CX88_BOARD_GENIATECH_DVBS,2409},{2410.subvendor = 0x0070,2411.subdevice = 0x1404,2412.card = CX88_BOARD_HAUPPAUGE_HVR3000,2413}, {2414.subvendor = 0x18ac,2415.subdevice = 0xdc00,2416.card = CX88_BOARD_SAMSUNG_SMT_7020,2417}, {2418.subvendor = 0x18ac,2419.subdevice = 0xdccd,2420.card = CX88_BOARD_SAMSUNG_SMT_7020,2421},{2422.subvendor = 0x1461,2423.subdevice = 0xc111, /* AverMedia M150-D */2424/* This board is known to work with the ASUS PVR416 config */2425.card = CX88_BOARD_ASUS_PVR_416,2426},{2427.subvendor = 0xc180,2428.subdevice = 0xc980,2429.card = CX88_BOARD_TE_DTV_250_OEM_SWANN,2430},{2431.subvendor = 0x0070,2432.subdevice = 0x9600,2433.card = CX88_BOARD_HAUPPAUGE_HVR1300,2434},{2435.subvendor = 0x0070,2436.subdevice = 0x9601,2437.card = CX88_BOARD_HAUPPAUGE_HVR1300,2438},{2439.subvendor = 0x0070,2440.subdevice = 0x9602,2441.card = CX88_BOARD_HAUPPAUGE_HVR1300,2442},{2443.subvendor = 0x107d,2444.subdevice = 0x6632,2445.card = CX88_BOARD_LEADTEK_PVR2000,2446},{2447.subvendor = 0x12ab,2448.subdevice = 0x2300, /* Club3D Zap TV2100 */2449.card = CX88_BOARD_KWORLD_DVB_T_CX22702,2450},{2451.subvendor = 0x0070,2452.subdevice = 0x9000,2453.card = CX88_BOARD_HAUPPAUGE_DVB_T1,2454},{2455.subvendor = 0x0070,2456.subdevice = 0x1400,2457.card = CX88_BOARD_HAUPPAUGE_HVR3000,2458},{2459.subvendor = 0x0070,2460.subdevice = 0x1401,2461.card = CX88_BOARD_HAUPPAUGE_HVR3000,2462},{2463.subvendor = 0x0070,2464.subdevice = 0x1402,2465.card = CX88_BOARD_HAUPPAUGE_HVR3000,2466},{2467.subvendor = 0x1421,2468.subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */2469.card = CX88_BOARD_KWORLD_DVBS_100,2470},{2471.subvendor = 0x1421,2472.subdevice = 0x0390,2473.card = CX88_BOARD_ADSTECH_PTV_390,2474},{2475.subvendor = 0x11bd,2476.subdevice = 0x0051,2477.card = CX88_BOARD_PINNACLE_PCTV_HD_800i,2478}, {2479.subvendor = 0x18ac,2480.subdevice = 0xd530,2481.card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,2482}, {2483.subvendor = 0x12ab,2484.subdevice = 0x1788,2485.card = CX88_BOARD_PINNACLE_HYBRID_PCTV,2486}, {2487.subvendor = 0x14f1,2488.subdevice = 0xea3d,2489.card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,2490}, {2491.subvendor = 0x107d,2492.subdevice = 0x6f18,2493.card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,2494}, {2495.subvendor = 0x14f1,2496.subdevice = 0x8852,2497.card = CX88_BOARD_GENIATECH_X8000_MT,2498}, {2499.subvendor = 0x18ac,2500.subdevice = 0xd610,2501.card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,2502}, {2503.subvendor = 0x1554,2504.subdevice = 0x4935,2505.card = CX88_BOARD_PROLINK_PV_8000GT,2506}, {2507.subvendor = 0x1554,2508.subdevice = 0x4976,2509.card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,2510}, {2511.subvendor = 0x17de,2512.subdevice = 0x08c1,2513.card = CX88_BOARD_KWORLD_ATSC_120,2514}, {2515.subvendor = 0x0070,2516.subdevice = 0x6900,2517.card = CX88_BOARD_HAUPPAUGE_HVR4000,2518}, {2519.subvendor = 0x0070,2520.subdevice = 0x6904,2521.card = CX88_BOARD_HAUPPAUGE_HVR4000,2522}, {2523.subvendor = 0x0070,2524.subdevice = 0x6902,2525.card = CX88_BOARD_HAUPPAUGE_HVR4000,2526}, {2527.subvendor = 0x0070,2528.subdevice = 0x6905,2529.card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,2530}, {2531.subvendor = 0x0070,2532.subdevice = 0x6906,2533.card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,2534}, {2535.subvendor = 0xd420,2536.subdevice = 0x9022,2537.card = CX88_BOARD_TEVII_S420,2538}, {2539.subvendor = 0xd460,2540.subdevice = 0x9022,2541.card = CX88_BOARD_TEVII_S460,2542}, {2543.subvendor = 0xd464,2544.subdevice = 0x9022,2545.card = CX88_BOARD_TEVII_S464,2546}, {2547.subvendor = 0xA044,2548.subdevice = 0x2011,2549.card = CX88_BOARD_OMICOM_SS4_PCI,2550}, {2551.subvendor = 0x8910,2552.subdevice = 0x8888,2553.card = CX88_BOARD_TBS_8910,2554}, {2555.subvendor = 0x8920,2556.subdevice = 0x8888,2557.card = CX88_BOARD_TBS_8920,2558}, {2559.subvendor = 0xb022,2560.subdevice = 0x3022,2561.card = CX88_BOARD_PROF_6200,2562}, {2563.subvendor = 0xB033,2564.subdevice = 0x3033,2565.card = CX88_BOARD_PROF_7300,2566}, {2567.subvendor = 0xb200,2568.subdevice = 0x4200,2569.card = CX88_BOARD_SATTRADE_ST4200,2570}, {2571.subvendor = 0x153b,2572.subdevice = 0x1177,2573.card = CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII,2574}, {2575.subvendor = 0x0070,2576.subdevice = 0x9290,2577.card = CX88_BOARD_HAUPPAUGE_IRONLY,2578}, {2579.subvendor = 0x107d,2580.subdevice = 0x6654,2581.card = CX88_BOARD_WINFAST_DTV1800H,2582}, {2583/* PVR2000 PAL Model [107d:6630] */2584.subvendor = 0x107d,2585.subdevice = 0x6630,2586.card = CX88_BOARD_LEADTEK_PVR2000,2587}, {2588/* PVR2000 PAL Model [107d:6638] */2589.subvendor = 0x107d,2590.subdevice = 0x6638,2591.card = CX88_BOARD_LEADTEK_PVR2000,2592}, {2593/* PVR2000 NTSC Model [107d:6631] */2594.subvendor = 0x107d,2595.subdevice = 0x6631,2596.card = CX88_BOARD_LEADTEK_PVR2000,2597}, {2598/* PVR2000 NTSC Model [107d:6637] */2599.subvendor = 0x107d,2600.subdevice = 0x6637,2601.card = CX88_BOARD_LEADTEK_PVR2000,2602}, {2603/* PVR2000 NTSC Model [107d:663d] */2604.subvendor = 0x107d,2605.subdevice = 0x663d,2606.card = CX88_BOARD_LEADTEK_PVR2000,2607}, {2608/* DV2000 NTSC Model [107d:6621] */2609.subvendor = 0x107d,2610.subdevice = 0x6621,2611.card = CX88_BOARD_WINFAST_DV2000,2612}, {2613/* TV2000 XP Global [107d:6618] */2614.subvendor = 0x107d,2615.subdevice = 0x6618,2616.card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,2617}, {2618.subvendor = 0xb034,2619.subdevice = 0x3034,2620.card = CX88_BOARD_PROF_7301,2621}, {2622.subvendor = 0x1822,2623.subdevice = 0x0023,2624.card = CX88_BOARD_TWINHAN_VP1027_DVBS,2625},2626};26272628/* ----------------------------------------------------------------------- */2629/* some leadtek specific stuff */26302631static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)2632{2633if (eeprom_data[4] != 0x7d ||2634eeprom_data[5] != 0x10 ||2635eeprom_data[7] != 0x66) {2636warn_printk(core, "Leadtek eeprom invalid.\n");2637return;2638}26392640/* Terry Wu <[email protected]> */2641switch (eeprom_data[6]) {2642case 0x13: /* SSID 6613 for TV2000 XP Expert NTSC Model */2643case 0x21: /* SSID 6621 for DV2000 NTSC Model */2644case 0x31: /* SSID 6631 for PVR2000 NTSC Model */2645case 0x37: /* SSID 6637 for PVR2000 NTSC Model */2646case 0x3d: /* SSID 6637 for PVR2000 NTSC Model */2647core->board.tuner_type = TUNER_PHILIPS_FM1236_MK3;2648break;2649default:2650core->board.tuner_type = TUNER_PHILIPS_FM1216ME_MK3;2651break;2652}26532654info_printk(core, "Leadtek Winfast 2000XP Expert config: "2655"tuner=%d, eeprom[0]=0x%02x\n",2656core->board.tuner_type, eeprom_data[0]);2657}26582659static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)2660{2661struct tveeprom tv;26622663tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);2664core->board.tuner_type = tv.tuner_type;2665core->tuner_formats = tv.tuner_formats;2666core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;26672668/* Make sure we support the board model */2669switch (tv.model)2670{2671case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */2672case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */2673case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */2674case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */2675case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */2676case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */2677case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */2678case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */2679case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */2680case 28552: /* WinTV-PVR 'Roslyn' (No IR) */2681case 34519: /* WinTV-PCI-FM */2682case 69009:2683/* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */2684case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */2685case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */2686case 69559:2687/* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */2688case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */2689case 90002: /* Nova-T-PCI (9002) */2690case 92001: /* Nova-S-Plus (Video and IR) */2691case 92002: /* Nova-S-Plus (Video and IR) */2692case 90003: /* Nova-T-PCI (9002 No RF out) */2693case 90500: /* Nova-T-PCI (oem) */2694case 90501: /* Nova-T-PCI (oem/IR) */2695case 92000: /* Nova-SE2 (OEM, No Video or IR) */2696case 92900: /* WinTV-IROnly (No analog or digital Video inputs) */2697case 94009: /* WinTV-HVR1100 (Video and IR Retail) */2698case 94501: /* WinTV-HVR1100 (Video and IR OEM) */2699case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */2700case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */2701case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */2702case 96569: /* WinTV-HVR1300 () */2703case 96659: /* WinTV-HVR1300 () */2704case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */2705/* known */2706break;2707case CX88_BOARD_SAMSUNG_SMT_7020:2708cx_set(MO_GP0_IO, 0x008989FF);2709break;2710default:2711warn_printk(core, "warning: unknown hauppauge model #%d\n",2712tv.model);2713break;2714}27152716info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);2717}27182719/* ----------------------------------------------------------------------- */2720/* some GDI (was: Modular Technology) specific stuff */27212722static const struct {2723int id;2724int fm;2725const char *name;2726} gdi_tuner[] = {2727[ 0x01 ] = { .id = TUNER_ABSENT,2728.name = "NTSC_M" },2729[ 0x02 ] = { .id = TUNER_ABSENT,2730.name = "PAL_B" },2731[ 0x03 ] = { .id = TUNER_ABSENT,2732.name = "PAL_I" },2733[ 0x04 ] = { .id = TUNER_ABSENT,2734.name = "PAL_D" },2735[ 0x05 ] = { .id = TUNER_ABSENT,2736.name = "SECAM" },27372738[ 0x10 ] = { .id = TUNER_ABSENT,2739.fm = 1,2740.name = "TEMIC_4049" },2741[ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,2742.name = "TEMIC_4136" },2743[ 0x12 ] = { .id = TUNER_ABSENT,2744.name = "TEMIC_4146" },27452746[ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,2747.fm = 1,2748.name = "PHILIPS_FQ1216_MK3" },2749[ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,2750.name = "PHILIPS_FQ1236_MK3" },2751[ 0x22 ] = { .id = TUNER_ABSENT,2752.name = "PHILIPS_FI1236_MK3" },2753[ 0x23 ] = { .id = TUNER_ABSENT,2754.name = "PHILIPS_FI1216_MK3" },2755};27562757static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)2758{2759const char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))2760? gdi_tuner[eeprom_data[0x0d]].name : NULL;27612762info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");2763if (NULL == name)2764return;2765core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;2766core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?2767CX88_RADIO : 0;2768}27692770/* ------------------------------------------------------------------- */2771/* some Divco specific stuff */2772static int cx88_dvico_xc2028_callback(struct cx88_core *core,2773int command, int arg)2774{2775switch (command) {2776case XC2028_TUNER_RESET:2777switch (core->boardnr) {2778case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:2779/* GPIO-4 xc3028 tuner */27802781cx_set(MO_GP0_IO, 0x00001000);2782cx_clear(MO_GP0_IO, 0x00000010);2783msleep(100);2784cx_set(MO_GP0_IO, 0x00000010);2785msleep(100);2786break;2787default:2788cx_write(MO_GP0_IO, 0x101000);2789mdelay(5);2790cx_set(MO_GP0_IO, 0x101010);2791}2792break;2793default:2794return -EINVAL;2795}27962797return 0;2798}279928002801/* ----------------------------------------------------------------------- */2802/* some Geniatech specific stuff */28032804static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,2805int command, int mode)2806{2807switch (command) {2808case XC2028_TUNER_RESET:2809switch (INPUT(core->input).type) {2810case CX88_RADIO:2811break;2812case CX88_VMUX_DVB:2813cx_write(MO_GP1_IO, 0x030302);2814mdelay(50);2815break;2816default:2817cx_write(MO_GP1_IO, 0x030301);2818mdelay(50);2819}2820cx_write(MO_GP1_IO, 0x101010);2821mdelay(50);2822cx_write(MO_GP1_IO, 0x101000);2823mdelay(50);2824cx_write(MO_GP1_IO, 0x101010);2825mdelay(50);2826return 0;2827}2828return -EINVAL;2829}28302831static int cx88_xc3028_winfast1800h_callback(struct cx88_core *core,2832int command, int arg)2833{2834switch (command) {2835case XC2028_TUNER_RESET:2836/* GPIO 12 (xc3028 tuner reset) */2837cx_set(MO_GP1_IO, 0x1010);2838mdelay(50);2839cx_clear(MO_GP1_IO, 0x10);2840mdelay(50);2841cx_set(MO_GP1_IO, 0x10);2842mdelay(50);2843return 0;2844}2845return -EINVAL;2846}28472848/* ------------------------------------------------------------------- */2849/* some Divco specific stuff */2850static int cx88_pv_8000gt_callback(struct cx88_core *core,2851int command, int arg)2852{2853switch (command) {2854case XC2028_TUNER_RESET:2855cx_write(MO_GP2_IO, 0xcf7);2856mdelay(50);2857cx_write(MO_GP2_IO, 0xef5);2858mdelay(50);2859cx_write(MO_GP2_IO, 0xcf7);2860break;2861default:2862return -EINVAL;2863}28642865return 0;2866}28672868/* ----------------------------------------------------------------------- */2869/* some DViCO specific stuff */28702871static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)2872{2873struct i2c_msg msg = { .addr = 0x45, .flags = 0 };2874int i, err;2875static u8 init_bufs[13][5] = {2876{ 0x10, 0x00, 0x20, 0x01, 0x03 },2877{ 0x10, 0x10, 0x01, 0x00, 0x21 },2878{ 0x10, 0x10, 0x10, 0x00, 0xCA },2879{ 0x10, 0x10, 0x12, 0x00, 0x08 },2880{ 0x10, 0x10, 0x13, 0x00, 0x0A },2881{ 0x10, 0x10, 0x16, 0x01, 0xC0 },2882{ 0x10, 0x10, 0x22, 0x01, 0x3D },2883{ 0x10, 0x10, 0x73, 0x01, 0x2E },2884{ 0x10, 0x10, 0x72, 0x00, 0xC5 },2885{ 0x10, 0x10, 0x71, 0x01, 0x97 },2886{ 0x10, 0x10, 0x70, 0x00, 0x0F },2887{ 0x10, 0x10, 0xB0, 0x00, 0x01 },2888{ 0x03, 0x0C },2889};28902891for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {2892msg.buf = init_bufs[i];2893msg.len = (i != 12 ? 5 : 2);2894err = i2c_transfer(&core->i2c_adap, &msg, 1);2895if (err != 1) {2896warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "2897"failed (err = %d)!\n", i, err);2898return;2899}2900}2901}29022903static int cx88_xc2028_tuner_callback(struct cx88_core *core,2904int command, int arg)2905{2906/* Board-specific callbacks */2907switch (core->boardnr) {2908case CX88_BOARD_POWERCOLOR_REAL_ANGEL:2909case CX88_BOARD_GENIATECH_X8000_MT:2910case CX88_BOARD_KWORLD_ATSC_120:2911return cx88_xc3028_geniatech_tuner_callback(core,2912command, arg);2913case CX88_BOARD_PROLINK_PV_8000GT:2914case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:2915return cx88_pv_8000gt_callback(core, command, arg);2916case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:2917case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:2918return cx88_dvico_xc2028_callback(core, command, arg);2919case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:2920case CX88_BOARD_WINFAST_DTV1800H:2921return cx88_xc3028_winfast1800h_callback(core, command, arg);2922}29232924switch (command) {2925case XC2028_TUNER_RESET:2926switch (INPUT(core->input).type) {2927case CX88_RADIO:2928info_printk(core, "setting GPIO to radio!\n");2929cx_write(MO_GP0_IO, 0x4ff);2930mdelay(250);2931cx_write(MO_GP2_IO, 0xff);2932mdelay(250);2933break;2934case CX88_VMUX_DVB: /* Digital TV*/2935default: /* Analog TV */2936info_printk(core, "setting GPIO to TV!\n");2937break;2938}2939cx_write(MO_GP1_IO, 0x101010);2940mdelay(250);2941cx_write(MO_GP1_IO, 0x101000);2942mdelay(250);2943cx_write(MO_GP1_IO, 0x101010);2944mdelay(250);2945return 0;2946}2947return -EINVAL;2948}29492950/* ----------------------------------------------------------------------- */2951/* Tuner callback function. Currently only needed for the Pinnacle *2952* PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *2953* analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */29542955static int cx88_xc5000_tuner_callback(struct cx88_core *core,2956int command, int arg)2957{2958switch (core->boardnr) {2959case CX88_BOARD_PINNACLE_PCTV_HD_800i:2960if (command == 0) { /* This is the reset command from xc5000 */29612962/* djh - According to the engineer at PCTV Systems,2963the xc5000 reset pin is supposed to be on GPIO12.2964However, despite three nights of effort, pulling2965that GPIO low didn't reset the xc5000. While2966pulling MO_SRST_IO low does reset the xc5000, this2967also resets in the s5h1409 being reset as well.2968This causes tuning to always fail since the internal2969state of the s5h1409 does not match the driver's2970state. Given that the only two conditions in which2971the driver performs a reset is during firmware load2972and powering down the chip, I am taking out the2973reset. We know that the chip is being reset2974when the cx88 comes online, and not being able to2975do power management for this board is worse than2976not having any tuning at all. */2977return 0;2978} else {2979err_printk(core, "xc5000: unknown tuner "2980"callback command.\n");2981return -EINVAL;2982}2983break;2984case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:2985if (command == 0) { /* This is the reset command from xc5000 */2986cx_clear(MO_GP0_IO, 0x00000010);2987msleep(10);2988cx_set(MO_GP0_IO, 0x00000010);2989return 0;2990} else {2991printk(KERN_ERR2992"xc5000: unknown tuner callback command.\n");2993return -EINVAL;2994}2995break;2996}2997return 0; /* Should never be here */2998}29993000int cx88_tuner_callback(void *priv, int component, int command, int arg)3001{3002struct i2c_algo_bit_data *i2c_algo = priv;3003struct cx88_core *core;30043005if (!i2c_algo) {3006printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");3007return -EINVAL;3008}30093010core = i2c_algo->data;30113012if (!core) {3013printk(KERN_ERR "cx88: Error - device struct undefined.\n");3014return -EINVAL;3015}30163017if (component != DVB_FRONTEND_COMPONENT_TUNER)3018return -EINVAL;30193020switch (core->board.tuner_type) {3021case TUNER_XC2028:3022info_printk(core, "Calling XC2028/3028 callback\n");3023return cx88_xc2028_tuner_callback(core, command, arg);3024case TUNER_XC5000:3025info_printk(core, "Calling XC5000 callback\n");3026return cx88_xc5000_tuner_callback(core, command, arg);3027}3028err_printk(core, "Error: Calling callback for tuner %d\n",3029core->board.tuner_type);3030return -EINVAL;3031}3032EXPORT_SYMBOL(cx88_tuner_callback);30333034/* ----------------------------------------------------------------------- */30353036static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)3037{3038int i;30393040if (0 == pci->subsystem_vendor &&30410 == pci->subsystem_device) {3042printk(KERN_ERR3043"%s: Your board has no valid PCI Subsystem ID and thus can't\n"3044"%s: be autodetected. Please pass card=<n> insmod option to\n"3045"%s: workaround that. Redirect complaints to the vendor of\n"3046"%s: the TV card. Best regards,\n"3047"%s: -- tux\n",3048core->name,core->name,core->name,core->name,core->name);3049} else {3050printk(KERN_ERR3051"%s: Your board isn't known (yet) to the driver. You can\n"3052"%s: try to pick one of the existing card configs via\n"3053"%s: card=<n> insmod option. Updating to the latest\n"3054"%s: version might help as well.\n",3055core->name,core->name,core->name,core->name);3056}3057err_printk(core, "Here is a list of valid choices for the card=<n> "3058"insmod option:\n");3059for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)3060printk(KERN_ERR "%s: card=%d -> %s\n",3061core->name, i, cx88_boards[i].name);3062}30633064static void cx88_card_setup_pre_i2c(struct cx88_core *core)3065{3066switch (core->boardnr) {3067case CX88_BOARD_HAUPPAUGE_HVR1300:3068/*3069* Bring the 702 demod up before i2c scanning/attach or devices are hidden3070* We leave here with the 702 on the bus3071*3072* "reset the IR receiver on GPIO[3]"3073* Reported by Mike Crash <mike AT mikecrash.com>3074*/3075cx_write(MO_GP0_IO, 0x0000ef88);3076udelay(1000);3077cx_clear(MO_GP0_IO, 0x00000088);3078udelay(50);3079cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */3080udelay(1000);3081break;30823083case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:3084case CX88_BOARD_PROLINK_PV_8000GT:3085cx_write(MO_GP2_IO, 0xcf7);3086mdelay(50);3087cx_write(MO_GP2_IO, 0xef5);3088mdelay(50);3089cx_write(MO_GP2_IO, 0xcf7);3090msleep(10);3091break;30923093case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:3094/* Enable the xc5000 tuner */3095cx_set(MO_GP0_IO, 0x00001010);3096break;30973098case CX88_BOARD_HAUPPAUGE_HVR3000:3099case CX88_BOARD_HAUPPAUGE_HVR4000:3100/* Init GPIO */3101cx_write(MO_GP0_IO, core->board.input[0].gpio0);3102udelay(1000);3103cx_clear(MO_GP0_IO, 0x00000080);3104udelay(50);3105cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */3106udelay(1000);3107break;31083109case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:3110case CX88_BOARD_WINFAST_DTV1800H:3111/* GPIO 12 (xc3028 tuner reset) */3112cx_set(MO_GP1_IO, 0x1010);3113mdelay(50);3114cx_clear(MO_GP1_IO, 0x10);3115mdelay(50);3116cx_set(MO_GP1_IO, 0x10);3117mdelay(50);3118break;31193120case CX88_BOARD_TWINHAN_VP1027_DVBS:3121cx_write(MO_GP0_IO, 0x00003230);3122cx_write(MO_GP0_IO, 0x00003210);3123msleep(1);3124cx_write(MO_GP0_IO, 0x00001230);3125break;3126}3127}31283129/*3130* Sets board-dependent xc3028 configuration3131*/3132void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)3133{3134memset(ctl, 0, sizeof(*ctl));31353136ctl->fname = XC2028_DEFAULT_FIRMWARE;3137ctl->max_len = 64;31383139switch (core->boardnr) {3140case CX88_BOARD_POWERCOLOR_REAL_ANGEL:3141/* Now works with firmware version 2.7 */3142if (core->i2c_algo.udelay < 16)3143core->i2c_algo.udelay = 16;3144break;3145case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:3146case CX88_BOARD_WINFAST_DTV1800H:3147ctl->demod = XC3028_FE_ZARLINK456;3148break;3149case CX88_BOARD_KWORLD_ATSC_120:3150case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:3151ctl->demod = XC3028_FE_OREN538;3152break;3153case CX88_BOARD_GENIATECH_X8000_MT:3154/* FIXME: For this board, the xc3028 never recovers after being3155powered down (the reset GPIO probably is not set properly).3156We don't have access to the hardware so we cannot determine3157which GPIO is used for xc3028, so just disable power xc30283158power management for now */3159ctl->disable_power_mgmt = 1;3160break;3161case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:3162case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:3163case CX88_BOARD_PROLINK_PV_8000GT:3164/*3165* Those boards uses non-MTS firmware3166*/3167break;3168case CX88_BOARD_PINNACLE_HYBRID_PCTV:3169case CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII:3170ctl->demod = XC3028_FE_ZARLINK456;3171ctl->mts = 1;3172break;3173default:3174ctl->demod = XC3028_FE_OREN538;3175ctl->mts = 1;3176}3177}3178EXPORT_SYMBOL_GPL(cx88_setup_xc3028);31793180static void cx88_card_setup(struct cx88_core *core)3181{3182static u8 eeprom[256];3183struct tuner_setup tun_setup;3184unsigned int mode_mask = T_RADIO | T_ANALOG_TV;31853186memset(&tun_setup, 0, sizeof(tun_setup));31873188if (0 == core->i2c_rc) {3189core->i2c_client.addr = 0xa0 >> 1;3190tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));3191}31923193switch (core->boardnr) {3194case CX88_BOARD_HAUPPAUGE:3195case CX88_BOARD_HAUPPAUGE_ROSLYN:3196if (0 == core->i2c_rc)3197hauppauge_eeprom(core, eeprom+8);3198break;3199case CX88_BOARD_GDI:3200if (0 == core->i2c_rc)3201gdi_eeprom(core, eeprom);3202break;3203case CX88_BOARD_LEADTEK_PVR2000:3204case CX88_BOARD_WINFAST_DV2000:3205case CX88_BOARD_WINFAST2000XP_EXPERT:3206if (0 == core->i2c_rc)3207leadtek_eeprom(core, eeprom);3208break;3209case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:3210case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:3211case CX88_BOARD_HAUPPAUGE_DVB_T1:3212case CX88_BOARD_HAUPPAUGE_HVR1100:3213case CX88_BOARD_HAUPPAUGE_HVR1100LP:3214case CX88_BOARD_HAUPPAUGE_HVR3000:3215case CX88_BOARD_HAUPPAUGE_HVR1300:3216case CX88_BOARD_HAUPPAUGE_HVR4000:3217case CX88_BOARD_HAUPPAUGE_HVR4000LITE:3218case CX88_BOARD_HAUPPAUGE_IRONLY:3219if (0 == core->i2c_rc)3220hauppauge_eeprom(core, eeprom);3221break;3222case CX88_BOARD_KWORLD_DVBS_100:3223cx_write(MO_GP0_IO, 0x000007f8);3224cx_write(MO_GP1_IO, 0x00000001);3225break;3226case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:3227/* GPIO0:0 is hooked to demod reset */3228/* GPIO0:4 is hooked to xc3028 reset */3229cx_write(MO_GP0_IO, 0x00111100);3230msleep(1);3231cx_write(MO_GP0_IO, 0x00111111);3232break;3233case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:3234/* GPIO0:6 is hooked to FX2 reset pin */3235cx_set(MO_GP0_IO, 0x00004040);3236cx_clear(MO_GP0_IO, 0x00000040);3237msleep(1000);3238cx_set(MO_GP0_IO, 0x00004040);3239/* FALLTHROUGH */3240case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:3241case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:3242case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:3243/* GPIO0:0 is hooked to mt352 reset pin */3244cx_set(MO_GP0_IO, 0x00000101);3245cx_clear(MO_GP0_IO, 0x00000001);3246msleep(1);3247cx_set(MO_GP0_IO, 0x00000101);3248if (0 == core->i2c_rc &&3249core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)3250dvico_fusionhdtv_hybrid_init(core);3251break;3252case CX88_BOARD_KWORLD_DVB_T:3253case CX88_BOARD_DNTV_LIVE_DVB_T:3254cx_set(MO_GP0_IO, 0x00000707);3255cx_set(MO_GP2_IO, 0x00000101);3256cx_clear(MO_GP2_IO, 0x00000001);3257msleep(1);3258cx_clear(MO_GP0_IO, 0x00000007);3259cx_set(MO_GP2_IO, 0x00000101);3260break;3261case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:3262cx_write(MO_GP0_IO, 0x00080808);3263break;3264case CX88_BOARD_ATI_HDTVWONDER:3265if (0 == core->i2c_rc) {3266/* enable tuner */3267int i;3268static const u8 buffer [][2] = {3269{0x10,0x12},3270{0x13,0x04},3271{0x16,0x00},3272{0x14,0x04},3273{0x17,0x00}3274};3275core->i2c_client.addr = 0x0a;32763277for (i = 0; i < ARRAY_SIZE(buffer); i++)3278if (2 != i2c_master_send(&core->i2c_client,3279buffer[i],2))3280warn_printk(core, "Unable to enable "3281"tuner(%i).\n", i);3282}3283break;3284case CX88_BOARD_MSI_TVANYWHERE_MASTER:3285{3286struct v4l2_priv_tun_config tea5767_cfg;3287struct tea5767_ctrl ctl;32883289memset(&ctl, 0, sizeof(ctl));32903291ctl.high_cut = 1;3292ctl.st_noise = 1;3293ctl.deemph_75 = 1;3294ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;32953296tea5767_cfg.tuner = TUNER_TEA5767;3297tea5767_cfg.priv = &ctl;32983299call_all(core, tuner, s_config, &tea5767_cfg);3300break;3301}3302case CX88_BOARD_TEVII_S420:3303case CX88_BOARD_TEVII_S460:3304case CX88_BOARD_TEVII_S464:3305case CX88_BOARD_OMICOM_SS4_PCI:3306case CX88_BOARD_TBS_8910:3307case CX88_BOARD_TBS_8920:3308case CX88_BOARD_PROF_6200:3309case CX88_BOARD_PROF_7300:3310case CX88_BOARD_PROF_7301:3311case CX88_BOARD_SATTRADE_ST4200:3312cx_write(MO_GP0_IO, 0x8000);3313msleep(100);3314cx_write(MO_SRST_IO, 0);3315msleep(10);3316cx_write(MO_GP0_IO, 0x8080);3317msleep(100);3318cx_write(MO_SRST_IO, 1);3319msleep(100);3320break;3321} /*end switch() */332233233324/* Setup tuners */3325if ((core->board.radio_type != UNSET)) {3326tun_setup.mode_mask = T_RADIO;3327tun_setup.type = core->board.radio_type;3328tun_setup.addr = core->board.radio_addr;3329tun_setup.tuner_callback = cx88_tuner_callback;3330call_all(core, tuner, s_type_addr, &tun_setup);3331mode_mask &= ~T_RADIO;3332}33333334if (core->board.tuner_type != TUNER_ABSENT) {3335tun_setup.mode_mask = mode_mask;3336tun_setup.type = core->board.tuner_type;3337tun_setup.addr = core->board.tuner_addr;3338tun_setup.tuner_callback = cx88_tuner_callback;33393340call_all(core, tuner, s_type_addr, &tun_setup);3341}33423343if (core->board.tda9887_conf) {3344struct v4l2_priv_tun_config tda9887_cfg;33453346tda9887_cfg.tuner = TUNER_TDA9887;3347tda9887_cfg.priv = &core->board.tda9887_conf;33483349call_all(core, tuner, s_config, &tda9887_cfg);3350}33513352if (core->board.tuner_type == TUNER_XC2028) {3353struct v4l2_priv_tun_config xc2028_cfg;3354struct xc2028_ctrl ctl;33553356/* Fills device-dependent initialization parameters */3357cx88_setup_xc3028(core, &ctl);33583359/* Sends parameters to xc2028/3028 tuner */3360memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));3361xc2028_cfg.tuner = TUNER_XC2028;3362xc2028_cfg.priv = &ctl;3363info_printk(core, "Asking xc2028/3028 to load firmware %s\n",3364ctl.fname);3365call_all(core, tuner, s_config, &xc2028_cfg);3366}3367call_all(core, core, s_power, 0);3368}33693370/* ------------------------------------------------------------------ */33713372static int cx88_pci_quirks(const char *name, struct pci_dev *pci)3373{3374unsigned int lat = UNSET;3375u8 ctrl = 0;3376u8 value;33773378/* check pci quirks */3379if (pci_pci_problems & PCIPCI_TRITON) {3380printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",3381name);3382ctrl |= CX88X_EN_TBFX;3383}3384if (pci_pci_problems & PCIPCI_NATOMA) {3385printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",3386name);3387ctrl |= CX88X_EN_TBFX;3388}3389if (pci_pci_problems & PCIPCI_VIAETBF) {3390printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",3391name);3392ctrl |= CX88X_EN_TBFX;3393}3394if (pci_pci_problems & PCIPCI_VSFX) {3395printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",3396name);3397ctrl |= CX88X_EN_VSFX;3398}3399#ifdef PCIPCI_ALIMAGIK3400if (pci_pci_problems & PCIPCI_ALIMAGIK) {3401printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",3402name);3403lat = 0x0A;3404}3405#endif34063407/* check insmod options */3408if (UNSET != latency)3409lat = latency;34103411/* apply stuff */3412if (ctrl) {3413pci_read_config_byte(pci, CX88X_DEVCTRL, &value);3414value |= ctrl;3415pci_write_config_byte(pci, CX88X_DEVCTRL, value);3416}3417if (UNSET != lat) {3418printk(KERN_INFO "%s: setting pci latency timer to %d\n",3419name, latency);3420pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);3421}3422return 0;3423}34243425int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)3426{3427if (request_mem_region(pci_resource_start(pci,0),3428pci_resource_len(pci,0),3429core->name))3430return 0;3431printk(KERN_ERR3432"%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",3433core->name, PCI_FUNC(pci->devfn),3434(unsigned long long)pci_resource_start(pci, 0),3435pci->subsystem_vendor, pci->subsystem_device);3436return -EBUSY;3437}34383439/* Allocate and initialize the cx88 core struct. One should hold the3440* devlist mutex before calling this. */3441struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)3442{3443struct cx88_core *core;3444int i;34453446core = kzalloc(sizeof(*core), GFP_KERNEL);3447if (core == NULL)3448return NULL;34493450atomic_inc(&core->refcount);3451core->pci_bus = pci->bus->number;3452core->pci_slot = PCI_SLOT(pci->devfn);3453core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |3454PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |3455PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;3456mutex_init(&core->lock);34573458core->nr = nr;3459sprintf(core->name, "cx88[%d]", core->nr);34603461strcpy(core->v4l2_dev.name, core->name);3462if (v4l2_device_register(NULL, &core->v4l2_dev)) {3463kfree(core);3464return NULL;3465}34663467if (0 != cx88_get_resources(core, pci)) {3468v4l2_device_unregister(&core->v4l2_dev);3469kfree(core);3470return NULL;3471}34723473/* PCI stuff */3474cx88_pci_quirks(core->name, pci);3475core->lmmio = ioremap(pci_resource_start(pci, 0),3476pci_resource_len(pci, 0));3477core->bmmio = (u8 __iomem *)core->lmmio;34783479if (core->lmmio == NULL) {3480kfree(core);3481return NULL;3482}34833484/* board config */3485core->boardnr = UNSET;3486if (card[core->nr] < ARRAY_SIZE(cx88_boards))3487core->boardnr = card[core->nr];3488for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)3489if (pci->subsystem_vendor == cx88_subids[i].subvendor &&3490pci->subsystem_device == cx88_subids[i].subdevice)3491core->boardnr = cx88_subids[i].card;3492if (UNSET == core->boardnr) {3493core->boardnr = CX88_BOARD_UNKNOWN;3494cx88_card_list(core, pci);3495}34963497memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));34983499if (!core->board.num_frontends && (core->board.mpeg & CX88_MPEG_DVB))3500core->board.num_frontends = 1;35013502info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s], frontend(s): %d\n",3503pci->subsystem_vendor, pci->subsystem_device, core->board.name,3504core->boardnr, card[core->nr] == core->boardnr ?3505"insmod option" : "autodetected",3506core->board.num_frontends);35073508if (tuner[core->nr] != UNSET)3509core->board.tuner_type = tuner[core->nr];3510if (radio[core->nr] != UNSET)3511core->board.radio_type = radio[core->nr];35123513info_printk(core, "TV tuner type %d, Radio tuner type %d\n",3514core->board.tuner_type, core->board.radio_type);35153516/* init hardware */3517cx88_reset(core);3518cx88_card_setup_pre_i2c(core);3519cx88_i2c_init(core, pci);35203521/* load tuner module, if needed */3522if (TUNER_ABSENT != core->board.tuner_type) {3523/* Ignore 0x6b and 0x6f on cx88 boards.3524* FusionHDTV5 RT Gold has an ir receiver at 0x6b3525* and an RTC at 0x6f which can get corrupted if probed. */3526static const unsigned short tv_addrs[] = {35270x42, 0x43, 0x4a, 0x4b, /* tda8290 */35280x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,35290x68, 0x69, 0x6a, 0x6c, 0x6d, 0x6e,3530I2C_CLIENT_END3531};3532int has_demod = (core->board.tda9887_conf & TDA9887_PRESENT);35333534/* I don't trust the radio_type as is stored in the card3535definitions, so we just probe for it.3536The radio_type is sometimes missing, or set to UNSET but3537later code configures a tea5767.3538*/3539v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,3540"tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));3541if (has_demod)3542v4l2_i2c_new_subdev(&core->v4l2_dev,3543&core->i2c_adap, "tuner",35440, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));3545if (core->board.tuner_addr == ADDR_UNSET) {3546v4l2_i2c_new_subdev(&core->v4l2_dev,3547&core->i2c_adap, "tuner",35480, has_demod ? tv_addrs + 4 : tv_addrs);3549} else {3550v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,3551"tuner", core->board.tuner_addr, NULL);3552}3553}35543555cx88_card_setup(core);3556if (!disable_ir) {3557cx88_i2c_init_ir(core);3558cx88_ir_init(core, pci);3559}35603561return core;3562}356335643565