bttv-cards.c 140 KB

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