bttv-cards.c 129 KB

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