bttv-cards.c 144 KB

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