bttv-cards.c 142 KB

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