bttv-cards.c 143 KB

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