bttv-cards.c 142 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832
  1. /*
  2. bttv-cards.c
  3. this file has configuration informations - card-specific stuff
  4. like the big tvcards array for the most part
  5. Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
  6. & Marcus Metzler (mocm@thp.uni-koeln.de)
  7. (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
  8. This program is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2 of the License, or
  11. (at your option) any later version.
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20. #include <linux/delay.h>
  21. #include <linux/module.h>
  22. #include <linux/kmod.h>
  23. #include <linux/init.h>
  24. #include <linux/pci.h>
  25. #include <linux/vmalloc.h>
  26. #include <linux/firmware.h>
  27. #include <net/checksum.h>
  28. #include <asm/unaligned.h>
  29. #include <asm/io.h>
  30. #include "bttvp.h"
  31. #include <media/v4l2-common.h>
  32. #include <media/tvaudio.h>
  33. #include "bttv-audio-hook.h"
  34. /* fwd decl */
  35. static void boot_msp34xx(struct bttv *btv, int pin);
  36. static void boot_bt832(struct bttv *btv);
  37. static void hauppauge_eeprom(struct bttv *btv);
  38. static void avermedia_eeprom(struct bttv *btv);
  39. static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
  40. static void modtec_eeprom(struct bttv *btv);
  41. static void init_PXC200(struct bttv *btv);
  42. static void init_RTV24(struct bttv *btv);
  43. static void rv605_muxsel(struct bttv *btv, unsigned int input);
  44. static void eagle_muxsel(struct bttv *btv, unsigned int input);
  45. static void xguard_muxsel(struct bttv *btv, unsigned int input);
  46. static void ivc120_muxsel(struct bttv *btv, unsigned int input);
  47. static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
  48. static void PXC200_muxsel(struct bttv *btv, unsigned int input);
  49. static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
  50. static void picolo_tetra_init(struct bttv *btv);
  51. static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
  52. static void tibetCS16_init(struct bttv *btv);
  53. static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
  54. static void kodicom4400r_init(struct bttv *btv);
  55. static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
  56. static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
  57. static void geovision_muxsel(struct bttv *btv, unsigned int input);
  58. static int terratec_active_radio_upgrade(struct bttv *btv);
  59. static int tea5757_read(struct bttv *btv);
  60. static int tea5757_write(struct bttv *btv, int value);
  61. static void identify_by_eeprom(struct bttv *btv,
  62. unsigned char eeprom_data[256]);
  63. static int __devinit pvr_boot(struct bttv *btv);
  64. /* config variables */
  65. static unsigned int triton1;
  66. static unsigned int vsfx;
  67. static unsigned int latency = UNSET;
  68. int no_overlay=-1;
  69. static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
  70. static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
  71. static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
  72. static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
  73. static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
  74. static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
  75. #ifdef MODULE
  76. static unsigned int autoload = 1;
  77. #else
  78. static unsigned int autoload;
  79. #endif
  80. static unsigned int gpiomask = UNSET;
  81. static unsigned int audioall = UNSET;
  82. static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
  83. /* insmod options */
  84. module_param(triton1, int, 0444);
  85. module_param(vsfx, int, 0444);
  86. module_param(no_overlay, int, 0444);
  87. module_param(latency, int, 0444);
  88. module_param(gpiomask, int, 0444);
  89. module_param(audioall, int, 0444);
  90. module_param(autoload, int, 0444);
  91. module_param_array(card, int, NULL, 0444);
  92. module_param_array(pll, int, NULL, 0444);
  93. module_param_array(tuner, int, NULL, 0444);
  94. module_param_array(svhs, int, NULL, 0444);
  95. module_param_array(remote, int, NULL, 0444);
  96. module_param_array(audiomux, int, NULL, 0444);
  97. MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
  98. "[enable bug compatibility for triton1 + others]");
  99. MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
  100. "[yet another chipset flaw workaround]");
  101. MODULE_PARM_DESC(latency,"pci latency timer");
  102. MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
  103. MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
  104. MODULE_PARM_DESC(tuner,"specify installed tuner type");
  105. MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
  106. MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
  107. " [some VIA/SIS chipsets are known to have problem with overlay]");
  108. /* ----------------------------------------------------------------------- */
  109. /* list of card IDs for bt878+ cards */
  110. static struct CARD {
  111. unsigned id;
  112. int cardnr;
  113. char *name;
  114. } cards[] __devinitdata = {
  115. { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
  116. { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
  117. { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
  118. { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
  119. { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
  120. { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
  121. { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
  122. { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
  123. { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
  124. { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
  125. { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
  126. { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
  127. { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
  128. { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
  129. { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
  130. { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
  131. { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
  132. { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
  133. { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
  134. { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
  135. { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
  136. /* some cards ship with byteswapped IDs ... */
  137. { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
  138. { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
  139. /* this seems to happen as well ... */
  140. { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
  141. { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
  142. { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
  143. { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
  144. { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
  145. { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
  146. { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
  147. { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
  148. { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
  149. { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
  150. { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
  151. { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
  152. { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
  153. { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
  154. { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
  155. { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
  156. { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
  157. { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
  158. { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
  159. { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
  160. { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
  161. { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
  162. /* clashes with FlyVideo
  163. *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
  164. { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
  165. { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
  166. { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
  167. { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
  168. { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
  169. { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
  170. { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
  171. { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
  172. { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
  173. { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
  174. { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
  175. { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
  176. { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
  177. { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
  178. { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
  179. { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
  180. { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
  181. { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
  182. { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
  183. { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
  184. { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
  185. { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
  186. { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
  187. { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
  188. { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
  189. { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
  190. { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
  191. { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
  192. { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
  193. { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
  194. { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
  195. { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
  196. { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
  197. { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
  198. { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
  199. { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
  200. { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
  201. { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
  202. { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
  203. { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
  204. { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
  205. { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
  206. { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
  207. { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
  208. { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
  209. { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
  210. { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
  211. { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
  212. { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
  213. { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
  214. { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
  215. { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
  216. { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
  217. { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
  218. { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
  219. { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
  220. { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
  221. { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
  222. { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
  223. { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
  224. { 0x03116000, BTTV_BOARD_SENSORAY311, "Sensoray 311" },
  225. { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
  226. { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
  227. { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
  228. { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
  229. { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
  230. { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
  231. { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
  232. { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
  233. { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
  234. { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
  235. { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
  236. { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
  237. { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
  238. { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
  239. /* likely broken, vendor id doesn't match the other magic views ...
  240. * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
  241. /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
  242. * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
  243. /* DVB cards (using pci function .1 for mpeg data xfer) */
  244. { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
  245. { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
  246. { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
  247. { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
  248. { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
  249. { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
  250. { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
  251. { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
  252. { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
  253. { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
  254. { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
  255. { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
  256. { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
  257. { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
  258. { 0, -1, NULL }
  259. };
  260. /* ----------------------------------------------------------------------- */
  261. /* array with description for bt848 / bt878 tv/grabber cards */
  262. struct tvcard bttv_tvcards[] = {
  263. /* ---- card 0x00 ---------------------------------- */
  264. [BTTV_BOARD_UNKNOWN] = {
  265. .name = " *** UNKNOWN/GENERIC *** ",
  266. .video_inputs = 4,
  267. .audio_inputs = 1,
  268. .tuner = 0,
  269. .svhs = 2,
  270. .muxsel = { 2, 3, 1, 0 },
  271. .tuner_type = UNSET,
  272. .tuner_addr = ADDR_UNSET,
  273. .radio_addr = ADDR_UNSET,
  274. },
  275. [BTTV_BOARD_MIRO] = {
  276. .name = "MIRO PCTV",
  277. .video_inputs = 4,
  278. .audio_inputs = 1,
  279. .tuner = 0,
  280. .svhs = 2,
  281. .gpiomask = 15,
  282. .muxsel = { 2, 3, 1, 1 },
  283. .gpiomux = { 2, 0, 0, 0 },
  284. .gpiomute = 10,
  285. .needs_tvaudio = 1,
  286. .tuner_type = UNSET,
  287. .tuner_addr = ADDR_UNSET,
  288. .radio_addr = ADDR_UNSET,
  289. },
  290. [BTTV_BOARD_HAUPPAUGE] = {
  291. .name = "Hauppauge (bt848)",
  292. .video_inputs = 4,
  293. .audio_inputs = 1,
  294. .tuner = 0,
  295. .svhs = 2,
  296. .gpiomask = 7,
  297. .muxsel = { 2, 3, 1, 1 },
  298. .gpiomux = { 0, 1, 2, 3 },
  299. .gpiomute = 4,
  300. .needs_tvaudio = 1,
  301. .tuner_type = UNSET,
  302. .tuner_addr = ADDR_UNSET,
  303. .radio_addr = ADDR_UNSET,
  304. },
  305. [BTTV_BOARD_STB] = {
  306. .name = "STB, Gateway P/N 6000699 (bt848)",
  307. .video_inputs = 3,
  308. .audio_inputs = 1,
  309. .tuner = 0,
  310. .svhs = 2,
  311. .gpiomask = 7,
  312. .muxsel = { 2, 3, 1, 1 },
  313. .gpiomux = { 4, 0, 2, 3 },
  314. .gpiomute = 1,
  315. .no_msp34xx = 1,
  316. .needs_tvaudio = 1,
  317. .tuner_type = TUNER_PHILIPS_NTSC,
  318. .tuner_addr = ADDR_UNSET,
  319. .radio_addr = ADDR_UNSET,
  320. .pll = PLL_28,
  321. .has_radio = 1,
  322. },
  323. /* ---- card 0x04 ---------------------------------- */
  324. [BTTV_BOARD_INTEL] = {
  325. .name = "Intel Create and Share PCI/ Smart Video Recorder III",
  326. .video_inputs = 4,
  327. .audio_inputs = 0,
  328. .tuner = UNSET,
  329. .svhs = 2,
  330. .gpiomask = 0,
  331. .muxsel = { 2, 3, 1, 1 },
  332. .gpiomux = { 0 },
  333. .needs_tvaudio = 0,
  334. .tuner_type = TUNER_ABSENT,
  335. .tuner_addr = ADDR_UNSET,
  336. .radio_addr = ADDR_UNSET,
  337. },
  338. [BTTV_BOARD_DIAMOND] = {
  339. .name = "Diamond DTV2000",
  340. .video_inputs = 4,
  341. .audio_inputs = 1,
  342. .tuner = 0,
  343. .svhs = 2,
  344. .gpiomask = 3,
  345. .muxsel = { 2, 3, 1, 0 },
  346. .gpiomux = { 0, 1, 0, 1 },
  347. .gpiomute = 3,
  348. .needs_tvaudio = 1,
  349. .tuner_type = UNSET,
  350. .tuner_addr = ADDR_UNSET,
  351. .radio_addr = ADDR_UNSET,
  352. },
  353. [BTTV_BOARD_AVERMEDIA] = {
  354. .name = "AVerMedia TVPhone",
  355. .video_inputs = 3,
  356. .audio_inputs = 1,
  357. .tuner = 0,
  358. .svhs = 3,
  359. .muxsel = { 2, 3, 1, 1 },
  360. .gpiomask = 0x0f,
  361. .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
  362. /* 0x04 for some cards ?? */
  363. .needs_tvaudio = 1,
  364. .tuner_type = UNSET,
  365. .tuner_addr = ADDR_UNSET,
  366. .radio_addr = ADDR_UNSET,
  367. .audio_mode_gpio= avermedia_tvphone_audio,
  368. .has_remote = 1,
  369. },
  370. [BTTV_BOARD_MATRIX_VISION] = {
  371. .name = "MATRIX-Vision MV-Delta",
  372. .video_inputs = 5,
  373. .audio_inputs = 1,
  374. .tuner = UNSET,
  375. .svhs = 3,
  376. .gpiomask = 0,
  377. .muxsel = { 2, 3, 1, 0, 0 },
  378. .gpiomux = { 0 },
  379. .needs_tvaudio = 1,
  380. .tuner_type = UNSET,
  381. .tuner_addr = ADDR_UNSET,
  382. .radio_addr = ADDR_UNSET,
  383. },
  384. /* ---- card 0x08 ---------------------------------- */
  385. [BTTV_BOARD_FLYVIDEO] = {
  386. .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
  387. .video_inputs = 4,
  388. .audio_inputs = 1,
  389. .tuner = 0,
  390. .svhs = 2,
  391. .gpiomask = 0xc00,
  392. .muxsel = { 2, 3, 1, 1 },
  393. .gpiomux = { 0, 0xc00, 0x800, 0x400 },
  394. .gpiomute = 0xc00,
  395. .needs_tvaudio = 1,
  396. .pll = PLL_28,
  397. .tuner_type = UNSET,
  398. .tuner_addr = ADDR_UNSET,
  399. .radio_addr = ADDR_UNSET,
  400. },
  401. [BTTV_BOARD_TURBOTV] = {
  402. .name = "IMS/IXmicro TurboTV",
  403. .video_inputs = 3,
  404. .audio_inputs = 1,
  405. .tuner = 0,
  406. .svhs = 2,
  407. .gpiomask = 3,
  408. .muxsel = { 2, 3, 1, 1 },
  409. .gpiomux = { 1, 1, 2, 3 },
  410. .needs_tvaudio = 0,
  411. .pll = PLL_28,
  412. .tuner_type = TUNER_TEMIC_PAL,
  413. .tuner_addr = ADDR_UNSET,
  414. .radio_addr = ADDR_UNSET,
  415. },
  416. [BTTV_BOARD_HAUPPAUGE878] = {
  417. .name = "Hauppauge (bt878)",
  418. .video_inputs = 4,
  419. .audio_inputs = 1,
  420. .tuner = 0,
  421. .svhs = 2,
  422. .gpiomask = 0x0f, /* old: 7 */
  423. .muxsel = { 2, 0, 1, 1 },
  424. .gpiomux = { 0, 1, 2, 3 },
  425. .gpiomute = 4,
  426. .needs_tvaudio = 1,
  427. .pll = PLL_28,
  428. .tuner_type = UNSET,
  429. .tuner_addr = ADDR_UNSET,
  430. .radio_addr = ADDR_UNSET,
  431. },
  432. [BTTV_BOARD_MIROPRO] = {
  433. .name = "MIRO PCTV pro",
  434. .video_inputs = 3,
  435. .audio_inputs = 1,
  436. .tuner = 0,
  437. .svhs = 2,
  438. .gpiomask = 0x3014f,
  439. .muxsel = { 2, 3, 1, 1 },
  440. .gpiomux = { 0x20001,0x10001, 0, 0 },
  441. .gpiomute = 10,
  442. .needs_tvaudio = 1,
  443. .tuner_type = UNSET,
  444. .tuner_addr = ADDR_UNSET,
  445. .radio_addr = ADDR_UNSET,
  446. },
  447. /* ---- card 0x0c ---------------------------------- */
  448. [BTTV_BOARD_ADSTECH_TV] = {
  449. .name = "ADS Technologies Channel Surfer TV (bt848)",
  450. .video_inputs = 3,
  451. .audio_inputs = 1,
  452. .tuner = 0,
  453. .svhs = 2,
  454. .gpiomask = 15,
  455. .muxsel = { 2, 3, 1, 1 },
  456. .gpiomux = { 13, 14, 11, 7 },
  457. .needs_tvaudio = 1,
  458. .tuner_type = UNSET,
  459. .tuner_addr = ADDR_UNSET,
  460. .radio_addr = ADDR_UNSET,
  461. },
  462. [BTTV_BOARD_AVERMEDIA98] = {
  463. .name = "AVerMedia TVCapture 98",
  464. .video_inputs = 3,
  465. .audio_inputs = 4,
  466. .tuner = 0,
  467. .svhs = 2,
  468. .gpiomask = 15,
  469. .muxsel = { 2, 3, 1, 1 },
  470. .gpiomux = { 13, 14, 11, 7 },
  471. .needs_tvaudio = 1,
  472. .msp34xx_alt = 1,
  473. .pll = PLL_28,
  474. .tuner_type = TUNER_PHILIPS_PAL,
  475. .tuner_addr = ADDR_UNSET,
  476. .radio_addr = ADDR_UNSET,
  477. .audio_mode_gpio= avermedia_tv_stereo_audio,
  478. .no_gpioirq = 1,
  479. },
  480. [BTTV_BOARD_VHX] = {
  481. .name = "Aimslab Video Highway Xtreme (VHX)",
  482. .video_inputs = 3,
  483. .audio_inputs = 1,
  484. .tuner = 0,
  485. .svhs = 2,
  486. .gpiomask = 7,
  487. .muxsel = { 2, 3, 1, 1 },
  488. .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
  489. .gpiomute = 4,
  490. .needs_tvaudio = 1,
  491. .pll = PLL_28,
  492. .tuner_type = UNSET,
  493. .tuner_addr = ADDR_UNSET,
  494. .radio_addr = ADDR_UNSET,
  495. },
  496. [BTTV_BOARD_ZOLTRIX] = {
  497. .name = "Zoltrix TV-Max",
  498. .video_inputs = 3,
  499. .audio_inputs = 1,
  500. .tuner = 0,
  501. .svhs = 2,
  502. .gpiomask = 15,
  503. .muxsel = { 2, 3, 1, 1 },
  504. .gpiomux = { 0, 0, 1, 0 },
  505. .gpiomute = 10,
  506. .needs_tvaudio = 1,
  507. .tuner_type = UNSET,
  508. .tuner_addr = ADDR_UNSET,
  509. .radio_addr = ADDR_UNSET,
  510. },
  511. /* ---- card 0x10 ---------------------------------- */
  512. [BTTV_BOARD_PIXVIEWPLAYTV] = {
  513. .name = "Prolink Pixelview PlayTV (bt878)",
  514. .video_inputs = 3,
  515. .audio_inputs = 1,
  516. .tuner = 0,
  517. .svhs = 2,
  518. .gpiomask = 0x01fe00,
  519. .muxsel = { 2, 3, 1, 1 },
  520. /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
  521. .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
  522. .gpiomute = 0x002000,
  523. .needs_tvaudio = 1,
  524. .pll = PLL_28,
  525. .tuner_type = UNSET,
  526. .tuner_addr = ADDR_UNSET,
  527. .radio_addr = ADDR_UNSET,
  528. },
  529. [BTTV_BOARD_WINVIEW_601] = {
  530. .name = "Leadtek WinView 601",
  531. .video_inputs = 3,
  532. .audio_inputs = 1,
  533. .tuner = 0,
  534. .svhs = 2,
  535. .gpiomask = 0x8300f8,
  536. .muxsel = { 2, 3, 1, 1,0 },
  537. .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
  538. .gpiomute = 0xcfa007,
  539. .needs_tvaudio = 1,
  540. .tuner_type = UNSET,
  541. .tuner_addr = ADDR_UNSET,
  542. .radio_addr = ADDR_UNSET,
  543. .volume_gpio = winview_volume,
  544. .has_radio = 1,
  545. },
  546. [BTTV_BOARD_AVEC_INTERCAP] = {
  547. .name = "AVEC Intercapture",
  548. .video_inputs = 3,
  549. .audio_inputs = 2,
  550. .tuner = 0,
  551. .svhs = 2,
  552. .gpiomask = 0,
  553. .muxsel = { 2, 3, 1, 1 },
  554. .gpiomux = { 1, 0, 0, 0 },
  555. .needs_tvaudio = 1,
  556. .tuner_type = UNSET,
  557. .tuner_addr = ADDR_UNSET,
  558. .radio_addr = ADDR_UNSET,
  559. },
  560. [BTTV_BOARD_LIFE_FLYKIT] = {
  561. .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
  562. .video_inputs = 4,
  563. .audio_inputs = 1,
  564. .tuner = UNSET,
  565. .svhs = UNSET,
  566. .gpiomask = 0x8dff00,
  567. .muxsel = { 2, 3, 1, 1 },
  568. .gpiomux = { 0 },
  569. .no_msp34xx = 1,
  570. .tuner_type = UNSET,
  571. .tuner_addr = ADDR_UNSET,
  572. .radio_addr = ADDR_UNSET,
  573. },
  574. /* ---- card 0x14 ---------------------------------- */
  575. [BTTV_BOARD_CEI_RAFFLES] = {
  576. .name = "CEI Raffles Card",
  577. .video_inputs = 3,
  578. .audio_inputs = 3,
  579. .tuner = 0,
  580. .svhs = 2,
  581. .muxsel = { 2, 3, 1, 1 },
  582. .tuner_type = UNSET,
  583. .tuner_addr = ADDR_UNSET,
  584. .radio_addr = ADDR_UNSET,
  585. },
  586. [BTTV_BOARD_CONFERENCETV] = {
  587. .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
  588. .video_inputs = 4,
  589. .audio_inputs = 2, /* tuner, line in */
  590. .tuner = 0,
  591. .svhs = 2,
  592. .gpiomask = 0x1800,
  593. .muxsel = { 2, 3, 1, 1 },
  594. .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
  595. .gpiomute = 0x1800,
  596. .pll = PLL_28,
  597. .tuner_type = TUNER_PHILIPS_PAL_I,
  598. .tuner_addr = ADDR_UNSET,
  599. .radio_addr = ADDR_UNSET,
  600. },
  601. [BTTV_BOARD_PHOEBE_TVMAS] = {
  602. .name = "Askey CPH050/ Phoebe Tv Master + FM",
  603. .video_inputs = 3,
  604. .audio_inputs = 1,
  605. .tuner = 0,
  606. .svhs = 2,
  607. .gpiomask = 0xc00,
  608. .muxsel = { 2, 3, 1, 1 },
  609. .gpiomux = { 0, 1, 0x800, 0x400 },
  610. .gpiomute = 0xc00,
  611. .needs_tvaudio = 1,
  612. .pll = PLL_28,
  613. .tuner_type = UNSET,
  614. .tuner_addr = ADDR_UNSET,
  615. .radio_addr = ADDR_UNSET,
  616. },
  617. [BTTV_BOARD_MODTEC_205] = {
  618. .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
  619. .video_inputs = 3,
  620. .audio_inputs = 1,
  621. .tuner = 0,
  622. .svhs = UNSET,
  623. .gpiomask = 7,
  624. .muxsel = { 2, 3, -1 },
  625. .digital_mode = DIGITAL_MODE_CAMERA,
  626. .gpiomux = { 0, 0, 0, 0 },
  627. .no_msp34xx = 1,
  628. .pll = PLL_28,
  629. .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
  630. .tuner_addr = ADDR_UNSET,
  631. .radio_addr = ADDR_UNSET,
  632. },
  633. /* ---- card 0x18 ---------------------------------- */
  634. [BTTV_BOARD_MAGICTVIEW061] = {
  635. .name = "Askey CPH05X/06X (bt878) [many vendors]",
  636. .video_inputs = 3,
  637. .audio_inputs = 1,
  638. .tuner = 0,
  639. .svhs = 2,
  640. .gpiomask = 0xe00,
  641. .muxsel = { 2, 3, 1, 1 },
  642. .gpiomux = {0x400, 0x400, 0x400, 0x400 },
  643. .gpiomute = 0xc00,
  644. .needs_tvaudio = 1,
  645. .pll = PLL_28,
  646. .tuner_type = UNSET,
  647. .tuner_addr = ADDR_UNSET,
  648. .radio_addr = ADDR_UNSET,
  649. .has_remote = 1,
  650. },
  651. [BTTV_BOARD_VOBIS_BOOSTAR] = {
  652. .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
  653. .video_inputs = 3,
  654. .audio_inputs = 1,
  655. .tuner = 0,
  656. .svhs = 2,
  657. .gpiomask = 0x1f0fff,
  658. .muxsel = { 2, 3, 1, 1 },
  659. .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
  660. .gpiomute = 0x40000,
  661. .needs_tvaudio = 0,
  662. .tuner_type = TUNER_PHILIPS_PAL,
  663. .tuner_addr = ADDR_UNSET,
  664. .radio_addr = ADDR_UNSET,
  665. .audio_mode_gpio= terratv_audio,
  666. },
  667. [BTTV_BOARD_HAUPPAUG_WCAM] = {
  668. .name = "Hauppauge WinCam newer (bt878)",
  669. .video_inputs = 4,
  670. .audio_inputs = 1,
  671. .tuner = 0,
  672. .svhs = 3,
  673. .gpiomask = 7,
  674. .muxsel = { 2, 0, 1, 1 },
  675. .gpiomux = { 0, 1, 2, 3 },
  676. .gpiomute = 4,
  677. .needs_tvaudio = 1,
  678. .tuner_type = UNSET,
  679. .tuner_addr = ADDR_UNSET,
  680. .radio_addr = ADDR_UNSET,
  681. },
  682. [BTTV_BOARD_MAXI] = {
  683. .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
  684. .video_inputs = 4,
  685. .audio_inputs = 2,
  686. .tuner = 0,
  687. .svhs = 2,
  688. .gpiomask = 0x1800,
  689. .muxsel = { 2, 3, 1, 1 },
  690. .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
  691. .gpiomute = 0x1800,
  692. .pll = PLL_28,
  693. .tuner_type = TUNER_PHILIPS_SECAM,
  694. .tuner_addr = ADDR_UNSET,
  695. .radio_addr = ADDR_UNSET,
  696. },
  697. /* ---- card 0x1c ---------------------------------- */
  698. [BTTV_BOARD_TERRATV] = {
  699. .name = "Terratec TerraTV+ Version 1.1 (bt878)",
  700. .video_inputs = 3,
  701. .audio_inputs = 1,
  702. .tuner = 0,
  703. .svhs = 2,
  704. .gpiomask = 0x1f0fff,
  705. .muxsel = { 2, 3, 1, 1 },
  706. .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
  707. .gpiomute = 0x40000,
  708. .needs_tvaudio = 0,
  709. .tuner_type = TUNER_PHILIPS_PAL,
  710. .tuner_addr = ADDR_UNSET,
  711. .radio_addr = ADDR_UNSET,
  712. .audio_mode_gpio= terratv_audio,
  713. /* GPIO wiring:
  714. External 20 pin connector (for Active Radio Upgrade board)
  715. gpio00: i2c-sda
  716. gpio01: i2c-scl
  717. gpio02: om5610-data
  718. gpio03: om5610-clk
  719. gpio04: om5610-wre
  720. gpio05: om5610-stereo
  721. gpio06: rds6588-davn
  722. gpio07: Pin 7 n.c.
  723. gpio08: nIOW
  724. gpio09+10: nIOR, nSEL ?? (bt878)
  725. gpio09: nIOR (bt848)
  726. gpio10: nSEL (bt848)
  727. Sound Routing:
  728. gpio16: u2-A0 (1st 4052bt)
  729. gpio17: u2-A1
  730. gpio18: u2-nEN
  731. gpio19: u4-A0 (2nd 4052)
  732. gpio20: u4-A1
  733. u4-nEN - GND
  734. Btspy:
  735. 00000 : Cdrom (internal audio input)
  736. 10000 : ext. Video audio input
  737. 20000 : TV Mono
  738. a0000 : TV Mono/2
  739. 1a0000 : TV Stereo
  740. 30000 : Radio
  741. 40000 : Mute
  742. */
  743. },
  744. [BTTV_BOARD_PXC200] = {
  745. /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
  746. .name = "Imagenation PXC200",
  747. .video_inputs = 5,
  748. .audio_inputs = 1,
  749. .tuner = UNSET,
  750. .svhs = 1, /* was: 4 */
  751. .gpiomask = 0,
  752. .muxsel = { 2, 3, 1, 0, 0},
  753. .gpiomux = { 0 },
  754. .needs_tvaudio = 1,
  755. .tuner_type = UNSET,
  756. .tuner_addr = ADDR_UNSET,
  757. .radio_addr = ADDR_UNSET,
  758. .muxsel_hook = PXC200_muxsel,
  759. },
  760. [BTTV_BOARD_FLYVIDEO_98] = {
  761. .name = "Lifeview FlyVideo 98 LR50",
  762. .video_inputs = 4,
  763. .audio_inputs = 1,
  764. .tuner = 0,
  765. .svhs = 2,
  766. .gpiomask = 0x1800, /* 0x8dfe00 */
  767. .muxsel = { 2, 3, 1, 1 },
  768. .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
  769. .gpiomute = 0x1800,
  770. .pll = PLL_28,
  771. .tuner_type = UNSET,
  772. .tuner_addr = ADDR_UNSET,
  773. .radio_addr = ADDR_UNSET,
  774. },
  775. [BTTV_BOARD_IPROTV] = {
  776. .name = "Formac iProTV, Formac ProTV I (bt848)",
  777. .video_inputs = 4,
  778. .audio_inputs = 1,
  779. .tuner = 0,
  780. .svhs = 3,
  781. .gpiomask = 1,
  782. .muxsel = { 2, 3, 1, 1 },
  783. .gpiomux = { 1, 0, 0, 0 },
  784. .pll = PLL_28,
  785. .tuner_type = TUNER_PHILIPS_PAL,
  786. .tuner_addr = ADDR_UNSET,
  787. .radio_addr = ADDR_UNSET,
  788. },
  789. /* ---- card 0x20 ---------------------------------- */
  790. [BTTV_BOARD_INTEL_C_S_PCI] = {
  791. .name = "Intel Create and Share PCI/ Smart Video Recorder III",
  792. .video_inputs = 4,
  793. .audio_inputs = 0,
  794. .tuner = UNSET,
  795. .svhs = 2,
  796. .gpiomask = 0,
  797. .muxsel = { 2, 3, 1, 1 },
  798. .gpiomux = { 0 },
  799. .needs_tvaudio = 0,
  800. .tuner_type = TUNER_ABSENT,
  801. .tuner_addr = ADDR_UNSET,
  802. .radio_addr = ADDR_UNSET,
  803. },
  804. [BTTV_BOARD_TERRATVALUE] = {
  805. .name = "Terratec TerraTValue Version Bt878",
  806. .video_inputs = 3,
  807. .audio_inputs = 1,
  808. .tuner = 0,
  809. .svhs = 2,
  810. .gpiomask = 0xffff00,
  811. .muxsel = { 2, 3, 1, 1 },
  812. .gpiomux = { 0x500, 0, 0x300, 0x900 },
  813. .gpiomute = 0x900,
  814. .needs_tvaudio = 1,
  815. .pll = PLL_28,
  816. .tuner_type = TUNER_PHILIPS_PAL,
  817. .tuner_addr = ADDR_UNSET,
  818. .radio_addr = ADDR_UNSET,
  819. },
  820. [BTTV_BOARD_WINFAST2000] = {
  821. .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
  822. .video_inputs = 4,
  823. .audio_inputs = 1,
  824. .tuner = 0,
  825. .svhs = 2,
  826. .muxsel = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */
  827. /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
  828. .gpiomask = 0xb33000,
  829. .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
  830. .gpiomute = 0x800000,
  831. /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
  832. gpio23 -- hef4052:nEnable (0x800000)
  833. gpio12 -- hef4052:A1
  834. gpio13 -- hef4052:A0
  835. 0x0000: external audio
  836. 0x1000: FM
  837. 0x2000: TV
  838. 0x3000: n.c.
  839. Note: There exists another variant "Winfast 2000" with tv stereo !?
  840. Note: eeprom only contains FF and pci subsystem id 107d:6606
  841. */
  842. .needs_tvaudio = 0,
  843. .pll = PLL_28,
  844. .has_radio = 1,
  845. .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
  846. .tuner_addr = ADDR_UNSET,
  847. .radio_addr = ADDR_UNSET,
  848. .audio_mode_gpio= winfast2000_audio,
  849. .has_remote = 1,
  850. },
  851. [BTTV_BOARD_CHRONOS_VS2] = {
  852. .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
  853. .video_inputs = 4,
  854. .audio_inputs = 3,
  855. .tuner = 0,
  856. .svhs = 2,
  857. .gpiomask = 0x1800,
  858. .muxsel = { 2, 3, 1, 1 },
  859. .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
  860. .gpiomute = 0x1800,
  861. .pll = PLL_28,
  862. .tuner_type = UNSET,
  863. .tuner_addr = ADDR_UNSET,
  864. .radio_addr = ADDR_UNSET,
  865. },
  866. /* ---- card 0x24 ---------------------------------- */
  867. [BTTV_BOARD_TYPHOON_TVIEW] = {
  868. .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
  869. .video_inputs = 4,
  870. .audio_inputs = 3,
  871. .tuner = 0,
  872. .svhs = 2,
  873. .gpiomask = 0x1800,
  874. .muxsel = { 2, 3, 1, 1 },
  875. .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
  876. .gpiomute = 0x1800,
  877. .pll = PLL_28,
  878. .tuner_type = UNSET,
  879. .tuner_addr = ADDR_UNSET,
  880. .radio_addr = ADDR_UNSET,
  881. .has_radio = 1,
  882. },
  883. [BTTV_BOARD_PXELVWPLTVPRO] = {
  884. .name = "Prolink PixelView PlayTV pro",
  885. .video_inputs = 3,
  886. .audio_inputs = 1,
  887. .tuner = 0,
  888. .svhs = 2,
  889. .gpiomask = 0xff,
  890. .muxsel = { 2, 3, 1, 1 },
  891. .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
  892. .gpiomute = 0x29,
  893. .no_msp34xx = 1,
  894. .pll = PLL_28,
  895. .tuner_type = UNSET,
  896. .tuner_addr = ADDR_UNSET,
  897. .radio_addr = ADDR_UNSET,
  898. },
  899. [BTTV_BOARD_MAGICTVIEW063] = {
  900. .name = "Askey CPH06X TView99",
  901. .video_inputs = 4,
  902. .audio_inputs = 1,
  903. .tuner = 0,
  904. .svhs = 2,
  905. .gpiomask = 0x551e00,
  906. .muxsel = { 2, 3, 1, 0 },
  907. .gpiomux = { 0x551400, 0x551200, 0, 0 },
  908. .gpiomute = 0x551c00,
  909. .needs_tvaudio = 1,
  910. .pll = PLL_28,
  911. .tuner_type = TUNER_PHILIPS_PAL_I,
  912. .tuner_addr = ADDR_UNSET,
  913. .radio_addr = ADDR_UNSET,
  914. .has_remote = 1,
  915. },
  916. [BTTV_BOARD_PINNACLE] = {
  917. .name = "Pinnacle PCTV Studio/Rave",
  918. .video_inputs = 3,
  919. .audio_inputs = 1,
  920. .tuner = 0,
  921. .svhs = 2,
  922. .gpiomask = 0x03000F,
  923. .muxsel = { 2, 3, 1, 1 },
  924. .gpiomux = { 2, 0xd0001, 0, 0 },
  925. .gpiomute = 1,
  926. .needs_tvaudio = 0,
  927. .pll = PLL_28,
  928. .tuner_type = UNSET,
  929. .tuner_addr = ADDR_UNSET,
  930. .radio_addr = ADDR_UNSET,
  931. },
  932. /* ---- card 0x28 ---------------------------------- */
  933. [BTTV_BOARD_STB2] = {
  934. .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
  935. .video_inputs = 3,
  936. .audio_inputs = 1,
  937. .tuner = 0,
  938. .svhs = 2,
  939. .gpiomask = 7,
  940. .muxsel = { 2, 3, 1, 1 },
  941. .gpiomux = { 4, 0, 2, 3 },
  942. .gpiomute = 1,
  943. .no_msp34xx = 1,
  944. .needs_tvaudio = 1,
  945. .tuner_type = TUNER_PHILIPS_NTSC,
  946. .tuner_addr = ADDR_UNSET,
  947. .radio_addr = ADDR_UNSET,
  948. .pll = PLL_28,
  949. .has_radio = 1,
  950. },
  951. [BTTV_BOARD_AVPHONE98] = {
  952. .name = "AVerMedia TVPhone 98",
  953. .video_inputs = 3,
  954. .audio_inputs = 4,
  955. .tuner = 0,
  956. .svhs = 2,
  957. .gpiomask = 15,
  958. .muxsel = { 2, 3, 1, 1 },
  959. .gpiomux = { 13, 4, 11, 7 },
  960. .needs_tvaudio = 1,
  961. .pll = PLL_28,
  962. .tuner_type = UNSET,
  963. .tuner_addr = ADDR_UNSET,
  964. .radio_addr = ADDR_UNSET,
  965. .has_radio = 1,
  966. .audio_mode_gpio= avermedia_tvphone_audio,
  967. },
  968. [BTTV_BOARD_PV951] = {
  969. .name = "ProVideo PV951", /* pic16c54 */
  970. .video_inputs = 3,
  971. .audio_inputs = 1,
  972. .tuner = 0,
  973. .svhs = 2,
  974. .gpiomask = 0,
  975. .muxsel = { 2, 3, 1, 1},
  976. .gpiomux = { 0, 0, 0, 0},
  977. .needs_tvaudio = 1,
  978. .no_msp34xx = 1,
  979. .pll = PLL_28,
  980. .tuner_type = TUNER_PHILIPS_PAL_I,
  981. .tuner_addr = ADDR_UNSET,
  982. .radio_addr = ADDR_UNSET,
  983. },
  984. [BTTV_BOARD_ONAIR_TV] = {
  985. .name = "Little OnAir TV",
  986. .video_inputs = 3,
  987. .audio_inputs = 1,
  988. .tuner = 0,
  989. .svhs = 2,
  990. .gpiomask = 0xe00b,
  991. .muxsel = { 2, 3, 1, 1 },
  992. .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
  993. .gpiomute = 0xff3ffc,
  994. .no_msp34xx = 1,
  995. .tuner_type = UNSET,
  996. .tuner_addr = ADDR_UNSET,
  997. .radio_addr = ADDR_UNSET,
  998. },
  999. /* ---- card 0x2c ---------------------------------- */
  1000. [BTTV_BOARD_SIGMA_TVII_FM] = {
  1001. .name = "Sigma TVII-FM",
  1002. .video_inputs = 2,
  1003. .audio_inputs = 1,
  1004. .tuner = 0,
  1005. .svhs = UNSET,
  1006. .gpiomask = 3,
  1007. .muxsel = { 2, 3, 1, 1 },
  1008. .gpiomux = { 1, 1, 0, 2 },
  1009. .gpiomute = 3,
  1010. .no_msp34xx = 1,
  1011. .pll = PLL_NONE,
  1012. .tuner_type = UNSET,
  1013. .tuner_addr = ADDR_UNSET,
  1014. .radio_addr = ADDR_UNSET,
  1015. },
  1016. [BTTV_BOARD_MATRIX_VISION2] = {
  1017. .name = "MATRIX-Vision MV-Delta 2",
  1018. .video_inputs = 5,
  1019. .audio_inputs = 1,
  1020. .tuner = UNSET,
  1021. .svhs = 3,
  1022. .gpiomask = 0,
  1023. .muxsel = { 2, 3, 1, 0, 0 },
  1024. .gpiomux = { 0 },
  1025. .no_msp34xx = 1,
  1026. .pll = PLL_28,
  1027. .tuner_type = UNSET,
  1028. .tuner_addr = ADDR_UNSET,
  1029. .radio_addr = ADDR_UNSET,
  1030. },
  1031. [BTTV_BOARD_ZOLTRIX_GENIE] = {
  1032. .name = "Zoltrix Genie TV/FM",
  1033. .video_inputs = 3,
  1034. .audio_inputs = 1,
  1035. .tuner = 0,
  1036. .svhs = 2,
  1037. .gpiomask = 0xbcf03f,
  1038. .muxsel = { 2, 3, 1, 1 },
  1039. .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
  1040. .gpiomute = 0xbcb03f,
  1041. .no_msp34xx = 1,
  1042. .pll = PLL_28,
  1043. .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
  1044. .tuner_addr = ADDR_UNSET,
  1045. .radio_addr = ADDR_UNSET,
  1046. },
  1047. [BTTV_BOARD_TERRATVRADIO] = {
  1048. .name = "Terratec TV/Radio+",
  1049. .video_inputs = 3,
  1050. .audio_inputs = 1,
  1051. .tuner = 0,
  1052. .svhs = 2,
  1053. .gpiomask = 0x70000,
  1054. .muxsel = { 2, 3, 1, 1 },
  1055. .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
  1056. .gpiomute = 0x40000,
  1057. .needs_tvaudio = 1,
  1058. .no_msp34xx = 1,
  1059. .pll = PLL_35,
  1060. .tuner_type = TUNER_PHILIPS_PAL_I,
  1061. .tuner_addr = ADDR_UNSET,
  1062. .radio_addr = ADDR_UNSET,
  1063. .has_radio = 1,
  1064. },
  1065. /* ---- card 0x30 ---------------------------------- */
  1066. [BTTV_BOARD_DYNALINK] = {
  1067. .name = "Askey CPH03x/ Dynalink Magic TView",
  1068. .video_inputs = 3,
  1069. .audio_inputs = 1,
  1070. .tuner = 0,
  1071. .svhs = 2,
  1072. .gpiomask = 15,
  1073. .muxsel = { 2, 3, 1, 1 },
  1074. .gpiomux = {2,0,0,0 },
  1075. .gpiomute = 1,
  1076. .needs_tvaudio = 1,
  1077. .pll = PLL_28,
  1078. .tuner_type = UNSET,
  1079. .tuner_addr = ADDR_UNSET,
  1080. .radio_addr = ADDR_UNSET,
  1081. },
  1082. [BTTV_BOARD_GVBCTV3PCI] = {
  1083. .name = "IODATA GV-BCTV3/PCI",
  1084. .video_inputs = 3,
  1085. .audio_inputs = 1,
  1086. .tuner = 0,
  1087. .svhs = 2,
  1088. .gpiomask = 0x010f00,
  1089. .muxsel = {2, 3, 0, 0 },
  1090. .gpiomux = {0x10000, 0, 0x10000, 0 },
  1091. .no_msp34xx = 1,
  1092. .pll = PLL_28,
  1093. .tuner_type = TUNER_ALPS_TSHC6_NTSC,
  1094. .tuner_addr = ADDR_UNSET,
  1095. .radio_addr = ADDR_UNSET,
  1096. .audio_mode_gpio= gvbctv3pci_audio,
  1097. },
  1098. [BTTV_BOARD_PXELVWPLTVPAK] = {
  1099. .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
  1100. .video_inputs = 5,
  1101. .audio_inputs = 1,
  1102. .tuner = 0,
  1103. .svhs = 3,
  1104. .gpiomask = 0xAA0000,
  1105. .muxsel = { 2,3,1,1,-1 },
  1106. .digital_mode = DIGITAL_MODE_CAMERA,
  1107. .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
  1108. .gpiomute = 0xa8000,
  1109. .no_msp34xx = 1,
  1110. .pll = PLL_28,
  1111. .tuner_type = TUNER_PHILIPS_PAL_I,
  1112. .tuner_addr = ADDR_UNSET,
  1113. .radio_addr = ADDR_UNSET,
  1114. .has_remote = 1,
  1115. /* GPIO wiring: (different from Rev.4C !)
  1116. GPIO17: U4.A0 (first hef4052bt)
  1117. GPIO19: U4.A1
  1118. GPIO20: U5.A1 (second hef4052bt)
  1119. GPIO21: U4.nEN
  1120. GPIO22: BT832 Reset Line
  1121. GPIO23: A5,A0, U5,nEN
  1122. Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
  1123. */
  1124. },
  1125. [BTTV_BOARD_EAGLE] = {
  1126. .name = "Eagle Wireless Capricorn2 (bt878A)",
  1127. .video_inputs = 4,
  1128. .audio_inputs = 1,
  1129. .tuner = 0,
  1130. .svhs = 2,
  1131. .gpiomask = 7,
  1132. .muxsel = { 2, 0, 1, 1 },
  1133. .gpiomux = { 0, 1, 2, 3 },
  1134. .gpiomute = 4,
  1135. .pll = PLL_28,
  1136. .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
  1137. .tuner_addr = ADDR_UNSET,
  1138. .radio_addr = ADDR_UNSET,
  1139. },
  1140. /* ---- card 0x34 ---------------------------------- */
  1141. [BTTV_BOARD_PINNACLEPRO] = {
  1142. /* David Härdeman <david@2gen.com> */
  1143. .name = "Pinnacle PCTV Studio Pro",
  1144. .video_inputs = 4,
  1145. .audio_inputs = 1,
  1146. .tuner = 0,
  1147. .svhs = 3,
  1148. .gpiomask = 0x03000F,
  1149. .muxsel = { 2, 3, 1, 1 },
  1150. .gpiomux = { 1, 0xd0001, 0, 0 },
  1151. .gpiomute = 10,
  1152. /* sound path (5 sources):
  1153. MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
  1154. 0= ext. Audio IN
  1155. 1= from MUX2
  1156. 2= Mono TV sound from Tuner
  1157. 3= not connected
  1158. MUX2 (mask 0x30000):
  1159. 0,2,3= from MSP34xx
  1160. 1= FM stereo Radio from Tuner */
  1161. .needs_tvaudio = 0,
  1162. .pll = PLL_28,
  1163. .tuner_type = UNSET,
  1164. .tuner_addr = ADDR_UNSET,
  1165. .radio_addr = ADDR_UNSET,
  1166. },
  1167. [BTTV_BOARD_TVIEW_RDS_FM] = {
  1168. /* Claas Langbehn <claas@bigfoot.com>,
  1169. Sven Grothklags <sven@upb.de> */
  1170. .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
  1171. .video_inputs = 4,
  1172. .audio_inputs = 3,
  1173. .tuner = 0,
  1174. .svhs = 2,
  1175. .gpiomask = 0x1c,
  1176. .muxsel = { 2, 3, 1, 1 },
  1177. .gpiomux = { 0, 0, 0x10, 8 },
  1178. .gpiomute = 4,
  1179. .needs_tvaudio = 1,
  1180. .pll = PLL_28,
  1181. .tuner_type = TUNER_PHILIPS_PAL,
  1182. .tuner_addr = ADDR_UNSET,
  1183. .radio_addr = ADDR_UNSET,
  1184. .has_radio = 1,
  1185. },
  1186. [BTTV_BOARD_LIFETEC_9415] = {
  1187. /* Tim Röstermundt <rosterm@uni-muenster.de>
  1188. in de.comp.os.unix.linux.hardware:
  1189. options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
  1190. gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
  1191. options tuner type=5 */
  1192. .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
  1193. .video_inputs = 4,
  1194. .audio_inputs = 1,
  1195. .tuner = 0,
  1196. .svhs = 2,
  1197. .gpiomask = 0x18e0,
  1198. .muxsel = { 2, 3, 1, 1 },
  1199. .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
  1200. .gpiomute = 0x18e0,
  1201. /* For cards with tda9820/tda9821:
  1202. 0x0000: Tuner normal stereo
  1203. 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
  1204. 0x0880: Tuner A2 stereo */
  1205. .pll = PLL_28,
  1206. .tuner_type = UNSET,
  1207. .tuner_addr = ADDR_UNSET,
  1208. .radio_addr = ADDR_UNSET,
  1209. },
  1210. [BTTV_BOARD_BESTBUY_EASYTV] = {
  1211. /* Miguel Angel Alvarez <maacruz@navegalia.com>
  1212. old Easy TV BT848 version (model CPH031) */
  1213. .name = "Askey CPH031/ BESTBUY Easy TV",
  1214. .video_inputs = 4,
  1215. .audio_inputs = 1,
  1216. .tuner = 0,
  1217. .svhs = 2,
  1218. .gpiomask = 0xF,
  1219. .muxsel = { 2, 3, 1, 0 },
  1220. .gpiomux = { 2, 0, 0, 0 },
  1221. .gpiomute = 10,
  1222. .needs_tvaudio = 0,
  1223. .pll = PLL_28,
  1224. .tuner_type = TUNER_TEMIC_PAL,
  1225. .tuner_addr = ADDR_UNSET,
  1226. .radio_addr = ADDR_UNSET,
  1227. },
  1228. /* ---- card 0x38 ---------------------------------- */
  1229. [BTTV_BOARD_FLYVIDEO_98FM] = {
  1230. /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
  1231. .name = "Lifeview FlyVideo 98FM LR50",
  1232. .video_inputs = 4,
  1233. .audio_inputs = 3,
  1234. .tuner = 0,
  1235. .svhs = 2,
  1236. .gpiomask = 0x1800,
  1237. .muxsel = { 2, 3, 1, 1 },
  1238. .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
  1239. .gpiomute = 0x1800,
  1240. .pll = PLL_28,
  1241. .tuner_type = TUNER_PHILIPS_PAL,
  1242. .tuner_addr = ADDR_UNSET,
  1243. .radio_addr = ADDR_UNSET,
  1244. },
  1245. /* This is the ultimate cheapo capture card
  1246. * just a BT848A on a small PCB!
  1247. * Steve Hosgood <steve@equiinet.com> */
  1248. [BTTV_BOARD_GRANDTEC] = {
  1249. .name = "GrandTec 'Grand Video Capture' (Bt848)",
  1250. .video_inputs = 2,
  1251. .audio_inputs = 0,
  1252. .tuner = UNSET,
  1253. .svhs = 1,
  1254. .gpiomask = 0,
  1255. .muxsel = { 3, 1 },
  1256. .gpiomux = { 0 },
  1257. .needs_tvaudio = 0,
  1258. .no_msp34xx = 1,
  1259. .pll = PLL_35,
  1260. .tuner_type = UNSET,
  1261. .tuner_addr = ADDR_UNSET,
  1262. .radio_addr = ADDR_UNSET,
  1263. },
  1264. [BTTV_BOARD_ASKEY_CPH060] = {
  1265. /* Daniel Herrington <daniel.herrington@home.com> */
  1266. .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
  1267. .video_inputs = 3,
  1268. .audio_inputs = 1,
  1269. .tuner = 0,
  1270. .svhs = 2,
  1271. .gpiomask = 0xe00,
  1272. .muxsel = { 2, 3, 1, 1},
  1273. .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
  1274. .gpiomute = 0x800,
  1275. .needs_tvaudio = 1,
  1276. .pll = PLL_28,
  1277. .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
  1278. .tuner_addr = ADDR_UNSET,
  1279. .radio_addr = ADDR_UNSET,
  1280. },
  1281. [BTTV_BOARD_ASKEY_CPH03X] = {
  1282. /* Matti Mottus <mottus@physic.ut.ee> */
  1283. .name = "Askey CPH03x TV Capturer",
  1284. .video_inputs = 4,
  1285. .audio_inputs = 1,
  1286. .tuner = 0,
  1287. .svhs = 2,
  1288. .gpiomask = 0x03000F,
  1289. .muxsel = { 2, 3, 1, 0 },
  1290. .gpiomux = { 2, 0, 0, 0 },
  1291. .gpiomute = 1,
  1292. .pll = PLL_28,
  1293. .tuner_type = TUNER_TEMIC_PAL,
  1294. .tuner_addr = ADDR_UNSET,
  1295. .radio_addr = ADDR_UNSET,
  1296. },
  1297. /* ---- card 0x3c ---------------------------------- */
  1298. [BTTV_BOARD_MM100PCTV] = {
  1299. /* Philip Blundell <philb@gnu.org> */
  1300. .name = "Modular Technology MM100PCTV",
  1301. .video_inputs = 2,
  1302. .audio_inputs = 2,
  1303. .tuner = 0,
  1304. .svhs = UNSET,
  1305. .gpiomask = 11,
  1306. .muxsel = { 2, 3, 1, 1 },
  1307. .gpiomux = { 2, 0, 0, 1 },
  1308. .gpiomute = 8,
  1309. .pll = PLL_35,
  1310. .tuner_type = TUNER_TEMIC_PAL,
  1311. .tuner_addr = ADDR_UNSET,
  1312. .radio_addr = ADDR_UNSET,
  1313. },
  1314. [BTTV_BOARD_GMV1] = {
  1315. /* Adrian Cox <adrian@humboldt.co.uk */
  1316. .name = "AG Electronics GMV1",
  1317. .video_inputs = 2,
  1318. .audio_inputs = 0,
  1319. .tuner = UNSET,
  1320. .svhs = 1,
  1321. .gpiomask = 0xF,
  1322. .muxsel = { 2, 2 },
  1323. .gpiomux = { },
  1324. .no_msp34xx = 1,
  1325. .needs_tvaudio = 0,
  1326. .pll = PLL_28,
  1327. .tuner_type = UNSET,
  1328. .tuner_addr = ADDR_UNSET,
  1329. .radio_addr = ADDR_UNSET,
  1330. },
  1331. [BTTV_BOARD_BESTBUY_EASYTV2] = {
  1332. /* Miguel Angel Alvarez <maacruz@navegalia.com>
  1333. new Easy TV BT878 version (model CPH061)
  1334. special thanks to Informatica Mieres for providing the card */
  1335. .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
  1336. .video_inputs = 3,
  1337. .audio_inputs = 2,
  1338. .tuner = 0,
  1339. .svhs = 2,
  1340. .gpiomask = 0xFF,
  1341. .muxsel = { 2, 3, 1, 0 },
  1342. .gpiomux = { 1, 0, 4, 4 },
  1343. .gpiomute = 9,
  1344. .needs_tvaudio = 0,
  1345. .pll = PLL_28,
  1346. .tuner_type = TUNER_PHILIPS_PAL,
  1347. .tuner_addr = ADDR_UNSET,
  1348. .radio_addr = ADDR_UNSET,
  1349. },
  1350. [BTTV_BOARD_ATI_TVWONDER] = {
  1351. /* Lukas Gebauer <geby@volny.cz> */
  1352. .name = "ATI TV-Wonder",
  1353. .video_inputs = 3,
  1354. .audio_inputs = 1,
  1355. .tuner = 0,
  1356. .svhs = 2,
  1357. .gpiomask = 0xf03f,
  1358. .muxsel = { 2, 3, 1, 0 },
  1359. .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
  1360. .gpiomute = 0xbffe,
  1361. .pll = PLL_28,
  1362. .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
  1363. .tuner_addr = ADDR_UNSET,
  1364. .radio_addr = ADDR_UNSET,
  1365. },
  1366. /* ---- card 0x40 ---------------------------------- */
  1367. [BTTV_BOARD_ATI_TVWONDERVE] = {
  1368. /* Lukas Gebauer <geby@volny.cz> */
  1369. .name = "ATI TV-Wonder VE",
  1370. .video_inputs = 2,
  1371. .audio_inputs = 1,
  1372. .tuner = 0,
  1373. .svhs = UNSET,
  1374. .gpiomask = 1,
  1375. .muxsel = { 2, 3, 0, 1 },
  1376. .gpiomux = { 0, 0, 1, 0 },
  1377. .no_msp34xx = 1,
  1378. .pll = PLL_28,
  1379. .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
  1380. .tuner_addr = ADDR_UNSET,
  1381. .radio_addr = ADDR_UNSET,
  1382. },
  1383. [BTTV_BOARD_FLYVIDEO2000] = {
  1384. /* DeeJay <deejay@westel900.net (2000S) */
  1385. .name = "Lifeview FlyVideo 2000S LR90",
  1386. .video_inputs = 3,
  1387. .audio_inputs = 3,
  1388. .tuner = 0,
  1389. .svhs = 2,
  1390. .gpiomask = 0x18e0,
  1391. .muxsel = { 2, 3, 0, 1 },
  1392. /* Radio changed from 1e80 to 0x800 to make
  1393. FlyVideo2000S in .hu happy (gm)*/
  1394. /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
  1395. .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
  1396. .gpiomute = 0x1800,
  1397. .audio_mode_gpio= fv2000s_audio,
  1398. .no_msp34xx = 1,
  1399. .no_tda9875 = 1,
  1400. .needs_tvaudio = 1,
  1401. .pll = PLL_28,
  1402. .tuner_type = TUNER_PHILIPS_PAL,
  1403. .tuner_addr = ADDR_UNSET,
  1404. .radio_addr = ADDR_UNSET,
  1405. },
  1406. [BTTV_BOARD_TERRATVALUER] = {
  1407. .name = "Terratec TValueRadio",
  1408. .video_inputs = 3,
  1409. .audio_inputs = 1,
  1410. .tuner = 0,
  1411. .svhs = 2,
  1412. .gpiomask = 0xffff00,
  1413. .muxsel = { 2, 3, 1, 1 },
  1414. .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
  1415. .gpiomute = 0x900,
  1416. .needs_tvaudio = 1,
  1417. .pll = PLL_28,
  1418. .tuner_type = TUNER_PHILIPS_PAL,
  1419. .tuner_addr = ADDR_UNSET,
  1420. .radio_addr = ADDR_UNSET,
  1421. .has_radio = 1,
  1422. },
  1423. [BTTV_BOARD_GVBCTV4PCI] = {
  1424. /* TANAKA Kei <peg00625@nifty.com> */
  1425. .name = "IODATA GV-BCTV4/PCI",
  1426. .video_inputs = 3,
  1427. .audio_inputs = 1,
  1428. .tuner = 0,
  1429. .svhs = 2,
  1430. .gpiomask = 0x010f00,
  1431. .muxsel = {2, 3, 0, 0 },
  1432. .gpiomux = {0x10000, 0, 0x10000, 0 },
  1433. .no_msp34xx = 1,
  1434. .pll = PLL_28,
  1435. .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
  1436. .tuner_addr = ADDR_UNSET,
  1437. .radio_addr = ADDR_UNSET,
  1438. .audio_mode_gpio= gvbctv3pci_audio,
  1439. },
  1440. /* ---- card 0x44 ---------------------------------- */
  1441. [BTTV_BOARD_VOODOOTV_FM] = {
  1442. .name = "3Dfx VoodooTV FM (Euro)",
  1443. /* try "insmod msp3400 simple=0" if you have
  1444. * sound problems with this card. */
  1445. .video_inputs = 4,
  1446. .audio_inputs = 1,
  1447. .tuner = 0,
  1448. .svhs = UNSET,
  1449. .gpiomask = 0x4f8a00,
  1450. /* 0x100000: 1=MSP enabled (0=disable again)
  1451. * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
  1452. .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
  1453. .gpiomute = 0x947fff,
  1454. /* tvtuner, radio, external,internal, mute, stereo
  1455. * tuner, Composit, SVid, Composit-on-Svid-adapter */
  1456. .muxsel = { 2, 3 ,0 ,1 },
  1457. .tuner_type = TUNER_MT2032,
  1458. .tuner_addr = ADDR_UNSET,
  1459. .radio_addr = ADDR_UNSET,
  1460. .pll = PLL_28,
  1461. .has_radio = 1,
  1462. },
  1463. [BTTV_BOARD_VOODOOTV_200] = {
  1464. .name = "VoodooTV 200 (USA)",
  1465. /* try "insmod msp3400 simple=0" if you have
  1466. * sound problems with this card. */
  1467. .video_inputs = 4,
  1468. .audio_inputs = 1,
  1469. .tuner = 0,
  1470. .svhs = UNSET,
  1471. .gpiomask = 0x4f8a00,
  1472. /* 0x100000: 1=MSP enabled (0=disable again)
  1473. * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
  1474. .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
  1475. .gpiomute = 0x947fff,
  1476. /* tvtuner, radio, external,internal, mute, stereo
  1477. * tuner, Composit, SVid, Composit-on-Svid-adapter */
  1478. .muxsel = { 2, 3 ,0 ,1 },
  1479. .tuner_type = TUNER_MT2032,
  1480. .tuner_addr = ADDR_UNSET,
  1481. .radio_addr = ADDR_UNSET,
  1482. .pll = PLL_28,
  1483. .has_radio = 1,
  1484. },
  1485. [BTTV_BOARD_AIMMS] = {
  1486. /* Philip Blundell <pb@nexus.co.uk> */
  1487. .name = "Active Imaging AIMMS",
  1488. .video_inputs = 1,
  1489. .audio_inputs = 0,
  1490. .tuner = UNSET,
  1491. .tuner_type = UNSET,
  1492. .tuner_addr = ADDR_UNSET,
  1493. .radio_addr = ADDR_UNSET,
  1494. .pll = PLL_28,
  1495. .muxsel = { 2 },
  1496. .gpiomask = 0
  1497. },
  1498. [BTTV_BOARD_PV_BT878P_PLUS] = {
  1499. /* Tomasz Pyra <hellfire@sedez.iq.pl> */
  1500. .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
  1501. .video_inputs = 3,
  1502. .audio_inputs = 4,
  1503. .tuner = 0,
  1504. .svhs = 2,
  1505. .gpiomask = 15,
  1506. .muxsel = { 2, 3, 1, 1 },
  1507. .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
  1508. .gpiomute = 13,
  1509. .needs_tvaudio = 1,
  1510. .pll = PLL_28,
  1511. .tuner_type = TUNER_LG_PAL_I_FM,
  1512. .tuner_addr = ADDR_UNSET,
  1513. .radio_addr = ADDR_UNSET,
  1514. .has_remote = 1,
  1515. /* GPIO wiring:
  1516. GPIO0: U4.A0 (hef4052bt)
  1517. GPIO1: U4.A1
  1518. GPIO2: U4.A1 (second hef4052bt)
  1519. GPIO3: U4.nEN, U5.A0, A5.nEN
  1520. GPIO8-15: vrd866b ?
  1521. */
  1522. },
  1523. [BTTV_BOARD_FLYVIDEO98EZ] = {
  1524. .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
  1525. .video_inputs = 4,
  1526. .audio_inputs = 0,
  1527. .tuner = UNSET,
  1528. .svhs = 2,
  1529. .muxsel = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */
  1530. .pll = PLL_28,
  1531. .no_msp34xx = 1,
  1532. .tuner_type = UNSET,
  1533. .tuner_addr = ADDR_UNSET,
  1534. .radio_addr = ADDR_UNSET,
  1535. },
  1536. /* ---- card 0x48 ---------------------------------- */
  1537. [BTTV_BOARD_PV_BT878P_9B] = {
  1538. /* Dariusz Kowalewski <darekk@automex.pl> */
  1539. .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
  1540. .video_inputs = 4,
  1541. .audio_inputs = 1,
  1542. .tuner = 0,
  1543. .svhs = 2,
  1544. .gpiomask = 0x3f,
  1545. .muxsel = { 2, 3, 1, 1 },
  1546. .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
  1547. .gpiomute = 0x09,
  1548. .needs_tvaudio = 1,
  1549. .no_msp34xx = 1,
  1550. .no_tda9875 = 1,
  1551. .pll = PLL_28,
  1552. .tuner_type = TUNER_PHILIPS_PAL,
  1553. .tuner_addr = ADDR_UNSET,
  1554. .radio_addr = ADDR_UNSET,
  1555. .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
  1556. .has_radio = 1, /* Note: not all cards have radio */
  1557. .has_remote = 1,
  1558. /* GPIO wiring:
  1559. GPIO0: A0 hef4052
  1560. GPIO1: A1 hef4052
  1561. GPIO3: nEN hef4052
  1562. GPIO8-15: vrd866b
  1563. GPIO20,22,23: R30,R29,R28
  1564. */
  1565. },
  1566. [BTTV_BOARD_SENSORAY311] = {
  1567. /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
  1568. /* you must jumper JP5 for the card to work */
  1569. .name = "Sensoray 311",
  1570. .video_inputs = 5,
  1571. .audio_inputs = 0,
  1572. .tuner = UNSET,
  1573. .svhs = 4,
  1574. .gpiomask = 0,
  1575. .muxsel = { 2, 3, 1, 0, 0 },
  1576. .gpiomux = { 0 },
  1577. .needs_tvaudio = 0,
  1578. .tuner_type = UNSET,
  1579. .tuner_addr = ADDR_UNSET,
  1580. .radio_addr = ADDR_UNSET,
  1581. },
  1582. [BTTV_BOARD_RV605] = {
  1583. /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
  1584. .name = "RemoteVision MX (RV605)",
  1585. .video_inputs = 16,
  1586. .audio_inputs = 0,
  1587. .tuner = UNSET,
  1588. .svhs = UNSET,
  1589. .gpiomask = 0x00,
  1590. .gpiomask2 = 0x07ff,
  1591. .muxsel = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
  1592. 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
  1593. .no_msp34xx = 1,
  1594. .no_tda9875 = 1,
  1595. .tuner_type = UNSET,
  1596. .tuner_addr = ADDR_UNSET,
  1597. .radio_addr = ADDR_UNSET,
  1598. .muxsel_hook = rv605_muxsel,
  1599. },
  1600. [BTTV_BOARD_POWERCLR_MTV878] = {
  1601. .name = "Powercolor MTV878/ MTV878R/ MTV878F",
  1602. .video_inputs = 3,
  1603. .audio_inputs = 2,
  1604. .tuner = 0,
  1605. .svhs = 2,
  1606. .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
  1607. .muxsel = { 2, 1, 1, },
  1608. .gpiomux = { 0, 1, 2, 2 },
  1609. .gpiomute = 4,
  1610. .needs_tvaudio = 0,
  1611. .tuner_type = TUNER_PHILIPS_PAL,
  1612. .tuner_addr = ADDR_UNSET,
  1613. .radio_addr = ADDR_UNSET,
  1614. .pll = PLL_28,
  1615. .has_radio = 1,
  1616. },
  1617. /* ---- card 0x4c ---------------------------------- */
  1618. [BTTV_BOARD_WINDVR] = {
  1619. /* Masaki Suzuki <masaki@btree.org> */
  1620. .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
  1621. .video_inputs = 3,
  1622. .audio_inputs = 1,
  1623. .tuner = 0,
  1624. .svhs = 2,
  1625. .gpiomask = 0x140007,
  1626. .muxsel = { 2, 3, 1, 1 },
  1627. .gpiomux = { 0, 1, 2, 3 },
  1628. .gpiomute = 4,
  1629. .tuner_type = TUNER_PHILIPS_NTSC,
  1630. .tuner_addr = ADDR_UNSET,
  1631. .radio_addr = ADDR_UNSET,
  1632. .audio_mode_gpio= windvr_audio,
  1633. },
  1634. [BTTV_BOARD_GRANDTEC_MULTI] = {
  1635. .name = "GrandTec Multi Capture Card (Bt878)",
  1636. .video_inputs = 4,
  1637. .audio_inputs = 0,
  1638. .tuner = UNSET,
  1639. .svhs = UNSET,
  1640. .gpiomask = 0,
  1641. .muxsel = { 2, 3, 1, 0 },
  1642. .gpiomux = { 0 },
  1643. .needs_tvaudio = 0,
  1644. .no_msp34xx = 1,
  1645. .pll = PLL_28,
  1646. .tuner_type = UNSET,
  1647. .tuner_addr = ADDR_UNSET,
  1648. .radio_addr = ADDR_UNSET,
  1649. },
  1650. [BTTV_BOARD_KWORLD] = {
  1651. .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
  1652. .video_inputs = 4,
  1653. .audio_inputs = 3,
  1654. .tuner = 0,
  1655. .svhs = 2,
  1656. .gpiomask = 7,
  1657. .muxsel = { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
  1658. .gpiomux = { 0, 0, 4, 4 },/* Yes, this tuner uses the same audio output for TV and FM radio!
  1659. * This card lacks external Audio In, so we mute it on Ext. & Int.
  1660. * The PCB can take a sbx1637/sbx1673, wiring unknown.
  1661. * This card lacks PCI subsystem ID, sigh.
  1662. * gpiomux =1: lower volume, 2+3: mute
  1663. * btwincap uses 0x80000/0x80003
  1664. */
  1665. .gpiomute = 4,
  1666. .needs_tvaudio = 0,
  1667. .no_msp34xx = 1,
  1668. .pll = PLL_28,
  1669. .tuner_type = TUNER_PHILIPS_PAL,
  1670. .tuner_addr = ADDR_UNSET,
  1671. .radio_addr = ADDR_UNSET,
  1672. /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
  1673. radio signal strength indicators work fine. */
  1674. .has_radio = 1,
  1675. /* GPIO Info:
  1676. GPIO0,1: HEF4052 A0,A1
  1677. GPIO2: HEF4052 nENABLE
  1678. GPIO3-7: n.c.
  1679. GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
  1680. GPIO14,15: ??
  1681. GPIO16-21: n.c.
  1682. GPIO22,23: ??
  1683. ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
  1684. },
  1685. [BTTV_BOARD_DSP_TCVIDEO] = {
  1686. /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
  1687. .name = "DSP Design TCVIDEO",
  1688. .video_inputs = 4,
  1689. .svhs = UNSET,
  1690. .muxsel = { 2, 3, 1, 0 },
  1691. .pll = PLL_28,
  1692. .tuner_type = UNSET,
  1693. .tuner_addr = ADDR_UNSET,
  1694. .radio_addr = ADDR_UNSET,
  1695. },
  1696. /* ---- card 0x50 ---------------------------------- */
  1697. [BTTV_BOARD_HAUPPAUGEPVR] = {
  1698. .name = "Hauppauge WinTV PVR",
  1699. .video_inputs = 4,
  1700. .audio_inputs = 1,
  1701. .tuner = 0,
  1702. .svhs = 2,
  1703. .muxsel = { 2, 0, 1, 1 },
  1704. .needs_tvaudio = 1,
  1705. .pll = PLL_28,
  1706. .tuner_type = UNSET,
  1707. .tuner_addr = ADDR_UNSET,
  1708. .radio_addr = ADDR_UNSET,
  1709. .gpiomask = 7,
  1710. .gpiomux = {7},
  1711. },
  1712. [BTTV_BOARD_GVBCTV5PCI] = {
  1713. .name = "IODATA GV-BCTV5/PCI",
  1714. .video_inputs = 3,
  1715. .audio_inputs = 1,
  1716. .tuner = 0,
  1717. .svhs = 2,
  1718. .gpiomask = 0x0f0f80,
  1719. .muxsel = {2, 3, 1, 0 },
  1720. .gpiomux = {0x030000, 0x010000, 0, 0 },
  1721. .gpiomute = 0x020000,
  1722. .no_msp34xx = 1,
  1723. .pll = PLL_28,
  1724. .tuner_type = TUNER_PHILIPS_NTSC_M,
  1725. .tuner_addr = ADDR_UNSET,
  1726. .radio_addr = ADDR_UNSET,
  1727. .audio_mode_gpio= gvbctv5pci_audio,
  1728. .has_radio = 1,
  1729. },
  1730. [BTTV_BOARD_OSPREY1x0] = {
  1731. .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
  1732. .video_inputs = 4, /* id-inputs-clock */
  1733. .audio_inputs = 0,
  1734. .tuner = UNSET,
  1735. .svhs = 3,
  1736. .muxsel = { 3, 2, 0, 1 },
  1737. .pll = PLL_28,
  1738. .tuner_type = UNSET,
  1739. .tuner_addr = ADDR_UNSET,
  1740. .radio_addr = ADDR_UNSET,
  1741. .no_msp34xx = 1,
  1742. .no_tda9875 = 1,
  1743. .no_tda7432 = 1,
  1744. },
  1745. [BTTV_BOARD_OSPREY1x0_848] = {
  1746. .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
  1747. .video_inputs = 3,
  1748. .audio_inputs = 0,
  1749. .tuner = UNSET,
  1750. .svhs = 2,
  1751. .muxsel = { 2, 3, 1 },
  1752. .pll = PLL_28,
  1753. .tuner_type = UNSET,
  1754. .tuner_addr = ADDR_UNSET,
  1755. .radio_addr = ADDR_UNSET,
  1756. .no_msp34xx = 1,
  1757. .no_tda9875 = 1,
  1758. .no_tda7432 = 1,
  1759. },
  1760. /* ---- card 0x54 ---------------------------------- */
  1761. [BTTV_BOARD_OSPREY101_848] = {
  1762. .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
  1763. .video_inputs = 2,
  1764. .audio_inputs = 0,
  1765. .tuner = UNSET,
  1766. .svhs = 1,
  1767. .muxsel = { 3, 1 },
  1768. .pll = PLL_28,
  1769. .tuner_type = UNSET,
  1770. .tuner_addr = ADDR_UNSET,
  1771. .radio_addr = ADDR_UNSET,
  1772. .no_msp34xx = 1,
  1773. .no_tda9875 = 1,
  1774. .no_tda7432 = 1,
  1775. },
  1776. [BTTV_BOARD_OSPREY1x1] = {
  1777. .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
  1778. .video_inputs = 1,
  1779. .audio_inputs = 0,
  1780. .tuner = UNSET,
  1781. .svhs = UNSET,
  1782. .muxsel = { 0 },
  1783. .pll = PLL_28,
  1784. .tuner_type = UNSET,
  1785. .tuner_addr = ADDR_UNSET,
  1786. .radio_addr = ADDR_UNSET,
  1787. .no_msp34xx = 1,
  1788. .no_tda9875 = 1,
  1789. .no_tda7432 = 1,
  1790. },
  1791. [BTTV_BOARD_OSPREY1x1_SVID] = {
  1792. .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
  1793. .video_inputs = 2,
  1794. .audio_inputs = 0,
  1795. .tuner = UNSET,
  1796. .svhs = 1,
  1797. .muxsel = { 0, 1 },
  1798. .pll = PLL_28,
  1799. .tuner_type = UNSET,
  1800. .tuner_addr = ADDR_UNSET,
  1801. .radio_addr = ADDR_UNSET,
  1802. .no_msp34xx = 1,
  1803. .no_tda9875 = 1,
  1804. .no_tda7432 = 1,
  1805. },
  1806. [BTTV_BOARD_OSPREY2xx] = {
  1807. .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
  1808. .video_inputs = 1,
  1809. .audio_inputs = 1,
  1810. .tuner = UNSET,
  1811. .svhs = UNSET,
  1812. .muxsel = { 0 },
  1813. .pll = PLL_28,
  1814. .tuner_type = UNSET,
  1815. .tuner_addr = ADDR_UNSET,
  1816. .radio_addr = ADDR_UNSET,
  1817. .no_msp34xx = 1,
  1818. .no_tda9875 = 1,
  1819. .no_tda7432 = 1,
  1820. },
  1821. /* ---- card 0x58 ---------------------------------- */
  1822. [BTTV_BOARD_OSPREY2x0_SVID] = {
  1823. .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
  1824. .video_inputs = 2,
  1825. .audio_inputs = 1,
  1826. .tuner = UNSET,
  1827. .svhs = 1,
  1828. .muxsel = { 0, 1 },
  1829. .pll = PLL_28,
  1830. .tuner_type = UNSET,
  1831. .tuner_addr = ADDR_UNSET,
  1832. .radio_addr = ADDR_UNSET,
  1833. .no_msp34xx = 1,
  1834. .no_tda9875 = 1,
  1835. .no_tda7432 = 1,
  1836. },
  1837. [BTTV_BOARD_OSPREY2x0] = {
  1838. .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
  1839. .video_inputs = 2,
  1840. .audio_inputs = 1,
  1841. .tuner = UNSET,
  1842. .svhs = 1,
  1843. .muxsel = { 2, 3 },
  1844. .pll = PLL_28,
  1845. .tuner_type = UNSET,
  1846. .tuner_addr = ADDR_UNSET,
  1847. .radio_addr = ADDR_UNSET,
  1848. .no_msp34xx = 1,
  1849. .no_tda9875 = 1,
  1850. .no_tda7432 = 1,
  1851. },
  1852. [BTTV_BOARD_OSPREY500] = {
  1853. .name = "Osprey 500", /* 500 */
  1854. .video_inputs = 2,
  1855. .audio_inputs = 1,
  1856. .tuner = UNSET,
  1857. .svhs = 1,
  1858. .muxsel = { 2, 3 },
  1859. .pll = PLL_28,
  1860. .tuner_type = UNSET,
  1861. .tuner_addr = ADDR_UNSET,
  1862. .radio_addr = ADDR_UNSET,
  1863. .no_msp34xx = 1,
  1864. .no_tda9875 = 1,
  1865. .no_tda7432 = 1,
  1866. },
  1867. [BTTV_BOARD_OSPREY540] = {
  1868. .name = "Osprey 540", /* 540 */
  1869. .video_inputs = 4,
  1870. .audio_inputs = 1,
  1871. .tuner = UNSET,
  1872. .pll = PLL_28,
  1873. .tuner_type = UNSET,
  1874. .tuner_addr = ADDR_UNSET,
  1875. .radio_addr = ADDR_UNSET,
  1876. .no_msp34xx = 1,
  1877. .no_tda9875 = 1,
  1878. .no_tda7432 = 1,
  1879. },
  1880. /* ---- card 0x5C ---------------------------------- */
  1881. [BTTV_BOARD_OSPREY2000] = {
  1882. .name = "Osprey 2000", /* 2000 */
  1883. .video_inputs = 2,
  1884. .audio_inputs = 1,
  1885. .tuner = UNSET,
  1886. .svhs = 1,
  1887. .muxsel = { 2, 3 },
  1888. .pll = PLL_28,
  1889. .tuner_type = UNSET,
  1890. .tuner_addr = ADDR_UNSET,
  1891. .radio_addr = ADDR_UNSET,
  1892. .no_msp34xx = 1,
  1893. .no_tda9875 = 1,
  1894. .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
  1895. },
  1896. [BTTV_BOARD_IDS_EAGLE] = {
  1897. /* M G Berberich <berberic@forwiss.uni-passau.de> */
  1898. .name = "IDS Eagle",
  1899. .video_inputs = 4,
  1900. .audio_inputs = 0,
  1901. .tuner = UNSET,
  1902. .tuner_type = UNSET,
  1903. .tuner_addr = ADDR_UNSET,
  1904. .radio_addr = ADDR_UNSET,
  1905. .svhs = UNSET,
  1906. .gpiomask = 0,
  1907. .muxsel = { 0, 1, 2, 3 },
  1908. .muxsel_hook = eagle_muxsel,
  1909. .no_msp34xx = 1,
  1910. .no_tda9875 = 1,
  1911. .pll = PLL_28,
  1912. },
  1913. [BTTV_BOARD_PINNACLESAT] = {
  1914. .name = "Pinnacle PCTV Sat",
  1915. .video_inputs = 2,
  1916. .audio_inputs = 0,
  1917. .svhs = 1,
  1918. .tuner = UNSET,
  1919. .tuner_type = UNSET,
  1920. .tuner_addr = ADDR_UNSET,
  1921. .radio_addr = ADDR_UNSET,
  1922. .no_msp34xx = 1,
  1923. .no_tda9875 = 1,
  1924. .no_tda7432 = 1,
  1925. .muxsel = { 3, 1 },
  1926. .pll = PLL_28,
  1927. .no_gpioirq = 1,
  1928. .has_dvb = 1,
  1929. },
  1930. [BTTV_BOARD_FORMAC_PROTV] = {
  1931. .name = "Formac ProTV II (bt878)",
  1932. .video_inputs = 4,
  1933. .audio_inputs = 1,
  1934. .tuner = 0,
  1935. .svhs = 3,
  1936. .gpiomask = 2,
  1937. /* TV, Comp1, Composite over SVID con, SVID */
  1938. .muxsel = { 2, 3, 1, 1 },
  1939. .gpiomux = { 2, 2, 0, 0 },
  1940. .pll = PLL_28,
  1941. .has_radio = 1,
  1942. .tuner_type = TUNER_PHILIPS_PAL,
  1943. .tuner_addr = ADDR_UNSET,
  1944. .radio_addr = ADDR_UNSET,
  1945. /* sound routing:
  1946. GPIO=0x00,0x01,0x03: mute (?)
  1947. 0x02: both TV and radio (tuner: FM1216/I)
  1948. The card has onboard audio connectors labeled "cdrom" and "board",
  1949. not soldered here, though unknown wiring.
  1950. Card lacks: external audio in, pci subsystem id.
  1951. */
  1952. },
  1953. /* ---- card 0x60 ---------------------------------- */
  1954. [BTTV_BOARD_MACHTV] = {
  1955. .name = "MachTV",
  1956. .video_inputs = 3,
  1957. .audio_inputs = 1,
  1958. .tuner = 0,
  1959. .svhs = UNSET,
  1960. .gpiomask = 7,
  1961. .muxsel = { 2, 3, 1, 1},
  1962. .gpiomux = { 0, 1, 2, 3},
  1963. .gpiomute = 4,
  1964. .needs_tvaudio = 1,
  1965. .tuner_type = TUNER_PHILIPS_PAL,
  1966. .tuner_addr = ADDR_UNSET,
  1967. .radio_addr = ADDR_UNSET,
  1968. .pll = PLL_28,
  1969. },
  1970. [BTTV_BOARD_EURESYS_PICOLO] = {
  1971. .name = "Euresys Picolo",
  1972. .video_inputs = 3,
  1973. .audio_inputs = 0,
  1974. .tuner = UNSET,
  1975. .svhs = 2,
  1976. .gpiomask = 0,
  1977. .no_msp34xx = 1,
  1978. .no_tda9875 = 1,
  1979. .no_tda7432 = 1,
  1980. .muxsel = { 2, 0, 1},
  1981. .pll = PLL_28,
  1982. .tuner_type = UNSET,
  1983. .tuner_addr = ADDR_UNSET,
  1984. .radio_addr = ADDR_UNSET,
  1985. },
  1986. [BTTV_BOARD_PV150] = {
  1987. /* Luc Van Hoeylandt <luc@e-magic.be> */
  1988. .name = "ProVideo PV150", /* 0x4f */
  1989. .video_inputs = 2,
  1990. .audio_inputs = 0,
  1991. .tuner = UNSET,
  1992. .svhs = UNSET,
  1993. .gpiomask = 0,
  1994. .muxsel = { 2, 3 },
  1995. .gpiomux = { 0 },
  1996. .needs_tvaudio = 0,
  1997. .no_msp34xx = 1,
  1998. .pll = PLL_28,
  1999. .tuner_type = UNSET,
  2000. .tuner_addr = ADDR_UNSET,
  2001. .radio_addr = ADDR_UNSET,
  2002. },
  2003. [BTTV_BOARD_AD_TVK503] = {
  2004. /* Hiroshi Takekawa <sian@big.or.jp> */
  2005. /* This card lacks subsystem ID */
  2006. .name = "AD-TVK503", /* 0x63 */
  2007. .video_inputs = 4,
  2008. .audio_inputs = 1,
  2009. .tuner = 0,
  2010. .svhs = 2,
  2011. .gpiomask = 0x001e8007,
  2012. .muxsel = { 2, 3, 1, 0 },
  2013. /* Tuner, Radio, external, internal, off, on */
  2014. .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
  2015. .gpiomute = 0x0f,
  2016. .needs_tvaudio = 0,
  2017. .no_msp34xx = 1,
  2018. .pll = PLL_28,
  2019. .tuner_type = TUNER_PHILIPS_NTSC,
  2020. .tuner_addr = ADDR_UNSET,
  2021. .radio_addr = ADDR_UNSET,
  2022. .audio_mode_gpio= adtvk503_audio,
  2023. },
  2024. /* ---- card 0x64 ---------------------------------- */
  2025. [BTTV_BOARD_HERCULES_SM_TV] = {
  2026. .name = "Hercules Smart TV Stereo",
  2027. .video_inputs = 4,
  2028. .audio_inputs = 1,
  2029. .tuner = 0,
  2030. .svhs = 2,
  2031. .gpiomask = 0x00,
  2032. .muxsel = { 2, 3, 1, 1 },
  2033. .needs_tvaudio = 1,
  2034. .no_msp34xx = 1,
  2035. .pll = PLL_28,
  2036. .tuner_type = TUNER_PHILIPS_PAL,
  2037. .tuner_addr = ADDR_UNSET,
  2038. .radio_addr = ADDR_UNSET,
  2039. /* Notes:
  2040. - card lacks subsystem ID
  2041. - stereo variant w/ daughter board with tda9874a @0xb0
  2042. - Audio Routing:
  2043. always from tda9874 independent of GPIO (?)
  2044. external line in: unknown
  2045. - Other chips: em78p156elp @ 0x96 (probably IR remote control)
  2046. hef4053 (instead 4052) for unknown function
  2047. */
  2048. },
  2049. [BTTV_BOARD_PACETV] = {
  2050. .name = "Pace TV & Radio Card",
  2051. .video_inputs = 4,
  2052. .audio_inputs = 1,
  2053. .tuner = 0,
  2054. .svhs = 2,
  2055. .muxsel = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */
  2056. .gpiomask = 0,
  2057. .no_tda9875 = 1,
  2058. .no_tda7432 = 1,
  2059. .tuner_type = TUNER_PHILIPS_PAL_I,
  2060. .tuner_addr = ADDR_UNSET,
  2061. .radio_addr = ADDR_UNSET,
  2062. .has_radio = 1,
  2063. .pll = PLL_28,
  2064. /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
  2065. only internal line out: (4pin header) RGGL
  2066. Radio must be decoded by msp3410d (not routed through)*/
  2067. /*
  2068. .digital_mode = DIGITAL_MODE_CAMERA, todo!
  2069. */
  2070. },
  2071. [BTTV_BOARD_IVC200] = {
  2072. /* Chris Willing <chris@vislab.usyd.edu.au> */
  2073. .name = "IVC-200",
  2074. .video_inputs = 1,
  2075. .audio_inputs = 0,
  2076. .tuner = UNSET,
  2077. .tuner_type = UNSET,
  2078. .tuner_addr = ADDR_UNSET,
  2079. .radio_addr = ADDR_UNSET,
  2080. .svhs = UNSET,
  2081. .gpiomask = 0xdf,
  2082. .muxsel = { 2 },
  2083. .pll = PLL_28,
  2084. },
  2085. [BTTV_BOARD_XGUARD] = {
  2086. .name = "Grand X-Guard / Trust 814PCI",
  2087. .video_inputs = 16,
  2088. .audio_inputs = 0,
  2089. .tuner = UNSET,
  2090. .svhs = UNSET,
  2091. .tuner_type = TUNER_ABSENT,
  2092. .tuner_addr = ADDR_UNSET,
  2093. .radio_addr = ADDR_UNSET,
  2094. .gpiomask2 = 0xff,
  2095. .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
  2096. .muxsel_hook = xguard_muxsel,
  2097. .no_msp34xx = 1,
  2098. .no_tda9875 = 1,
  2099. .no_tda7432 = 1,
  2100. .pll = PLL_28,
  2101. },
  2102. /* ---- card 0x68 ---------------------------------- */
  2103. [BTTV_BOARD_NEBULA_DIGITV] = {
  2104. .name = "Nebula Electronics DigiTV",
  2105. .video_inputs = 1,
  2106. .tuner = UNSET,
  2107. .svhs = UNSET,
  2108. .muxsel = { 2, 3, 1, 0 },
  2109. .no_msp34xx = 1,
  2110. .no_tda9875 = 1,
  2111. .no_tda7432 = 1,
  2112. .pll = PLL_28,
  2113. .tuner_type = UNSET,
  2114. .tuner_addr = ADDR_UNSET,
  2115. .radio_addr = ADDR_UNSET,
  2116. .has_dvb = 1,
  2117. .has_remote = 1,
  2118. .gpiomask = 0x1b,
  2119. .no_gpioirq = 1,
  2120. },
  2121. [BTTV_BOARD_PV143] = {
  2122. /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
  2123. .name = "ProVideo PV143",
  2124. .video_inputs = 4,
  2125. .audio_inputs = 0,
  2126. .tuner = UNSET,
  2127. .svhs = UNSET,
  2128. .gpiomask = 0,
  2129. .muxsel = { 2, 3, 1, 0 },
  2130. .gpiomux = { 0 },
  2131. .needs_tvaudio = 0,
  2132. .no_msp34xx = 1,
  2133. .pll = PLL_28,
  2134. .tuner_type = UNSET,
  2135. .tuner_addr = ADDR_UNSET,
  2136. .radio_addr = ADDR_UNSET,
  2137. },
  2138. [BTTV_BOARD_VD009X1_MINIDIN] = {
  2139. /* M.Klahr@phytec.de */
  2140. .name = "PHYTEC VD-009-X1 MiniDIN (bt878)",
  2141. .video_inputs = 4,
  2142. .audio_inputs = 0,
  2143. .tuner = UNSET, /* card has no tuner */
  2144. .svhs = 3,
  2145. .gpiomask = 0x00,
  2146. .muxsel = { 2, 3, 1, 0 },
  2147. .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
  2148. .needs_tvaudio = 1,
  2149. .pll = PLL_28,
  2150. .tuner_type = UNSET,
  2151. .tuner_addr = ADDR_UNSET,
  2152. .radio_addr = ADDR_UNSET,
  2153. },
  2154. [BTTV_BOARD_VD009X1_COMBI] = {
  2155. .name = "PHYTEC VD-009-X1 Combi (bt878)",
  2156. .video_inputs = 4,
  2157. .audio_inputs = 0,
  2158. .tuner = UNSET, /* card has no tuner */
  2159. .svhs = 3,
  2160. .gpiomask = 0x00,
  2161. .muxsel = { 2, 3, 1, 1 },
  2162. .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
  2163. .needs_tvaudio = 1,
  2164. .pll = PLL_28,
  2165. .tuner_type = UNSET,
  2166. .tuner_addr = ADDR_UNSET,
  2167. .radio_addr = ADDR_UNSET,
  2168. },
  2169. /* ---- card 0x6c ---------------------------------- */
  2170. [BTTV_BOARD_VD009_MINIDIN] = {
  2171. .name = "PHYTEC VD-009 MiniDIN (bt878)",
  2172. .video_inputs = 10,
  2173. .audio_inputs = 0,
  2174. .tuner = UNSET, /* card has no tuner */
  2175. .svhs = 9,
  2176. .gpiomask = 0x00,
  2177. .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
  2178. via the upper nibble of muxsel. here: used for
  2179. xternal video-mux */
  2180. .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
  2181. .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
  2182. .needs_tvaudio = 1,
  2183. .pll = PLL_28,
  2184. .tuner_type = UNSET,
  2185. .tuner_addr = ADDR_UNSET,
  2186. .radio_addr = ADDR_UNSET,
  2187. },
  2188. [BTTV_BOARD_VD009_COMBI] = {
  2189. .name = "PHYTEC VD-009 Combi (bt878)",
  2190. .video_inputs = 10,
  2191. .audio_inputs = 0,
  2192. .tuner = UNSET, /* card has no tuner */
  2193. .svhs = 9,
  2194. .gpiomask = 0x00,
  2195. .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
  2196. via the upper nibble of muxsel. here: used for
  2197. xternal video-mux */
  2198. .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
  2199. .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
  2200. .needs_tvaudio = 1,
  2201. .pll = PLL_28,
  2202. .tuner_type = UNSET,
  2203. .tuner_addr = ADDR_UNSET,
  2204. .radio_addr = ADDR_UNSET,
  2205. },
  2206. [BTTV_BOARD_IVC100] = {
  2207. .name = "IVC-100",
  2208. .video_inputs = 4,
  2209. .audio_inputs = 0,
  2210. .tuner = UNSET,
  2211. .tuner_type = UNSET,
  2212. .tuner_addr = ADDR_UNSET,
  2213. .radio_addr = ADDR_UNSET,
  2214. .svhs = UNSET,
  2215. .gpiomask = 0xdf,
  2216. .muxsel = { 2, 3, 1, 0 },
  2217. .pll = PLL_28,
  2218. },
  2219. [BTTV_BOARD_IVC120] = {
  2220. /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
  2221. .name = "IVC-120G",
  2222. .video_inputs = 16,
  2223. .audio_inputs = 0, /* card has no audio */
  2224. .tuner = UNSET, /* card has no tuner */
  2225. .tuner_type = UNSET,
  2226. .tuner_addr = ADDR_UNSET,
  2227. .radio_addr = ADDR_UNSET,
  2228. .svhs = UNSET, /* card has no svhs */
  2229. .needs_tvaudio = 0,
  2230. .no_msp34xx = 1,
  2231. .no_tda9875 = 1,
  2232. .no_tda7432 = 1,
  2233. .gpiomask = 0x00,
  2234. .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
  2235. 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
  2236. .muxsel_hook = ivc120_muxsel,
  2237. .pll = PLL_28,
  2238. },
  2239. /* ---- card 0x70 ---------------------------------- */
  2240. [BTTV_BOARD_PC_HDTV] = {
  2241. .name = "pcHDTV HD-2000 TV",
  2242. .video_inputs = 4,
  2243. .audio_inputs = 1,
  2244. .tuner = 0,
  2245. .svhs = 2,
  2246. .muxsel = { 2, 3, 1, 0 },
  2247. .tuner_type = TUNER_PHILIPS_FCV1236D,
  2248. .tuner_addr = ADDR_UNSET,
  2249. .radio_addr = ADDR_UNSET,
  2250. .has_dvb = 1,
  2251. },
  2252. [BTTV_BOARD_TWINHAN_DST] = {
  2253. .name = "Twinhan DST + clones",
  2254. .no_msp34xx = 1,
  2255. .no_tda9875 = 1,
  2256. .no_tda7432 = 1,
  2257. .tuner_type = TUNER_ABSENT,
  2258. .tuner_addr = ADDR_UNSET,
  2259. .radio_addr = ADDR_UNSET,
  2260. .no_video = 1,
  2261. .has_dvb = 1,
  2262. },
  2263. [BTTV_BOARD_WINFASTVC100] = {
  2264. .name = "Winfast VC100",
  2265. .video_inputs = 3,
  2266. .audio_inputs = 0,
  2267. .svhs = 1,
  2268. .tuner = UNSET,
  2269. .muxsel = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */
  2270. .no_msp34xx = 1,
  2271. .no_tda9875 = 1,
  2272. .no_tda7432 = 1,
  2273. .tuner_type = TUNER_ABSENT,
  2274. .tuner_addr = ADDR_UNSET,
  2275. .radio_addr = ADDR_UNSET,
  2276. .pll = PLL_28,
  2277. },
  2278. [BTTV_BOARD_TEV560] = {
  2279. .name = "Teppro TEV-560/InterVision IV-560",
  2280. .video_inputs = 3,
  2281. .audio_inputs = 1,
  2282. .tuner = 0,
  2283. .svhs = 2,
  2284. .gpiomask = 3,
  2285. .muxsel = { 2, 3, 1, 1 },
  2286. .gpiomux = { 1, 1, 1, 1 },
  2287. .needs_tvaudio = 1,
  2288. .tuner_type = TUNER_PHILIPS_PAL,
  2289. .tuner_addr = ADDR_UNSET,
  2290. .radio_addr = ADDR_UNSET,
  2291. .pll = PLL_35,
  2292. },
  2293. /* ---- card 0x74 ---------------------------------- */
  2294. [BTTV_BOARD_SIMUS_GVC1100] = {
  2295. .name = "SIMUS GVC1100",
  2296. .video_inputs = 4,
  2297. .audio_inputs = 0,
  2298. .tuner = UNSET,
  2299. .svhs = UNSET,
  2300. .tuner_type = UNSET,
  2301. .tuner_addr = ADDR_UNSET,
  2302. .radio_addr = ADDR_UNSET,
  2303. .pll = PLL_28,
  2304. .muxsel = { 2, 2, 2, 2 },
  2305. .gpiomask = 0x3F,
  2306. .muxsel_hook = gvc1100_muxsel,
  2307. },
  2308. [BTTV_BOARD_NGSTV_PLUS] = {
  2309. /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
  2310. .name = "NGS NGSTV+",
  2311. .video_inputs = 3,
  2312. .tuner = 0,
  2313. .svhs = 2,
  2314. .gpiomask = 0x008007,
  2315. .muxsel = { 2, 3, 0, 0 },
  2316. .gpiomux = { 0, 0, 0, 0 },
  2317. .gpiomute = 0x000003,
  2318. .pll = PLL_28,
  2319. .tuner_type = TUNER_PHILIPS_PAL,
  2320. .tuner_addr = ADDR_UNSET,
  2321. .radio_addr = ADDR_UNSET,
  2322. .has_remote = 1,
  2323. },
  2324. [BTTV_BOARD_LMLBT4] = {
  2325. /* http://linuxmedialabs.com */
  2326. .name = "LMLBT4",
  2327. .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
  2328. .audio_inputs = 0,
  2329. .tuner = UNSET,
  2330. .svhs = UNSET,
  2331. .muxsel = { 2, 3, 1, 0 },
  2332. .no_msp34xx = 1,
  2333. .no_tda9875 = 1,
  2334. .no_tda7432 = 1,
  2335. .needs_tvaudio = 0,
  2336. .tuner_type = UNSET,
  2337. .tuner_addr = ADDR_UNSET,
  2338. .radio_addr = ADDR_UNSET,
  2339. },
  2340. [BTTV_BOARD_TEKRAM_M205] = {
  2341. /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
  2342. .name = "Tekram M205 PRO",
  2343. .video_inputs = 3,
  2344. .audio_inputs = 1,
  2345. .tuner = 0,
  2346. .tuner_type = TUNER_PHILIPS_PAL,
  2347. .tuner_addr = ADDR_UNSET,
  2348. .radio_addr = ADDR_UNSET,
  2349. .svhs = 2,
  2350. .needs_tvaudio = 0,
  2351. .gpiomask = 0x68,
  2352. .muxsel = { 2, 3, 1 },
  2353. .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
  2354. .pll = PLL_28,
  2355. },
  2356. /* ---- card 0x78 ---------------------------------- */
  2357. [BTTV_BOARD_CONTVFMI] = {
  2358. /* Javier Cendan Ares <jcendan@lycos.es> */
  2359. /* bt878 TV + FM without subsystem ID */
  2360. .name = "Conceptronic CONTVFMi",
  2361. .video_inputs = 3,
  2362. .audio_inputs = 1,
  2363. .tuner = 0,
  2364. .svhs = 2,
  2365. .gpiomask = 0x008007,
  2366. .muxsel = { 2, 3, 1, 1 },
  2367. .gpiomux = { 0, 1, 2, 2 },
  2368. .gpiomute = 3,
  2369. .needs_tvaudio = 0,
  2370. .pll = PLL_28,
  2371. .tuner_type = TUNER_PHILIPS_PAL,
  2372. .tuner_addr = ADDR_UNSET,
  2373. .radio_addr = ADDR_UNSET,
  2374. .has_remote = 1,
  2375. .has_radio = 1,
  2376. },
  2377. [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
  2378. /*Eric DEBIEF <debief@telemsa.com>*/
  2379. /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controled*/
  2380. /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the folowing declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/
  2381. /*0x79 in bttv.h*/
  2382. .name = "Euresys Picolo Tetra",
  2383. .video_inputs = 4,
  2384. .audio_inputs = 0,
  2385. .tuner = UNSET,
  2386. .svhs = UNSET,
  2387. .gpiomask = 0,
  2388. .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
  2389. .no_msp34xx = 1,
  2390. .no_tda9875 = 1,
  2391. .no_tda7432 = 1,
  2392. .muxsel = {2,2,2,2},/*878A input is always MUX0, see above.*/
  2393. .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
  2394. .pll = PLL_28,
  2395. .needs_tvaudio = 0,
  2396. .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
  2397. .tuner_type = UNSET,
  2398. .tuner_addr = ADDR_UNSET,
  2399. .radio_addr = ADDR_UNSET,
  2400. },
  2401. [BTTV_BOARD_SPIRIT_TV] = {
  2402. /* Spirit TV Tuner from http://spiritmodems.com.au */
  2403. /* Stafford Goodsell <surge@goliath.homeunix.org> */
  2404. .name = "Spirit TV Tuner",
  2405. .video_inputs = 3,
  2406. .audio_inputs = 1,
  2407. .tuner = 0,
  2408. .svhs = 2,
  2409. .gpiomask = 0x0000000f,
  2410. .muxsel = { 2, 1, 1 },
  2411. .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
  2412. .tuner_type = TUNER_TEMIC_PAL,
  2413. .tuner_addr = ADDR_UNSET,
  2414. .radio_addr = ADDR_UNSET,
  2415. .no_msp34xx = 1,
  2416. .no_tda9875 = 1,
  2417. },
  2418. [BTTV_BOARD_AVDVBT_771] = {
  2419. /* Wolfram Joost <wojo@frokaschwei.de> */
  2420. .name = "AVerMedia AVerTV DVB-T 771",
  2421. .video_inputs = 2,
  2422. .svhs = 1,
  2423. .tuner = UNSET,
  2424. .tuner_type = TUNER_ABSENT,
  2425. .tuner_addr = ADDR_UNSET,
  2426. .radio_addr = ADDR_UNSET,
  2427. .muxsel = { 3 , 3 },
  2428. .no_msp34xx = 1,
  2429. .no_tda9875 = 1,
  2430. .no_tda7432 = 1,
  2431. .pll = PLL_28,
  2432. .has_dvb = 1,
  2433. .no_gpioirq = 1,
  2434. .has_remote = 1,
  2435. },
  2436. /* ---- card 0x7c ---------------------------------- */
  2437. [BTTV_BOARD_AVDVBT_761] = {
  2438. /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
  2439. /* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see also ir-kbd-gpio.c */
  2440. .name = "AverMedia AverTV DVB-T 761",
  2441. .video_inputs = 2,
  2442. .tuner = UNSET,
  2443. .svhs = 1,
  2444. .muxsel = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */
  2445. .no_msp34xx = 1,
  2446. .no_tda9875 = 1,
  2447. .no_tda7432 = 1,
  2448. .pll = PLL_28,
  2449. .tuner_type = UNSET,
  2450. .tuner_addr = ADDR_UNSET,
  2451. .radio_addr = ADDR_UNSET,
  2452. .has_dvb = 1,
  2453. .no_gpioirq = 1,
  2454. .has_remote = 1,
  2455. },
  2456. [BTTV_BOARD_MATRIX_VISIONSQ] = {
  2457. /* andre.schwarz@matrix-vision.de */
  2458. .name = "MATRIX Vision Sigma-SQ",
  2459. .video_inputs = 16,
  2460. .audio_inputs = 0,
  2461. .tuner = UNSET,
  2462. .svhs = UNSET,
  2463. .gpiomask = 0x0,
  2464. .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
  2465. 3, 3, 3, 3, 3, 3, 3, 3 },
  2466. .muxsel_hook = sigmaSQ_muxsel,
  2467. .gpiomux = { 0 },
  2468. .no_msp34xx = 1,
  2469. .pll = PLL_28,
  2470. .tuner_type = UNSET,
  2471. .tuner_addr = ADDR_UNSET,
  2472. .radio_addr = ADDR_UNSET,
  2473. },
  2474. [BTTV_BOARD_MATRIX_VISIONSLC] = {
  2475. /* andre.schwarz@matrix-vision.de */
  2476. .name = "MATRIX Vision Sigma-SLC",
  2477. .video_inputs = 4,
  2478. .audio_inputs = 0,
  2479. .tuner = UNSET,
  2480. .svhs = UNSET,
  2481. .gpiomask = 0x0,
  2482. .muxsel = { 2, 2, 2, 2 },
  2483. .muxsel_hook = sigmaSLC_muxsel,
  2484. .gpiomux = { 0 },
  2485. .no_msp34xx = 1,
  2486. .pll = PLL_28,
  2487. .tuner_type = UNSET,
  2488. .tuner_addr = ADDR_UNSET,
  2489. .radio_addr = ADDR_UNSET,
  2490. },
  2491. /* BTTV_BOARD_APAC_VIEWCOMP */
  2492. [BTTV_BOARD_APAC_VIEWCOMP] = {
  2493. /* Attila Kondoros <attila.kondoros@chello.hu> */
  2494. /* bt878 TV + FM 0x00000000 subsystem ID */
  2495. .name = "APAC Viewcomp 878(AMAX)",
  2496. .video_inputs = 2,
  2497. .audio_inputs = 1,
  2498. .tuner = 0,
  2499. .svhs = UNSET,
  2500. .gpiomask = 0xFF,
  2501. .muxsel = { 2, 3, 1, 1 },
  2502. .gpiomux = { 2, 0, 0, 0 },
  2503. .gpiomute = 10,
  2504. .needs_tvaudio = 0,
  2505. .pll = PLL_28,
  2506. .tuner_type = TUNER_PHILIPS_PAL,
  2507. .tuner_addr = ADDR_UNSET,
  2508. .radio_addr = ADDR_UNSET,
  2509. .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
  2510. .has_radio = 1, /* not every card has radio */
  2511. },
  2512. /* ---- card 0x80 ---------------------------------- */
  2513. [BTTV_BOARD_DVICO_DVBT_LITE] = {
  2514. /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
  2515. .name = "DViCO FusionHDTV DVB-T Lite",
  2516. .tuner = UNSET,
  2517. .no_msp34xx = 1,
  2518. .no_tda9875 = 1,
  2519. .no_tda7432 = 1,
  2520. .pll = PLL_28,
  2521. .no_video = 1,
  2522. .has_dvb = 1,
  2523. .tuner_type = UNSET,
  2524. .tuner_addr = ADDR_UNSET,
  2525. .radio_addr = ADDR_UNSET,
  2526. },
  2527. [BTTV_BOARD_VGEAR_MYVCD] = {
  2528. /* Steven <photon38@pchome.com.tw> */
  2529. .name = "V-Gear MyVCD",
  2530. .video_inputs = 3,
  2531. .audio_inputs = 1,
  2532. .tuner = 0,
  2533. .svhs = 2,
  2534. .gpiomask = 0x3f,
  2535. .muxsel = {2, 3, 1, 0 },
  2536. .gpiomux = {0x31, 0x31, 0x31, 0x31 },
  2537. .gpiomute = 0x31,
  2538. .no_msp34xx = 1,
  2539. .pll = PLL_28,
  2540. .tuner_type = TUNER_PHILIPS_NTSC_M,
  2541. .tuner_addr = ADDR_UNSET,
  2542. .radio_addr = ADDR_UNSET,
  2543. .has_radio = 0,
  2544. },
  2545. [BTTV_BOARD_SUPER_TV] = {
  2546. /* Rick C <cryptdragoon@gmail.com> */
  2547. .name = "Super TV Tuner",
  2548. .video_inputs = 4,
  2549. .audio_inputs = 1,
  2550. .tuner = 0,
  2551. .svhs = 2,
  2552. .muxsel = { 2, 3, 1, 0 },
  2553. .tuner_type = TUNER_PHILIPS_NTSC,
  2554. .tuner_addr = ADDR_UNSET,
  2555. .radio_addr = ADDR_UNSET,
  2556. .gpiomask = 0x008007,
  2557. .gpiomux = { 0, 0x000001,0,0 },
  2558. .needs_tvaudio = 1,
  2559. .has_radio = 1,
  2560. },
  2561. [BTTV_BOARD_TIBET_CS16] = {
  2562. /* Chris Fanning <video4linux@haydon.net> */
  2563. .name = "Tibet Systems 'Progress DVR' CS16",
  2564. .video_inputs = 16,
  2565. .audio_inputs = 0,
  2566. .tuner = UNSET,
  2567. .svhs = UNSET,
  2568. .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
  2569. .pll = PLL_28,
  2570. .no_msp34xx = 1,
  2571. .no_tda9875 = 1,
  2572. .no_tda7432 = 1,
  2573. .tuner_type = UNSET,
  2574. .tuner_addr = ADDR_UNSET,
  2575. .radio_addr = ADDR_UNSET,
  2576. .muxsel_hook = tibetCS16_muxsel,
  2577. },
  2578. [BTTV_BOARD_KODICOM_4400R] = {
  2579. /* Bill Brack <wbrack@mmm.com.hk> */
  2580. /*
  2581. * Note that, because of the card's wiring, the "master"
  2582. * BT878A chip (i.e. the one which controls the analog switch
  2583. * and must use this card type) is the 2nd one detected. The
  2584. * other 3 chips should use card type 0x85, whose description
  2585. * follows this one. There is a EEPROM on the card (which is
  2586. * connected to the I2C of one of those other chips), but is
  2587. * not currently handled. There is also a facility for a
  2588. * "monitor", which is also not currently implemented.
  2589. */
  2590. .name = "Kodicom 4400R (master)",
  2591. .video_inputs = 16,
  2592. .audio_inputs = 0,
  2593. .tuner = UNSET,
  2594. .tuner_type = UNSET,
  2595. .tuner_addr = ADDR_UNSET,
  2596. .radio_addr = ADDR_UNSET,
  2597. .svhs = UNSET,
  2598. /* GPIO bits 0-9 used for analog switch:
  2599. * 00 - 03: camera selector
  2600. * 04 - 06: channel (controller) selector
  2601. * 07: data (1->on, 0->off)
  2602. * 08: strobe
  2603. * 09: reset
  2604. * bit 16 is input from sync separator for the channel
  2605. */
  2606. .gpiomask = 0x0003ff,
  2607. .no_gpioirq = 1,
  2608. .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
  2609. .pll = PLL_28,
  2610. .no_msp34xx = 1,
  2611. .no_tda7432 = 1,
  2612. .no_tda9875 = 1,
  2613. .muxsel_hook = kodicom4400r_muxsel,
  2614. },
  2615. [BTTV_BOARD_KODICOM_4400R_SL] = {
  2616. /* Bill Brack <wbrack@mmm.com.hk> */
  2617. /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
  2618. * one which controls the analog switch, and must use the card type)
  2619. * is the 2nd one detected. The other 3 chips should use this card
  2620. * type
  2621. */
  2622. .name = "Kodicom 4400R (slave)",
  2623. .video_inputs = 16,
  2624. .audio_inputs = 0,
  2625. .tuner = UNSET,
  2626. .tuner_type = UNSET,
  2627. .tuner_addr = ADDR_UNSET,
  2628. .radio_addr = ADDR_UNSET,
  2629. .svhs = UNSET,
  2630. .gpiomask = 0x010000,
  2631. .no_gpioirq = 1,
  2632. .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
  2633. .pll = PLL_28,
  2634. .no_msp34xx = 1,
  2635. .no_tda7432 = 1,
  2636. .no_tda9875 = 1,
  2637. .muxsel_hook = kodicom4400r_muxsel,
  2638. },
  2639. /* ---- card 0x86---------------------------------- */
  2640. [BTTV_BOARD_ADLINK_RTV24] = {
  2641. /* Michael Henson <mhenson@clarityvi.com> */
  2642. /* Adlink RTV24 with special unlock codes */
  2643. .name = "Adlink RTV24",
  2644. .video_inputs = 4,
  2645. .audio_inputs = 1,
  2646. .tuner = 0,
  2647. .svhs = 2,
  2648. .muxsel = { 2, 3, 1, 0 },
  2649. .tuner_type = UNSET,
  2650. .tuner_addr = ADDR_UNSET,
  2651. .radio_addr = ADDR_UNSET,
  2652. .pll = PLL_28,
  2653. },
  2654. /* ---- card 0x87---------------------------------- */
  2655. [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
  2656. /* Michael Krufky <mkrufky@m1k.net> */
  2657. .name = "DViCO FusionHDTV 5 Lite",
  2658. .tuner = 0,
  2659. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
  2660. .tuner_addr = ADDR_UNSET,
  2661. .radio_addr = ADDR_UNSET,
  2662. .video_inputs = 3,
  2663. .audio_inputs = 1,
  2664. .svhs = 2,
  2665. .muxsel = { 2, 3, 1 },
  2666. .gpiomask = 0x00e00007,
  2667. .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
  2668. .gpiomute = 0x00c00007,
  2669. .no_msp34xx = 1,
  2670. .no_tda9875 = 1,
  2671. .no_tda7432 = 1,
  2672. .has_dvb = 1,
  2673. },
  2674. /* ---- card 0x88---------------------------------- */
  2675. [BTTV_BOARD_ACORP_Y878F] = {
  2676. /* Mauro Carvalho Chehab <mchehab@infradead.org> */
  2677. .name = "Acorp Y878F",
  2678. .video_inputs = 3,
  2679. .audio_inputs = 1,
  2680. .tuner = 0,
  2681. .svhs = 2,
  2682. .gpiomask = 0x01fe00,
  2683. .muxsel = { 2, 3, 1, 1 },
  2684. .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
  2685. .gpiomute = 0x002000,
  2686. .needs_tvaudio = 1,
  2687. .pll = PLL_28,
  2688. .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
  2689. .tuner_addr = 0xc1 >>1,
  2690. .radio_addr = 0xc1 >>1,
  2691. .has_radio = 1,
  2692. },
  2693. /* ---- card 0x89 ---------------------------------- */
  2694. [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
  2695. .name = "Conceptronic CTVFMi v2",
  2696. .video_inputs = 3,
  2697. .audio_inputs = 1,
  2698. .tuner = 0,
  2699. .svhs = 2,
  2700. .gpiomask = 0x001c0007,
  2701. .muxsel = { 2, 3, 1, 1 },
  2702. .gpiomux = { 0, 1, 2, 2 },
  2703. .gpiomute = 3,
  2704. .needs_tvaudio = 0,
  2705. .pll = PLL_28,
  2706. .tuner_type = TUNER_TENA_9533_DI,
  2707. .tuner_addr = ADDR_UNSET,
  2708. .radio_addr = ADDR_UNSET,
  2709. .has_remote = 1,
  2710. .has_radio = 1,
  2711. },
  2712. /* ---- card 0x8a ---------------------------------- */
  2713. [BTTV_BOARD_PV_BT878P_2E] = {
  2714. .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
  2715. .video_inputs = 5,
  2716. .audio_inputs = 1,
  2717. .tuner = 0,
  2718. .svhs = 3,
  2719. .gpiomask = 0x01fe00,
  2720. .muxsel = { 2,3,1,1,-1 },
  2721. .digital_mode = DIGITAL_MODE_CAMERA,
  2722. .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
  2723. .gpiomute = 0x12400,
  2724. .no_msp34xx = 1,
  2725. .pll = PLL_28,
  2726. .tuner_type = TUNER_LG_PAL_FM,
  2727. .tuner_addr = ADDR_UNSET,
  2728. .radio_addr = ADDR_UNSET,
  2729. .has_remote = 1,
  2730. },
  2731. /* ---- card 0x8b ---------------------------------- */
  2732. [BTTV_BOARD_PV_M4900] = {
  2733. /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
  2734. .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
  2735. .video_inputs = 3,
  2736. .audio_inputs = 1,
  2737. .tuner = 0,
  2738. .svhs = 2,
  2739. .gpiomask = 0x3f,
  2740. .muxsel = { 2, 3, 1, 1 },
  2741. .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
  2742. .gpiomute = 0x29,
  2743. .no_msp34xx = 1,
  2744. .pll = PLL_28,
  2745. .tuner_type = TUNER_YMEC_TVF_5533MF,
  2746. .tuner_addr = ADDR_UNSET,
  2747. .radio_addr = ADDR_UNSET,
  2748. .has_radio = 1,
  2749. .has_remote = 1,
  2750. },
  2751. /* ---- card 0x8c ---------------------------------- */
  2752. /* Has four Bt878 chips behind a PCI bridge, each chip has:
  2753. one external BNC composite input (mux 2)
  2754. three internal composite inputs (unknown muxes)
  2755. an 18-bit stereo A/D (CS5331A), which has:
  2756. one external stereo unblanced (RCA) audio connection
  2757. one (or 3?) internal stereo balanced (XLR) audio connection
  2758. input is selected via gpio to a 14052B mux
  2759. (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
  2760. gain is controlled via an X9221A chip on the I2C bus @0x28
  2761. sample rate is controlled via gpio to an MK1413S
  2762. (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
  2763. There is neither a tuner nor an svideo input. */
  2764. [BTTV_BOARD_OSPREY440] = {
  2765. .name = "Osprey 440",
  2766. .video_inputs = 4,
  2767. .audio_inputs = 2, /* this is meaningless */
  2768. .tuner = UNSET,
  2769. .svhs = UNSET,
  2770. .muxsel = { 2, 3, 0, 1 }, /* 3,0,1 are guesses */
  2771. .gpiomask = 0x303,
  2772. .gpiomute = 0x000, /* int + 32kHz */
  2773. .gpiomux = { 0, 0, 0x000, 0x100},
  2774. .pll = PLL_28,
  2775. .tuner_type = UNSET,
  2776. .tuner_addr = ADDR_UNSET,
  2777. .radio_addr = ADDR_UNSET,
  2778. .no_msp34xx = 1,
  2779. .no_tda9875 = 1,
  2780. .no_tda7432 = 1,
  2781. },
  2782. /* ---- card 0x8d ---------------------------------- */
  2783. [BTTV_BOARD_ASOUND_SKYEYE] = {
  2784. .name = "Asound Skyeye PCTV",
  2785. .video_inputs = 3,
  2786. .audio_inputs = 1,
  2787. .tuner = 0,
  2788. .svhs = 2,
  2789. .gpiomask = 15,
  2790. .muxsel = { 2, 3, 1, 1 },
  2791. .gpiomux = { 2, 0, 0, 0 },
  2792. .gpiomute = 1,
  2793. .needs_tvaudio = 1,
  2794. .pll = PLL_28,
  2795. .tuner_type = TUNER_PHILIPS_NTSC,
  2796. .tuner_addr = ADDR_UNSET,
  2797. .radio_addr = ADDR_UNSET,
  2798. },
  2799. /* ---- card 0x8e ---------------------------------- */
  2800. [BTTV_BOARD_SABRENT_TVFM] = {
  2801. .name = "Sabrent TV-FM (bttv version)",
  2802. .video_inputs = 3,
  2803. .audio_inputs = 1,
  2804. .tuner = 0,
  2805. .svhs = 2,
  2806. .gpiomask = 0x108007,
  2807. .muxsel = { 2, 3, 1, 1 },
  2808. .gpiomux = { 100000, 100002, 100002, 100000 },
  2809. .no_msp34xx = 1,
  2810. .no_tda9875 = 1,
  2811. .no_tda7432 = 1,
  2812. .pll = PLL_28,
  2813. .tuner_type = TUNER_TNF_5335MF,
  2814. .tuner_addr = ADDR_UNSET,
  2815. .has_radio = 1,
  2816. },
  2817. /* ---- card 0x8f ---------------------------------- */
  2818. [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
  2819. .name = "Hauppauge ImpactVCB (bt878)",
  2820. .video_inputs = 4,
  2821. .audio_inputs = 0,
  2822. .tuner = UNSET,
  2823. .svhs = UNSET,
  2824. .gpiomask = 0x0f, /* old: 7 */
  2825. .muxsel = { 0, 1, 3, 2 }, /* Composite 0-3 */
  2826. .no_msp34xx = 1,
  2827. .no_tda9875 = 1,
  2828. .no_tda7432 = 1,
  2829. .tuner_type = UNSET,
  2830. .tuner_addr = ADDR_UNSET,
  2831. .radio_addr = ADDR_UNSET,
  2832. },
  2833. [BTTV_BOARD_MACHTV_MAGICTV] = {
  2834. /* Julian Calaby <julian.calaby@gmail.com>
  2835. * Slightly different from original MachTV definition (0x60)
  2836. * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
  2837. * stuffs up remote chip. Bug is a pin on the jaecs is not set
  2838. * properly (methinks) causing no keyup bits being set */
  2839. .name = "MagicTV", /* rebranded MachTV */
  2840. .video_inputs = 3,
  2841. .audio_inputs = 1,
  2842. .tuner = 0,
  2843. .svhs = 2,
  2844. .gpiomask = 7,
  2845. .muxsel = { 2, 3, 1, 1 },
  2846. .gpiomux = { 0, 1, 2, 3 },
  2847. .gpiomute = 4,
  2848. .tuner_type = TUNER_TEMIC_4009FR5_PAL,
  2849. .tuner_addr = ADDR_UNSET,
  2850. .radio_addr = ADDR_UNSET,
  2851. .pll = PLL_28,
  2852. .has_radio = 1,
  2853. .has_remote = 1,
  2854. },
  2855. [BTTV_BOARD_SSAI_SECURITY] = {
  2856. .name = "SSAI Security Video Interface",
  2857. .video_inputs = 4,
  2858. .audio_inputs = 0,
  2859. .tuner = UNSET,
  2860. .svhs = UNSET,
  2861. .muxsel = { 0, 1, 2, 3 },
  2862. .tuner_type = UNSET,
  2863. .tuner_addr = ADDR_UNSET,
  2864. .radio_addr = ADDR_UNSET,
  2865. },
  2866. [BTTV_BOARD_SSAI_ULTRASOUND] = {
  2867. .name = "SSAI Ultrasound Video Interface",
  2868. .video_inputs = 2,
  2869. .audio_inputs = 0,
  2870. .tuner = UNSET,
  2871. .svhs = 1,
  2872. .muxsel = { 2, 0, 1, 3 },
  2873. .tuner_type = UNSET,
  2874. .tuner_addr = ADDR_UNSET,
  2875. .radio_addr = ADDR_UNSET,
  2876. },
  2877. /* ---- card 0x94---------------------------------- */
  2878. [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
  2879. .name = "DViCO FusionHDTV 2",
  2880. .tuner = 0,
  2881. .tuner_type = TUNER_PHILIPS_FCV1236D,
  2882. .tuner_addr = ADDR_UNSET,
  2883. .radio_addr = ADDR_UNSET,
  2884. .video_inputs = 3,
  2885. .audio_inputs = 1,
  2886. .svhs = 2,
  2887. .muxsel = { 2, 3, 1 },
  2888. .gpiomask = 0x00e00007,
  2889. .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
  2890. .gpiomute = 0x00c00007,
  2891. .no_msp34xx = 1,
  2892. .no_tda9875 = 1,
  2893. .no_tda7432 = 1,
  2894. },
  2895. /* ---- card 0x95---------------------------------- */
  2896. [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
  2897. .name = "Typhoon TV-Tuner PCI (50684)",
  2898. .video_inputs = 3,
  2899. .audio_inputs = 1,
  2900. .tuner = 0,
  2901. .svhs = 2,
  2902. .gpiomask = 0x3014f,
  2903. .muxsel = { 2, 3, 1, 1 },
  2904. .gpiomux = { 0x20001,0x10001, 0, 0 },
  2905. .gpiomute = 10,
  2906. .needs_tvaudio = 1,
  2907. .pll = PLL_28,
  2908. .tuner_type = TUNER_PHILIPS_PAL_I,
  2909. .tuner_addr = ADDR_UNSET,
  2910. .radio_addr = ADDR_UNSET,
  2911. },
  2912. [BTTV_BOARD_GEOVISION_GV600] = {
  2913. /* emhn@usb.ve */
  2914. .name = "Geovision GV-600",
  2915. .video_inputs = 16,
  2916. .audio_inputs = 0,
  2917. .tuner = UNSET,
  2918. .svhs = UNSET,
  2919. .gpiomask = 0x0,
  2920. .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
  2921. 2, 2, 2, 2, 2, 2, 2, 2 },
  2922. .muxsel_hook = geovision_muxsel,
  2923. .gpiomux = { 0 },
  2924. .no_msp34xx = 1,
  2925. .pll = PLL_28,
  2926. .tuner_type = UNSET,
  2927. .tuner_addr = ADDR_UNSET,
  2928. .radio_addr = ADDR_UNSET,
  2929. },
  2930. [BTTV_BOARD_KOZUMI_KTV_01C] = {
  2931. /* Mauro Lacy <mauro@lacy.com.ar>
  2932. * Based on MagicTV and Conceptronic CONTVFMi */
  2933. .name = "Kozumi KTV-01C",
  2934. .video_inputs = 3,
  2935. .audio_inputs = 1,
  2936. .tuner = 0,
  2937. .svhs = 2,
  2938. .gpiomask = 0x008007,
  2939. .muxsel = { 2, 3, 1, 1 },
  2940. .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
  2941. .gpiomute = 3, /* CONTVFMi */
  2942. .needs_tvaudio = 0,
  2943. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
  2944. .tuner_addr = ADDR_UNSET,
  2945. .radio_addr = ADDR_UNSET,
  2946. .pll = PLL_28,
  2947. .has_radio = 1,
  2948. .has_remote = 1,
  2949. },
  2950. };
  2951. static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
  2952. /* ----------------------------------------------------------------------- */
  2953. static unsigned char eeprom_data[256];
  2954. /*
  2955. * identify card
  2956. */
  2957. void __devinit bttv_idcard(struct bttv *btv)
  2958. {
  2959. unsigned int gpiobits;
  2960. int i,type;
  2961. unsigned short tmp;
  2962. /* read PCI subsystem ID */
  2963. pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
  2964. btv->cardid = tmp << 16;
  2965. pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
  2966. btv->cardid |= tmp;
  2967. if (0 != btv->cardid && 0xffffffff != btv->cardid) {
  2968. /* look for the card */
  2969. for (type = -1, i = 0; cards[i].id != 0; i++)
  2970. if (cards[i].id == btv->cardid)
  2971. type = i;
  2972. if (type != -1) {
  2973. /* found it */
  2974. printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
  2975. "PCI subsystem ID is %04x:%04x\n",
  2976. btv->c.nr,cards[type].name,cards[type].cardnr,
  2977. btv->cardid & 0xffff,
  2978. (btv->cardid >> 16) & 0xffff);
  2979. btv->c.type = cards[type].cardnr;
  2980. } else {
  2981. /* 404 */
  2982. printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
  2983. btv->c.nr, btv->cardid & 0xffff,
  2984. (btv->cardid >> 16) & 0xffff);
  2985. printk(KERN_DEBUG "please mail id, board name and "
  2986. "the correct card= insmod option to video4linux-list@redhat.com\n");
  2987. }
  2988. }
  2989. /* let the user override the autodetected type */
  2990. if (card[btv->c.nr] < bttv_num_tvcards)
  2991. btv->c.type=card[btv->c.nr];
  2992. /* print which card config we are using */
  2993. printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
  2994. bttv_tvcards[btv->c.type].name, btv->c.type,
  2995. card[btv->c.nr] < bttv_num_tvcards
  2996. ? "insmod option" : "autodetected");
  2997. /* overwrite gpio stuff ?? */
  2998. if (UNSET == audioall && UNSET == audiomux[0])
  2999. return;
  3000. if (UNSET != audiomux[0]) {
  3001. gpiobits = 0;
  3002. for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
  3003. bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
  3004. gpiobits |= audiomux[i];
  3005. }
  3006. } else {
  3007. gpiobits = audioall;
  3008. for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
  3009. bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
  3010. }
  3011. }
  3012. bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
  3013. printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
  3014. btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
  3015. for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
  3016. printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
  3017. }
  3018. printk("\n");
  3019. }
  3020. /*
  3021. * (most) board specific initialisations goes here
  3022. */
  3023. /* Some Modular Technology cards have an eeprom, but no subsystem ID */
  3024. static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
  3025. {
  3026. int type = -1;
  3027. if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
  3028. type = BTTV_BOARD_MODTEC_205;
  3029. else if (0 == strncmp(eeprom_data+20,"Picolo",7))
  3030. type = BTTV_BOARD_EURESYS_PICOLO;
  3031. else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
  3032. type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
  3033. if (-1 != type) {
  3034. btv->c.type = type;
  3035. printk("bttv%d: detected by eeprom: %s [card=%d]\n",
  3036. btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
  3037. }
  3038. }
  3039. static void flyvideo_gpio(struct bttv *btv)
  3040. {
  3041. int gpio,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821;
  3042. int tuner=UNSET,ttype;
  3043. gpio_inout(0xffffff, 0);
  3044. udelay(8); /* without this we would see the 0x1800 mask */
  3045. gpio = gpio_read();
  3046. /* FIXME: must restore OUR_EN ??? */
  3047. /* all cards provide GPIO info, some have an additional eeprom
  3048. * LR50: GPIO coding can be found lower right CP1 .. CP9
  3049. * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
  3050. * GPIO14-12: n.c.
  3051. * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
  3052. * lowest 3 bytes are remote control codes (no handshake needed)
  3053. * xxxFFF: No remote control chip soldered
  3054. * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
  3055. * Note: Some bits are Audio_Mask !
  3056. */
  3057. ttype=(gpio&0x0f0000)>>16;
  3058. switch(ttype) {
  3059. case 0x0: tuner=2; /* NTSC, e.g. TPI8NSR11P */
  3060. break;
  3061. case 0x2: tuner=39;/* LG NTSC (newer TAPC series) TAPC-H701P */
  3062. break;
  3063. case 0x4: tuner=5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
  3064. break;
  3065. case 0x6: tuner=37;/* LG PAL (newer TAPC series) TAPC-G702P */
  3066. break;
  3067. case 0xC: tuner=3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
  3068. break;
  3069. default:
  3070. printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
  3071. }
  3072. has_remote = gpio & 0x800000;
  3073. has_radio = gpio & 0x400000;
  3074. /* unknown 0x200000;
  3075. * unknown2 0x100000; */
  3076. is_capture_only = !(gpio & 0x008000); /* GPIO15 */
  3077. has_tda9820_tda9821 = !(gpio & 0x004000);
  3078. is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
  3079. /*
  3080. * gpio & 0x001000 output bit for audio routing */
  3081. if(is_capture_only)
  3082. tuner = TUNER_ABSENT; /* No tuner present */
  3083. printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
  3084. btv->c.nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio);
  3085. printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
  3086. btv->c.nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ",
  3087. is_capture_only?"yes":"no ");
  3088. if (tuner != UNSET) /* only set if known tuner autodetected, else let insmod option through */
  3089. btv->tuner_type = tuner;
  3090. btv->has_radio = has_radio;
  3091. /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
  3092. * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
  3093. * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
  3094. if(has_tda9820_tda9821) btv->audio_mode_gpio = lt9415_audio;
  3095. /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
  3096. }
  3097. static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
  3098. 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
  3099. static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
  3100. 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
  3101. static void miro_pinnacle_gpio(struct bttv *btv)
  3102. {
  3103. int id,msp,gpio;
  3104. char *info;
  3105. gpio_inout(0xffffff, 0);
  3106. gpio = gpio_read();
  3107. id = ((gpio>>10) & 63) -1;
  3108. msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
  3109. if (id < 32) {
  3110. btv->tuner_type = miro_tunermap[id];
  3111. if (0 == (gpio & 0x20)) {
  3112. btv->has_radio = 1;
  3113. if (!miro_fmtuner[id]) {
  3114. btv->has_matchbox = 1;
  3115. btv->mbox_we = (1<<6);
  3116. btv->mbox_most = (1<<7);
  3117. btv->mbox_clk = (1<<8);
  3118. btv->mbox_data = (1<<9);
  3119. btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
  3120. }
  3121. } else {
  3122. btv->has_radio = 0;
  3123. }
  3124. if (-1 != msp) {
  3125. if (btv->c.type == BTTV_BOARD_MIRO)
  3126. btv->c.type = BTTV_BOARD_MIROPRO;
  3127. if (btv->c.type == BTTV_BOARD_PINNACLE)
  3128. btv->c.type = BTTV_BOARD_PINNACLEPRO;
  3129. }
  3130. printk(KERN_INFO
  3131. "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
  3132. btv->c.nr, id+1, btv->tuner_type,
  3133. !btv->has_radio ? "no" :
  3134. (btv->has_matchbox ? "matchbox" : "fmtuner"),
  3135. (-1 == msp) ? "no" : "yes");
  3136. } else {
  3137. /* new cards with microtune tuner */
  3138. id = 63 - id;
  3139. btv->has_radio = 0;
  3140. switch (id) {
  3141. case 1:
  3142. info = "PAL / mono";
  3143. btv->tda9887_conf = TDA9887_INTERCARRIER;
  3144. break;
  3145. case 2:
  3146. info = "PAL+SECAM / stereo";
  3147. btv->has_radio = 1;
  3148. btv->tda9887_conf = TDA9887_QSS;
  3149. break;
  3150. case 3:
  3151. info = "NTSC / stereo";
  3152. btv->has_radio = 1;
  3153. btv->tda9887_conf = TDA9887_QSS;
  3154. break;
  3155. case 4:
  3156. info = "PAL+SECAM / mono";
  3157. btv->tda9887_conf = TDA9887_QSS;
  3158. break;
  3159. case 5:
  3160. info = "NTSC / mono";
  3161. btv->tda9887_conf = TDA9887_INTERCARRIER;
  3162. break;
  3163. case 6:
  3164. info = "NTSC / stereo";
  3165. btv->tda9887_conf = TDA9887_INTERCARRIER;
  3166. break;
  3167. case 7:
  3168. info = "PAL / stereo";
  3169. btv->tda9887_conf = TDA9887_INTERCARRIER;
  3170. break;
  3171. default:
  3172. info = "oops: unknown card";
  3173. break;
  3174. }
  3175. if (-1 != msp)
  3176. btv->c.type = BTTV_BOARD_PINNACLEPRO;
  3177. printk(KERN_INFO
  3178. "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
  3179. btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
  3180. btv->tuner_type = TUNER_MT2032;
  3181. }
  3182. }
  3183. /* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
  3184. #define LM1882_SYNC_DRIVE 0x200000L
  3185. static void init_ids_eagle(struct bttv *btv)
  3186. {
  3187. gpio_inout(0xffffff,0xFFFF37);
  3188. gpio_write(0x200020);
  3189. /* flash strobe inverter ?! */
  3190. gpio_write(0x200024);
  3191. /* switch sync drive off */
  3192. gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
  3193. /* set BT848 muxel to 2 */
  3194. btaor((2)<<5, ~(2<<5), BT848_IFORM);
  3195. }
  3196. /* Muxsel helper for the IDS Eagle.
  3197. * the eagles does not use the standard muxsel-bits but
  3198. * has its own multiplexer */
  3199. static void eagle_muxsel(struct bttv *btv, unsigned int input)
  3200. {
  3201. btaor((2)<<5, ~(3<<5), BT848_IFORM);
  3202. gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]);
  3203. /* composite */
  3204. /* set chroma ADC to sleep */
  3205. btor(BT848_ADC_C_SLEEP, BT848_ADC);
  3206. /* set to composite video */
  3207. btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
  3208. btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
  3209. /* switch sync drive off */
  3210. gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
  3211. }
  3212. static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
  3213. {
  3214. static const int masks[] = {0x30, 0x01, 0x12, 0x23};
  3215. gpio_write(masks[input%4]);
  3216. }
  3217. /* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
  3218. alarms output
  3219. GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
  3220. assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
  3221. IN - sensor inputs, INx - sensor inputs and TI XORed together
  3222. O1,O2,O3 - alarm outputs (relays)
  3223. OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
  3224. */
  3225. static void init_lmlbt4x(struct bttv *btv)
  3226. {
  3227. printk(KERN_DEBUG "LMLBT4x init\n");
  3228. btwrite(0x000000, BT848_GPIO_REG_INP);
  3229. gpio_inout(0xffffff, 0x0006C0);
  3230. gpio_write(0x000000);
  3231. }
  3232. static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
  3233. {
  3234. unsigned int inmux = input % 8;
  3235. gpio_inout( 0xf, 0xf );
  3236. gpio_bits( 0xf, inmux );
  3237. }
  3238. static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
  3239. {
  3240. unsigned int inmux = input % 4;
  3241. gpio_inout( 3<<9, 3<<9 );
  3242. gpio_bits( 3<<9, inmux<<9 );
  3243. }
  3244. static void geovision_muxsel(struct bttv *btv, unsigned int input)
  3245. {
  3246. unsigned int inmux = input % 16;
  3247. gpio_inout(0xf, 0xf);
  3248. gpio_bits(0xf, inmux);
  3249. }
  3250. /* ----------------------------------------------------------------------- */
  3251. static void bttv_reset_audio(struct bttv *btv)
  3252. {
  3253. /*
  3254. * BT878A has a audio-reset register.
  3255. * 1. This register is an audio reset function but it is in
  3256. * function-0 (video capture) address space.
  3257. * 2. It is enough to do this once per power-up of the card.
  3258. * 3. There is a typo in the Conexant doc -- it is not at
  3259. * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
  3260. * --//Shrikumar 030609
  3261. */
  3262. if (btv->id != 878)
  3263. return;
  3264. if (bttv_debug)
  3265. printk("bttv%d: BT878A ARESET\n",btv->c.nr);
  3266. btwrite((1<<7), 0x058);
  3267. udelay(10);
  3268. btwrite( 0, 0x058);
  3269. }
  3270. /* initialization part one -- before registering i2c bus */
  3271. void __devinit bttv_init_card1(struct bttv *btv)
  3272. {
  3273. switch (btv->c.type) {
  3274. case BTTV_BOARD_HAUPPAUGE:
  3275. case BTTV_BOARD_HAUPPAUGE878:
  3276. boot_msp34xx(btv,5);
  3277. break;
  3278. case BTTV_BOARD_VOODOOTV_200:
  3279. case BTTV_BOARD_VOODOOTV_FM:
  3280. boot_msp34xx(btv,20);
  3281. break;
  3282. case BTTV_BOARD_AVERMEDIA98:
  3283. boot_msp34xx(btv,11);
  3284. break;
  3285. case BTTV_BOARD_HAUPPAUGEPVR:
  3286. pvr_boot(btv);
  3287. break;
  3288. case BTTV_BOARD_TWINHAN_DST:
  3289. case BTTV_BOARD_AVDVBT_771:
  3290. case BTTV_BOARD_PINNACLESAT:
  3291. btv->use_i2c_hw = 1;
  3292. break;
  3293. case BTTV_BOARD_ADLINK_RTV24:
  3294. init_RTV24( btv );
  3295. break;
  3296. }
  3297. if (!bttv_tvcards[btv->c.type].has_dvb)
  3298. bttv_reset_audio(btv);
  3299. }
  3300. /* initialization part two -- after registering i2c bus */
  3301. void __devinit bttv_init_card2(struct bttv *btv)
  3302. {
  3303. int addr=ADDR_UNSET;
  3304. btv->tuner_type = UNSET;
  3305. if (BTTV_BOARD_UNKNOWN == btv->c.type) {
  3306. bttv_readee(btv,eeprom_data,0xa0);
  3307. identify_by_eeprom(btv,eeprom_data);
  3308. }
  3309. switch (btv->c.type) {
  3310. case BTTV_BOARD_MIRO:
  3311. case BTTV_BOARD_MIROPRO:
  3312. case BTTV_BOARD_PINNACLE:
  3313. case BTTV_BOARD_PINNACLEPRO:
  3314. /* miro/pinnacle */
  3315. miro_pinnacle_gpio(btv);
  3316. break;
  3317. case BTTV_BOARD_FLYVIDEO_98:
  3318. case BTTV_BOARD_MAXI:
  3319. case BTTV_BOARD_LIFE_FLYKIT:
  3320. case BTTV_BOARD_FLYVIDEO:
  3321. case BTTV_BOARD_TYPHOON_TVIEW:
  3322. case BTTV_BOARD_CHRONOS_VS2:
  3323. case BTTV_BOARD_FLYVIDEO_98FM:
  3324. case BTTV_BOARD_FLYVIDEO2000:
  3325. case BTTV_BOARD_FLYVIDEO98EZ:
  3326. case BTTV_BOARD_CONFERENCETV:
  3327. case BTTV_BOARD_LIFETEC_9415:
  3328. flyvideo_gpio(btv);
  3329. break;
  3330. case BTTV_BOARD_HAUPPAUGE:
  3331. case BTTV_BOARD_HAUPPAUGE878:
  3332. case BTTV_BOARD_HAUPPAUGEPVR:
  3333. /* pick up some config infos from the eeprom */
  3334. bttv_readee(btv,eeprom_data,0xa0);
  3335. hauppauge_eeprom(btv);
  3336. break;
  3337. case BTTV_BOARD_AVERMEDIA98:
  3338. case BTTV_BOARD_AVPHONE98:
  3339. bttv_readee(btv,eeprom_data,0xa0);
  3340. avermedia_eeprom(btv);
  3341. break;
  3342. case BTTV_BOARD_PXC200:
  3343. init_PXC200(btv);
  3344. break;
  3345. case BTTV_BOARD_PICOLO_TETRA_CHIP:
  3346. picolo_tetra_init(btv);
  3347. break;
  3348. case BTTV_BOARD_VHX:
  3349. btv->has_radio = 1;
  3350. btv->has_matchbox = 1;
  3351. btv->mbox_we = 0x20;
  3352. btv->mbox_most = 0;
  3353. btv->mbox_clk = 0x08;
  3354. btv->mbox_data = 0x10;
  3355. btv->mbox_mask = 0x38;
  3356. break;
  3357. case BTTV_BOARD_VOBIS_BOOSTAR:
  3358. case BTTV_BOARD_TERRATV:
  3359. terratec_active_radio_upgrade(btv);
  3360. break;
  3361. case BTTV_BOARD_MAGICTVIEW061:
  3362. if (btv->cardid == 0x3002144f) {
  3363. btv->has_radio=1;
  3364. printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
  3365. }
  3366. break;
  3367. case BTTV_BOARD_STB2:
  3368. if (btv->cardid == 0x3060121a) {
  3369. /* Fix up entry for 3DFX VoodooTV 100,
  3370. which is an OEM STB card variant. */
  3371. btv->has_radio=0;
  3372. btv->tuner_type=TUNER_TEMIC_NTSC;
  3373. }
  3374. break;
  3375. case BTTV_BOARD_OSPREY1x0:
  3376. case BTTV_BOARD_OSPREY1x0_848:
  3377. case BTTV_BOARD_OSPREY101_848:
  3378. case BTTV_BOARD_OSPREY1x1:
  3379. case BTTV_BOARD_OSPREY1x1_SVID:
  3380. case BTTV_BOARD_OSPREY2xx:
  3381. case BTTV_BOARD_OSPREY2x0_SVID:
  3382. case BTTV_BOARD_OSPREY2x0:
  3383. case BTTV_BOARD_OSPREY440:
  3384. case BTTV_BOARD_OSPREY500:
  3385. case BTTV_BOARD_OSPREY540:
  3386. case BTTV_BOARD_OSPREY2000:
  3387. bttv_readee(btv,eeprom_data,0xa0);
  3388. osprey_eeprom(btv, eeprom_data);
  3389. break;
  3390. case BTTV_BOARD_IDS_EAGLE:
  3391. init_ids_eagle(btv);
  3392. break;
  3393. case BTTV_BOARD_MODTEC_205:
  3394. bttv_readee(btv,eeprom_data,0xa0);
  3395. modtec_eeprom(btv);
  3396. break;
  3397. case BTTV_BOARD_LMLBT4:
  3398. init_lmlbt4x(btv);
  3399. break;
  3400. case BTTV_BOARD_TIBET_CS16:
  3401. tibetCS16_init(btv);
  3402. break;
  3403. case BTTV_BOARD_KODICOM_4400R:
  3404. kodicom4400r_init(btv);
  3405. break;
  3406. }
  3407. /* pll configuration */
  3408. if (!(btv->id==848 && btv->revision==0x11)) {
  3409. /* defaults from card list */
  3410. if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
  3411. btv->pll.pll_ifreq=28636363;
  3412. btv->pll.pll_crystal=BT848_IFORM_XT0;
  3413. }
  3414. if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
  3415. btv->pll.pll_ifreq=35468950;
  3416. btv->pll.pll_crystal=BT848_IFORM_XT1;
  3417. }
  3418. /* insmod options can override */
  3419. switch (pll[btv->c.nr]) {
  3420. case 0: /* none */
  3421. btv->pll.pll_crystal = 0;
  3422. btv->pll.pll_ifreq = 0;
  3423. btv->pll.pll_ofreq = 0;
  3424. break;
  3425. case 1: /* 28 MHz */
  3426. case 28:
  3427. btv->pll.pll_ifreq = 28636363;
  3428. btv->pll.pll_ofreq = 0;
  3429. btv->pll.pll_crystal = BT848_IFORM_XT0;
  3430. break;
  3431. case 2: /* 35 MHz */
  3432. case 35:
  3433. btv->pll.pll_ifreq = 35468950;
  3434. btv->pll.pll_ofreq = 0;
  3435. btv->pll.pll_crystal = BT848_IFORM_XT1;
  3436. break;
  3437. }
  3438. }
  3439. btv->pll.pll_current = -1;
  3440. /* tuner configuration (from card list / autodetect / insmod option) */
  3441. if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
  3442. addr = bttv_tvcards[btv->c.type].tuner_addr;
  3443. if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
  3444. if(UNSET == btv->tuner_type)
  3445. btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
  3446. if (UNSET != tuner[btv->c.nr])
  3447. btv->tuner_type = tuner[btv->c.nr];
  3448. if (btv->tuner_type == TUNER_ABSENT ||
  3449. bttv_tvcards[btv->c.type].tuner == UNSET)
  3450. printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
  3451. else if(btv->tuner_type == UNSET)
  3452. printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
  3453. else
  3454. printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
  3455. btv->tuner_type);
  3456. if (btv->tuner_type != UNSET) {
  3457. struct tuner_setup tun_setup;
  3458. tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
  3459. tun_setup.type = btv->tuner_type;
  3460. tun_setup.addr = addr;
  3461. bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
  3462. }
  3463. if (btv->tda9887_conf) {
  3464. struct v4l2_priv_tun_config tda9887_cfg;
  3465. tda9887_cfg.tuner = TUNER_TDA9887;
  3466. tda9887_cfg.priv = &btv->tda9887_conf;
  3467. bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
  3468. }
  3469. btv->svhs = bttv_tvcards[btv->c.type].svhs;
  3470. if (svhs[btv->c.nr] != UNSET)
  3471. btv->svhs = svhs[btv->c.nr];
  3472. if (remote[btv->c.nr] != UNSET)
  3473. btv->has_remote = remote[btv->c.nr];
  3474. if (bttv_tvcards[btv->c.type].has_radio)
  3475. btv->has_radio=1;
  3476. if (bttv_tvcards[btv->c.type].has_remote)
  3477. btv->has_remote=1;
  3478. if (!bttv_tvcards[btv->c.type].no_gpioirq)
  3479. btv->gpioirq=1;
  3480. if (bttv_tvcards[btv->c.type].volume_gpio)
  3481. btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
  3482. if (bttv_tvcards[btv->c.type].audio_mode_gpio)
  3483. btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
  3484. if (bttv_tvcards[btv->c.type].digital_mode == DIGITAL_MODE_CAMERA) {
  3485. /* detect Bt832 chip for quartzsight digital camera */
  3486. if ((bttv_I2CRead(btv, I2C_ADDR_BT832_ALT1, "Bt832") >=0) ||
  3487. (bttv_I2CRead(btv, I2C_ADDR_BT832_ALT2, "Bt832") >=0))
  3488. boot_bt832(btv);
  3489. }
  3490. if (!autoload)
  3491. return;
  3492. if (bttv_tvcards[btv->c.type].tuner == UNSET)
  3493. return; /* no tuner or related drivers to load */
  3494. /* try to detect audio/fader chips */
  3495. if (!bttv_tvcards[btv->c.type].no_msp34xx &&
  3496. bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
  3497. request_module("msp3400");
  3498. if (bttv_tvcards[btv->c.type].msp34xx_alt &&
  3499. bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
  3500. request_module("msp3400");
  3501. if (!bttv_tvcards[btv->c.type].no_tda9875 &&
  3502. bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
  3503. request_module("tda9875");
  3504. if (!bttv_tvcards[btv->c.type].no_tda7432 &&
  3505. bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
  3506. request_module("tda7432");
  3507. if (bttv_tvcards[btv->c.type].needs_tvaudio)
  3508. request_module("tvaudio");
  3509. if (btv->tuner_type != UNSET && btv->tuner_type != TUNER_ABSENT)
  3510. request_module("tuner");
  3511. }
  3512. /* ----------------------------------------------------------------------- */
  3513. static void modtec_eeprom(struct bttv *btv)
  3514. {
  3515. if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
  3516. btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
  3517. printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
  3518. btv->c.nr,&eeprom_data[0x1e]);
  3519. } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
  3520. btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
  3521. printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
  3522. btv->c.nr,&eeprom_data[0x1e]);
  3523. } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
  3524. btv->tuner_type=TUNER_PHILIPS_NTSC;
  3525. printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
  3526. btv->c.nr,&eeprom_data[0x1e]);
  3527. } else {
  3528. printk("bttv%d: Modtec: Unknown TunerString: %s\n",
  3529. btv->c.nr,&eeprom_data[0x1e]);
  3530. }
  3531. }
  3532. static void __devinit hauppauge_eeprom(struct bttv *btv)
  3533. {
  3534. struct tveeprom tv;
  3535. tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
  3536. btv->tuner_type = tv.tuner_type;
  3537. btv->has_radio = tv.has_radio;
  3538. printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
  3539. btv->c.nr, tv.model);
  3540. /*
  3541. * Some of the 878 boards have duplicate PCI IDs. Switch the board
  3542. * type based on model #.
  3543. */
  3544. if(tv.model == 64900) {
  3545. printk("bttv%d: Switching board type from %s to %s\n",
  3546. btv->c.nr,
  3547. bttv_tvcards[btv->c.type].name,
  3548. bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
  3549. btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
  3550. }
  3551. }
  3552. static int terratec_active_radio_upgrade(struct bttv *btv)
  3553. {
  3554. int freq;
  3555. btv->has_radio = 1;
  3556. btv->has_matchbox = 1;
  3557. btv->mbox_we = 0x10;
  3558. btv->mbox_most = 0x20;
  3559. btv->mbox_clk = 0x08;
  3560. btv->mbox_data = 0x04;
  3561. btv->mbox_mask = 0x3c;
  3562. btv->mbox_iow = 1 << 8;
  3563. btv->mbox_ior = 1 << 9;
  3564. btv->mbox_csel = 1 << 10;
  3565. freq=88000/62.5;
  3566. tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
  3567. if (0x1ed8 == tea5757_read(btv)) {
  3568. printk("bttv%d: Terratec Active Radio Upgrade found.\n",
  3569. btv->c.nr);
  3570. btv->has_radio = 1;
  3571. btv->has_matchbox = 1;
  3572. } else {
  3573. btv->has_radio = 0;
  3574. btv->has_matchbox = 0;
  3575. }
  3576. return 0;
  3577. }
  3578. /* ----------------------------------------------------------------------- */
  3579. /*
  3580. * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
  3581. *
  3582. * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
  3583. * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
  3584. * unpacked with unzip).
  3585. */
  3586. #define PVR_GPIO_DELAY 10
  3587. #define BTTV_ALT_DATA 0x000001
  3588. #define BTTV_ALT_DCLK 0x100000
  3589. #define BTTV_ALT_NCONFIG 0x800000
  3590. static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
  3591. {
  3592. u32 n;
  3593. u8 bits;
  3594. int i;
  3595. gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
  3596. gpio_write(0);
  3597. udelay(PVR_GPIO_DELAY);
  3598. gpio_write(BTTV_ALT_NCONFIG);
  3599. udelay(PVR_GPIO_DELAY);
  3600. for (n = 0; n < microlen; n++) {
  3601. bits = micro[n];
  3602. for (i = 0 ; i < 8 ; i++) {
  3603. gpio_bits(BTTV_ALT_DCLK,0);
  3604. if (bits & 0x01)
  3605. gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
  3606. else
  3607. gpio_bits(BTTV_ALT_DATA,0);
  3608. gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
  3609. bits >>= 1;
  3610. }
  3611. }
  3612. gpio_bits(BTTV_ALT_DCLK,0);
  3613. udelay(PVR_GPIO_DELAY);
  3614. /* begin Altera init loop (Not necessary,but doesn't hurt) */
  3615. for (i = 0 ; i < 30 ; i++) {
  3616. gpio_bits(BTTV_ALT_DCLK,0);
  3617. gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
  3618. }
  3619. gpio_bits(BTTV_ALT_DCLK,0);
  3620. return 0;
  3621. }
  3622. static int __devinit pvr_boot(struct bttv *btv)
  3623. {
  3624. const struct firmware *fw_entry;
  3625. int rc;
  3626. rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
  3627. if (rc != 0) {
  3628. printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
  3629. btv->c.nr);
  3630. return rc;
  3631. }
  3632. rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
  3633. printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
  3634. btv->c.nr, (rc < 0) ? "failed" : "ok");
  3635. release_firmware(fw_entry);
  3636. return rc;
  3637. }
  3638. /* ----------------------------------------------------------------------- */
  3639. /* some osprey specific stuff */
  3640. static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
  3641. {
  3642. int i;
  3643. u32 serial = 0;
  3644. int cardid = -1;
  3645. /* This code will nevery actually get called in this case.... */
  3646. if (btv->c.type == BTTV_BOARD_UNKNOWN) {
  3647. /* this might be an antique... check for MMAC label in eeprom */
  3648. if (!strncmp(ee, "MMAC", 4)) {
  3649. u8 checksum = 0;
  3650. for (i = 0; i < 21; i++)
  3651. checksum += ee[i];
  3652. if (checksum != ee[21])
  3653. return;
  3654. cardid = BTTV_BOARD_OSPREY1x0_848;
  3655. for (i = 12; i < 21; i++)
  3656. serial *= 10, serial += ee[i] - '0';
  3657. }
  3658. } else {
  3659. unsigned short type;
  3660. for (i = 4*16; i < 8*16; i += 16) {
  3661. u16 checksum = ip_compute_csum(ee + i, 16);
  3662. if ((checksum&0xff) + (checksum>>8) == 0xff)
  3663. break;
  3664. }
  3665. if (i >= 8*16)
  3666. return;
  3667. ee += i;
  3668. /* found a valid descriptor */
  3669. type = get_unaligned_be16((__be16 *)(ee+4));
  3670. switch(type) {
  3671. /* 848 based */
  3672. case 0x0004:
  3673. cardid = BTTV_BOARD_OSPREY1x0_848;
  3674. break;
  3675. case 0x0005:
  3676. cardid = BTTV_BOARD_OSPREY101_848;
  3677. break;
  3678. /* 878 based */
  3679. case 0x0012:
  3680. case 0x0013:
  3681. cardid = BTTV_BOARD_OSPREY1x0;
  3682. break;
  3683. case 0x0014:
  3684. case 0x0015:
  3685. cardid = BTTV_BOARD_OSPREY1x1;
  3686. break;
  3687. case 0x0016:
  3688. case 0x0017:
  3689. case 0x0020:
  3690. cardid = BTTV_BOARD_OSPREY1x1_SVID;
  3691. break;
  3692. case 0x0018:
  3693. case 0x0019:
  3694. case 0x001E:
  3695. case 0x001F:
  3696. cardid = BTTV_BOARD_OSPREY2xx;
  3697. break;
  3698. case 0x001A:
  3699. case 0x001B:
  3700. cardid = BTTV_BOARD_OSPREY2x0_SVID;
  3701. break;
  3702. case 0x0040:
  3703. cardid = BTTV_BOARD_OSPREY500;
  3704. break;
  3705. case 0x0050:
  3706. case 0x0056:
  3707. cardid = BTTV_BOARD_OSPREY540;
  3708. /* bttv_osprey_540_init(btv); */
  3709. break;
  3710. case 0x0060:
  3711. case 0x0070:
  3712. case 0x00A0:
  3713. cardid = BTTV_BOARD_OSPREY2x0;
  3714. /* enable output on select control lines */
  3715. gpio_inout(0xffffff,0x000303);
  3716. break;
  3717. case 0x00D8:
  3718. cardid = BTTV_BOARD_OSPREY440;
  3719. break;
  3720. default:
  3721. /* unknown...leave generic, but get serial # */
  3722. printk(KERN_INFO "bttv%d: "
  3723. "osprey eeprom: unknown card type 0x%04x\n",
  3724. btv->c.nr, type);
  3725. break;
  3726. }
  3727. serial = get_unaligned_be32((__be32 *)(ee+6));
  3728. }
  3729. printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
  3730. btv->c.nr, cardid,
  3731. cardid>0 ? bttv_tvcards[cardid].name : "Unknown", serial);
  3732. if (cardid<0 || btv->c.type == cardid)
  3733. return;
  3734. /* card type isn't set correctly */
  3735. if (card[btv->c.nr] < bttv_num_tvcards) {
  3736. printk(KERN_WARNING "bttv%d: osprey eeprom: "
  3737. "Not overriding user specified card type\n", btv->c.nr);
  3738. } else {
  3739. printk(KERN_INFO "bttv%d: osprey eeprom: "
  3740. "Changing card type from %d to %d\n", btv->c.nr,
  3741. btv->c.type, cardid);
  3742. btv->c.type = cardid;
  3743. }
  3744. }
  3745. /* ----------------------------------------------------------------------- */
  3746. /* AVermedia specific stuff, from bktr_card.c */
  3747. static int tuner_0_table[] = {
  3748. TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
  3749. TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
  3750. TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
  3751. TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
  3752. TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
  3753. TUNER_PHILIPS_FM1216ME_MK3 };
  3754. static int tuner_1_table[] = {
  3755. TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
  3756. TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
  3757. TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
  3758. TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
  3759. TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
  3760. static void __devinit avermedia_eeprom(struct bttv *btv)
  3761. {
  3762. int tuner_make,tuner_tv_fm,tuner_format,tuner=0;
  3763. tuner_make = (eeprom_data[0x41] & 0x7);
  3764. tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
  3765. tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
  3766. btv->has_remote = (eeprom_data[0x42] & 0x01);
  3767. if (tuner_make == 0 || tuner_make == 2)
  3768. if(tuner_format <=0x0a)
  3769. tuner = tuner_0_table[tuner_format];
  3770. if (tuner_make == 1)
  3771. if(tuner_format <=9)
  3772. tuner = tuner_1_table[tuner_format];
  3773. if (tuner_make == 4)
  3774. if(tuner_format == 0x09)
  3775. tuner = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
  3776. printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
  3777. btv->c.nr,eeprom_data[0x41],eeprom_data[0x42]);
  3778. if(tuner) {
  3779. btv->tuner_type=tuner;
  3780. printk("%d",tuner);
  3781. } else
  3782. printk("Unknown type");
  3783. printk(" radio:%s remote control:%s\n",
  3784. tuner_tv_fm ? "yes" : "no",
  3785. btv->has_remote ? "yes" : "no");
  3786. }
  3787. /* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */
  3788. void bttv_tda9880_setnorm(struct bttv *btv, int norm)
  3789. {
  3790. /* fix up our card entry */
  3791. if(norm==V4L2_STD_NTSC) {
  3792. bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
  3793. bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x957fff;
  3794. bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
  3795. bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x957fff;
  3796. dprintk("bttv_tda9880_setnorm to NTSC\n");
  3797. }
  3798. else {
  3799. bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
  3800. bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x947fff;
  3801. bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
  3802. bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x947fff;
  3803. dprintk("bttv_tda9880_setnorm to PAL\n");
  3804. }
  3805. /* set GPIO according */
  3806. gpio_bits(bttv_tvcards[btv->c.type].gpiomask,
  3807. bttv_tvcards[btv->c.type].gpiomux[btv->audio]);
  3808. }
  3809. /*
  3810. * reset/enable the MSP on some Hauppauge cards
  3811. * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
  3812. *
  3813. * Hauppauge: pin 5
  3814. * Voodoo: pin 20
  3815. */
  3816. static void __devinit boot_msp34xx(struct bttv *btv, int pin)
  3817. {
  3818. int mask = (1 << pin);
  3819. gpio_inout(mask,mask);
  3820. gpio_bits(mask,0);
  3821. udelay(2500);
  3822. gpio_bits(mask,mask);
  3823. if (bttv_gpio)
  3824. bttv_gpio_tracking(btv,"msp34xx");
  3825. if (bttv_verbose)
  3826. printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
  3827. "init [%d]\n", btv->c.nr, pin);
  3828. }
  3829. static void __devinit boot_bt832(struct bttv *btv)
  3830. {
  3831. }
  3832. /* ----------------------------------------------------------------------- */
  3833. /* Imagenation L-Model PXC200 Framegrabber */
  3834. /* This is basically the same procedure as
  3835. * used by Alessandro Rubini in his pxc200
  3836. * driver, but using BTTV functions */
  3837. static void __devinit init_PXC200(struct bttv *btv)
  3838. {
  3839. static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
  3840. 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
  3841. 0x00 };
  3842. unsigned int i;
  3843. int tmp;
  3844. u32 val;
  3845. /* Initialise GPIO-connevted stuff */
  3846. gpio_inout(0xffffff, (1<<13));
  3847. gpio_write(0);
  3848. udelay(3);
  3849. gpio_write(1<<13);
  3850. /* GPIO inputs are pulled up, so no need to drive
  3851. * reset pin any longer */
  3852. gpio_bits(0xffffff, 0);
  3853. if (bttv_gpio)
  3854. bttv_gpio_tracking(btv,"pxc200");
  3855. /* we could/should try and reset/control the AD pots? but
  3856. right now we simply turned off the crushing. Without
  3857. this the AGC drifts drifts
  3858. remember the EN is reverse logic -->
  3859. setting BT848_ADC_AGC_EN disable the AGC
  3860. tboult@eecs.lehigh.edu
  3861. */
  3862. btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
  3863. /* Initialise MAX517 DAC */
  3864. printk(KERN_INFO "Setting DAC reference voltage level ...\n");
  3865. bttv_I2CWrite(btv,0x5E,0,0x80,1);
  3866. /* Initialise 12C508 PIC */
  3867. /* The I2CWrite and I2CRead commmands are actually to the
  3868. * same chips - but the R/W bit is included in the address
  3869. * argument so the numbers are different */
  3870. printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
  3871. /* First of all, enable the clock line. This is used in the PXC200-F */
  3872. val = btread(BT848_GPIO_DMA_CTL);
  3873. val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
  3874. btwrite(val, BT848_GPIO_DMA_CTL);
  3875. /* Then, push to 0 the reset pin long enough to reset the *
  3876. * device same as above for the reset line, but not the same
  3877. * value sent to the GPIO-connected stuff
  3878. * which one is the good one? */
  3879. gpio_inout(0xffffff,(1<<2));
  3880. gpio_write(0);
  3881. udelay(10);
  3882. gpio_write(1<<2);
  3883. for (i = 0; i < ARRAY_SIZE(vals); i++) {
  3884. tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
  3885. if (tmp != -1) {
  3886. printk(KERN_INFO
  3887. "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
  3888. vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
  3889. }
  3890. }
  3891. printk(KERN_INFO "PXC200 Initialised.\n");
  3892. }
  3893. /* ----------------------------------------------------------------------- */
  3894. /*
  3895. * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
  3896. * it. This apparently involves the following procedure for each 878 chip:
  3897. *
  3898. * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
  3899. *
  3900. * 2) write to GPIO_DATA
  3901. * - 0x0E
  3902. * - sleep 1ms
  3903. * - 0x10 + 0x0E
  3904. * - sleep 10ms
  3905. * - 0x0E
  3906. * read from GPIO_DATA into buf (uint_32)
  3907. * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
  3908. * error. ERROR_CPLD_Check_Failed stop.
  3909. *
  3910. * 3) write to GPIO_DATA
  3911. * - write 0x4400 + 0x0E
  3912. * - sleep 10ms
  3913. * - write 0x4410 + 0x0E
  3914. * - sleep 1ms
  3915. * - write 0x0E
  3916. * read from GPIO_DATA into buf (uint_32)
  3917. * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
  3918. * error. ERROR_CPLD_Check_Failed.
  3919. */
  3920. /* ----------------------------------------------------------------------- */
  3921. static void
  3922. init_RTV24 (struct bttv *btv)
  3923. {
  3924. uint32_t dataRead = 0;
  3925. long watchdog_value = 0x0E;
  3926. printk (KERN_INFO
  3927. "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
  3928. btv->c.nr);
  3929. btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
  3930. btwrite (0 + watchdog_value, BT848_GPIO_DATA);
  3931. msleep (1);
  3932. btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
  3933. msleep (10);
  3934. btwrite (0 + watchdog_value, BT848_GPIO_DATA);
  3935. dataRead = btread (BT848_GPIO_DATA);
  3936. if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
  3937. printk (KERN_INFO
  3938. "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
  3939. btv->c.nr, dataRead);
  3940. }
  3941. btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
  3942. msleep (10);
  3943. btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
  3944. msleep (1);
  3945. btwrite (watchdog_value, BT848_GPIO_DATA);
  3946. msleep (1);
  3947. dataRead = btread (BT848_GPIO_DATA);
  3948. if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
  3949. printk (KERN_INFO
  3950. "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
  3951. btv->c.nr, dataRead);
  3952. return;
  3953. }
  3954. printk (KERN_INFO
  3955. "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
  3956. }
  3957. /* ----------------------------------------------------------------------- */
  3958. /* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
  3959. /*
  3960. * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
  3961. * This code is placed under the terms of the GNU General Public License
  3962. *
  3963. * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
  3964. */
  3965. static void bus_low(struct bttv *btv, int bit)
  3966. {
  3967. if (btv->mbox_ior) {
  3968. gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
  3969. btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
  3970. udelay(5);
  3971. }
  3972. gpio_bits(bit,0);
  3973. udelay(5);
  3974. if (btv->mbox_ior) {
  3975. gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
  3976. udelay(5);
  3977. }
  3978. }
  3979. static void bus_high(struct bttv *btv, int bit)
  3980. {
  3981. if (btv->mbox_ior) {
  3982. gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
  3983. btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
  3984. udelay(5);
  3985. }
  3986. gpio_bits(bit,bit);
  3987. udelay(5);
  3988. if (btv->mbox_ior) {
  3989. gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
  3990. udelay(5);
  3991. }
  3992. }
  3993. static int bus_in(struct bttv *btv, int bit)
  3994. {
  3995. if (btv->mbox_ior) {
  3996. gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
  3997. btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
  3998. udelay(5);
  3999. gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
  4000. udelay(5);
  4001. }
  4002. return gpio_read() & (bit);
  4003. }
  4004. /* TEA5757 register bits */
  4005. #define TEA_FREQ 0:14
  4006. #define TEA_BUFFER 15:15
  4007. #define TEA_SIGNAL_STRENGTH 16:17
  4008. #define TEA_PORT1 18:18
  4009. #define TEA_PORT0 19:19
  4010. #define TEA_BAND 20:21
  4011. #define TEA_BAND_FM 0
  4012. #define TEA_BAND_MW 1
  4013. #define TEA_BAND_LW 2
  4014. #define TEA_BAND_SW 3
  4015. #define TEA_MONO 22:22
  4016. #define TEA_ALLOW_STEREO 0
  4017. #define TEA_FORCE_MONO 1
  4018. #define TEA_SEARCH_DIRECTION 23:23
  4019. #define TEA_SEARCH_DOWN 0
  4020. #define TEA_SEARCH_UP 1
  4021. #define TEA_STATUS 24:24
  4022. #define TEA_STATUS_TUNED 0
  4023. #define TEA_STATUS_SEARCHING 1
  4024. /* Low-level stuff */
  4025. static int tea5757_read(struct bttv *btv)
  4026. {
  4027. unsigned long timeout;
  4028. int value = 0;
  4029. int i;
  4030. /* better safe than sorry */
  4031. gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
  4032. if (btv->mbox_ior) {
  4033. gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
  4034. btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
  4035. udelay(5);
  4036. }
  4037. if (bttv_gpio)
  4038. bttv_gpio_tracking(btv,"tea5757 read");
  4039. bus_low(btv,btv->mbox_we);
  4040. bus_low(btv,btv->mbox_clk);
  4041. udelay(10);
  4042. timeout= jiffies + msecs_to_jiffies(1000);
  4043. /* wait for DATA line to go low; error if it doesn't */
  4044. while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
  4045. schedule();
  4046. if (bus_in(btv,btv->mbox_data)) {
  4047. printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
  4048. return -1;
  4049. }
  4050. dprintk("bttv%d: tea5757:",btv->c.nr);
  4051. for (i = 0; i < 24; i++) {
  4052. udelay(5);
  4053. bus_high(btv,btv->mbox_clk);
  4054. udelay(5);
  4055. dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
  4056. bus_low(btv,btv->mbox_clk);
  4057. value <<= 1;
  4058. value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
  4059. dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
  4060. }
  4061. dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
  4062. return value;
  4063. }
  4064. static int tea5757_write(struct bttv *btv, int value)
  4065. {
  4066. int i;
  4067. int reg = value;
  4068. gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
  4069. if (btv->mbox_ior) {
  4070. gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
  4071. btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
  4072. udelay(5);
  4073. }
  4074. if (bttv_gpio)
  4075. bttv_gpio_tracking(btv,"tea5757 write");
  4076. dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
  4077. bus_low(btv,btv->mbox_clk);
  4078. bus_high(btv,btv->mbox_we);
  4079. for (i = 0; i < 25; i++) {
  4080. if (reg & 0x1000000)
  4081. bus_high(btv,btv->mbox_data);
  4082. else
  4083. bus_low(btv,btv->mbox_data);
  4084. reg <<= 1;
  4085. bus_high(btv,btv->mbox_clk);
  4086. udelay(10);
  4087. bus_low(btv,btv->mbox_clk);
  4088. udelay(10);
  4089. }
  4090. bus_low(btv,btv->mbox_we); /* unmute !!! */
  4091. return 0;
  4092. }
  4093. void tea5757_set_freq(struct bttv *btv, unsigned short freq)
  4094. {
  4095. dprintk("tea5757_set_freq %d\n",freq);
  4096. tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
  4097. }
  4098. /* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
  4099. *
  4100. * This is needed because rv605 don't use a normal multiplex, but a crosspoint
  4101. * switch instead (CD22M3494E). This IC can have multiple active connections
  4102. * between Xn (input) and Yn (output) pins. We need to clear any existing
  4103. * connection prior to establish a new one, pulsing the STROBE pin.
  4104. *
  4105. * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
  4106. * GPIO pins are wired as:
  4107. * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
  4108. * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
  4109. * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
  4110. * GPIO[8] - - P3[5] (microcontroller)
  4111. * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
  4112. * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
  4113. * GPINTR - - P3[4] (microcontroller)
  4114. *
  4115. * The microcontroller is a 80C32 like. It should be possible to change xpoint
  4116. * configuration either directly (as we are doing) or using the microcontroller
  4117. * which is also wired to I2C interface. I have no further info on the
  4118. * microcontroller features, one would need to disassembly the firmware.
  4119. * note: the vendor refused to give any information on this product, all
  4120. * that stuff was found using a multimeter! :)
  4121. */
  4122. static void rv605_muxsel(struct bttv *btv, unsigned int input)
  4123. {
  4124. /* reset all conections */
  4125. gpio_bits(0x200,0x200);
  4126. mdelay(1);
  4127. gpio_bits(0x200,0x000);
  4128. mdelay(1);
  4129. /* create a new connection */
  4130. gpio_bits(0x480,0x080);
  4131. gpio_bits(0x480,0x480);
  4132. mdelay(1);
  4133. gpio_bits(0x480,0x080);
  4134. mdelay(1);
  4135. }
  4136. /* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
  4137. *
  4138. * The CS16 (available on eBay cheap) is a PCI board with four Fusion
  4139. * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
  4140. * chips, ten eight input analog multiplexors, a not chip and a few
  4141. * other components.
  4142. *
  4143. * 16 inputs on a secondary bracket are provided and can be selected
  4144. * from each of the four capture chips. Two of the eight input
  4145. * multiplexors are used to select from any of the 16 input signals.
  4146. *
  4147. * Unsupported hardware capabilities:
  4148. * . A video output monitor on the secondary bracket can be selected from
  4149. * one of the 878A chips.
  4150. * . Another passthrough but I haven't spent any time investigating it.
  4151. * . Digital I/O (logic level connected to GPIO) is available from an
  4152. * onboard header.
  4153. *
  4154. * The on chip input mux should always be set to 2.
  4155. * GPIO[16:19] - Video input selection
  4156. * GPIO[0:3] - Video output monitor select (only available from one 878A)
  4157. * GPIO[?:?] - Digital I/O.
  4158. *
  4159. * There is an ATMEL microcontroller with an 8031 core on board. I have not
  4160. * determined what function (if any) it provides. With the microcontroller
  4161. * and sync seperator chips a guess is that it might have to do with video
  4162. * switching and maybe some digital I/O.
  4163. */
  4164. static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
  4165. {
  4166. /* video mux */
  4167. gpio_bits(0x0f0000, input << 16);
  4168. }
  4169. static void tibetCS16_init(struct bttv *btv)
  4170. {
  4171. /* enable gpio bits, mask obtained via btSpy */
  4172. gpio_inout(0xffffff, 0x0f7fff);
  4173. gpio_write(0x0f7fff);
  4174. }
  4175. /*
  4176. * The following routines for the Kodicom-4400r get a little mind-twisting.
  4177. * There is a "master" controller and three "slave" controllers, together
  4178. * an analog switch which connects any of 16 cameras to any of the BT87A's.
  4179. * The analog switch is controlled by the "master", but the detection order
  4180. * of the four BT878A chips is in an order which I just don't understand.
  4181. * The "master" is actually the second controller to be detected. The
  4182. * logic on the board uses logical numbers for the 4 controllers, but
  4183. * those numbers are different from the detection sequence. When working
  4184. * with the analog switch, we need to "map" from the detection sequence
  4185. * over to the board's logical controller number. This mapping sequence
  4186. * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
  4187. * unit 3, the second (which is the master) is logical unit 0, etc.
  4188. * We need to maintain the status of the analog switch (which of the 16
  4189. * cameras is connected to which of the 4 controllers). Rather than
  4190. * add to the bttv structure for this, we use the data reserved for
  4191. * the mbox (unused for this card type).
  4192. */
  4193. /*
  4194. * First a routine to set the analog switch, which controls which camera
  4195. * is routed to which controller. The switch comprises an X-address
  4196. * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
  4197. * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
  4198. * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
  4199. * the switch. A STROBE bit (gpio bit 8) latches the data value into the
  4200. * specified address. The idea is to set the address and data, then bring
  4201. * STROBE high, and finally bring STROBE back to low.
  4202. */
  4203. static void kodicom4400r_write(struct bttv *btv,
  4204. unsigned char xaddr,
  4205. unsigned char yaddr,
  4206. unsigned char data) {
  4207. unsigned int udata;
  4208. udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
  4209. gpio_bits(0x1ff, udata); /* write ADDR and DAT */
  4210. gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
  4211. gpio_bits(0x1ff, udata); /* strobe low */
  4212. }
  4213. /*
  4214. * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
  4215. * use this routine. The routine finds the "master" for the card, maps
  4216. * the controller number from the detected position over to the logical
  4217. * number, writes the appropriate data to the analog switch, and housekeeps
  4218. * the local copy of the switch information. The parameter 'input' is the
  4219. * requested camera number (0 - 15).
  4220. */
  4221. static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
  4222. {
  4223. char *sw_status;
  4224. int xaddr, yaddr;
  4225. struct bttv *mctlr;
  4226. static unsigned char map[4] = {3, 0, 2, 1};
  4227. mctlr = master[btv->c.nr];
  4228. if (mctlr == NULL) { /* ignore if master not yet detected */
  4229. return;
  4230. }
  4231. yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
  4232. yaddr = map[yaddr];
  4233. sw_status = (char *)(&mctlr->mbox_we);
  4234. xaddr = input & 0xf;
  4235. /* Check if the controller/camera pair has changed, else ignore */
  4236. if (sw_status[yaddr] != xaddr)
  4237. {
  4238. /* "open" the old switch, "close" the new one, save the new */
  4239. kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
  4240. sw_status[yaddr] = xaddr;
  4241. kodicom4400r_write(mctlr, xaddr, yaddr, 1);
  4242. }
  4243. }
  4244. /*
  4245. * During initialisation, we need to reset the analog switch. We
  4246. * also preset the switch to map the 4 connectors on the card to the
  4247. * *user's* (see above description of kodicom4400r_muxsel) channels
  4248. * 0 through 3
  4249. */
  4250. static void kodicom4400r_init(struct bttv *btv)
  4251. {
  4252. char *sw_status = (char *)(&btv->mbox_we);
  4253. int ix;
  4254. gpio_inout(0x0003ff, 0x0003ff);
  4255. gpio_write(1 << 9); /* reset MUX */
  4256. gpio_write(0);
  4257. /* Preset camera 0 to the 4 controllers */
  4258. for (ix = 0; ix < 4; ix++) {
  4259. sw_status[ix] = ix;
  4260. kodicom4400r_write(btv, ix, ix, 1);
  4261. }
  4262. /*
  4263. * Since this is the "master", we need to set up the
  4264. * other three controller chips' pointers to this structure
  4265. * for later use in the muxsel routine.
  4266. */
  4267. if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
  4268. return;
  4269. master[btv->c.nr-1] = btv;
  4270. master[btv->c.nr] = btv;
  4271. master[btv->c.nr+1] = btv;
  4272. master[btv->c.nr+2] = btv;
  4273. }
  4274. /* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
  4275. * video multiplexers to provide up to 16 video inputs. These
  4276. * multiplexers are controlled by the lower 8 GPIO pins of the
  4277. * bt878. The multiplexers probably Pericom PI5V331Q or similar.
  4278. * xxx0 is pin xxx of multiplexer U5,
  4279. * yyy1 is pin yyy of multiplexer U2
  4280. */
  4281. #define ENA0 0x01
  4282. #define ENB0 0x02
  4283. #define ENA1 0x04
  4284. #define ENB1 0x08
  4285. #define IN10 0x10
  4286. #define IN00 0x20
  4287. #define IN11 0x40
  4288. #define IN01 0x80
  4289. static void xguard_muxsel(struct bttv *btv, unsigned int input)
  4290. {
  4291. static const int masks[] = {
  4292. ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
  4293. ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
  4294. ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
  4295. ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
  4296. };
  4297. gpio_write(masks[input%16]);
  4298. }
  4299. static void picolo_tetra_init(struct bttv *btv)
  4300. {
  4301. /*This is the video input redirection fonctionality : I DID NOT USED IT. */
  4302. btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
  4303. btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
  4304. }
  4305. static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
  4306. {
  4307. dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
  4308. /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
  4309. /*GPIO[20]&GPIO[21] used to choose the right input*/
  4310. btwrite (input<<20,BT848_GPIO_DATA);
  4311. }
  4312. /*
  4313. * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
  4314. *
  4315. * The IVC120G security card has 4 i2c controlled TDA8540 matrix
  4316. * swichers to provide 16 channels to MUX0. The TDA8540's have
  4317. * 4 independent outputs and as such the IVC120G also has the
  4318. * optional "Monitor Out" bus. This allows the card to be looking
  4319. * at one input while the monitor is looking at another.
  4320. *
  4321. * Since I've couldn't be bothered figuring out how to add an
  4322. * independant muxsel for the monitor bus, I've just set it to
  4323. * whatever the card is looking at.
  4324. *
  4325. * OUT0 of the TDA8540's is connected to MUX0 (0x03)
  4326. * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
  4327. *
  4328. * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
  4329. * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
  4330. * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
  4331. * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
  4332. *
  4333. */
  4334. /* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
  4335. #define I2C_TDA8540 0x90
  4336. #define I2C_TDA8540_ALT1 0x92
  4337. #define I2C_TDA8540_ALT2 0x94
  4338. #define I2C_TDA8540_ALT3 0x96
  4339. #define I2C_TDA8540_ALT4 0x98
  4340. #define I2C_TDA8540_ALT5 0x9a
  4341. #define I2C_TDA8540_ALT6 0x9c
  4342. static void ivc120_muxsel(struct bttv *btv, unsigned int input)
  4343. {
  4344. /* Simple maths */
  4345. int key = input % 4;
  4346. int matrix = input / 4;
  4347. dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
  4348. btv->c.nr, input, matrix, key);
  4349. /* Handles the input selection on the TDA8540's */
  4350. bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
  4351. ((matrix == 3) ? (key | key << 2) : 0x00), 1);
  4352. bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
  4353. ((matrix == 0) ? (key | key << 2) : 0x00), 1);
  4354. bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
  4355. ((matrix == 1) ? (key | key << 2) : 0x00), 1);
  4356. bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
  4357. ((matrix == 2) ? (key | key << 2) : 0x00), 1);
  4358. /* Handles the output enables on the TDA8540's */
  4359. bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
  4360. ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
  4361. bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
  4362. ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
  4363. bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
  4364. ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
  4365. bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
  4366. ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
  4367. /* Selects MUX0 for input on the 878 */
  4368. btaor((0)<<5, ~(3<<5), BT848_IFORM);
  4369. }
  4370. /* PXC200 muxsel helper
  4371. * luke@syseng.anu.edu.au
  4372. * another transplant
  4373. * from Alessandro Rubini (rubini@linux.it)
  4374. *
  4375. * There are 4 kinds of cards:
  4376. * PXC200L which is bt848
  4377. * PXC200F which is bt848 with PIC controlling mux
  4378. * PXC200AL which is bt878
  4379. * PXC200AF which is bt878 with PIC controlling mux
  4380. */
  4381. #define PX_CFG_PXC200F 0x01
  4382. #define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
  4383. #define PX_I2C_PIC 0x0f
  4384. #define PX_PXC200A_CARDID 0x200a1295
  4385. #define PX_I2C_CMD_CFG 0x00
  4386. static void PXC200_muxsel(struct bttv *btv, unsigned int input)
  4387. {
  4388. int rc;
  4389. long mux;
  4390. int bitmask;
  4391. unsigned char buf[2];
  4392. /* Read PIC config to determine if this is a PXC200F */
  4393. /* PX_I2C_CMD_CFG*/
  4394. buf[0]=0;
  4395. buf[1]=0;
  4396. rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
  4397. if (rc) {
  4398. printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
  4399. /* not PXC ? do nothing */
  4400. return;
  4401. }
  4402. rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
  4403. if (!(rc & PX_CFG_PXC200F)) {
  4404. printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
  4405. return;
  4406. }
  4407. /* The multiplexer in the 200F is handled by the GPIO port */
  4408. /* get correct mapping between inputs */
  4409. /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
  4410. /* ** not needed!? */
  4411. mux = input;
  4412. /* make sure output pins are enabled */
  4413. /* bitmask=0x30f; */
  4414. bitmask=0x302;
  4415. /* check whether we have a PXC200A */
  4416. if (btv->cardid == PX_PXC200A_CARDID) {
  4417. bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
  4418. bitmask |= 7<<4; /* the DAC */
  4419. }
  4420. btwrite(bitmask, BT848_GPIO_OUT_EN);
  4421. bitmask = btread(BT848_GPIO_DATA);
  4422. if (btv->cardid == PX_PXC200A_CARDID)
  4423. bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
  4424. else /* older device */
  4425. bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
  4426. btwrite(bitmask,BT848_GPIO_DATA);
  4427. /*
  4428. * Was "to be safe, set the bt848 to input 0"
  4429. * Actually, since it's ok at load time, better not messing
  4430. * with these bits (on PXC200AF you need to set mux 2 here)
  4431. *
  4432. * needed because bttv-driver sets mux before calling this function
  4433. */
  4434. if (btv->cardid == PX_PXC200A_CARDID)
  4435. btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
  4436. else /* older device */
  4437. btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
  4438. printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
  4439. }
  4440. /* ----------------------------------------------------------------------- */
  4441. /* motherboard chipset specific stuff */
  4442. void __init bttv_check_chipset(void)
  4443. {
  4444. int pcipci_fail = 0;
  4445. struct pci_dev *dev = NULL;
  4446. if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
  4447. pcipci_fail = 1;
  4448. if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
  4449. triton1 = 1;
  4450. if (pci_pci_problems & PCIPCI_VSFX)
  4451. vsfx = 1;
  4452. #ifdef PCIPCI_ALIMAGIK
  4453. if (pci_pci_problems & PCIPCI_ALIMAGIK)
  4454. latency = 0x0A;
  4455. #endif
  4456. /* print warnings about any quirks found */
  4457. if (triton1)
  4458. printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
  4459. if (vsfx)
  4460. printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
  4461. if (pcipci_fail) {
  4462. printk(KERN_INFO "bttv: bttv and your chipset may not work "
  4463. "together.\n");
  4464. if (!no_overlay) {
  4465. printk(KERN_INFO "bttv: overlay will be disabled.\n");
  4466. no_overlay = 1;
  4467. } else {
  4468. printk(KERN_INFO "bttv: overlay forced. Use this "
  4469. "option at your own risk.\n");
  4470. }
  4471. }
  4472. if (UNSET != latency)
  4473. printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
  4474. while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
  4475. PCI_DEVICE_ID_INTEL_82441, dev))) {
  4476. unsigned char b;
  4477. pci_read_config_byte(dev, 0x53, &b);
  4478. if (bttv_debug)
  4479. printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
  4480. "bufcon=0x%02x\n",b);
  4481. }
  4482. }
  4483. int __devinit bttv_handle_chipset(struct bttv *btv)
  4484. {
  4485. unsigned char command;
  4486. if (!triton1 && !vsfx && UNSET == latency)
  4487. return 0;
  4488. if (bttv_verbose) {
  4489. if (triton1)
  4490. printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
  4491. if (vsfx && btv->id >= 878)
  4492. printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
  4493. if (UNSET != latency)
  4494. printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
  4495. btv->c.nr,latency);
  4496. }
  4497. if (btv->id < 878) {
  4498. /* bt848 (mis)uses a bit in the irq mask for etbf */
  4499. if (triton1)
  4500. btv->triton1 = BT848_INT_ETBF;
  4501. } else {
  4502. /* bt878 has a bit in the pci config space for it */
  4503. pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
  4504. if (triton1)
  4505. command |= BT878_EN_TBFX;
  4506. if (vsfx)
  4507. command |= BT878_EN_VSFX;
  4508. pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
  4509. }
  4510. if (UNSET != latency)
  4511. pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
  4512. return 0;
  4513. }
  4514. /*
  4515. * Local variables:
  4516. * c-basic-offset: 8
  4517. * End:
  4518. */