bttv-cards.c 144 KB

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