summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-01-28 21:32:59 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:42:46 -0300
commitabb0362f49c361f71b5aa6d244d4847145ed53c1 (patch)
treed59799fe09af041a4f630d8e4f49e8eb3b32968b /drivers
parent72134a6d5199c3f5c8efe914e49072bde95948b3 (diff)
V4L/DVB (10560): bttv: make tuner card info more consistent
The bttv card database structure had a "tuner" field that was the input number of the tuner input or UNSET for no tuner. However, the only values it could ever be are 0 and UNSET. Having a tuner on an input other than 0 didn't work and was never used. There is also a "tuner_type" field that can be set to TUNER_ABSENT to indicate no tuner, which makes "tuner = UNSET" redundant. In many cases, tuner_type was set to UNSET when there was no tuner, which isn't quite correct. tuner_type == UNSET is supposed to mean the tuner type isn't yet known. So, I changed cards where "tuner == UNSET" to always have tuner_type of TUNER_ABSENT. At this point the tuner field is redundant, so I deleted it. I have the card setup code set the card's tuner_type (not the card type's tuner_type!) to TUNER_ABSENT if it hasn't yet been set at the end of the setup code. Various places that check if the card has a tuner will now look for this instead of checking the card type's "tuner" field. Also autoload the tuner module before issuing the TUNER_SET_TYPE_ADDR I2C client call instead of after issuing it. Overall, on ia32 this decreases compiled code size by about 24 bytes and reduces the data size by 640 bytes. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/bt8xx/bttv-cards.c285
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c15
-rw-r--r--drivers/media/video/bt8xx/bttv-i2c.c6
-rw-r--r--drivers/media/video/bt8xx/bttv.h1
4 files changed, 77 insertions, 230 deletions
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
index 5c558e48e42..edf8d2505f0 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -321,7 +321,6 @@ struct tvcard bttv_tvcards[] = {
.name = " *** UNKNOWN/GENERIC *** ",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.muxsel = { 2, 3, 1, 0 },
.tuner_type = UNSET,
@@ -332,7 +331,6 @@ struct tvcard bttv_tvcards[] = {
.name = "MIRO PCTV",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 15,
.muxsel = { 2, 3, 1, 1 },
@@ -347,7 +345,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Hauppauge (bt848)",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 7,
.muxsel = { 2, 3, 1, 1 },
@@ -362,7 +359,6 @@ struct tvcard bttv_tvcards[] = {
.name = "STB, Gateway P/N 6000699 (bt848)",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 7,
.muxsel = { 2, 3, 1, 1 },
@@ -382,7 +378,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Intel Create and Share PCI/ Smart Video Recorder III",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 2,
.gpiomask = 0,
.muxsel = { 2, 3, 1, 1 },
@@ -396,7 +391,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Diamond DTV2000",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 3,
.muxsel = { 2, 3, 1, 0 },
@@ -411,7 +405,6 @@ struct tvcard bttv_tvcards[] = {
.name = "AVerMedia TVPhone",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 3,
.muxsel = { 2, 3, 1, 1 },
.gpiomask = 0x0f,
@@ -428,13 +421,12 @@ struct tvcard bttv_tvcards[] = {
.name = "MATRIX-Vision MV-Delta",
.video_inputs = 5,
.audio_inputs = 1,
- .tuner = UNSET,
.svhs = 3,
.gpiomask = 0,
.muxsel = { 2, 3, 1, 0, 0 },
.gpiomux = { 0 },
.needs_tvaudio = 1,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -444,7 +436,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xc00,
.muxsel = { 2, 3, 1, 1 },
@@ -460,7 +451,6 @@ struct tvcard bttv_tvcards[] = {
.name = "IMS/IXmicro TurboTV",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 3,
.muxsel = { 2, 3, 1, 1 },
@@ -475,7 +465,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Hauppauge (bt878)",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x0f, /* old: 7 */
.muxsel = { 2, 0, 1, 1 },
@@ -491,7 +480,6 @@ struct tvcard bttv_tvcards[] = {
.name = "MIRO PCTV pro",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x3014f,
.muxsel = { 2, 3, 1, 1 },
@@ -508,7 +496,6 @@ struct tvcard bttv_tvcards[] = {
.name = "ADS Technologies Channel Surfer TV (bt848)",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 15,
.muxsel = { 2, 3, 1, 1 },
@@ -522,7 +509,6 @@ struct tvcard bttv_tvcards[] = {
.name = "AVerMedia TVCapture 98",
.video_inputs = 3,
.audio_inputs = 4,
- .tuner = 0,
.svhs = 2,
.gpiomask = 15,
.muxsel = { 2, 3, 1, 1 },
@@ -540,7 +526,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Aimslab Video Highway Xtreme (VHX)",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 7,
.muxsel = { 2, 3, 1, 1 },
@@ -556,7 +541,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Zoltrix TV-Max",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 15,
.muxsel = { 2, 3, 1, 1 },
@@ -573,7 +557,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Prolink Pixelview PlayTV (bt878)",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x01fe00,
.muxsel = { 2, 3, 1, 1 },
@@ -590,7 +573,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Leadtek WinView 601",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x8300f8,
.muxsel = { 2, 3, 1, 1,0 },
@@ -607,7 +589,6 @@ struct tvcard bttv_tvcards[] = {
.name = "AVEC Intercapture",
.video_inputs = 3,
.audio_inputs = 2,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0,
.muxsel = { 2, 3, 1, 1 },
@@ -621,13 +602,12 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0x8dff00,
.muxsel = { 2, 3, 1, 1 },
.gpiomux = { 0 },
.no_msp34xx = 1,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -637,7 +617,6 @@ struct tvcard bttv_tvcards[] = {
.name = "CEI Raffles Card",
.video_inputs = 3,
.audio_inputs = 3,
- .tuner = 0,
.svhs = 2,
.muxsel = { 2, 3, 1, 1 },
.tuner_type = UNSET,
@@ -648,7 +627,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
.video_inputs = 4,
.audio_inputs = 2, /* tuner, line in */
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x1800,
.muxsel = { 2, 3, 1, 1 },
@@ -663,7 +641,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Askey CPH050/ Phoebe Tv Master + FM",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xc00,
.muxsel = { 2, 3, 1, 1 },
@@ -679,7 +656,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = UNSET,
.gpiomask = 7,
.muxsel = { 2, 3, -1 },
@@ -697,7 +673,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Askey CPH05X/06X (bt878) [many vendors]",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xe00,
.muxsel = { 2, 3, 1, 1 },
@@ -714,7 +689,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x1f0fff,
.muxsel = { 2, 3, 1, 1 },
@@ -730,7 +704,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Hauppauge WinCam newer (bt878)",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 3,
.gpiomask = 7,
.muxsel = { 2, 0, 1, 1 },
@@ -745,7 +718,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
.video_inputs = 4,
.audio_inputs = 2,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x1800,
.muxsel = { 2, 3, 1, 1 },
@@ -762,7 +734,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Terratec TerraTV+ Version 1.1 (bt878)",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x1f0fff,
.muxsel = { 2, 3, 1, 1 },
@@ -810,13 +781,12 @@ struct tvcard bttv_tvcards[] = {
.name = "Imagenation PXC200",
.video_inputs = 5,
.audio_inputs = 1,
- .tuner = UNSET,
.svhs = 1, /* was: 4 */
.gpiomask = 0,
.muxsel = { 2, 3, 1, 0, 0},
.gpiomux = { 0 },
.needs_tvaudio = 1,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.muxsel_hook = PXC200_muxsel,
@@ -826,7 +796,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo 98 LR50",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x1800, /* 0x8dfe00 */
.muxsel = { 2, 3, 1, 1 },
@@ -841,7 +810,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Formac iProTV, Formac ProTV I (bt848)",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 3,
.gpiomask = 1,
.muxsel = { 2, 3, 1, 1 },
@@ -857,7 +825,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Intel Create and Share PCI/ Smart Video Recorder III",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 2,
.gpiomask = 0,
.muxsel = { 2, 3, 1, 1 },
@@ -871,7 +838,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Terratec TerraTValue Version Bt878",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xffff00,
.muxsel = { 2, 3, 1, 1 },
@@ -887,7 +853,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Leadtek WinFast 2000/ WinFast 2000 XP",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.muxsel = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */
/* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
@@ -918,7 +883,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
.video_inputs = 4,
.audio_inputs = 3,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x1800,
.muxsel = { 2, 3, 1, 1 },
@@ -935,7 +899,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
.video_inputs = 4,
.audio_inputs = 3,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x1800,
.muxsel = { 2, 3, 1, 1 },
@@ -951,7 +914,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Prolink PixelView PlayTV pro",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xff,
.muxsel = { 2, 3, 1, 1 },
@@ -967,7 +929,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Askey CPH06X TView99",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x551e00,
.muxsel = { 2, 3, 1, 0 },
@@ -984,7 +945,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Pinnacle PCTV Studio/Rave",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x03000F,
.muxsel = { 2, 3, 1, 1 },
@@ -1002,7 +962,6 @@ struct tvcard bttv_tvcards[] = {
.name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 7,
.muxsel = { 2, 3, 1, 1 },
@@ -1020,7 +979,6 @@ struct tvcard bttv_tvcards[] = {
.name = "AVerMedia TVPhone 98",
.video_inputs = 3,
.audio_inputs = 4,
- .tuner = 0,
.svhs = 2,
.gpiomask = 15,
.muxsel = { 2, 3, 1, 1 },
@@ -1037,7 +995,6 @@ struct tvcard bttv_tvcards[] = {
.name = "ProVideo PV951", /* pic16c54 */
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0,
.muxsel = { 2, 3, 1, 1},
@@ -1053,7 +1010,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Little OnAir TV",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xe00b,
.muxsel = { 2, 3, 1, 1 },
@@ -1070,7 +1026,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Sigma TVII-FM",
.video_inputs = 2,
.audio_inputs = 1,
- .tuner = 0,
.svhs = UNSET,
.gpiomask = 3,
.muxsel = { 2, 3, 1, 1 },
@@ -1086,14 +1041,13 @@ struct tvcard bttv_tvcards[] = {
.name = "MATRIX-Vision MV-Delta 2",
.video_inputs = 5,
.audio_inputs = 1,
- .tuner = UNSET,
.svhs = 3,
.gpiomask = 0,
.muxsel = { 2, 3, 1, 0, 0 },
.gpiomux = { 0 },
.no_msp34xx = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -1101,7 +1055,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Zoltrix Genie TV/FM",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xbcf03f,
.muxsel = { 2, 3, 1, 1 },
@@ -1117,7 +1070,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Terratec TV/Radio+",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x70000,
.muxsel = { 2, 3, 1, 1 },
@@ -1137,7 +1089,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Askey CPH03x/ Dynalink Magic TView",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 15,
.muxsel = { 2, 3, 1, 1 },
@@ -1153,7 +1104,6 @@ struct tvcard bttv_tvcards[] = {
.name = "IODATA GV-BCTV3/PCI",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x010f00,
.muxsel = {2, 3, 0, 0 },
@@ -1169,7 +1119,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
.video_inputs = 5,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 3,
.gpiomask = 0xAA0000,
.muxsel = { 2,3,1,1,-1 },
@@ -1196,7 +1145,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Eagle Wireless Capricorn2 (bt878A)",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 7,
.muxsel = { 2, 0, 1, 1 },
@@ -1214,7 +1162,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Pinnacle PCTV Studio Pro",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 3,
.gpiomask = 0x03000F,
.muxsel = { 2, 3, 1, 1 },
@@ -1241,7 +1188,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
.video_inputs = 4,
.audio_inputs = 3,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x1c,
.muxsel = { 2, 3, 1, 1 },
@@ -1263,7 +1209,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x18e0,
.muxsel = { 2, 3, 1, 1 },
@@ -1284,7 +1229,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Askey CPH031/ BESTBUY Easy TV",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xF,
.muxsel = { 2, 3, 1, 0 },
@@ -1303,7 +1247,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo 98FM LR50",
.video_inputs = 4,
.audio_inputs = 3,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x1800,
.muxsel = { 2, 3, 1, 1 },
@@ -1321,7 +1264,6 @@ struct tvcard bttv_tvcards[] = {
.name = "GrandTec 'Grand Video Capture' (Bt848)",
.video_inputs = 2,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 1,
.gpiomask = 0,
.muxsel = { 3, 1 },
@@ -1329,7 +1271,7 @@ struct tvcard bttv_tvcards[] = {
.needs_tvaudio = 0,
.no_msp34xx = 1,
.pll = PLL_35,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -1338,7 +1280,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xe00,
.muxsel = { 2, 3, 1, 1},
@@ -1355,7 +1296,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Askey CPH03x TV Capturer",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x03000F,
.muxsel = { 2, 3, 1, 0 },
@@ -1373,7 +1313,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Modular Technology MM100PCTV",
.video_inputs = 2,
.audio_inputs = 2,
- .tuner = 0,
.svhs = UNSET,
.gpiomask = 11,
.muxsel = { 2, 3, 1, 1 },
@@ -1389,7 +1328,6 @@ struct tvcard bttv_tvcards[] = {
.name = "AG Electronics GMV1",
.video_inputs = 2,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 1,
.gpiomask = 0xF,
.muxsel = { 2, 2 },
@@ -1397,7 +1335,7 @@ struct tvcard bttv_tvcards[] = {
.no_msp34xx = 1,
.needs_tvaudio = 0,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -1408,7 +1346,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
.video_inputs = 3,
.audio_inputs = 2,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xFF,
.muxsel = { 2, 3, 1, 0 },
@@ -1425,7 +1362,6 @@ struct tvcard bttv_tvcards[] = {
.name = "ATI TV-Wonder",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xf03f,
.muxsel = { 2, 3, 1, 0 },
@@ -1443,7 +1379,6 @@ struct tvcard bttv_tvcards[] = {
.name = "ATI TV-Wonder VE",
.video_inputs = 2,
.audio_inputs = 1,
- .tuner = 0,
.svhs = UNSET,
.gpiomask = 1,
.muxsel = { 2, 3, 0, 1 },
@@ -1459,7 +1394,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo 2000S LR90",
.video_inputs = 3,
.audio_inputs = 3,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x18e0,
.muxsel = { 2, 3, 0, 1 },
@@ -1481,7 +1415,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Terratec TValueRadio",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0xffff00,
.muxsel = { 2, 3, 1, 1 },
@@ -1499,7 +1432,6 @@ struct tvcard bttv_tvcards[] = {
.name = "IODATA GV-BCTV4/PCI",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x010f00,
.muxsel = {2, 3, 0, 0 },
@@ -1519,7 +1451,6 @@ struct tvcard bttv_tvcards[] = {
* sound problems with this card. */
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = UNSET,
.gpiomask = 0x4f8a00,
/* 0x100000: 1=MSP enabled (0=disable again)
@@ -1541,7 +1472,6 @@ struct tvcard bttv_tvcards[] = {
* sound problems with this card. */
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = UNSET,
.gpiomask = 0x4f8a00,
/* 0x100000: 1=MSP enabled (0=disable again)
@@ -1562,8 +1492,7 @@ struct tvcard bttv_tvcards[] = {
.name = "Active Imaging AIMMS",
.video_inputs = 1,
.audio_inputs = 0,
- .tuner = UNSET,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.pll = PLL_28,
@@ -1575,7 +1504,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
.video_inputs = 3,
.audio_inputs = 4,
- .tuner = 0,
.svhs = 2,
.gpiomask = 15,
.muxsel = { 2, 3, 1, 1 },
@@ -1599,12 +1527,11 @@ struct tvcard bttv_tvcards[] = {
.name = "Lifeview FlyVideo 98EZ (capture only) LR51",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 2,
.muxsel = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */
.pll = PLL_28,
.no_msp34xx = 1,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -1615,7 +1542,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x3f,
.muxsel = { 2, 3, 1, 1 },
@@ -1645,13 +1571,12 @@ struct tvcard bttv_tvcards[] = {
.name = "Sensoray 311",
.video_inputs = 5,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 4,
.gpiomask = 0,
.muxsel = { 2, 3, 1, 0, 0 },
.gpiomux = { 0 },
.needs_tvaudio = 0,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -1660,7 +1585,6 @@ struct tvcard bttv_tvcards[] = {
.name = "RemoteVision MX (RV605)",
.video_inputs = 16,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0x00,
.gpiomask2 = 0x07ff,
@@ -1668,7 +1592,7 @@ struct tvcard bttv_tvcards[] = {
0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
.no_msp34xx = 1,
.no_tda9875 = 1,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.muxsel_hook = rv605_muxsel,
@@ -1677,7 +1601,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Powercolor MTV878/ MTV878R/ MTV878F",
.video_inputs = 3,
.audio_inputs = 2,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
.muxsel = { 2, 1, 1, },
@@ -1697,7 +1620,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x140007,
.muxsel = { 2, 3, 1, 1 },
@@ -1712,7 +1634,6 @@ struct tvcard bttv_tvcards[] = {
.name = "GrandTec Multi Capture Card (Bt878)",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0,
.muxsel = { 2, 3, 1, 0 },
@@ -1720,7 +1641,7 @@ struct tvcard bttv_tvcards[] = {
.needs_tvaudio = 0,
.no_msp34xx = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -1728,7 +1649,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
.video_inputs = 4,
.audio_inputs = 3,
- .tuner = 0,
.svhs = 2,
.gpiomask = 7,
.muxsel = { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
@@ -1776,7 +1696,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Hauppauge WinTV PVR",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.muxsel = { 2, 0, 1, 1 },
.needs_tvaudio = 1,
@@ -1792,7 +1711,6 @@ struct tvcard bttv_tvcards[] = {
.name = "IODATA GV-BCTV5/PCI",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x0f0f80,
.muxsel = {2, 3, 1, 0 },
@@ -1810,11 +1728,10 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
.video_inputs = 4, /* id-inputs-clock */
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 3,
.muxsel = { 3, 2, 0, 1 },
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1825,11 +1742,10 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
.video_inputs = 3,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 2,
.muxsel = { 2, 3, 1 },
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1842,11 +1758,10 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
.video_inputs = 2,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 1,
.muxsel = { 3, 1 },
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1857,11 +1772,10 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
.video_inputs = 1,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.muxsel = { 0 },
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1872,11 +1786,10 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
.video_inputs = 2,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 1,
.muxsel = { 0, 1 },
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1887,11 +1800,10 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
.video_inputs = 1,
.audio_inputs = 1,
- .tuner = UNSET,
.svhs = UNSET,
.muxsel = { 0 },
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1904,11 +1816,10 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
.video_inputs = 2,
.audio_inputs = 1,
- .tuner = UNSET,
.svhs = 1,
.muxsel = { 0, 1 },
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1919,11 +1830,10 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
.video_inputs = 2,
.audio_inputs = 1,
- .tuner = UNSET,
.svhs = 1,
.muxsel = { 2, 3 },
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1934,11 +1844,10 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 500", /* 500 */
.video_inputs = 2,
.audio_inputs = 1,
- .tuner = UNSET,
.svhs = 1,
.muxsel = { 2, 3 },
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1949,9 +1858,8 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 540", /* 540 */
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = UNSET,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1964,11 +1872,10 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 2000", /* 2000 */
.video_inputs = 2,
.audio_inputs = 1,
- .tuner = UNSET,
.svhs = 1,
.muxsel = { 2, 3 },
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1980,8 +1887,7 @@ struct tvcard bttv_tvcards[] = {
.name = "IDS Eagle",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.svhs = UNSET,
@@ -1997,8 +1903,7 @@ struct tvcard bttv_tvcards[] = {
.video_inputs = 2,
.audio_inputs = 0,
.svhs = 1,
- .tuner = UNSET,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -2013,7 +1918,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Formac ProTV II (bt878)",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 3,
.gpiomask = 2,
/* TV, Comp1, Composite over SVID con, SVID */
@@ -2038,7 +1942,6 @@ struct tvcard bttv_tvcards[] = {
.name = "MachTV",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = UNSET,
.gpiomask = 7,
.muxsel = { 2, 3, 1, 1},
@@ -2054,7 +1957,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Euresys Picolo",
.video_inputs = 3,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 2,
.gpiomask = 0,
.no_msp34xx = 1,
@@ -2062,7 +1964,7 @@ struct tvcard bttv_tvcards[] = {
.no_tda7432 = 1,
.muxsel = { 2, 0, 1},
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2071,7 +1973,6 @@ struct tvcard bttv_tvcards[] = {
.name = "ProVideo PV150", /* 0x4f */
.video_inputs = 2,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0,
.muxsel = { 2, 3 },
@@ -2079,7 +1980,7 @@ struct tvcard bttv_tvcards[] = {
.needs_tvaudio = 0,
.no_msp34xx = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2089,7 +1990,6 @@ struct tvcard bttv_tvcards[] = {
.name = "AD-TVK503", /* 0x63 */
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x001e8007,
.muxsel = { 2, 3, 1, 0 },
@@ -2110,7 +2010,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Hercules Smart TV Stereo",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x00,
.muxsel = { 2, 3, 1, 1 },
@@ -2134,7 +2033,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Pace TV & Radio Card",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.muxsel = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */
.gpiomask = 0,
@@ -2157,8 +2055,7 @@ struct tvcard bttv_tvcards[] = {
.name = "IVC-200",
.video_inputs = 1,
.audio_inputs = 0,
- .tuner = UNSET,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.svhs = UNSET,
@@ -2170,8 +2067,7 @@ struct tvcard bttv_tvcards[] = {
.name = "IVCE-8784",
.video_inputs = 1,
.audio_inputs = 0,
- .tuner = UNSET,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.svhs = UNSET,
@@ -2183,7 +2079,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Grand X-Guard / Trust 814PCI",
.video_inputs = 16,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
@@ -2201,14 +2096,13 @@ struct tvcard bttv_tvcards[] = {
[BTTV_BOARD_NEBULA_DIGITV] = {
.name = "Nebula Electronics DigiTV",
.video_inputs = 1,
- .tuner = UNSET,
.svhs = UNSET,
.muxsel = { 2, 3, 1, 0 },
.no_msp34xx = 1,
.no_tda9875 = 1,
.no_tda7432 = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.has_dvb = 1,
@@ -2221,7 +2115,6 @@ struct tvcard bttv_tvcards[] = {
.name = "ProVideo PV143",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0,
.muxsel = { 2, 3, 1, 0 },
@@ -2229,7 +2122,7 @@ struct tvcard bttv_tvcards[] = {
.needs_tvaudio = 0,
.no_msp34xx = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2238,14 +2131,13 @@ struct tvcard bttv_tvcards[] = {
.name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET, /* card has no tuner */
.svhs = 3,
.gpiomask = 0x00,
.muxsel = { 2, 3, 1, 0 },
.gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
.needs_tvaudio = 0,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2253,14 +2145,13 @@ struct tvcard bttv_tvcards[] = {
.name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET, /* card has no tuner */
.svhs = 3,
.gpiomask = 0x00,
.muxsel = { 2, 3, 1, 1 },
.gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
.needs_tvaudio = 0,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2270,7 +2161,6 @@ struct tvcard bttv_tvcards[] = {
.name = "PHYTEC VD-009 MiniDIN (bt878)",
.video_inputs = 10,
.audio_inputs = 0,
- .tuner = UNSET, /* card has no tuner */
.svhs = 9,
.gpiomask = 0x00,
.gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
@@ -2280,7 +2170,7 @@ struct tvcard bttv_tvcards[] = {
.gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
.needs_tvaudio = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2288,7 +2178,6 @@ struct tvcard bttv_tvcards[] = {
.name = "PHYTEC VD-009 Combi (bt878)",
.video_inputs = 10,
.audio_inputs = 0,
- .tuner = UNSET, /* card has no tuner */
.svhs = 9,
.gpiomask = 0x00,
.gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
@@ -2298,7 +2187,7 @@ struct tvcard bttv_tvcards[] = {
.gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
.needs_tvaudio = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2306,8 +2195,7 @@ struct tvcard bttv_tvcards[] = {
.name = "IVC-100",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.svhs = UNSET,
@@ -2320,8 +2208,7 @@ struct tvcard bttv_tvcards[] = {
.name = "IVC-120G",
.video_inputs = 16,
.audio_inputs = 0, /* card has no audio */
- .tuner = UNSET, /* card has no tuner */
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.svhs = UNSET, /* card has no svhs */
@@ -2341,7 +2228,6 @@ struct tvcard bttv_tvcards[] = {
.name = "pcHDTV HD-2000 TV",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.muxsel = { 2, 3, 1, 0 },
.tuner_type = TUNER_PHILIPS_FCV1236D,
@@ -2365,7 +2251,6 @@ struct tvcard bttv_tvcards[] = {
.video_inputs = 3,
.audio_inputs = 0,
.svhs = 1,
- .tuner = UNSET,
.muxsel = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */
.no_msp34xx = 1,
.no_tda9875 = 1,
@@ -2379,7 +2264,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Teppro TEV-560/InterVision IV-560",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 3,
.muxsel = { 2, 3, 1, 1 },
@@ -2396,9 +2280,8 @@ struct tvcard bttv_tvcards[] = {
.name = "SIMUS GVC1100",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.pll = PLL_28,
@@ -2410,7 +2293,6 @@ struct tvcard bttv_tvcards[] = {
/* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
.name = "NGS NGSTV+",
.video_inputs = 3,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x008007,
.muxsel = { 2, 3, 0, 0 },
@@ -2427,14 +2309,13 @@ struct tvcard bttv_tvcards[] = {
.name = "LMLBT4",
.video_inputs = 4, /* IN1,IN2,IN3,IN4 */
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.muxsel = { 2, 3, 1, 0 },
.no_msp34xx = 1,
.no_tda9875 = 1,
.no_tda7432 = 1,
.needs_tvaudio = 0,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2443,7 +2324,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Tekram M205 PRO",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.tuner_type = TUNER_PHILIPS_PAL,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
@@ -2462,7 +2342,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Conceptronic CONTVFMi",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x008007,
.muxsel = { 2, 3, 1, 1 },
@@ -2484,7 +2363,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Euresys Picolo Tetra",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0,
.gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
@@ -2496,7 +2374,7 @@ struct tvcard bttv_tvcards[] = {
.pll = PLL_28,
.needs_tvaudio = 0,
.muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2506,7 +2384,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Spirit TV Tuner",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x0000000f,
.muxsel = { 2, 1, 1 },
@@ -2522,7 +2399,6 @@ struct tvcard bttv_tvcards[] = {
.name = "AVerMedia AVerTV DVB-T 771",
.video_inputs = 2,
.svhs = 1,
- .tuner = UNSET,
.tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
@@ -2541,14 +2417,13 @@ struct tvcard bttv_tvcards[] = {
/* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see also ir-kbd-gpio.c */
.name = "AverMedia AverTV DVB-T 761",
.video_inputs = 2,
- .tuner = UNSET,
.svhs = 1,
.muxsel = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */
.no_msp34xx = 1,
.no_tda9875 = 1,
.no_tda7432 = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.has_dvb = 1,
@@ -2560,7 +2435,6 @@ struct tvcard bttv_tvcards[] = {
.name = "MATRIX Vision Sigma-SQ",
.video_inputs = 16,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0x0,
.muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
@@ -2569,7 +2443,7 @@ struct tvcard bttv_tvcards[] = {
.gpiomux = { 0 },
.no_msp34xx = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2578,7 +2452,6 @@ struct tvcard bttv_tvcards[] = {
.name = "MATRIX Vision Sigma-SLC",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0x0,
.muxsel = { 2, 2, 2, 2 },
@@ -2586,7 +2459,7 @@ struct tvcard bttv_tvcards[] = {
.gpiomux = { 0 },
.no_msp34xx = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2597,7 +2470,6 @@ struct tvcard bttv_tvcards[] = {
.name = "APAC Viewcomp 878(AMAX)",
.video_inputs = 2,
.audio_inputs = 1,
- .tuner = 0,
.svhs = UNSET,
.gpiomask = 0xFF,
.muxsel = { 2, 3, 1, 1 },
@@ -2616,14 +2488,13 @@ struct tvcard bttv_tvcards[] = {
[BTTV_BOARD_DVICO_DVBT_LITE] = {
/* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
.name = "DViCO FusionHDTV DVB-T Lite",
- .tuner = UNSET,
.no_msp34xx = 1,
.no_tda9875 = 1,
.no_tda7432 = 1,
.pll = PLL_28,
.no_video = 1,
.has_dvb = 1,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2632,7 +2503,6 @@ struct tvcard bttv_tvcards[] = {
.name = "V-Gear MyVCD",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x3f,
.muxsel = {2, 3, 1, 0 },
@@ -2650,7 +2520,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Super TV Tuner",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.muxsel = { 2, 3, 1, 0 },
.tuner_type = TUNER_PHILIPS_NTSC,
@@ -2666,14 +2535,13 @@ struct tvcard bttv_tvcards[] = {
.name = "Tibet Systems 'Progress DVR' CS16",
.video_inputs = 16,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
.pll = PLL_28,
.no_msp34xx = 1,
.no_tda9875 = 1,
.no_tda7432 = 1,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.muxsel_hook = tibetCS16_muxsel,
@@ -2693,8 +2561,7 @@ struct tvcard bttv_tvcards[] = {
.name = "Kodicom 4400R (master)",
.video_inputs = 16,
.audio_inputs = 0,
- .tuner = UNSET,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.svhs = UNSET,
@@ -2725,8 +2592,7 @@ struct tvcard bttv_tvcards[] = {
.name = "Kodicom 4400R (slave)",
.video_inputs = 16,
.audio_inputs = 0,
- .tuner = UNSET,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.svhs = UNSET,
@@ -2746,7 +2612,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Adlink RTV24",
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.muxsel = { 2, 3, 1, 0 },
.tuner_type = UNSET,
@@ -2758,7 +2623,6 @@ struct tvcard bttv_tvcards[] = {
[BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
/* Michael Krufky <mkrufky@m1k.net> */
.name = "DViCO FusionHDTV 5 Lite",
- .tuner = 0,
.tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
@@ -2780,7 +2644,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Acorp Y878F",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x01fe00,
.muxsel = { 2, 3, 1, 1 },
@@ -2798,7 +2661,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Conceptronic CTVFMi v2",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x001c0007,
.muxsel = { 2, 3, 1, 1 },
@@ -2817,7 +2679,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
.video_inputs = 5,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 3,
.gpiomask = 0x01fe00,
.muxsel = { 2,3,1,1,-1 },
@@ -2837,7 +2698,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x3f,
.muxsel = { 2, 3, 1, 1 },
@@ -2868,14 +2728,13 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 440",
.video_inputs = 4,
.audio_inputs = 2, /* this is meaningless */
- .tuner = UNSET,
.svhs = UNSET,
.muxsel = { 2, 3, 0, 1 }, /* 3,0,1 are guesses */
.gpiomask = 0x303,
.gpiomute = 0x000, /* int + 32kHz */
.gpiomux = { 0, 0, 0x000, 0x100},
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -2887,7 +2746,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Asound Skyeye PCTV",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 15,
.muxsel = { 2, 3, 1, 1 },
@@ -2904,7 +2762,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Sabrent TV-FM (bttv version)",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x108007,
.muxsel = { 2, 3, 1, 1 },
@@ -2922,14 +2779,13 @@ struct tvcard bttv_tvcards[] = {
.name = "Hauppauge ImpactVCB (bt878)",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0x0f, /* old: 7 */
.muxsel = { 0, 1, 3, 2 }, /* Composite 0-3 */
.no_msp34xx = 1,
.no_tda9875 = 1,
.no_tda7432 = 1,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2944,7 +2800,6 @@ struct tvcard bttv_tvcards[] = {
.name = "MagicTV", /* rebranded MachTV */
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 7,
.muxsel = { 2, 3, 1, 1 },
@@ -2961,10 +2816,9 @@ struct tvcard bttv_tvcards[] = {
.name = "SSAI Security Video Interface",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.muxsel = { 0, 1, 2, 3 },
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -2972,17 +2826,15 @@ struct tvcard bttv_tvcards[] = {
.name = "SSAI Ultrasound Video Interface",
.video_inputs = 2,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 1,
.muxsel = { 2, 0, 1, 3 },
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
/* ---- card 0x94---------------------------------- */
[BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
.name = "DViCO FusionHDTV 2",
- .tuner = 0,
.tuner_type = TUNER_PHILIPS_FCV1236D,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
@@ -3002,7 +2854,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Typhoon TV-Tuner PCI (50684)",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x3014f,
.muxsel = { 2, 3, 1, 1 },
@@ -3019,7 +2870,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Geovision GV-600",
.video_inputs = 16,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0x0,
.muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
@@ -3028,7 +2878,7 @@ struct tvcard bttv_tvcards[] = {
.gpiomux = { 0 },
.no_msp34xx = 1,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -3039,7 +2889,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Kozumi KTV-01C",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
.gpiomask = 0x008007,
.muxsel = { 2, 3, 1, 1 },
@@ -3059,7 +2908,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Encore ENL TV-FM-2",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = 2,
/* bit 6 -> IR disabled
bit 18/17 = 00 -> mute
@@ -3083,14 +2931,13 @@ struct tvcard bttv_tvcards[] = {
.name = "PHYTEC VD-012 (bt878)",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET, /* card has no tuner */
.svhs = UNSET, /* card has no s-video */
.gpiomask = 0x00,
.muxsel = { 0, 2, 3, 1 },
.gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
.needs_tvaudio = 0,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -3099,14 +2946,13 @@ struct tvcard bttv_tvcards[] = {
.name = "PHYTEC VD-012-X1 (bt878)",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET, /* card has no tuner */
.svhs = 3,
.gpiomask = 0x00,
.muxsel = { 2, 3, 1 },
.gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
.needs_tvaudio = 0,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
},
@@ -3115,14 +2961,13 @@ struct tvcard bttv_tvcards[] = {
.name = "PHYTEC VD-012-X2 (bt878)",
.video_inputs = 4,
.audio_inputs = 0,
- .tuner = UNSET, /* card has no tuner */
.svhs = 3,
.gpiomask = 0x00,
.muxsel = { 3, 2, 1 },
.gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
.needs_tvaudio = 0,
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
}
@@ -3687,13 +3532,12 @@ void __devinit bttv_init_card2(struct bttv *btv)
addr = bttv_tvcards[btv->c.type].tuner_addr;
if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
- if(UNSET == btv->tuner_type)
+ if (UNSET == btv->tuner_type)
btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
if (UNSET != tuner[btv->c.nr])
btv->tuner_type = tuner[btv->c.nr];
- if (btv->tuner_type == TUNER_ABSENT ||
- bttv_tvcards[btv->c.type].tuner == UNSET)
+ if (btv->tuner_type == TUNER_ABSENT)
printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
else if(btv->tuner_type == UNSET)
printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
@@ -3701,13 +3545,23 @@ void __devinit bttv_init_card2(struct bttv *btv)
printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
btv->tuner_type);
- if (btv->tuner_type != UNSET) {
+ if (UNSET == btv->tuner_type)
+ btv->tuner_type = TUNER_ABSENT;
+
+ if (btv->tuner_type != TUNER_ABSENT) {
struct tuner_setup tun_setup;
+ /* Load tuner module before issuing tuner config call! */
+ if (autoload)
+ request_module("tuner");
+
tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
tun_setup.type = btv->tuner_type;
tun_setup.addr = addr;
+ if (bttv_tvcards[btv->c.type].has_radio)
+ tun_setup.mode_mask |= T_RADIO;
+
bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
}
@@ -3740,7 +3594,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
if (!autoload)
return;
- if (bttv_tvcards[btv->c.type].tuner == UNSET)
+ if (btv->tuner_type == TUNER_ABSENT)
return; /* no tuner or related drivers to load */
/* try to detect audio/fader chips */
@@ -3762,9 +3616,6 @@ void __devinit bttv_init_card2(struct bttv *btv)
if (bttv_tvcards[btv->c.type].needs_tvaudio)
request_module("tvaudio");
-
- if (btv->tuner_type != UNSET && btv->tuner_type != TUNER_ABSENT)
- request_module("tuner");
}
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 89e0cd19153..1bb6c2df366 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -1356,8 +1356,8 @@ set_input(struct bttv *btv, unsigned int input, unsigned int norm)
} else {
video_mux(btv,input);
}
- audio_input(btv,(input == bttv_tvcards[btv->c.type].tuner ?
- TVAUDIO_INPUT_TUNER : TVAUDIO_INPUT_EXTERN));
+ audio_input(btv, (btv->tuner_type != TUNER_ABSENT && input == 0) ?
+ TVAUDIO_INPUT_TUNER : TVAUDIO_INPUT_EXTERN);
set_tvnorm(btv, norm);
}
@@ -1907,7 +1907,7 @@ static int bttv_enum_input(struct file *file, void *priv,
i->type = V4L2_INPUT_TYPE_CAMERA;
i->audioset = 1;
- if (i->index == bttv_tvcards[btv->c.type].tuner) {
+ if (btv->tuner_type != TUNER_ABSENT && i->index == 0) {
sprintf(i->name, "Television");
i->type = V4L2_INPUT_TYPE_TUNER;
i->tuner = 0;
@@ -1971,7 +1971,7 @@ static int bttv_s_tuner(struct file *file, void *priv,
if (0 != err)
return err;
- if (UNSET == bttv_tvcards[btv->c.type].tuner)
+ if (btv->tuner_type == TUNER_ABSENT)
return -EINVAL;
if (0 != t->index)
@@ -2665,8 +2665,7 @@ static int bttv_querycap(struct file *file, void *priv,
if (no_overlay <= 0)
cap->capabilities |= V4L2_CAP_VIDEO_OVERLAY;
- if (bttv_tvcards[btv->c.type].tuner != UNSET &&
- bttv_tvcards[btv->c.type].tuner != TUNER_ABSENT)
+ if (btv->tuner_type != TUNER_ABSENT)
cap->capabilities |= V4L2_CAP_TUNER;
return 0;
}
@@ -2949,7 +2948,7 @@ static int bttv_g_tuner(struct file *file, void *priv,
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
- if (UNSET == bttv_tvcards[btv->c.type].tuner)
+ if (btv->tuner_type == TUNER_ABSENT)
return -EINVAL;
if (0 != t->index)
return -EINVAL;
@@ -3509,7 +3508,7 @@ static int radio_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
- if (UNSET == bttv_tvcards[btv->c.type].tuner)
+ if (btv->tuner_type == TUNER_ABSENT)
return -EINVAL;
if (0 != t->index)
return -EINVAL;
diff --git a/drivers/media/video/bt8xx/bttv-i2c.c b/drivers/media/video/bt8xx/bttv-i2c.c
index bcd2cd240a1..511d2bf176f 100644
--- a/drivers/media/video/bt8xx/bttv-i2c.c
+++ b/drivers/media/video/bt8xx/bttv-i2c.c
@@ -286,12 +286,10 @@ static int attach_inform(struct i2c_client *client)
btv->i2c_msp34xx_client = client;
if (client->driver->id == I2C_DRIVERID_TVAUDIO)
btv->i2c_tvaudio_client = client;
- if (btv->tuner_type != UNSET) {
+ if (btv->tuner_type != TUNER_ABSENT) {
struct tuner_setup tun_setup;
- if ((addr==ADDR_UNSET) ||
- (addr==client->addr)) {
-
+ if (addr == ADDR_UNSET || addr == client->addr) {
tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV | T_RADIO;
tun_setup.type = btv->tuner_type;
tun_setup.addr = addr;
diff --git a/drivers/media/video/bt8xx/bttv.h b/drivers/media/video/bt8xx/bttv.h
index 6bf2fa03a58..861ff2f8f98 100644
--- a/drivers/media/video/bt8xx/bttv.h
+++ b/drivers/media/video/bt8xx/bttv.h
@@ -216,7 +216,6 @@ struct tvcard
char *name;
unsigned int video_inputs;
unsigned int audio_inputs;
- unsigned int tuner;
unsigned int svhs;
unsigned int digital_mode; // DIGITAL_MODE_CAMERA or DIGITAL_MODE_VIDEO
u32 gpiomask;