bttv-cards.c 144 KB

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