summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-01-28 16:32:59 -0800
committerTrent Piepho <xyzzy@speakeasy.org>2009-01-28 16:32:59 -0800
commitf030fca37c310181b3fce820ab359bb8eceed0e2 (patch)
treeeb79ddb1e871efee85a7362cc52e236eab62b921
parent4a49903c6320c8ba9dfe2c139103166f75594f49 (diff)
downloadmediapointer-dvb-s2-f030fca37c310181b3fce820ab359bb8eceed0e2.tar.gz
mediapointer-dvb-s2-f030fca37c310181b3fce820ab359bb8eceed0e2.tar.bz2
bttv: make tuner card info more consistent
From: Trent Piepho <xyzzy@speakeasy.org> 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. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-cards.c285
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-driver.c15
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-i2c.c6
-rw-r--r--linux/drivers/media/video/bt8xx/bttv.h1
4 files changed, 77 insertions, 230 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c
index 89203525f..3c9349f2c 100644
--- a/linux/drivers/media/video/bt8xx/bttv-cards.c
+++ b/linux/drivers/media/video/bt8xx/bttv-cards.c
@@ -322,7 +322,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,
@@ -333,7 +332,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 },
@@ -348,7 +346,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 },
@@ -363,7 +360,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 },
@@ -383,7 +379,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 },
@@ -397,7 +392,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 },
@@ -412,7 +406,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,
@@ -429,13 +422,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,
},
@@ -445,7 +437,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 },
@@ -461,7 +452,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 },
@@ -476,7 +466,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 },
@@ -492,7 +481,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 },
@@ -509,7 +497,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 },
@@ -523,7 +510,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 },
@@ -541,7 +527,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 },
@@ -557,7 +542,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 },
@@ -574,7 +558,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 },
@@ -596,7 +579,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 },
@@ -613,7 +595,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 },
@@ -627,13 +608,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,
},
@@ -643,7 +623,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,
@@ -654,7 +633,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 },
@@ -669,7 +647,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 },
@@ -685,7 +662,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 },
@@ -703,7 +679,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 },
@@ -720,7 +695,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 },
@@ -736,7 +710,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 },
@@ -751,7 +724,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 },
@@ -768,7 +740,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 },
@@ -816,13 +787,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,
@@ -832,7 +802,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 },
@@ -847,7 +816,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 },
@@ -863,7 +831,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 },
@@ -877,7 +844,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 },
@@ -893,7 +859,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 */
#if 0
@@ -929,7 +894,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 },
@@ -946,7 +910,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 },
@@ -962,7 +925,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 },
@@ -978,7 +940,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 },
@@ -995,7 +956,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 },
@@ -1013,7 +973,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 },
@@ -1031,7 +990,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 },
@@ -1048,7 +1006,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},
@@ -1064,7 +1021,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 },
@@ -1081,7 +1037,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 },
@@ -1097,14 +1052,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,
},
@@ -1112,7 +1066,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 },
@@ -1128,7 +1081,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 },
@@ -1148,7 +1100,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 },
@@ -1164,7 +1115,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 },
@@ -1180,7 +1130,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 },
@@ -1207,7 +1156,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 },
@@ -1225,7 +1173,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 },
@@ -1252,7 +1199,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 },
@@ -1274,7 +1220,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 },
@@ -1295,7 +1240,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 },
@@ -1314,7 +1258,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 },
@@ -1332,7 +1275,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 },
@@ -1340,7 +1282,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,
},
@@ -1349,7 +1291,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},
@@ -1366,7 +1307,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 },
@@ -1384,7 +1324,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 },
@@ -1400,7 +1339,6 @@ struct tvcard bttv_tvcards[] = {
.name = "AG Electronics GMV1",
.video_inputs = 2,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 1,
.gpiomask = 0xF,
.muxsel = { 2, 2 },
@@ -1408,7 +1346,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,
},
@@ -1419,7 +1357,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 },
@@ -1436,7 +1373,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 },
@@ -1454,7 +1390,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 },
@@ -1470,7 +1405,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 },
@@ -1492,7 +1426,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 },
@@ -1510,7 +1443,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 },
@@ -1530,7 +1462,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)
@@ -1552,7 +1483,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)
@@ -1573,8 +1503,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,
@@ -1586,7 +1515,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 },
@@ -1610,12 +1538,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,
},
@@ -1626,7 +1553,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 },
@@ -1656,13 +1582,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,
},
@@ -1671,7 +1596,6 @@ struct tvcard bttv_tvcards[] = {
.name = "RemoteVision MX (RV605)",
.video_inputs = 16,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0x00,
.gpiomask2 = 0x07ff,
@@ -1679,7 +1603,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,
@@ -1688,7 +1612,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, },
@@ -1708,7 +1631,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 },
@@ -1723,7 +1645,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 },
@@ -1731,7 +1652,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,
},
@@ -1739,7 +1660,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 */
@@ -1787,7 +1707,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,
@@ -1803,7 +1722,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 },
@@ -1821,11 +1739,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,
@@ -1836,11 +1753,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,
@@ -1853,11 +1769,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,
@@ -1868,11 +1783,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,
@@ -1883,11 +1797,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,
@@ -1898,11 +1811,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,
@@ -1915,11 +1827,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,
@@ -1930,11 +1841,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,
@@ -1945,11 +1855,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,
@@ -1960,14 +1869,13 @@ struct tvcard bttv_tvcards[] = {
.name = "Osprey 540", /* 540 */
.video_inputs = 4,
.audio_inputs = 1,
- .tuner = UNSET,
#if 0 /* TODO ... */
.svhs = OSPREY540_SVID_ANALOG,
.muxsel = { [OSPREY540_COMP_ANALOG] = 2,
[OSPREY540_SVID_ANALOG] = 3, },
#endif
.pll = PLL_28,
- .tuner_type = UNSET,
+ .tuner_type = TUNER_ABSENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.no_msp34xx = 1,
@@ -1984,11 +1892,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,
@@ -2000,8 +1907,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,
@@ -2017,8 +1923,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,
@@ -2033,7 +1938,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 */
@@ -2058,7 +1962,6 @@ struct tvcard bttv_tvcards[] = {
.name = "MachTV",
.video_inputs = 3,
.audio_inputs = 1,
- .tuner = 0,
.svhs = UNSET,
.gpiomask = 7,
.muxsel = { 2, 3, 1, 1},
@@ -2074,7 +1977,6 @@ struct tvcard bttv_tvcards[] = {
.name = "Euresys Picolo",
.video_inputs = 3,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = 2,
.gpiomask = 0,
.no_msp34xx = 1,
@@ -2082,7 +1984,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,
},
@@ -2091,7 +1993,6 @@ struct tvcard bttv_tvcards[] = {
.name = "ProVideo PV150", /* 0x4f */
.video_inputs = 2,
.audio_inputs = 0,
- .tuner = UNSET,
.svhs = UNSET,
.gpiomask = 0,
.muxsel = { 2, 3 },
@@ -2099,7 +2000,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,
},
@@ -2109,7 +2010,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 },
@@ -2130,7 +2030,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 },
@@ -2154,7 +2053,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,
@@ -2177,8 +2075,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,
@@ -2190,8 +2087,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,
@@ -2203,7 +2099,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,
@@ -2221,14 +2116,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,
@@ -2241,7 +2135,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 },
@@ -2249,7 +2142,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,
},
@@ -2258,14 +2151,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,
},
@@ -2273,14 +2165,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,
},
@@ -2290,7 +2181,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
@@ -2300,7 +2190,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,
},
@@ -2308,7 +2198,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
@@ -2318,7 +2207,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,
},
@@ -2326,8 +2215,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,
@@ -2340,8 +2228,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 */
@@ -2361,7 +2248,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,
@@ -2385,7 +2271,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,
@@ -2399,7 +2284,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 },
@@ -2416,9 +2300,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,
@@ -2430,7 +2313,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 },
@@ -2447,14 +2329,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,
},
@@ -2463,7 +2344,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,
@@ -2482,7 +2362,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 },
@@ -2504,7 +2383,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*/
@@ -2516,7 +2394,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,
},
@@ -2526,7 +2404,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 },
@@ -2542,7 +2419,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,
@@ -2561,14 +2437,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,
@@ -2580,7 +2455,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,
@@ -2589,7 +2463,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,
},
@@ -2598,7 +2472,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 },
@@ -2606,7 +2479,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,
},
@@ -2617,7 +2490,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 },
@@ -2636,14 +2508,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,
},
@@ -2652,7 +2523,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 },
@@ -2673,7 +2543,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,
@@ -2689,14 +2558,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,
@@ -2716,8 +2584,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,
@@ -2748,8 +2615,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,
@@ -2769,7 +2635,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,
@@ -2781,7 +2646,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,
@@ -2803,7 +2667,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 },
@@ -2821,7 +2684,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 },
@@ -2840,7 +2702,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 },
@@ -2860,7 +2721,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 },
@@ -2891,14 +2751,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,
@@ -2910,7 +2769,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 },
@@ -2927,7 +2785,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 },
@@ -2945,14 +2802,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,
},
@@ -2967,7 +2823,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 },
@@ -2984,10 +2839,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,
},
@@ -2995,17 +2849,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,
@@ -3025,7 +2877,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 },
@@ -3042,7 +2893,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,
@@ -3051,7 +2901,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,
},
@@ -3062,7 +2912,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 },
@@ -3088,7 +2937,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
@@ -3112,14 +2960,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,
},
@@ -3128,14 +2975,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,
},
@@ -3144,14 +2990,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,
}
@@ -3725,13 +3570,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);
@@ -3739,13 +3583,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);
}
@@ -3778,7 +3632,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 */
@@ -3800,9 +3654,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/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c
index f72c6ffea..53be29350 100644
--- a/linux/drivers/media/video/bt8xx/bttv-driver.c
+++ b/linux/drivers/media/video/bt8xx/bttv-driver.c
@@ -1384,8 +1384,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);
}
@@ -1935,7 +1935,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;
@@ -1999,7 +1999,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)
@@ -2693,8 +2693,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;
}
@@ -2977,7 +2976,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;
@@ -3537,7 +3536,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/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c
index 558572589..66fc4e480 100644
--- a/linux/drivers/media/video/bt8xx/bttv-i2c.c
+++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c
@@ -289,12 +289,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/linux/drivers/media/video/bt8xx/bttv.h b/linux/drivers/media/video/bt8xx/bttv.h
index 17b2add83..1fee79c55 100644
--- a/linux/drivers/media/video/bt8xx/bttv.h
+++ b/linux/drivers/media/video/bt8xx/bttv.h
@@ -217,7 +217,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;