bttv-cards.c 142 KB

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