cx88-cards.c 96 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823
  1. /*
  2. * device driver for Conexant 2388x based TV cards
  3. * card-specific stuff.
  4. *
  5. * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  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. */
  17. #include "cx88.h"
  18. #include "tea5767.h"
  19. #include "xc4000.h"
  20. #include <linux/init.h>
  21. #include <linux/module.h>
  22. #include <linux/pci.h>
  23. #include <linux/delay.h>
  24. #include <linux/slab.h>
  25. static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  26. static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  27. static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  28. module_param_array(tuner, int, NULL, 0444);
  29. module_param_array(radio, int, NULL, 0444);
  30. module_param_array(card, int, NULL, 0444);
  31. MODULE_PARM_DESC(tuner, "tuner type");
  32. MODULE_PARM_DESC(radio, "radio tuner type");
  33. MODULE_PARM_DESC(card, "card type");
  34. static unsigned int latency = UNSET;
  35. module_param(latency, int, 0444);
  36. MODULE_PARM_DESC(latency, "pci latency timer");
  37. static int disable_ir;
  38. module_param(disable_ir, int, 0444);
  39. MODULE_PARM_DESC(disable_ir, "Disable IR support");
  40. #define dprintk(level, fmt, arg...) do { \
  41. if (cx88_core_debug >= level) \
  42. printk(KERN_DEBUG pr_fmt("%s: core:" fmt), \
  43. __func__, ##arg); \
  44. } while (0)
  45. /* ------------------------------------------------------------------ */
  46. /* board config info */
  47. /* If radio_type !=UNSET, radio_addr should be specified
  48. */
  49. static const struct cx88_board cx88_boards[] = {
  50. [CX88_BOARD_UNKNOWN] = {
  51. .name = "UNKNOWN/GENERIC",
  52. .tuner_type = UNSET,
  53. .radio_type = UNSET,
  54. .tuner_addr = ADDR_UNSET,
  55. .radio_addr = ADDR_UNSET,
  56. .input = { {
  57. .type = CX88_VMUX_COMPOSITE1,
  58. .vmux = 0,
  59. }, {
  60. .type = CX88_VMUX_COMPOSITE2,
  61. .vmux = 1,
  62. }, {
  63. .type = CX88_VMUX_COMPOSITE3,
  64. .vmux = 2,
  65. }, {
  66. .type = CX88_VMUX_COMPOSITE4,
  67. .vmux = 3,
  68. } },
  69. },
  70. [CX88_BOARD_HAUPPAUGE] = {
  71. .name = "Hauppauge WinTV 34xxx models",
  72. .tuner_type = UNSET,
  73. .radio_type = UNSET,
  74. .tuner_addr = ADDR_UNSET,
  75. .radio_addr = ADDR_UNSET,
  76. .tda9887_conf = TDA9887_PRESENT,
  77. .input = { {
  78. .type = CX88_VMUX_TELEVISION,
  79. .vmux = 0,
  80. .gpio0 = 0xff00, // internal decoder
  81. }, {
  82. .type = CX88_VMUX_DEBUG,
  83. .vmux = 0,
  84. .gpio0 = 0xff01, // mono from tuner chip
  85. }, {
  86. .type = CX88_VMUX_COMPOSITE1,
  87. .vmux = 1,
  88. .gpio0 = 0xff02,
  89. }, {
  90. .type = CX88_VMUX_SVIDEO,
  91. .vmux = 2,
  92. .gpio0 = 0xff02,
  93. } },
  94. .radio = {
  95. .type = CX88_RADIO,
  96. .gpio0 = 0xff01,
  97. },
  98. },
  99. [CX88_BOARD_GDI] = {
  100. .name = "GDI Black Gold",
  101. .tuner_type = UNSET,
  102. .radio_type = UNSET,
  103. .tuner_addr = ADDR_UNSET,
  104. .radio_addr = ADDR_UNSET,
  105. .input = { {
  106. .type = CX88_VMUX_TELEVISION,
  107. .vmux = 0,
  108. }, {
  109. .type = CX88_VMUX_SVIDEO,
  110. .vmux = 2,
  111. } },
  112. },
  113. [CX88_BOARD_PIXELVIEW] = {
  114. .name = "PixelView",
  115. .tuner_type = TUNER_PHILIPS_PAL,
  116. .radio_type = UNSET,
  117. .tuner_addr = ADDR_UNSET,
  118. .radio_addr = ADDR_UNSET,
  119. .input = { {
  120. .type = CX88_VMUX_TELEVISION,
  121. .vmux = 0,
  122. .gpio0 = 0xff00, // internal decoder
  123. }, {
  124. .type = CX88_VMUX_COMPOSITE1,
  125. .vmux = 1,
  126. }, {
  127. .type = CX88_VMUX_SVIDEO,
  128. .vmux = 2,
  129. } },
  130. .radio = {
  131. .type = CX88_RADIO,
  132. .gpio0 = 0xff10,
  133. },
  134. },
  135. [CX88_BOARD_ATI_WONDER_PRO] = {
  136. .name = "ATI TV Wonder Pro",
  137. .tuner_type = TUNER_PHILIPS_4IN1,
  138. .radio_type = UNSET,
  139. .tuner_addr = ADDR_UNSET,
  140. .radio_addr = ADDR_UNSET,
  141. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
  142. .input = { {
  143. .type = CX88_VMUX_TELEVISION,
  144. .vmux = 0,
  145. .gpio0 = 0x03ff,
  146. }, {
  147. .type = CX88_VMUX_COMPOSITE1,
  148. .vmux = 1,
  149. .gpio0 = 0x03fe,
  150. }, {
  151. .type = CX88_VMUX_SVIDEO,
  152. .vmux = 2,
  153. .gpio0 = 0x03fe,
  154. } },
  155. },
  156. [CX88_BOARD_WINFAST2000XP_EXPERT] = {
  157. .name = "Leadtek Winfast 2000XP Expert",
  158. .tuner_type = TUNER_PHILIPS_4IN1,
  159. .radio_type = UNSET,
  160. .tuner_addr = ADDR_UNSET,
  161. .radio_addr = ADDR_UNSET,
  162. .tda9887_conf = TDA9887_PRESENT,
  163. .input = { {
  164. .type = CX88_VMUX_TELEVISION,
  165. .vmux = 0,
  166. .gpio0 = 0x00F5e700,
  167. .gpio1 = 0x00003004,
  168. .gpio2 = 0x00F5e700,
  169. .gpio3 = 0x02000000,
  170. }, {
  171. .type = CX88_VMUX_COMPOSITE1,
  172. .vmux = 1,
  173. .gpio0 = 0x00F5c700,
  174. .gpio1 = 0x00003004,
  175. .gpio2 = 0x00F5c700,
  176. .gpio3 = 0x02000000,
  177. }, {
  178. .type = CX88_VMUX_SVIDEO,
  179. .vmux = 2,
  180. .gpio0 = 0x00F5c700,
  181. .gpio1 = 0x00003004,
  182. .gpio2 = 0x00F5c700,
  183. .gpio3 = 0x02000000,
  184. } },
  185. .radio = {
  186. .type = CX88_RADIO,
  187. .gpio0 = 0x00F5d700,
  188. .gpio1 = 0x00003004,
  189. .gpio2 = 0x00F5d700,
  190. .gpio3 = 0x02000000,
  191. },
  192. },
  193. [CX88_BOARD_AVERTV_STUDIO_303] = {
  194. .name = "AverTV Studio 303 (M126)",
  195. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  196. .radio_type = UNSET,
  197. .tuner_addr = ADDR_UNSET,
  198. .radio_addr = ADDR_UNSET,
  199. .tda9887_conf = TDA9887_PRESENT,
  200. .input = { {
  201. .type = CX88_VMUX_TELEVISION,
  202. .vmux = 0,
  203. .gpio1 = 0xe09f,
  204. }, {
  205. .type = CX88_VMUX_COMPOSITE1,
  206. .vmux = 1,
  207. .gpio1 = 0xe05f,
  208. }, {
  209. .type = CX88_VMUX_SVIDEO,
  210. .vmux = 2,
  211. .gpio1 = 0xe05f,
  212. } },
  213. .radio = {
  214. .gpio1 = 0xe0df,
  215. .type = CX88_RADIO,
  216. },
  217. },
  218. [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
  219. // added gpio values thanks to Michal
  220. // values for PAL from DScaler
  221. .name = "MSI TV-@nywhere Master",
  222. .tuner_type = TUNER_MT2032,
  223. .radio_type = UNSET,
  224. .tuner_addr = ADDR_UNSET,
  225. .radio_addr = ADDR_UNSET,
  226. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
  227. .input = { {
  228. .type = CX88_VMUX_TELEVISION,
  229. .vmux = 0,
  230. .gpio0 = 0x000040bf,
  231. .gpio1 = 0x000080c0,
  232. .gpio2 = 0x0000ff40,
  233. }, {
  234. .type = CX88_VMUX_COMPOSITE1,
  235. .vmux = 1,
  236. .gpio0 = 0x000040bf,
  237. .gpio1 = 0x000080c0,
  238. .gpio2 = 0x0000ff40,
  239. }, {
  240. .type = CX88_VMUX_SVIDEO,
  241. .vmux = 2,
  242. .gpio0 = 0x000040bf,
  243. .gpio1 = 0x000080c0,
  244. .gpio2 = 0x0000ff40,
  245. } },
  246. .radio = {
  247. .type = CX88_RADIO,
  248. .vmux = 3,
  249. .gpio0 = 0x000040bf,
  250. .gpio1 = 0x000080c0,
  251. .gpio2 = 0x0000ff20,
  252. },
  253. },
  254. [CX88_BOARD_WINFAST_DV2000] = {
  255. .name = "Leadtek Winfast DV2000",
  256. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  257. .radio_type = UNSET,
  258. .tuner_addr = ADDR_UNSET,
  259. .radio_addr = ADDR_UNSET,
  260. .tda9887_conf = TDA9887_PRESENT,
  261. .input = { {
  262. .type = CX88_VMUX_TELEVISION,
  263. .vmux = 0,
  264. .gpio0 = 0x0035e700,
  265. .gpio1 = 0x00003004,
  266. .gpio2 = 0x0035e700,
  267. .gpio3 = 0x02000000,
  268. }, {
  269. .type = CX88_VMUX_COMPOSITE1,
  270. .vmux = 1,
  271. .gpio0 = 0x0035c700,
  272. .gpio1 = 0x00003004,
  273. .gpio2 = 0x0035c700,
  274. .gpio3 = 0x02000000,
  275. }, {
  276. .type = CX88_VMUX_SVIDEO,
  277. .vmux = 2,
  278. .gpio0 = 0x0035c700,
  279. .gpio1 = 0x0035c700,
  280. .gpio2 = 0x02000000,
  281. .gpio3 = 0x02000000,
  282. } },
  283. .radio = {
  284. .type = CX88_RADIO,
  285. .gpio0 = 0x0035d700,
  286. .gpio1 = 0x00007004,
  287. .gpio2 = 0x0035d700,
  288. .gpio3 = 0x02000000,
  289. },
  290. },
  291. [CX88_BOARD_LEADTEK_PVR2000] = {
  292. // gpio values for PAL version from regspy by DScaler
  293. .name = "Leadtek PVR 2000",
  294. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  295. .radio_type = UNSET,
  296. .tuner_addr = ADDR_UNSET,
  297. .radio_addr = ADDR_UNSET,
  298. .tda9887_conf = TDA9887_PRESENT,
  299. .input = { {
  300. .type = CX88_VMUX_TELEVISION,
  301. .vmux = 0,
  302. .gpio0 = 0x0000bde2,
  303. .audioroute = 1,
  304. }, {
  305. .type = CX88_VMUX_COMPOSITE1,
  306. .vmux = 1,
  307. .gpio0 = 0x0000bde6,
  308. .audioroute = 1,
  309. }, {
  310. .type = CX88_VMUX_SVIDEO,
  311. .vmux = 2,
  312. .gpio0 = 0x0000bde6,
  313. .audioroute = 1,
  314. } },
  315. .radio = {
  316. .type = CX88_RADIO,
  317. .gpio0 = 0x0000bd62,
  318. .audioroute = 1,
  319. },
  320. .mpeg = CX88_MPEG_BLACKBIRD,
  321. },
  322. [CX88_BOARD_IODATA_GVVCP3PCI] = {
  323. .name = "IODATA GV-VCP3/PCI",
  324. .tuner_type = UNSET,
  325. .radio_type = UNSET,
  326. .tuner_addr = ADDR_UNSET,
  327. .radio_addr = ADDR_UNSET,
  328. .input = { {
  329. .type = CX88_VMUX_COMPOSITE1,
  330. .vmux = 0,
  331. }, {
  332. .type = CX88_VMUX_COMPOSITE2,
  333. .vmux = 1,
  334. }, {
  335. .type = CX88_VMUX_SVIDEO,
  336. .vmux = 2,
  337. } },
  338. },
  339. [CX88_BOARD_PROLINK_PLAYTVPVR] = {
  340. .name = "Prolink PlayTV PVR",
  341. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  342. .radio_type = UNSET,
  343. .tuner_addr = ADDR_UNSET,
  344. .radio_addr = ADDR_UNSET,
  345. .tda9887_conf = TDA9887_PRESENT,
  346. .input = { {
  347. .type = CX88_VMUX_TELEVISION,
  348. .vmux = 0,
  349. .gpio0 = 0xbff0,
  350. }, {
  351. .type = CX88_VMUX_COMPOSITE1,
  352. .vmux = 1,
  353. .gpio0 = 0xbff3,
  354. }, {
  355. .type = CX88_VMUX_SVIDEO,
  356. .vmux = 2,
  357. .gpio0 = 0xbff3,
  358. } },
  359. .radio = {
  360. .type = CX88_RADIO,
  361. .gpio0 = 0xbff0,
  362. },
  363. },
  364. [CX88_BOARD_ASUS_PVR_416] = {
  365. .name = "ASUS PVR-416",
  366. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  367. .radio_type = UNSET,
  368. .tuner_addr = ADDR_UNSET,
  369. .radio_addr = ADDR_UNSET,
  370. .tda9887_conf = TDA9887_PRESENT,
  371. .input = { {
  372. .type = CX88_VMUX_TELEVISION,
  373. .vmux = 0,
  374. .gpio0 = 0x0000fde6,
  375. }, {
  376. .type = CX88_VMUX_SVIDEO,
  377. .vmux = 2,
  378. .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
  379. .audioroute = 1,
  380. } },
  381. .radio = {
  382. .type = CX88_RADIO,
  383. .gpio0 = 0x0000fde2,
  384. },
  385. .mpeg = CX88_MPEG_BLACKBIRD,
  386. },
  387. [CX88_BOARD_MSI_TVANYWHERE] = {
  388. .name = "MSI TV-@nywhere",
  389. .tuner_type = TUNER_MT2032,
  390. .radio_type = UNSET,
  391. .tuner_addr = ADDR_UNSET,
  392. .radio_addr = ADDR_UNSET,
  393. .tda9887_conf = TDA9887_PRESENT,
  394. .input = { {
  395. .type = CX88_VMUX_TELEVISION,
  396. .vmux = 0,
  397. .gpio0 = 0x00000fbf,
  398. .gpio2 = 0x0000fc08,
  399. }, {
  400. .type = CX88_VMUX_COMPOSITE1,
  401. .vmux = 1,
  402. .gpio0 = 0x00000fbf,
  403. .gpio2 = 0x0000fc68,
  404. }, {
  405. .type = CX88_VMUX_SVIDEO,
  406. .vmux = 2,
  407. .gpio0 = 0x00000fbf,
  408. .gpio2 = 0x0000fc68,
  409. } },
  410. },
  411. [CX88_BOARD_KWORLD_DVB_T] = {
  412. .name = "KWorld/VStream XPert DVB-T",
  413. .tuner_type = UNSET,
  414. .radio_type = UNSET,
  415. .tuner_addr = ADDR_UNSET,
  416. .radio_addr = ADDR_UNSET,
  417. .input = { {
  418. .type = CX88_VMUX_COMPOSITE1,
  419. .vmux = 1,
  420. .gpio0 = 0x0700,
  421. .gpio2 = 0x0101,
  422. }, {
  423. .type = CX88_VMUX_SVIDEO,
  424. .vmux = 2,
  425. .gpio0 = 0x0700,
  426. .gpio2 = 0x0101,
  427. } },
  428. .mpeg = CX88_MPEG_DVB,
  429. },
  430. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
  431. .name = "DViCO FusionHDTV DVB-T1",
  432. .tuner_type = UNSET, /* No analog tuner */
  433. .radio_type = UNSET,
  434. .tuner_addr = ADDR_UNSET,
  435. .radio_addr = ADDR_UNSET,
  436. .input = { {
  437. .type = CX88_VMUX_COMPOSITE1,
  438. .vmux = 1,
  439. .gpio0 = 0x000027df,
  440. }, {
  441. .type = CX88_VMUX_SVIDEO,
  442. .vmux = 2,
  443. .gpio0 = 0x000027df,
  444. } },
  445. .mpeg = CX88_MPEG_DVB,
  446. },
  447. [CX88_BOARD_KWORLD_LTV883] = {
  448. .name = "KWorld LTV883RF",
  449. .tuner_type = TUNER_TNF_8831BGFF,
  450. .radio_type = UNSET,
  451. .tuner_addr = ADDR_UNSET,
  452. .radio_addr = ADDR_UNSET,
  453. .input = { {
  454. .type = CX88_VMUX_TELEVISION,
  455. .vmux = 0,
  456. .gpio0 = 0x07f8,
  457. }, {
  458. .type = CX88_VMUX_DEBUG,
  459. .vmux = 0,
  460. .gpio0 = 0x07f9, // mono from tuner chip
  461. }, {
  462. .type = CX88_VMUX_COMPOSITE1,
  463. .vmux = 1,
  464. .gpio0 = 0x000007fa,
  465. }, {
  466. .type = CX88_VMUX_SVIDEO,
  467. .vmux = 2,
  468. .gpio0 = 0x000007fa,
  469. } },
  470. .radio = {
  471. .type = CX88_RADIO,
  472. .gpio0 = 0x000007f8,
  473. },
  474. },
  475. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
  476. .name = "DViCO FusionHDTV 3 Gold-Q",
  477. .tuner_type = TUNER_MICROTUNE_4042FI5,
  478. .radio_type = UNSET,
  479. .tuner_addr = ADDR_UNSET,
  480. .radio_addr = ADDR_UNSET,
  481. /*
  482. * GPIO[0] resets DT3302 DTV receiver
  483. * 0 - reset asserted
  484. * 1 - normal operation
  485. * GPIO[1] mutes analog audio output connector
  486. * 0 - enable selected source
  487. * 1 - mute
  488. * GPIO[2] selects source for analog audio output connector
  489. * 0 - analog audio input connector on tab
  490. * 1 - analog DAC output from CX23881 chip
  491. * GPIO[3] selects RF input connector on tuner module
  492. * 0 - RF connector labeled CABLE
  493. * 1 - RF connector labeled ANT
  494. * GPIO[4] selects high RF for QAM256 mode
  495. * 0 - normal RF
  496. * 1 - high RF
  497. */
  498. .input = { {
  499. .type = CX88_VMUX_TELEVISION,
  500. .vmux = 0,
  501. .gpio0 = 0x0f0d,
  502. }, {
  503. .type = CX88_VMUX_CABLE,
  504. .vmux = 0,
  505. .gpio0 = 0x0f05,
  506. }, {
  507. .type = CX88_VMUX_COMPOSITE1,
  508. .vmux = 1,
  509. .gpio0 = 0x0f00,
  510. }, {
  511. .type = CX88_VMUX_SVIDEO,
  512. .vmux = 2,
  513. .gpio0 = 0x0f00,
  514. } },
  515. .mpeg = CX88_MPEG_DVB,
  516. },
  517. [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
  518. .name = "Hauppauge Nova-T DVB-T",
  519. .tuner_type = UNSET,
  520. .radio_type = UNSET,
  521. .tuner_addr = ADDR_UNSET,
  522. .radio_addr = ADDR_UNSET,
  523. .input = { {
  524. .type = CX88_VMUX_DVB,
  525. .vmux = 0,
  526. } },
  527. .mpeg = CX88_MPEG_DVB,
  528. },
  529. [CX88_BOARD_CONEXANT_DVB_T1] = {
  530. .name = "Conexant DVB-T reference design",
  531. .tuner_type = UNSET,
  532. .radio_type = UNSET,
  533. .tuner_addr = ADDR_UNSET,
  534. .radio_addr = ADDR_UNSET,
  535. .input = { {
  536. .type = CX88_VMUX_DVB,
  537. .vmux = 0,
  538. } },
  539. .mpeg = CX88_MPEG_DVB,
  540. },
  541. [CX88_BOARD_PROVIDEO_PV259] = {
  542. .name = "Provideo PV259",
  543. .tuner_type = TUNER_PHILIPS_FQ1216ME,
  544. .radio_type = UNSET,
  545. .tuner_addr = ADDR_UNSET,
  546. .radio_addr = ADDR_UNSET,
  547. .input = { {
  548. .type = CX88_VMUX_TELEVISION,
  549. .vmux = 0,
  550. .audioroute = 1,
  551. } },
  552. .mpeg = CX88_MPEG_BLACKBIRD,
  553. },
  554. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
  555. .name = "DViCO FusionHDTV DVB-T Plus",
  556. .tuner_type = UNSET, /* No analog tuner */
  557. .radio_type = UNSET,
  558. .tuner_addr = ADDR_UNSET,
  559. .radio_addr = ADDR_UNSET,
  560. .input = { {
  561. .type = CX88_VMUX_COMPOSITE1,
  562. .vmux = 1,
  563. .gpio0 = 0x000027df,
  564. }, {
  565. .type = CX88_VMUX_SVIDEO,
  566. .vmux = 2,
  567. .gpio0 = 0x000027df,
  568. } },
  569. .mpeg = CX88_MPEG_DVB,
  570. },
  571. [CX88_BOARD_DNTV_LIVE_DVB_T] = {
  572. .name = "digitalnow DNTV Live! DVB-T",
  573. .tuner_type = UNSET,
  574. .radio_type = UNSET,
  575. .tuner_addr = ADDR_UNSET,
  576. .radio_addr = ADDR_UNSET,
  577. .input = { {
  578. .type = CX88_VMUX_COMPOSITE1,
  579. .vmux = 1,
  580. .gpio0 = 0x00000700,
  581. .gpio2 = 0x00000101,
  582. }, {
  583. .type = CX88_VMUX_SVIDEO,
  584. .vmux = 2,
  585. .gpio0 = 0x00000700,
  586. .gpio2 = 0x00000101,
  587. } },
  588. .mpeg = CX88_MPEG_DVB,
  589. },
  590. [CX88_BOARD_PCHDTV_HD3000] = {
  591. .name = "pcHDTV HD3000 HDTV",
  592. .tuner_type = TUNER_THOMSON_DTT761X,
  593. .radio_type = UNSET,
  594. .tuner_addr = ADDR_UNSET,
  595. .radio_addr = ADDR_UNSET,
  596. .tda9887_conf = TDA9887_PRESENT,
  597. /* GPIO[2] = audio source for analog audio out connector
  598. * 0 = analog audio input connector
  599. * 1 = CX88 audio DACs
  600. *
  601. * GPIO[7] = input to CX88's audio/chroma ADC
  602. * 0 = FM 10.7 MHz IF
  603. * 1 = Sound 4.5 MHz IF
  604. *
  605. * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
  606. *
  607. * GPIO[16] = Remote control input
  608. */
  609. .input = { {
  610. .type = CX88_VMUX_TELEVISION,
  611. .vmux = 0,
  612. .gpio0 = 0x00008484,
  613. }, {
  614. .type = CX88_VMUX_COMPOSITE1,
  615. .vmux = 1,
  616. .gpio0 = 0x00008400,
  617. }, {
  618. .type = CX88_VMUX_SVIDEO,
  619. .vmux = 2,
  620. .gpio0 = 0x00008400,
  621. } },
  622. .radio = {
  623. .type = CX88_RADIO,
  624. .gpio0 = 0x00008404,
  625. },
  626. .mpeg = CX88_MPEG_DVB,
  627. },
  628. [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
  629. // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
  630. // GPIO values obtained from regspy, courtesy Sean Covel
  631. .name = "Hauppauge WinTV 28xxx (Roslyn) models",
  632. .tuner_type = UNSET,
  633. .radio_type = UNSET,
  634. .tuner_addr = ADDR_UNSET,
  635. .radio_addr = ADDR_UNSET,
  636. .input = { {
  637. .type = CX88_VMUX_TELEVISION,
  638. .vmux = 0,
  639. .gpio0 = 0xed1a,
  640. .gpio2 = 0x00ff,
  641. }, {
  642. .type = CX88_VMUX_DEBUG,
  643. .vmux = 0,
  644. .gpio0 = 0xff01,
  645. }, {
  646. .type = CX88_VMUX_COMPOSITE1,
  647. .vmux = 1,
  648. .gpio0 = 0xff02,
  649. }, {
  650. .type = CX88_VMUX_SVIDEO,
  651. .vmux = 2,
  652. .gpio0 = 0xed92,
  653. .gpio2 = 0x00ff,
  654. } },
  655. .radio = {
  656. .type = CX88_RADIO,
  657. .gpio0 = 0xed96,
  658. .gpio2 = 0x00ff,
  659. },
  660. .mpeg = CX88_MPEG_BLACKBIRD,
  661. },
  662. [CX88_BOARD_DIGITALLOGIC_MEC] = {
  663. .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
  664. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  665. .radio_type = UNSET,
  666. .tuner_addr = ADDR_UNSET,
  667. .radio_addr = ADDR_UNSET,
  668. .tda9887_conf = TDA9887_PRESENT,
  669. .input = { {
  670. .type = CX88_VMUX_TELEVISION,
  671. .vmux = 0,
  672. .gpio0 = 0x00009d80,
  673. .audioroute = 1,
  674. }, {
  675. .type = CX88_VMUX_COMPOSITE1,
  676. .vmux = 1,
  677. .gpio0 = 0x00009d76,
  678. .audioroute = 1,
  679. }, {
  680. .type = CX88_VMUX_SVIDEO,
  681. .vmux = 2,
  682. .gpio0 = 0x00009d76,
  683. .audioroute = 1,
  684. } },
  685. .radio = {
  686. .type = CX88_RADIO,
  687. .gpio0 = 0x00009d00,
  688. .audioroute = 1,
  689. },
  690. .mpeg = CX88_MPEG_BLACKBIRD,
  691. },
  692. [CX88_BOARD_IODATA_GVBCTV7E] = {
  693. .name = "IODATA GV/BCTV7E",
  694. .tuner_type = TUNER_PHILIPS_FQ1286,
  695. .radio_type = UNSET,
  696. .tuner_addr = ADDR_UNSET,
  697. .radio_addr = ADDR_UNSET,
  698. .tda9887_conf = TDA9887_PRESENT,
  699. .input = { {
  700. .type = CX88_VMUX_TELEVISION,
  701. .vmux = 1,
  702. .gpio1 = 0x0000e03f,
  703. }, {
  704. .type = CX88_VMUX_COMPOSITE1,
  705. .vmux = 2,
  706. .gpio1 = 0x0000e07f,
  707. }, {
  708. .type = CX88_VMUX_SVIDEO,
  709. .vmux = 3,
  710. .gpio1 = 0x0000e07f,
  711. } }
  712. },
  713. [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
  714. .name = "PixelView PlayTV Ultra Pro (Stereo)",
  715. /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
  716. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  717. .radio_type = UNSET,
  718. .tuner_addr = ADDR_UNSET,
  719. .radio_addr = ADDR_UNSET,
  720. /*
  721. * Some variants use a tda9874 and so need the
  722. * tvaudio module.
  723. */
  724. .audio_chip = CX88_AUDIO_TVAUDIO,
  725. .input = { {
  726. .type = CX88_VMUX_TELEVISION,
  727. .vmux = 0,
  728. .gpio0 = 0xbf61, /* internal decoder */
  729. }, {
  730. .type = CX88_VMUX_COMPOSITE1,
  731. .vmux = 1,
  732. .gpio0 = 0xbf63,
  733. }, {
  734. .type = CX88_VMUX_SVIDEO,
  735. .vmux = 2,
  736. .gpio0 = 0xbf63,
  737. } },
  738. .radio = {
  739. .type = CX88_RADIO,
  740. .gpio0 = 0xbf60,
  741. },
  742. },
  743. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
  744. .name = "DViCO FusionHDTV 3 Gold-T",
  745. .tuner_type = TUNER_THOMSON_DTT761X,
  746. .radio_type = UNSET,
  747. .tuner_addr = ADDR_UNSET,
  748. .radio_addr = ADDR_UNSET,
  749. .tda9887_conf = TDA9887_PRESENT,
  750. .input = { {
  751. .type = CX88_VMUX_TELEVISION,
  752. .vmux = 0,
  753. .gpio0 = 0x97ed,
  754. }, {
  755. .type = CX88_VMUX_COMPOSITE1,
  756. .vmux = 1,
  757. .gpio0 = 0x97e9,
  758. }, {
  759. .type = CX88_VMUX_SVIDEO,
  760. .vmux = 2,
  761. .gpio0 = 0x97e9,
  762. } },
  763. .mpeg = CX88_MPEG_DVB,
  764. },
  765. [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
  766. .name = "ADS Tech Instant TV DVB-T PCI",
  767. .tuner_type = UNSET,
  768. .radio_type = UNSET,
  769. .tuner_addr = ADDR_UNSET,
  770. .radio_addr = ADDR_UNSET,
  771. .input = { {
  772. .type = CX88_VMUX_COMPOSITE1,
  773. .vmux = 1,
  774. .gpio0 = 0x0700,
  775. .gpio2 = 0x0101,
  776. }, {
  777. .type = CX88_VMUX_SVIDEO,
  778. .vmux = 2,
  779. .gpio0 = 0x0700,
  780. .gpio2 = 0x0101,
  781. } },
  782. .mpeg = CX88_MPEG_DVB,
  783. },
  784. [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
  785. .name = "TerraTec Cinergy 1400 DVB-T",
  786. .tuner_type = UNSET,
  787. .input = { {
  788. .type = CX88_VMUX_DVB,
  789. .vmux = 0,
  790. }, {
  791. .type = CX88_VMUX_COMPOSITE1,
  792. .vmux = 2,
  793. }, {
  794. .type = CX88_VMUX_SVIDEO,
  795. .vmux = 2,
  796. } },
  797. .mpeg = CX88_MPEG_DVB,
  798. },
  799. [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
  800. .name = "DViCO FusionHDTV 5 Gold",
  801. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
  802. .radio_type = UNSET,
  803. .tuner_addr = ADDR_UNSET,
  804. .radio_addr = ADDR_UNSET,
  805. .tda9887_conf = TDA9887_PRESENT,
  806. .input = { {
  807. .type = CX88_VMUX_TELEVISION,
  808. .vmux = 0,
  809. .gpio0 = 0x87fd,
  810. }, {
  811. .type = CX88_VMUX_COMPOSITE1,
  812. .vmux = 1,
  813. .gpio0 = 0x87f9,
  814. }, {
  815. .type = CX88_VMUX_SVIDEO,
  816. .vmux = 2,
  817. .gpio0 = 0x87f9,
  818. } },
  819. .mpeg = CX88_MPEG_DVB,
  820. },
  821. [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
  822. .name = "AverMedia UltraTV Media Center PCI 550",
  823. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  824. .radio_type = UNSET,
  825. .tuner_addr = ADDR_UNSET,
  826. .radio_addr = ADDR_UNSET,
  827. .tda9887_conf = TDA9887_PRESENT,
  828. .input = { {
  829. .type = CX88_VMUX_COMPOSITE1,
  830. .vmux = 0,
  831. .gpio0 = 0x0000cd73,
  832. .audioroute = 1,
  833. }, {
  834. .type = CX88_VMUX_SVIDEO,
  835. .vmux = 1,
  836. .gpio0 = 0x0000cd73,
  837. .audioroute = 1,
  838. }, {
  839. .type = CX88_VMUX_TELEVISION,
  840. .vmux = 3,
  841. .gpio0 = 0x0000cdb3,
  842. .audioroute = 1,
  843. } },
  844. .radio = {
  845. .type = CX88_RADIO,
  846. .vmux = 2,
  847. .gpio0 = 0x0000cdf3,
  848. .audioroute = 1,
  849. },
  850. .mpeg = CX88_MPEG_BLACKBIRD,
  851. },
  852. [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
  853. /* Alexander Wold <awold@bigfoot.com> */
  854. .name = "Kworld V-Stream Xpert DVD",
  855. .tuner_type = UNSET,
  856. .input = { {
  857. .type = CX88_VMUX_COMPOSITE1,
  858. .vmux = 1,
  859. .gpio0 = 0x03000000,
  860. .gpio1 = 0x01000000,
  861. .gpio2 = 0x02000000,
  862. .gpio3 = 0x00100000,
  863. }, {
  864. .type = CX88_VMUX_SVIDEO,
  865. .vmux = 2,
  866. .gpio0 = 0x03000000,
  867. .gpio1 = 0x01000000,
  868. .gpio2 = 0x02000000,
  869. .gpio3 = 0x00100000,
  870. } },
  871. },
  872. [CX88_BOARD_ATI_HDTVWONDER] = {
  873. .name = "ATI HDTV Wonder",
  874. .tuner_type = TUNER_PHILIPS_TUV1236D,
  875. .radio_type = UNSET,
  876. .tuner_addr = ADDR_UNSET,
  877. .radio_addr = ADDR_UNSET,
  878. .input = { {
  879. .type = CX88_VMUX_TELEVISION,
  880. .vmux = 0,
  881. .gpio0 = 0x00000ff7,
  882. .gpio1 = 0x000000ff,
  883. .gpio2 = 0x00000001,
  884. .gpio3 = 0x00000000,
  885. }, {
  886. .type = CX88_VMUX_COMPOSITE1,
  887. .vmux = 1,
  888. .gpio0 = 0x00000ffe,
  889. .gpio1 = 0x000000ff,
  890. .gpio2 = 0x00000001,
  891. .gpio3 = 0x00000000,
  892. }, {
  893. .type = CX88_VMUX_SVIDEO,
  894. .vmux = 2,
  895. .gpio0 = 0x00000ffe,
  896. .gpio1 = 0x000000ff,
  897. .gpio2 = 0x00000001,
  898. .gpio3 = 0x00000000,
  899. } },
  900. .mpeg = CX88_MPEG_DVB,
  901. },
  902. [CX88_BOARD_WINFAST_DTV1000] = {
  903. .name = "WinFast DTV1000-T",
  904. .tuner_type = UNSET,
  905. .radio_type = UNSET,
  906. .tuner_addr = ADDR_UNSET,
  907. .radio_addr = ADDR_UNSET,
  908. .input = { {
  909. .type = CX88_VMUX_DVB,
  910. .vmux = 0,
  911. }, {
  912. .type = CX88_VMUX_COMPOSITE1,
  913. .vmux = 1,
  914. }, {
  915. .type = CX88_VMUX_SVIDEO,
  916. .vmux = 2,
  917. } },
  918. .mpeg = CX88_MPEG_DVB,
  919. },
  920. [CX88_BOARD_AVERTV_303] = {
  921. .name = "AVerTV 303 (M126)",
  922. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  923. .radio_type = UNSET,
  924. .tuner_addr = ADDR_UNSET,
  925. .radio_addr = ADDR_UNSET,
  926. .tda9887_conf = TDA9887_PRESENT,
  927. .input = { {
  928. .type = CX88_VMUX_TELEVISION,
  929. .vmux = 0,
  930. .gpio0 = 0x00ff,
  931. .gpio1 = 0xe09f,
  932. .gpio2 = 0x0010,
  933. .gpio3 = 0x0000,
  934. }, {
  935. .type = CX88_VMUX_COMPOSITE1,
  936. .vmux = 1,
  937. .gpio0 = 0x00ff,
  938. .gpio1 = 0xe05f,
  939. .gpio2 = 0x0010,
  940. .gpio3 = 0x0000,
  941. }, {
  942. .type = CX88_VMUX_SVIDEO,
  943. .vmux = 2,
  944. .gpio0 = 0x00ff,
  945. .gpio1 = 0xe05f,
  946. .gpio2 = 0x0010,
  947. .gpio3 = 0x0000,
  948. } },
  949. },
  950. [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
  951. .name = "Hauppauge Nova-S-Plus DVB-S",
  952. .tuner_type = UNSET,
  953. .radio_type = UNSET,
  954. .tuner_addr = ADDR_UNSET,
  955. .radio_addr = ADDR_UNSET,
  956. .audio_chip = CX88_AUDIO_WM8775,
  957. .i2sinputcntl = 2,
  958. .input = { {
  959. .type = CX88_VMUX_DVB,
  960. .vmux = 0,
  961. /* 2: Line-In */
  962. .audioroute = 2,
  963. }, {
  964. .type = CX88_VMUX_COMPOSITE1,
  965. .vmux = 1,
  966. /* 2: Line-In */
  967. .audioroute = 2,
  968. }, {
  969. .type = CX88_VMUX_SVIDEO,
  970. .vmux = 2,
  971. /* 2: Line-In */
  972. .audioroute = 2,
  973. } },
  974. .mpeg = CX88_MPEG_DVB,
  975. },
  976. [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
  977. .name = "Hauppauge Nova-SE2 DVB-S",
  978. .tuner_type = UNSET,
  979. .radio_type = UNSET,
  980. .tuner_addr = ADDR_UNSET,
  981. .radio_addr = ADDR_UNSET,
  982. .input = { {
  983. .type = CX88_VMUX_DVB,
  984. .vmux = 0,
  985. } },
  986. .mpeg = CX88_MPEG_DVB,
  987. },
  988. [CX88_BOARD_KWORLD_DVBS_100] = {
  989. .name = "KWorld DVB-S 100",
  990. .tuner_type = UNSET,
  991. .radio_type = UNSET,
  992. .tuner_addr = ADDR_UNSET,
  993. .radio_addr = ADDR_UNSET,
  994. .audio_chip = CX88_AUDIO_WM8775,
  995. .input = { {
  996. .type = CX88_VMUX_DVB,
  997. .vmux = 0,
  998. /* 2: Line-In */
  999. .audioroute = 2,
  1000. }, {
  1001. .type = CX88_VMUX_COMPOSITE1,
  1002. .vmux = 1,
  1003. /* 2: Line-In */
  1004. .audioroute = 2,
  1005. }, {
  1006. .type = CX88_VMUX_SVIDEO,
  1007. .vmux = 2,
  1008. /* 2: Line-In */
  1009. .audioroute = 2,
  1010. } },
  1011. .mpeg = CX88_MPEG_DVB,
  1012. },
  1013. [CX88_BOARD_HAUPPAUGE_HVR1100] = {
  1014. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
  1015. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1016. .radio_type = UNSET,
  1017. .tuner_addr = ADDR_UNSET,
  1018. .radio_addr = ADDR_UNSET,
  1019. .tda9887_conf = TDA9887_PRESENT,
  1020. .input = { {
  1021. .type = CX88_VMUX_TELEVISION,
  1022. .vmux = 0,
  1023. }, {
  1024. .type = CX88_VMUX_COMPOSITE1,
  1025. .vmux = 1,
  1026. }, {
  1027. .type = CX88_VMUX_SVIDEO,
  1028. .vmux = 2,
  1029. } },
  1030. /* fixme: Add radio support */
  1031. .mpeg = CX88_MPEG_DVB,
  1032. },
  1033. [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
  1034. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
  1035. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1036. .radio_type = UNSET,
  1037. .tuner_addr = ADDR_UNSET,
  1038. .radio_addr = ADDR_UNSET,
  1039. .tda9887_conf = TDA9887_PRESENT,
  1040. .input = { {
  1041. .type = CX88_VMUX_TELEVISION,
  1042. .vmux = 0,
  1043. }, {
  1044. .type = CX88_VMUX_COMPOSITE1,
  1045. .vmux = 1,
  1046. } },
  1047. /* fixme: Add radio support */
  1048. .mpeg = CX88_MPEG_DVB,
  1049. },
  1050. [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
  1051. .name = "digitalnow DNTV Live! DVB-T Pro",
  1052. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1053. .radio_type = UNSET,
  1054. .tuner_addr = ADDR_UNSET,
  1055. .radio_addr = ADDR_UNSET,
  1056. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1057. TDA9887_PORT2_ACTIVE,
  1058. .input = { {
  1059. .type = CX88_VMUX_TELEVISION,
  1060. .vmux = 0,
  1061. .gpio0 = 0xf80808,
  1062. }, {
  1063. .type = CX88_VMUX_COMPOSITE1,
  1064. .vmux = 1,
  1065. .gpio0 = 0xf80808,
  1066. }, {
  1067. .type = CX88_VMUX_SVIDEO,
  1068. .vmux = 2,
  1069. .gpio0 = 0xf80808,
  1070. } },
  1071. .radio = {
  1072. .type = CX88_RADIO,
  1073. .gpio0 = 0xf80808,
  1074. },
  1075. .mpeg = CX88_MPEG_DVB,
  1076. },
  1077. [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
  1078. /* Kworld V-stream Xpert DVB-T with Thomson tuner */
  1079. /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
  1080. /* Manenti Marco <marco_manenti@colman.it> */
  1081. .name = "KWorld/VStream XPert DVB-T with cx22702",
  1082. .tuner_type = UNSET,
  1083. .radio_type = UNSET,
  1084. .tuner_addr = ADDR_UNSET,
  1085. .radio_addr = ADDR_UNSET,
  1086. .input = { {
  1087. .type = CX88_VMUX_COMPOSITE1,
  1088. .vmux = 1,
  1089. .gpio0 = 0x0700,
  1090. .gpio2 = 0x0101,
  1091. }, {
  1092. .type = CX88_VMUX_SVIDEO,
  1093. .vmux = 2,
  1094. .gpio0 = 0x0700,
  1095. .gpio2 = 0x0101,
  1096. } },
  1097. .mpeg = CX88_MPEG_DVB,
  1098. },
  1099. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
  1100. .name = "DViCO FusionHDTV DVB-T Dual Digital",
  1101. .tuner_type = UNSET, /* No analog tuner */
  1102. .radio_type = UNSET,
  1103. .tuner_addr = ADDR_UNSET,
  1104. .radio_addr = ADDR_UNSET,
  1105. .input = { {
  1106. .type = CX88_VMUX_COMPOSITE1,
  1107. .vmux = 1,
  1108. .gpio0 = 0x000067df,
  1109. }, {
  1110. .type = CX88_VMUX_SVIDEO,
  1111. .vmux = 2,
  1112. .gpio0 = 0x000067df,
  1113. } },
  1114. .mpeg = CX88_MPEG_DVB,
  1115. },
  1116. [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
  1117. .name = "KWorld HardwareMpegTV XPert",
  1118. .tuner_type = TUNER_PHILIPS_TDA8290,
  1119. .radio_type = UNSET,
  1120. .tuner_addr = ADDR_UNSET,
  1121. .radio_addr = ADDR_UNSET,
  1122. .input = { {
  1123. .type = CX88_VMUX_TELEVISION,
  1124. .vmux = 0,
  1125. .gpio0 = 0x3de2,
  1126. .gpio2 = 0x00ff,
  1127. }, {
  1128. .type = CX88_VMUX_COMPOSITE1,
  1129. .vmux = 1,
  1130. .gpio0 = 0x3de6,
  1131. .audioroute = 1,
  1132. }, {
  1133. .type = CX88_VMUX_SVIDEO,
  1134. .vmux = 2,
  1135. .gpio0 = 0x3de6,
  1136. .audioroute = 1,
  1137. } },
  1138. .radio = {
  1139. .type = CX88_RADIO,
  1140. .gpio0 = 0x3de6,
  1141. .gpio2 = 0x00ff,
  1142. },
  1143. .mpeg = CX88_MPEG_BLACKBIRD,
  1144. },
  1145. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
  1146. .name = "DViCO FusionHDTV DVB-T Hybrid",
  1147. .tuner_type = TUNER_THOMSON_FE6600,
  1148. .radio_type = UNSET,
  1149. .tuner_addr = ADDR_UNSET,
  1150. .radio_addr = ADDR_UNSET,
  1151. .input = { {
  1152. .type = CX88_VMUX_TELEVISION,
  1153. .vmux = 0,
  1154. .gpio0 = 0x0000a75f,
  1155. }, {
  1156. .type = CX88_VMUX_COMPOSITE1,
  1157. .vmux = 1,
  1158. .gpio0 = 0x0000a75b,
  1159. }, {
  1160. .type = CX88_VMUX_SVIDEO,
  1161. .vmux = 2,
  1162. .gpio0 = 0x0000a75b,
  1163. } },
  1164. .mpeg = CX88_MPEG_DVB,
  1165. },
  1166. [CX88_BOARD_PCHDTV_HD5500] = {
  1167. .name = "pcHDTV HD5500 HDTV",
  1168. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
  1169. .radio_type = UNSET,
  1170. .tuner_addr = ADDR_UNSET,
  1171. .radio_addr = ADDR_UNSET,
  1172. .tda9887_conf = TDA9887_PRESENT,
  1173. .input = { {
  1174. .type = CX88_VMUX_TELEVISION,
  1175. .vmux = 0,
  1176. .gpio0 = 0x87fd,
  1177. }, {
  1178. .type = CX88_VMUX_COMPOSITE1,
  1179. .vmux = 1,
  1180. .gpio0 = 0x87f9,
  1181. }, {
  1182. .type = CX88_VMUX_SVIDEO,
  1183. .vmux = 2,
  1184. .gpio0 = 0x87f9,
  1185. } },
  1186. .mpeg = CX88_MPEG_DVB,
  1187. },
  1188. [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
  1189. /*
  1190. * FIXME: tested TV input only, disabled composite,
  1191. * svideo and radio until they can be tested also.
  1192. */
  1193. .name = "Kworld MCE 200 Deluxe",
  1194. .tuner_type = TUNER_TENA_9533_DI,
  1195. .radio_type = UNSET,
  1196. .tda9887_conf = TDA9887_PRESENT,
  1197. .tuner_addr = ADDR_UNSET,
  1198. .radio_addr = ADDR_UNSET,
  1199. .input = { {
  1200. .type = CX88_VMUX_TELEVISION,
  1201. .vmux = 0,
  1202. .gpio0 = 0x0000BDE6
  1203. } },
  1204. .mpeg = CX88_MPEG_BLACKBIRD,
  1205. },
  1206. [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
  1207. /* FIXME: SVideo, Composite and FM inputs are untested */
  1208. .name = "PixelView PlayTV P7000",
  1209. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  1210. .radio_type = UNSET,
  1211. .tuner_addr = ADDR_UNSET,
  1212. .radio_addr = ADDR_UNSET,
  1213. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1214. TDA9887_PORT2_ACTIVE,
  1215. .input = { {
  1216. .type = CX88_VMUX_TELEVISION,
  1217. .vmux = 0,
  1218. .gpio0 = 0x5da6,
  1219. } },
  1220. .mpeg = CX88_MPEG_BLACKBIRD,
  1221. },
  1222. [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
  1223. .name = "NPG Tech Real TV FM Top 10",
  1224. .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
  1225. .radio_type = UNSET,
  1226. .tuner_addr = ADDR_UNSET,
  1227. .radio_addr = ADDR_UNSET,
  1228. .input = { {
  1229. .type = CX88_VMUX_TELEVISION,
  1230. .vmux = 0,
  1231. .gpio0 = 0x0788,
  1232. }, {
  1233. .type = CX88_VMUX_COMPOSITE1,
  1234. .vmux = 1,
  1235. .gpio0 = 0x078b,
  1236. }, {
  1237. .type = CX88_VMUX_SVIDEO,
  1238. .vmux = 2,
  1239. .gpio0 = 0x078b,
  1240. } },
  1241. .radio = {
  1242. .type = CX88_RADIO,
  1243. .gpio0 = 0x074a,
  1244. },
  1245. },
  1246. [CX88_BOARD_WINFAST_DTV2000H] = {
  1247. .name = "WinFast DTV2000 H",
  1248. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1249. .radio_type = UNSET,
  1250. .tuner_addr = ADDR_UNSET,
  1251. .radio_addr = ADDR_UNSET,
  1252. .tda9887_conf = TDA9887_PRESENT,
  1253. .input = { {
  1254. .type = CX88_VMUX_TELEVISION,
  1255. .vmux = 0,
  1256. .gpio0 = 0x00017304,
  1257. .gpio1 = 0x00008203,
  1258. .gpio2 = 0x00017304,
  1259. .gpio3 = 0x02000000,
  1260. }, {
  1261. .type = CX88_VMUX_COMPOSITE1,
  1262. .vmux = 1,
  1263. .gpio0 = 0x0001d701,
  1264. .gpio1 = 0x0000b207,
  1265. .gpio2 = 0x0001d701,
  1266. .gpio3 = 0x02000000,
  1267. }, {
  1268. .type = CX88_VMUX_COMPOSITE2,
  1269. .vmux = 2,
  1270. .gpio0 = 0x0001d503,
  1271. .gpio1 = 0x0000b207,
  1272. .gpio2 = 0x0001d503,
  1273. .gpio3 = 0x02000000,
  1274. }, {
  1275. .type = CX88_VMUX_SVIDEO,
  1276. .vmux = 3,
  1277. .gpio0 = 0x0001d701,
  1278. .gpio1 = 0x0000b207,
  1279. .gpio2 = 0x0001d701,
  1280. .gpio3 = 0x02000000,
  1281. } },
  1282. .radio = {
  1283. .type = CX88_RADIO,
  1284. .gpio0 = 0x00015702,
  1285. .gpio1 = 0x0000f207,
  1286. .gpio2 = 0x00015702,
  1287. .gpio3 = 0x02000000,
  1288. },
  1289. .mpeg = CX88_MPEG_DVB,
  1290. },
  1291. [CX88_BOARD_WINFAST_DTV2000H_J] = {
  1292. .name = "WinFast DTV2000 H rev. J",
  1293. .tuner_type = TUNER_PHILIPS_FMD1216MEX_MK3,
  1294. .radio_type = UNSET,
  1295. .tuner_addr = ADDR_UNSET,
  1296. .radio_addr = ADDR_UNSET,
  1297. .tda9887_conf = TDA9887_PRESENT,
  1298. .input = { {
  1299. .type = CX88_VMUX_TELEVISION,
  1300. .vmux = 0,
  1301. .gpio0 = 0x00017300,
  1302. .gpio1 = 0x00008207,
  1303. .gpio2 = 0x00000000,
  1304. .gpio3 = 0x02000000,
  1305. }, {
  1306. .type = CX88_VMUX_TELEVISION,
  1307. .vmux = 0,
  1308. .gpio0 = 0x00018300,
  1309. .gpio1 = 0x0000f207,
  1310. .gpio2 = 0x00017304,
  1311. .gpio3 = 0x02000000,
  1312. }, {
  1313. .type = CX88_VMUX_COMPOSITE1,
  1314. .vmux = 1,
  1315. .gpio0 = 0x00018301,
  1316. .gpio1 = 0x0000f207,
  1317. .gpio2 = 0x00017304,
  1318. .gpio3 = 0x02000000,
  1319. }, {
  1320. .type = CX88_VMUX_SVIDEO,
  1321. .vmux = 2,
  1322. .gpio0 = 0x00018301,
  1323. .gpio1 = 0x0000f207,
  1324. .gpio2 = 0x00017304,
  1325. .gpio3 = 0x02000000,
  1326. } },
  1327. .radio = {
  1328. .type = CX88_RADIO,
  1329. .gpio0 = 0x00015702,
  1330. .gpio1 = 0x0000f207,
  1331. .gpio2 = 0x00015702,
  1332. .gpio3 = 0x02000000,
  1333. },
  1334. .mpeg = CX88_MPEG_DVB,
  1335. },
  1336. [CX88_BOARD_GENIATECH_DVBS] = {
  1337. .name = "Geniatech DVB-S",
  1338. .tuner_type = UNSET,
  1339. .radio_type = UNSET,
  1340. .tuner_addr = ADDR_UNSET,
  1341. .radio_addr = ADDR_UNSET,
  1342. .input = { {
  1343. .type = CX88_VMUX_DVB,
  1344. .vmux = 0,
  1345. }, {
  1346. .type = CX88_VMUX_COMPOSITE1,
  1347. .vmux = 1,
  1348. } },
  1349. .mpeg = CX88_MPEG_DVB,
  1350. },
  1351. [CX88_BOARD_HAUPPAUGE_HVR3000] = {
  1352. .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
  1353. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1354. .radio_type = UNSET,
  1355. .tuner_addr = ADDR_UNSET,
  1356. .radio_addr = ADDR_UNSET,
  1357. .tda9887_conf = TDA9887_PRESENT,
  1358. .audio_chip = CX88_AUDIO_WM8775,
  1359. .input = { {
  1360. .type = CX88_VMUX_TELEVISION,
  1361. .vmux = 0,
  1362. .gpio0 = 0x84bf,
  1363. /* 1: TV Audio / FM Mono */
  1364. .audioroute = 1,
  1365. }, {
  1366. .type = CX88_VMUX_COMPOSITE1,
  1367. .vmux = 1,
  1368. .gpio0 = 0x84bf,
  1369. /* 2: Line-In */
  1370. .audioroute = 2,
  1371. }, {
  1372. .type = CX88_VMUX_SVIDEO,
  1373. .vmux = 2,
  1374. .gpio0 = 0x84bf,
  1375. /* 2: Line-In */
  1376. .audioroute = 2,
  1377. } },
  1378. .radio = {
  1379. .type = CX88_RADIO,
  1380. .gpio0 = 0x84bf,
  1381. /* 4: FM Stereo (untested) */
  1382. .audioroute = 8,
  1383. },
  1384. .mpeg = CX88_MPEG_DVB,
  1385. .num_frontends = 2,
  1386. },
  1387. [CX88_BOARD_NORWOOD_MICRO] = {
  1388. .name = "Norwood Micro TV Tuner",
  1389. .tuner_type = TUNER_TNF_5335MF,
  1390. .radio_type = UNSET,
  1391. .tuner_addr = ADDR_UNSET,
  1392. .radio_addr = ADDR_UNSET,
  1393. .input = { {
  1394. .type = CX88_VMUX_TELEVISION,
  1395. .vmux = 0,
  1396. .gpio0 = 0x0709,
  1397. }, {
  1398. .type = CX88_VMUX_COMPOSITE1,
  1399. .vmux = 1,
  1400. .gpio0 = 0x070b,
  1401. }, {
  1402. .type = CX88_VMUX_SVIDEO,
  1403. .vmux = 2,
  1404. .gpio0 = 0x070b,
  1405. } },
  1406. },
  1407. [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
  1408. .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
  1409. .tuner_type = TUNER_LG_PAL_NEW_TAPC,
  1410. .radio_type = UNSET,
  1411. .tuner_addr = ADDR_UNSET,
  1412. .radio_addr = ADDR_UNSET,
  1413. .input = { {
  1414. .type = CX88_VMUX_TELEVISION,
  1415. .vmux = 0,
  1416. .gpio0 = 0x003fffff,
  1417. .gpio1 = 0x00e00000,
  1418. .gpio2 = 0x003fffff,
  1419. .gpio3 = 0x02000000,
  1420. }, {
  1421. .type = CX88_VMUX_COMPOSITE1,
  1422. .vmux = 1,
  1423. .gpio0 = 0x003fffff,
  1424. .gpio1 = 0x00e00000,
  1425. .gpio2 = 0x003fffff,
  1426. .gpio3 = 0x02000000,
  1427. }, {
  1428. .type = CX88_VMUX_SVIDEO,
  1429. .vmux = 2,
  1430. .gpio0 = 0x003fffff,
  1431. .gpio1 = 0x00e00000,
  1432. .gpio2 = 0x003fffff,
  1433. .gpio3 = 0x02000000,
  1434. } },
  1435. },
  1436. [CX88_BOARD_HAUPPAUGE_HVR1300] = {
  1437. .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
  1438. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1439. .radio_type = UNSET,
  1440. .tuner_addr = ADDR_UNSET,
  1441. .radio_addr = ADDR_UNSET,
  1442. .tda9887_conf = TDA9887_PRESENT,
  1443. .audio_chip = CX88_AUDIO_WM8775,
  1444. /*
  1445. * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
  1446. */
  1447. .input = { {
  1448. .type = CX88_VMUX_TELEVISION,
  1449. .vmux = 0,
  1450. .gpio0 = 0xef88,
  1451. /* 1: TV Audio / FM Mono */
  1452. .audioroute = 1,
  1453. }, {
  1454. .type = CX88_VMUX_COMPOSITE1,
  1455. .vmux = 1,
  1456. .gpio0 = 0xef88,
  1457. /* 2: Line-In */
  1458. .audioroute = 2,
  1459. }, {
  1460. .type = CX88_VMUX_SVIDEO,
  1461. .vmux = 2,
  1462. .gpio0 = 0xef88,
  1463. /* 2: Line-In */
  1464. .audioroute = 2,
  1465. } },
  1466. .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
  1467. .radio = {
  1468. .type = CX88_RADIO,
  1469. .gpio0 = 0xef88,
  1470. /* 4: FM Stereo (untested) */
  1471. .audioroute = 8,
  1472. },
  1473. },
  1474. [CX88_BOARD_SAMSUNG_SMT_7020] = {
  1475. .name = "Samsung SMT 7020 DVB-S",
  1476. .tuner_type = UNSET,
  1477. .radio_type = UNSET,
  1478. .tuner_addr = ADDR_UNSET,
  1479. .radio_addr = ADDR_UNSET,
  1480. .input = { {
  1481. .type = CX88_VMUX_DVB,
  1482. .vmux = 0,
  1483. } },
  1484. .mpeg = CX88_MPEG_DVB,
  1485. },
  1486. [CX88_BOARD_ADSTECH_PTV_390] = {
  1487. .name = "ADS Tech Instant Video PCI",
  1488. .tuner_type = UNSET,
  1489. .radio_type = UNSET,
  1490. .tuner_addr = ADDR_UNSET,
  1491. .radio_addr = ADDR_UNSET,
  1492. .input = { {
  1493. .type = CX88_VMUX_DEBUG,
  1494. .vmux = 3,
  1495. .gpio0 = 0x04ff,
  1496. }, {
  1497. .type = CX88_VMUX_COMPOSITE1,
  1498. .vmux = 1,
  1499. .gpio0 = 0x07fa,
  1500. }, {
  1501. .type = CX88_VMUX_SVIDEO,
  1502. .vmux = 2,
  1503. .gpio0 = 0x07fa,
  1504. } },
  1505. },
  1506. [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
  1507. .name = "Pinnacle PCTV HD 800i",
  1508. .tuner_type = TUNER_XC5000,
  1509. .radio_type = UNSET,
  1510. .tuner_addr = ADDR_UNSET,
  1511. .radio_addr = ADDR_UNSET,
  1512. .input = { {
  1513. .type = CX88_VMUX_TELEVISION,
  1514. .vmux = 0,
  1515. .gpio0 = 0x04fb,
  1516. .gpio1 = 0x10ff,
  1517. }, {
  1518. .type = CX88_VMUX_COMPOSITE1,
  1519. .vmux = 1,
  1520. .gpio0 = 0x04fb,
  1521. .gpio1 = 0x10ef,
  1522. .audioroute = 1,
  1523. }, {
  1524. .type = CX88_VMUX_SVIDEO,
  1525. .vmux = 2,
  1526. .gpio0 = 0x04fb,
  1527. .gpio1 = 0x10ef,
  1528. .audioroute = 1,
  1529. } },
  1530. .mpeg = CX88_MPEG_DVB,
  1531. },
  1532. [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
  1533. .name = "DViCO FusionHDTV 5 PCI nano",
  1534. /* xc3008 tuner, digital only for now */
  1535. .tuner_type = UNSET,
  1536. .radio_type = UNSET,
  1537. .tuner_addr = ADDR_UNSET,
  1538. .radio_addr = ADDR_UNSET,
  1539. .input = { {
  1540. .type = CX88_VMUX_TELEVISION,
  1541. .vmux = 0,
  1542. .gpio0 = 0x000027df, /* Unconfirmed */
  1543. }, {
  1544. .type = CX88_VMUX_COMPOSITE1,
  1545. .vmux = 1,
  1546. .gpio0 = 0x000027df, /* Unconfirmed */
  1547. .audioroute = 1,
  1548. }, {
  1549. .type = CX88_VMUX_SVIDEO,
  1550. .vmux = 2,
  1551. .gpio0 = 0x000027df, /* Unconfirmed */
  1552. .audioroute = 1,
  1553. } },
  1554. .mpeg = CX88_MPEG_DVB,
  1555. },
  1556. [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
  1557. .name = "Pinnacle Hybrid PCTV",
  1558. .tuner_type = TUNER_XC2028,
  1559. .tuner_addr = 0x61,
  1560. .radio_type = UNSET,
  1561. .radio_addr = ADDR_UNSET,
  1562. .input = { {
  1563. .type = CX88_VMUX_TELEVISION,
  1564. .vmux = 0,
  1565. .gpio0 = 0x004ff,
  1566. .gpio1 = 0x010ff,
  1567. .gpio2 = 0x00001,
  1568. }, {
  1569. .type = CX88_VMUX_COMPOSITE1,
  1570. .vmux = 1,
  1571. .gpio0 = 0x004fb,
  1572. .gpio1 = 0x010ef,
  1573. .audioroute = 1,
  1574. }, {
  1575. .type = CX88_VMUX_SVIDEO,
  1576. .vmux = 2,
  1577. .gpio0 = 0x004fb,
  1578. .gpio1 = 0x010ef,
  1579. .audioroute = 1,
  1580. } },
  1581. .radio = {
  1582. .type = CX88_RADIO,
  1583. .gpio0 = 0x004ff,
  1584. .gpio1 = 0x010ff,
  1585. .gpio2 = 0x0ff,
  1586. },
  1587. .mpeg = CX88_MPEG_DVB,
  1588. },
  1589. /* Terry Wu <terrywu2009@gmail.com> */
  1590. /* TV Audio : set GPIO 2, 18, 19 value to 0, 1, 0 */
  1591. /* FM Audio : set GPIO 2, 18, 19 value to 0, 0, 0 */
  1592. /* Line-in Audio : set GPIO 2, 18, 19 value to 0, 1, 1 */
  1593. /* Mute Audio : set GPIO 2 value to 1 */
  1594. [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
  1595. .name = "Leadtek TV2000 XP Global",
  1596. .tuner_type = TUNER_XC2028,
  1597. .tuner_addr = 0x61,
  1598. .radio_type = UNSET,
  1599. .radio_addr = ADDR_UNSET,
  1600. .input = { {
  1601. .type = CX88_VMUX_TELEVISION,
  1602. .vmux = 0,
  1603. .gpio0 = 0x0400, /* pin 2 = 0 */
  1604. .gpio1 = 0x0000,
  1605. .gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */
  1606. .gpio3 = 0x0000,
  1607. }, {
  1608. .type = CX88_VMUX_COMPOSITE1,
  1609. .vmux = 1,
  1610. .gpio0 = 0x0400, /* pin 2 = 0 */
  1611. .gpio1 = 0x0000,
  1612. .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
  1613. .gpio3 = 0x0000,
  1614. }, {
  1615. .type = CX88_VMUX_SVIDEO,
  1616. .vmux = 2,
  1617. .gpio0 = 0x0400, /* pin 2 = 0 */
  1618. .gpio1 = 0x0000,
  1619. .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
  1620. .gpio3 = 0x0000,
  1621. } },
  1622. .radio = {
  1623. .type = CX88_RADIO,
  1624. .gpio0 = 0x0400, /* pin 2 = 0 */
  1625. .gpio1 = 0x0000,
  1626. .gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */
  1627. .gpio3 = 0x0000,
  1628. },
  1629. },
  1630. [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36] = {
  1631. .name = "Leadtek TV2000 XP Global (SC4100)",
  1632. .tuner_type = TUNER_XC4000,
  1633. .tuner_addr = 0x61,
  1634. .radio_type = UNSET,
  1635. .radio_addr = ADDR_UNSET,
  1636. .input = { {
  1637. .type = CX88_VMUX_TELEVISION,
  1638. .vmux = 0,
  1639. .gpio0 = 0x0400, /* pin 2 = 0 */
  1640. .gpio1 = 0x0000,
  1641. .gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */
  1642. .gpio3 = 0x0000,
  1643. }, {
  1644. .type = CX88_VMUX_COMPOSITE1,
  1645. .vmux = 1,
  1646. .gpio0 = 0x0400, /* pin 2 = 0 */
  1647. .gpio1 = 0x0000,
  1648. .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
  1649. .gpio3 = 0x0000,
  1650. }, {
  1651. .type = CX88_VMUX_SVIDEO,
  1652. .vmux = 2,
  1653. .gpio0 = 0x0400, /* pin 2 = 0 */
  1654. .gpio1 = 0x0000,
  1655. .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
  1656. .gpio3 = 0x0000,
  1657. } },
  1658. .radio = {
  1659. .type = CX88_RADIO,
  1660. .gpio0 = 0x0400, /* pin 2 = 0 */
  1661. .gpio1 = 0x0000,
  1662. .gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */
  1663. .gpio3 = 0x0000,
  1664. },
  1665. },
  1666. [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43] = {
  1667. .name = "Leadtek TV2000 XP Global (XC4100)",
  1668. .tuner_type = TUNER_XC4000,
  1669. .tuner_addr = 0x61,
  1670. .radio_type = UNSET,
  1671. .radio_addr = ADDR_UNSET,
  1672. .input = { {
  1673. .type = CX88_VMUX_TELEVISION,
  1674. .vmux = 0,
  1675. .gpio0 = 0x0400, /* pin 2 = 0 */
  1676. .gpio1 = 0x6040, /* pin 14 = 1, pin 13 = 0 */
  1677. .gpio2 = 0x0000,
  1678. .gpio3 = 0x0000,
  1679. }, {
  1680. .type = CX88_VMUX_COMPOSITE1,
  1681. .vmux = 1,
  1682. .gpio0 = 0x0400, /* pin 2 = 0 */
  1683. .gpio1 = 0x6060, /* pin 14 = 1, pin 13 = 1 */
  1684. .gpio2 = 0x0000,
  1685. .gpio3 = 0x0000,
  1686. }, {
  1687. .type = CX88_VMUX_SVIDEO,
  1688. .vmux = 2,
  1689. .gpio0 = 0x0400, /* pin 2 = 0 */
  1690. .gpio1 = 0x6060, /* pin 14 = 1, pin 13 = 1 */
  1691. .gpio2 = 0x0000,
  1692. .gpio3 = 0x0000,
  1693. } },
  1694. .radio = {
  1695. .type = CX88_RADIO,
  1696. .gpio0 = 0x0400, /* pin 2 = 0 */
  1697. .gpio1 = 0x6000, /* pin 14 = 1, pin 13 = 0 */
  1698. .gpio2 = 0x0000,
  1699. .gpio3 = 0x0000,
  1700. },
  1701. },
  1702. [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
  1703. /* Long names may confuse LIRC. */
  1704. .name = "PowerColor RA330",
  1705. .tuner_type = TUNER_XC2028,
  1706. .tuner_addr = 0x61,
  1707. .input = { {
  1708. /*
  1709. * Due to the way the cx88 driver is written,
  1710. * there is no way to deactivate audio pass-
  1711. * through without this entry. Furthermore, if
  1712. * the TV mux entry is first, you get audio
  1713. * from the tuner on boot for a little while.
  1714. */
  1715. .type = CX88_VMUX_DEBUG,
  1716. .vmux = 3,
  1717. .gpio0 = 0x00ff,
  1718. .gpio1 = 0xf39d,
  1719. .gpio3 = 0x0000,
  1720. }, {
  1721. .type = CX88_VMUX_TELEVISION,
  1722. .vmux = 0,
  1723. .gpio0 = 0x00ff,
  1724. .gpio1 = 0xf35d,
  1725. .gpio3 = 0x0000,
  1726. }, {
  1727. .type = CX88_VMUX_COMPOSITE1,
  1728. .vmux = 1,
  1729. .gpio0 = 0x00ff,
  1730. .gpio1 = 0xf37d,
  1731. .gpio3 = 0x0000,
  1732. }, {
  1733. .type = CX88_VMUX_SVIDEO,
  1734. .vmux = 2,
  1735. .gpio0 = 0x000ff,
  1736. .gpio1 = 0x0f37d,
  1737. .gpio3 = 0x00000,
  1738. } },
  1739. .radio = {
  1740. .type = CX88_RADIO,
  1741. .gpio0 = 0x000ff,
  1742. .gpio1 = 0x0f35d,
  1743. .gpio3 = 0x00000,
  1744. },
  1745. },
  1746. [CX88_BOARD_GENIATECH_X8000_MT] = {
  1747. /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
  1748. .name = "Geniatech X8000-MT DVBT",
  1749. .tuner_type = TUNER_XC2028,
  1750. .tuner_addr = 0x61,
  1751. .input = { {
  1752. .type = CX88_VMUX_TELEVISION,
  1753. .vmux = 0,
  1754. .gpio0 = 0x00000000,
  1755. .gpio1 = 0x00e3e341,
  1756. .gpio2 = 0x00000000,
  1757. .gpio3 = 0x00000000,
  1758. }, {
  1759. .type = CX88_VMUX_COMPOSITE1,
  1760. .vmux = 1,
  1761. .gpio0 = 0x00000000,
  1762. .gpio1 = 0x00e3e361,
  1763. .gpio2 = 0x00000000,
  1764. .gpio3 = 0x00000000,
  1765. }, {
  1766. .type = CX88_VMUX_SVIDEO,
  1767. .vmux = 2,
  1768. .gpio0 = 0x00000000,
  1769. .gpio1 = 0x00e3e361,
  1770. .gpio2 = 0x00000000,
  1771. .gpio3 = 0x00000000,
  1772. } },
  1773. .radio = {
  1774. .type = CX88_RADIO,
  1775. .gpio0 = 0x00000000,
  1776. .gpio1 = 0x00e3e341,
  1777. .gpio2 = 0x00000000,
  1778. .gpio3 = 0x00000000,
  1779. },
  1780. .mpeg = CX88_MPEG_DVB,
  1781. },
  1782. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
  1783. .name = "DViCO FusionHDTV DVB-T PRO",
  1784. .tuner_type = TUNER_XC2028,
  1785. .tuner_addr = 0x61,
  1786. .radio_type = UNSET,
  1787. .radio_addr = ADDR_UNSET,
  1788. .input = { {
  1789. .type = CX88_VMUX_COMPOSITE1,
  1790. .vmux = 1,
  1791. .gpio0 = 0x000067df,
  1792. }, {
  1793. .type = CX88_VMUX_SVIDEO,
  1794. .vmux = 2,
  1795. .gpio0 = 0x000067df,
  1796. } },
  1797. .mpeg = CX88_MPEG_DVB,
  1798. },
  1799. [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
  1800. .name = "DViCO FusionHDTV 7 Gold",
  1801. .tuner_type = TUNER_XC5000,
  1802. .radio_type = UNSET,
  1803. .tuner_addr = ADDR_UNSET,
  1804. .radio_addr = ADDR_UNSET,
  1805. .input = { {
  1806. .type = CX88_VMUX_TELEVISION,
  1807. .vmux = 0,
  1808. .gpio0 = 0x10df,
  1809. }, {
  1810. .type = CX88_VMUX_COMPOSITE1,
  1811. .vmux = 1,
  1812. .gpio0 = 0x16d9,
  1813. }, {
  1814. .type = CX88_VMUX_SVIDEO,
  1815. .vmux = 2,
  1816. .gpio0 = 0x16d9,
  1817. } },
  1818. .mpeg = CX88_MPEG_DVB,
  1819. },
  1820. [CX88_BOARD_PROLINK_PV_8000GT] = {
  1821. .name = "Prolink Pixelview MPEG 8000GT",
  1822. .tuner_type = TUNER_XC2028,
  1823. .tuner_addr = 0x61,
  1824. .input = { {
  1825. .type = CX88_VMUX_TELEVISION,
  1826. .vmux = 0,
  1827. .gpio0 = 0x0ff,
  1828. .gpio2 = 0x0cfb,
  1829. }, {
  1830. .type = CX88_VMUX_COMPOSITE1,
  1831. .vmux = 1,
  1832. .gpio2 = 0x0cfb,
  1833. }, {
  1834. .type = CX88_VMUX_SVIDEO,
  1835. .vmux = 2,
  1836. .gpio2 = 0x0cfb,
  1837. } },
  1838. .radio = {
  1839. .type = CX88_RADIO,
  1840. .gpio2 = 0x0cfb,
  1841. },
  1842. },
  1843. [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
  1844. .name = "Prolink Pixelview Global Extreme",
  1845. .tuner_type = TUNER_XC2028,
  1846. .tuner_addr = 0x61,
  1847. .input = { {
  1848. .type = CX88_VMUX_TELEVISION,
  1849. .vmux = 0,
  1850. .gpio0 = 0x04fb,
  1851. .gpio1 = 0x04080,
  1852. .gpio2 = 0x0cf7,
  1853. }, {
  1854. .type = CX88_VMUX_COMPOSITE1,
  1855. .vmux = 1,
  1856. .gpio0 = 0x04fb,
  1857. .gpio1 = 0x04080,
  1858. .gpio2 = 0x0cfb,
  1859. }, {
  1860. .type = CX88_VMUX_SVIDEO,
  1861. .vmux = 2,
  1862. .gpio0 = 0x04fb,
  1863. .gpio1 = 0x04080,
  1864. .gpio2 = 0x0cfb,
  1865. } },
  1866. .radio = {
  1867. .type = CX88_RADIO,
  1868. .gpio0 = 0x04ff,
  1869. .gpio1 = 0x04080,
  1870. .gpio2 = 0x0cf7,
  1871. },
  1872. },
  1873. /*
  1874. * Both radio, analog and ATSC work with this board.
  1875. * However, for analog to work, s5h1409 gate should be open,
  1876. * otherwise, tuner-xc3028 won't be detected.
  1877. * A proper fix require using the newer i2c methods to add
  1878. * tuner-xc3028 without doing an i2c probe.
  1879. */
  1880. [CX88_BOARD_KWORLD_ATSC_120] = {
  1881. .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
  1882. .tuner_type = TUNER_XC2028,
  1883. .radio_type = UNSET,
  1884. .tuner_addr = ADDR_UNSET,
  1885. .radio_addr = ADDR_UNSET,
  1886. .input = { {
  1887. .type = CX88_VMUX_TELEVISION,
  1888. .vmux = 0,
  1889. .gpio0 = 0x000000ff,
  1890. .gpio1 = 0x0000f35d,
  1891. .gpio2 = 0x00000000,
  1892. }, {
  1893. .type = CX88_VMUX_COMPOSITE1,
  1894. .vmux = 1,
  1895. .gpio0 = 0x000000ff,
  1896. .gpio1 = 0x0000f37e,
  1897. .gpio2 = 0x00000000,
  1898. }, {
  1899. .type = CX88_VMUX_SVIDEO,
  1900. .vmux = 2,
  1901. .gpio0 = 0x000000ff,
  1902. .gpio1 = 0x0000f37e,
  1903. .gpio2 = 0x00000000,
  1904. } },
  1905. .radio = {
  1906. .type = CX88_RADIO,
  1907. .gpio0 = 0x000000ff,
  1908. .gpio1 = 0x0000f35d,
  1909. .gpio2 = 0x00000000,
  1910. },
  1911. .mpeg = CX88_MPEG_DVB,
  1912. },
  1913. [CX88_BOARD_HAUPPAUGE_HVR4000] = {
  1914. .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
  1915. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1916. .radio_type = UNSET,
  1917. .tuner_addr = ADDR_UNSET,
  1918. .radio_addr = ADDR_UNSET,
  1919. .tda9887_conf = TDA9887_PRESENT,
  1920. .audio_chip = CX88_AUDIO_WM8775,
  1921. /*
  1922. * GPIO0 (WINTV2000)
  1923. *
  1924. * Analogue SAT DVB-T
  1925. * Antenna 0xc4bf 0xc4bb
  1926. * Composite 0xc4bf 0xc4bb
  1927. * S-Video 0xc4bf 0xc4bb
  1928. * Composite1 0xc4ff 0xc4fb
  1929. * S-Video1 0xc4ff 0xc4fb
  1930. *
  1931. * BIT VALUE FUNCTION GP{x}_IO
  1932. * 0 1 I:?
  1933. * 1 1 I:?
  1934. * 2 1 O:MPEG PORT 0=DVB-T 1=DVB-S
  1935. * 3 1 I:?
  1936. * 4 1 I:?
  1937. * 5 1 I:?
  1938. * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
  1939. * 7 1 O:DVB-T DEMOD RESET LOW
  1940. *
  1941. * BIT VALUE FUNCTION GP{x}_OE
  1942. * 8 0 I
  1943. * 9 0 I
  1944. * a 1 O
  1945. * b 0 I
  1946. * c 0 I
  1947. * d 0 I
  1948. * e 1 O
  1949. * f 1 O
  1950. *
  1951. * WM8775 ADC
  1952. *
  1953. * 1: TV Audio / FM Mono
  1954. * 2: Line-In
  1955. * 3: Line-In Expansion
  1956. * 4: FM Stereo
  1957. */
  1958. .input = { {
  1959. .type = CX88_VMUX_TELEVISION,
  1960. .vmux = 0,
  1961. .gpio0 = 0xc4bf,
  1962. /* 1: TV Audio / FM Mono */
  1963. .audioroute = 1,
  1964. }, {
  1965. .type = CX88_VMUX_COMPOSITE1,
  1966. .vmux = 1,
  1967. .gpio0 = 0xc4bf,
  1968. /* 2: Line-In */
  1969. .audioroute = 2,
  1970. }, {
  1971. .type = CX88_VMUX_SVIDEO,
  1972. .vmux = 2,
  1973. .gpio0 = 0xc4bf,
  1974. /* 2: Line-In */
  1975. .audioroute = 2,
  1976. } },
  1977. .radio = {
  1978. .type = CX88_RADIO,
  1979. .gpio0 = 0xc4bf,
  1980. /* 4: FM Stereo */
  1981. .audioroute = 8,
  1982. },
  1983. .mpeg = CX88_MPEG_DVB,
  1984. .num_frontends = 2,
  1985. },
  1986. [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
  1987. .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
  1988. .tuner_type = UNSET,
  1989. .radio_type = UNSET,
  1990. .tuner_addr = ADDR_UNSET,
  1991. .radio_addr = ADDR_UNSET,
  1992. .input = { {
  1993. .type = CX88_VMUX_DVB,
  1994. .vmux = 0,
  1995. } },
  1996. .mpeg = CX88_MPEG_DVB,
  1997. },
  1998. [CX88_BOARD_TEVII_S420] = {
  1999. .name = "TeVii S420 DVB-S",
  2000. .tuner_type = UNSET,
  2001. .radio_type = UNSET,
  2002. .tuner_addr = ADDR_UNSET,
  2003. .radio_addr = ADDR_UNSET,
  2004. .input = { {
  2005. .type = CX88_VMUX_DVB,
  2006. .vmux = 0,
  2007. } },
  2008. .mpeg = CX88_MPEG_DVB,
  2009. },
  2010. [CX88_BOARD_TEVII_S460] = {
  2011. .name = "TeVii S460 DVB-S/S2",
  2012. .tuner_type = UNSET,
  2013. .radio_type = UNSET,
  2014. .tuner_addr = ADDR_UNSET,
  2015. .radio_addr = ADDR_UNSET,
  2016. .input = { {
  2017. .type = CX88_VMUX_DVB,
  2018. .vmux = 0,
  2019. } },
  2020. .mpeg = CX88_MPEG_DVB,
  2021. },
  2022. [CX88_BOARD_TEVII_S464] = {
  2023. .name = "TeVii S464 DVB-S/S2",
  2024. .tuner_type = UNSET,
  2025. .radio_type = UNSET,
  2026. .tuner_addr = ADDR_UNSET,
  2027. .radio_addr = ADDR_UNSET,
  2028. .input = { {
  2029. .type = CX88_VMUX_DVB,
  2030. .vmux = 0,
  2031. } },
  2032. .mpeg = CX88_MPEG_DVB,
  2033. },
  2034. [CX88_BOARD_OMICOM_SS4_PCI] = {
  2035. .name = "Omicom SS4 DVB-S/S2 PCI",
  2036. .tuner_type = UNSET,
  2037. .radio_type = UNSET,
  2038. .tuner_addr = ADDR_UNSET,
  2039. .radio_addr = ADDR_UNSET,
  2040. .input = { {
  2041. .type = CX88_VMUX_DVB,
  2042. .vmux = 0,
  2043. } },
  2044. .mpeg = CX88_MPEG_DVB,
  2045. },
  2046. [CX88_BOARD_TBS_8910] = {
  2047. .name = "TBS 8910 DVB-S",
  2048. .tuner_type = UNSET,
  2049. .radio_type = UNSET,
  2050. .tuner_addr = ADDR_UNSET,
  2051. .radio_addr = ADDR_UNSET,
  2052. .input = { {
  2053. .type = CX88_VMUX_DVB,
  2054. .vmux = 0,
  2055. } },
  2056. .mpeg = CX88_MPEG_DVB,
  2057. },
  2058. [CX88_BOARD_TBS_8920] = {
  2059. .name = "TBS 8920 DVB-S/S2",
  2060. .tuner_type = UNSET,
  2061. .radio_type = UNSET,
  2062. .tuner_addr = ADDR_UNSET,
  2063. .radio_addr = ADDR_UNSET,
  2064. .input = { {
  2065. .type = CX88_VMUX_DVB,
  2066. .vmux = 0,
  2067. .gpio0 = 0x8080,
  2068. } },
  2069. .mpeg = CX88_MPEG_DVB,
  2070. },
  2071. [CX88_BOARD_PROF_6200] = {
  2072. .name = "Prof 6200 DVB-S",
  2073. .tuner_type = UNSET,
  2074. .radio_type = UNSET,
  2075. .tuner_addr = ADDR_UNSET,
  2076. .radio_addr = ADDR_UNSET,
  2077. .input = { {
  2078. .type = CX88_VMUX_DVB,
  2079. .vmux = 0,
  2080. } },
  2081. .mpeg = CX88_MPEG_DVB,
  2082. },
  2083. [CX88_BOARD_PROF_7300] = {
  2084. .name = "PROF 7300 DVB-S/S2",
  2085. .tuner_type = UNSET,
  2086. .radio_type = UNSET,
  2087. .tuner_addr = ADDR_UNSET,
  2088. .radio_addr = ADDR_UNSET,
  2089. .input = { {
  2090. .type = CX88_VMUX_DVB,
  2091. .vmux = 0,
  2092. } },
  2093. .mpeg = CX88_MPEG_DVB,
  2094. },
  2095. [CX88_BOARD_SATTRADE_ST4200] = {
  2096. .name = "SATTRADE ST4200 DVB-S/S2",
  2097. .tuner_type = UNSET,
  2098. .radio_type = UNSET,
  2099. .tuner_addr = ADDR_UNSET,
  2100. .radio_addr = ADDR_UNSET,
  2101. .input = { {
  2102. .type = CX88_VMUX_DVB,
  2103. .vmux = 0,
  2104. } },
  2105. .mpeg = CX88_MPEG_DVB,
  2106. },
  2107. [CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII] = {
  2108. .name = "Terratec Cinergy HT PCI MKII",
  2109. .tuner_type = TUNER_XC2028,
  2110. .tuner_addr = 0x61,
  2111. .radio_type = UNSET,
  2112. .radio_addr = ADDR_UNSET,
  2113. .input = { {
  2114. .type = CX88_VMUX_TELEVISION,
  2115. .vmux = 0,
  2116. .gpio0 = 0x004ff,
  2117. .gpio1 = 0x010ff,
  2118. .gpio2 = 0x00001,
  2119. }, {
  2120. .type = CX88_VMUX_COMPOSITE1,
  2121. .vmux = 1,
  2122. .gpio0 = 0x004fb,
  2123. .gpio1 = 0x010ef,
  2124. .audioroute = 1,
  2125. }, {
  2126. .type = CX88_VMUX_SVIDEO,
  2127. .vmux = 2,
  2128. .gpio0 = 0x004fb,
  2129. .gpio1 = 0x010ef,
  2130. .audioroute = 1,
  2131. } },
  2132. .radio = {
  2133. .type = CX88_RADIO,
  2134. .gpio0 = 0x004ff,
  2135. .gpio1 = 0x010ff,
  2136. .gpio2 = 0x0ff,
  2137. },
  2138. .mpeg = CX88_MPEG_DVB,
  2139. },
  2140. [CX88_BOARD_HAUPPAUGE_IRONLY] = {
  2141. .name = "Hauppauge WinTV-IR Only",
  2142. .tuner_type = UNSET,
  2143. .radio_type = UNSET,
  2144. .tuner_addr = ADDR_UNSET,
  2145. .radio_addr = ADDR_UNSET,
  2146. },
  2147. [CX88_BOARD_WINFAST_DTV1800H] = {
  2148. .name = "Leadtek WinFast DTV1800 Hybrid",
  2149. .tuner_type = TUNER_XC2028,
  2150. .radio_type = UNSET,
  2151. .tuner_addr = 0x61,
  2152. .radio_addr = ADDR_UNSET,
  2153. /*
  2154. * GPIO setting
  2155. *
  2156. * 2: mute (0=off,1=on)
  2157. * 12: tuner reset pin
  2158. * 13: audio source (0=tuner audio,1=line in)
  2159. * 14: FM (0=on,1=off ???)
  2160. */
  2161. .input = { {
  2162. .type = CX88_VMUX_TELEVISION,
  2163. .vmux = 0,
  2164. .gpio0 = 0x0400, /* pin 2 = 0 */
  2165. .gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */
  2166. .gpio2 = 0x0000,
  2167. }, {
  2168. .type = CX88_VMUX_COMPOSITE1,
  2169. .vmux = 1,
  2170. .gpio0 = 0x0400, /* pin 2 = 0 */
  2171. .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
  2172. .gpio2 = 0x0000,
  2173. }, {
  2174. .type = CX88_VMUX_SVIDEO,
  2175. .vmux = 2,
  2176. .gpio0 = 0x0400, /* pin 2 = 0 */
  2177. .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
  2178. .gpio2 = 0x0000,
  2179. } },
  2180. .radio = {
  2181. .type = CX88_RADIO,
  2182. .gpio0 = 0x0400, /* pin 2 = 0 */
  2183. .gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */
  2184. .gpio2 = 0x0000,
  2185. },
  2186. .mpeg = CX88_MPEG_DVB,
  2187. },
  2188. [CX88_BOARD_WINFAST_DTV1800H_XC4000] = {
  2189. .name = "Leadtek WinFast DTV1800 H (XC4000)",
  2190. .tuner_type = TUNER_XC4000,
  2191. .radio_type = UNSET,
  2192. .tuner_addr = 0x61,
  2193. .radio_addr = ADDR_UNSET,
  2194. /*
  2195. * GPIO setting
  2196. *
  2197. * 2: mute (0=off,1=on)
  2198. * 12: tuner reset pin
  2199. * 13: audio source (0=tuner audio,1=line in)
  2200. * 14: FM (0=on,1=off ???)
  2201. */
  2202. .input = { {
  2203. .type = CX88_VMUX_TELEVISION,
  2204. .vmux = 0,
  2205. .gpio0 = 0x0400, /* pin 2 = 0 */
  2206. .gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */
  2207. .gpio2 = 0x0000,
  2208. }, {
  2209. .type = CX88_VMUX_COMPOSITE1,
  2210. .vmux = 1,
  2211. .gpio0 = 0x0400, /* pin 2 = 0 */
  2212. .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
  2213. .gpio2 = 0x0000,
  2214. }, {
  2215. .type = CX88_VMUX_SVIDEO,
  2216. .vmux = 2,
  2217. .gpio0 = 0x0400, /* pin 2 = 0 */
  2218. .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
  2219. .gpio2 = 0x0000,
  2220. } },
  2221. .radio = {
  2222. .type = CX88_RADIO,
  2223. .gpio0 = 0x0400, /* pin 2 = 0 */
  2224. .gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */
  2225. .gpio2 = 0x0000,
  2226. },
  2227. .mpeg = CX88_MPEG_DVB,
  2228. },
  2229. [CX88_BOARD_WINFAST_DTV2000H_PLUS] = {
  2230. .name = "Leadtek WinFast DTV2000 H PLUS",
  2231. .tuner_type = TUNER_XC4000,
  2232. .radio_type = UNSET,
  2233. .tuner_addr = 0x61,
  2234. .radio_addr = ADDR_UNSET,
  2235. /*
  2236. * GPIO
  2237. * 2: 1: mute audio
  2238. * 12: 0: reset XC4000
  2239. * 13: 1: audio input is line in (0: tuner)
  2240. * 14: 0: FM radio
  2241. * 16: 0: RF input is cable
  2242. */
  2243. .input = { {
  2244. .type = CX88_VMUX_TELEVISION,
  2245. .vmux = 0,
  2246. .gpio0 = 0x0403,
  2247. .gpio1 = 0xF0D7,
  2248. .gpio2 = 0x0101,
  2249. .gpio3 = 0x0000,
  2250. }, {
  2251. .type = CX88_VMUX_CABLE,
  2252. .vmux = 0,
  2253. .gpio0 = 0x0403,
  2254. .gpio1 = 0xF0D7,
  2255. .gpio2 = 0x0100,
  2256. .gpio3 = 0x0000,
  2257. }, {
  2258. .type = CX88_VMUX_COMPOSITE1,
  2259. .vmux = 1,
  2260. .gpio0 = 0x0403, /* was 0x0407 */
  2261. .gpio1 = 0xF0F7,
  2262. .gpio2 = 0x0101,
  2263. .gpio3 = 0x0000,
  2264. }, {
  2265. .type = CX88_VMUX_SVIDEO,
  2266. .vmux = 2,
  2267. .gpio0 = 0x0403, /* was 0x0407 */
  2268. .gpio1 = 0xF0F7,
  2269. .gpio2 = 0x0101,
  2270. .gpio3 = 0x0000,
  2271. } },
  2272. .radio = {
  2273. .type = CX88_RADIO,
  2274. .gpio0 = 0x0403,
  2275. .gpio1 = 0xF097,
  2276. .gpio2 = 0x0100,
  2277. .gpio3 = 0x0000,
  2278. },
  2279. .mpeg = CX88_MPEG_DVB,
  2280. },
  2281. [CX88_BOARD_PROF_7301] = {
  2282. .name = "Prof 7301 DVB-S/S2",
  2283. .tuner_type = UNSET,
  2284. .radio_type = UNSET,
  2285. .tuner_addr = ADDR_UNSET,
  2286. .radio_addr = ADDR_UNSET,
  2287. .input = { {
  2288. .type = CX88_VMUX_DVB,
  2289. .vmux = 0,
  2290. } },
  2291. .mpeg = CX88_MPEG_DVB,
  2292. },
  2293. [CX88_BOARD_TWINHAN_VP1027_DVBS] = {
  2294. .name = "Twinhan VP-1027 DVB-S",
  2295. .tuner_type = UNSET,
  2296. .radio_type = UNSET,
  2297. .tuner_addr = ADDR_UNSET,
  2298. .radio_addr = ADDR_UNSET,
  2299. .input = { {
  2300. .type = CX88_VMUX_DVB,
  2301. .vmux = 0,
  2302. } },
  2303. .mpeg = CX88_MPEG_DVB,
  2304. },
  2305. };
  2306. /* ------------------------------------------------------------------ */
  2307. /* PCI subsystem IDs */
  2308. static const struct cx88_subid cx88_subids[] = {
  2309. {
  2310. .subvendor = 0x0070,
  2311. .subdevice = 0x3400,
  2312. .card = CX88_BOARD_HAUPPAUGE,
  2313. }, {
  2314. .subvendor = 0x0070,
  2315. .subdevice = 0x3401,
  2316. .card = CX88_BOARD_HAUPPAUGE,
  2317. }, {
  2318. .subvendor = 0x14c7,
  2319. .subdevice = 0x0106,
  2320. .card = CX88_BOARD_GDI,
  2321. }, {
  2322. .subvendor = 0x14c7,
  2323. .subdevice = 0x0107, /* with mpeg encoder */
  2324. .card = CX88_BOARD_GDI,
  2325. }, {
  2326. .subvendor = PCI_VENDOR_ID_ATI,
  2327. .subdevice = 0x00f8,
  2328. .card = CX88_BOARD_ATI_WONDER_PRO,
  2329. }, {
  2330. .subvendor = PCI_VENDOR_ID_ATI,
  2331. .subdevice = 0x00f9,
  2332. .card = CX88_BOARD_ATI_WONDER_PRO,
  2333. }, {
  2334. .subvendor = 0x107d,
  2335. .subdevice = 0x6611,
  2336. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  2337. }, {
  2338. .subvendor = 0x107d,
  2339. .subdevice = 0x6613, /* NTSC */
  2340. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  2341. }, {
  2342. .subvendor = 0x107d,
  2343. .subdevice = 0x6620,
  2344. .card = CX88_BOARD_WINFAST_DV2000,
  2345. }, {
  2346. .subvendor = 0x107d,
  2347. .subdevice = 0x663b,
  2348. .card = CX88_BOARD_LEADTEK_PVR2000,
  2349. }, {
  2350. .subvendor = 0x107d,
  2351. .subdevice = 0x663c,
  2352. .card = CX88_BOARD_LEADTEK_PVR2000,
  2353. }, {
  2354. .subvendor = 0x1461,
  2355. .subdevice = 0x000b,
  2356. .card = CX88_BOARD_AVERTV_STUDIO_303,
  2357. }, {
  2358. .subvendor = 0x1462,
  2359. .subdevice = 0x8606,
  2360. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  2361. }, {
  2362. .subvendor = 0x10fc,
  2363. .subdevice = 0xd003,
  2364. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  2365. }, {
  2366. .subvendor = 0x1043,
  2367. .subdevice = 0x4823, /* with mpeg encoder */
  2368. .card = CX88_BOARD_ASUS_PVR_416,
  2369. }, {
  2370. .subvendor = 0x17de,
  2371. .subdevice = 0x08a6,
  2372. .card = CX88_BOARD_KWORLD_DVB_T,
  2373. }, {
  2374. .subvendor = 0x18ac,
  2375. .subdevice = 0xd810,
  2376. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  2377. }, {
  2378. .subvendor = 0x18ac,
  2379. .subdevice = 0xd820,
  2380. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  2381. }, {
  2382. .subvendor = 0x18ac,
  2383. .subdevice = 0xdb00,
  2384. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  2385. }, {
  2386. .subvendor = 0x0070,
  2387. .subdevice = 0x9002,
  2388. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2389. }, {
  2390. .subvendor = 0x14f1,
  2391. .subdevice = 0x0187,
  2392. .card = CX88_BOARD_CONEXANT_DVB_T1,
  2393. }, {
  2394. .subvendor = 0x1540,
  2395. .subdevice = 0x2580,
  2396. .card = CX88_BOARD_PROVIDEO_PV259,
  2397. }, {
  2398. .subvendor = 0x18ac,
  2399. .subdevice = 0xdb10,
  2400. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  2401. }, {
  2402. .subvendor = 0x1554,
  2403. .subdevice = 0x4811,
  2404. .card = CX88_BOARD_PIXELVIEW,
  2405. }, {
  2406. .subvendor = 0x7063,
  2407. .subdevice = 0x3000, /* HD-3000 card */
  2408. .card = CX88_BOARD_PCHDTV_HD3000,
  2409. }, {
  2410. .subvendor = 0x17de,
  2411. .subdevice = 0xa8a6,
  2412. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  2413. }, {
  2414. .subvendor = 0x0070,
  2415. .subdevice = 0x2801,
  2416. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  2417. }, {
  2418. .subvendor = 0x14f1,
  2419. .subdevice = 0x0342,
  2420. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  2421. }, {
  2422. .subvendor = 0x10fc,
  2423. .subdevice = 0xd035,
  2424. .card = CX88_BOARD_IODATA_GVBCTV7E,
  2425. }, {
  2426. .subvendor = 0x1421,
  2427. .subdevice = 0x0334,
  2428. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  2429. }, {
  2430. .subvendor = 0x153b,
  2431. .subdevice = 0x1166,
  2432. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  2433. }, {
  2434. .subvendor = 0x18ac,
  2435. .subdevice = 0xd500,
  2436. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  2437. }, {
  2438. .subvendor = 0x1461,
  2439. .subdevice = 0x8011,
  2440. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  2441. }, {
  2442. .subvendor = PCI_VENDOR_ID_ATI,
  2443. .subdevice = 0xa101,
  2444. .card = CX88_BOARD_ATI_HDTVWONDER,
  2445. }, {
  2446. .subvendor = 0x107d,
  2447. .subdevice = 0x665f,
  2448. .card = CX88_BOARD_WINFAST_DTV1000,
  2449. }, {
  2450. .subvendor = 0x1461,
  2451. .subdevice = 0x000a,
  2452. .card = CX88_BOARD_AVERTV_303,
  2453. }, {
  2454. .subvendor = 0x0070,
  2455. .subdevice = 0x9200,
  2456. .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
  2457. }, {
  2458. .subvendor = 0x0070,
  2459. .subdevice = 0x9201,
  2460. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  2461. }, {
  2462. .subvendor = 0x0070,
  2463. .subdevice = 0x9202,
  2464. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  2465. }, {
  2466. .subvendor = 0x17de,
  2467. .subdevice = 0x08b2,
  2468. .card = CX88_BOARD_KWORLD_DVBS_100,
  2469. }, {
  2470. .subvendor = 0x0070,
  2471. .subdevice = 0x9400,
  2472. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  2473. }, {
  2474. .subvendor = 0x0070,
  2475. .subdevice = 0x9402,
  2476. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  2477. }, {
  2478. .subvendor = 0x0070,
  2479. .subdevice = 0x9800,
  2480. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  2481. }, {
  2482. .subvendor = 0x0070,
  2483. .subdevice = 0x9802,
  2484. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  2485. }, {
  2486. .subvendor = 0x0070,
  2487. .subdevice = 0x9001,
  2488. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2489. }, {
  2490. .subvendor = 0x1822,
  2491. .subdevice = 0x0025,
  2492. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  2493. }, {
  2494. .subvendor = 0x17de,
  2495. .subdevice = 0x08a1,
  2496. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  2497. }, {
  2498. .subvendor = 0x18ac,
  2499. .subdevice = 0xdb50,
  2500. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  2501. }, {
  2502. .subvendor = 0x18ac,
  2503. .subdevice = 0xdb54,
  2504. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  2505. /* Re-branded DViCO: DigitalNow DVB-T Dual */
  2506. }, {
  2507. .subvendor = 0x18ac,
  2508. .subdevice = 0xdb11,
  2509. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  2510. /* Re-branded DViCO: UltraView DVB-T Plus */
  2511. }, {
  2512. .subvendor = 0x18ac,
  2513. .subdevice = 0xdb30,
  2514. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
  2515. }, {
  2516. .subvendor = 0x17de,
  2517. .subdevice = 0x0840,
  2518. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  2519. }, {
  2520. .subvendor = 0x1421,
  2521. .subdevice = 0x0305,
  2522. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  2523. }, {
  2524. .subvendor = 0x18ac,
  2525. .subdevice = 0xdb40,
  2526. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  2527. }, {
  2528. .subvendor = 0x18ac,
  2529. .subdevice = 0xdb44,
  2530. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  2531. }, {
  2532. .subvendor = 0x7063,
  2533. .subdevice = 0x5500,
  2534. .card = CX88_BOARD_PCHDTV_HD5500,
  2535. }, {
  2536. .subvendor = 0x17de,
  2537. .subdevice = 0x0841,
  2538. .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
  2539. }, {
  2540. .subvendor = 0x1822,
  2541. .subdevice = 0x0019,
  2542. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  2543. }, {
  2544. .subvendor = 0x1554,
  2545. .subdevice = 0x4813,
  2546. .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
  2547. }, {
  2548. .subvendor = 0x14f1,
  2549. .subdevice = 0x0842,
  2550. .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
  2551. }, {
  2552. .subvendor = 0x107d,
  2553. .subdevice = 0x665e,
  2554. .card = CX88_BOARD_WINFAST_DTV2000H,
  2555. }, {
  2556. .subvendor = 0x107d,
  2557. .subdevice = 0x6f2b,
  2558. .card = CX88_BOARD_WINFAST_DTV2000H_J,
  2559. }, {
  2560. .subvendor = 0x18ac,
  2561. .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
  2562. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  2563. }, {
  2564. .subvendor = 0x14f1,
  2565. .subdevice = 0x0084,
  2566. .card = CX88_BOARD_GENIATECH_DVBS,
  2567. }, {
  2568. .subvendor = 0x0070,
  2569. .subdevice = 0x1404,
  2570. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2571. }, {
  2572. .subvendor = 0x18ac,
  2573. .subdevice = 0xdc00,
  2574. .card = CX88_BOARD_SAMSUNG_SMT_7020,
  2575. }, {
  2576. .subvendor = 0x18ac,
  2577. .subdevice = 0xdccd,
  2578. .card = CX88_BOARD_SAMSUNG_SMT_7020,
  2579. }, {
  2580. .subvendor = 0x1461,
  2581. .subdevice = 0xc111, /* AverMedia M150-D */
  2582. /* This board is known to work with the ASUS PVR416 config */
  2583. .card = CX88_BOARD_ASUS_PVR_416,
  2584. }, {
  2585. .subvendor = 0xc180,
  2586. .subdevice = 0xc980,
  2587. .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
  2588. }, {
  2589. .subvendor = 0x0070,
  2590. .subdevice = 0x9600,
  2591. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2592. }, {
  2593. .subvendor = 0x0070,
  2594. .subdevice = 0x9601,
  2595. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2596. }, {
  2597. .subvendor = 0x0070,
  2598. .subdevice = 0x9602,
  2599. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2600. }, {
  2601. .subvendor = 0x107d,
  2602. .subdevice = 0x6632,
  2603. .card = CX88_BOARD_LEADTEK_PVR2000,
  2604. }, {
  2605. .subvendor = 0x12ab,
  2606. .subdevice = 0x2300, /* Club3D Zap TV2100 */
  2607. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  2608. }, {
  2609. .subvendor = 0x0070,
  2610. .subdevice = 0x9000,
  2611. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2612. }, {
  2613. .subvendor = 0x0070,
  2614. .subdevice = 0x1400,
  2615. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2616. }, {
  2617. .subvendor = 0x0070,
  2618. .subdevice = 0x1401,
  2619. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2620. }, {
  2621. .subvendor = 0x0070,
  2622. .subdevice = 0x1402,
  2623. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2624. }, {
  2625. .subvendor = 0x1421,
  2626. .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
  2627. .card = CX88_BOARD_KWORLD_DVBS_100,
  2628. }, {
  2629. .subvendor = 0x1421,
  2630. .subdevice = 0x0390,
  2631. .card = CX88_BOARD_ADSTECH_PTV_390,
  2632. }, {
  2633. .subvendor = 0x11bd,
  2634. .subdevice = 0x0051,
  2635. .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
  2636. }, {
  2637. .subvendor = 0x18ac,
  2638. .subdevice = 0xd530,
  2639. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
  2640. }, {
  2641. .subvendor = 0x12ab,
  2642. .subdevice = 0x1788,
  2643. .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
  2644. }, {
  2645. .subvendor = 0x14f1,
  2646. .subdevice = 0xea3d,
  2647. .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
  2648. }, {
  2649. .subvendor = 0x107d,
  2650. .subdevice = 0x6f18,
  2651. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
  2652. }, {
  2653. .subvendor = 0x14f1,
  2654. .subdevice = 0x8852,
  2655. .card = CX88_BOARD_GENIATECH_X8000_MT,
  2656. }, {
  2657. .subvendor = 0x18ac,
  2658. .subdevice = 0xd610,
  2659. .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
  2660. }, {
  2661. .subvendor = 0x1554,
  2662. .subdevice = 0x4935,
  2663. .card = CX88_BOARD_PROLINK_PV_8000GT,
  2664. }, {
  2665. .subvendor = 0x1554,
  2666. .subdevice = 0x4976,
  2667. .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
  2668. }, {
  2669. .subvendor = 0x17de,
  2670. .subdevice = 0x08c1,
  2671. .card = CX88_BOARD_KWORLD_ATSC_120,
  2672. }, {
  2673. .subvendor = 0x0070,
  2674. .subdevice = 0x6900,
  2675. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2676. }, {
  2677. .subvendor = 0x0070,
  2678. .subdevice = 0x6904,
  2679. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2680. }, {
  2681. .subvendor = 0x0070,
  2682. .subdevice = 0x6902,
  2683. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2684. }, {
  2685. .subvendor = 0x0070,
  2686. .subdevice = 0x6905,
  2687. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2688. }, {
  2689. .subvendor = 0x0070,
  2690. .subdevice = 0x6906,
  2691. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2692. }, {
  2693. .subvendor = 0xd420,
  2694. .subdevice = 0x9022,
  2695. .card = CX88_BOARD_TEVII_S420,
  2696. }, {
  2697. .subvendor = 0xd460,
  2698. .subdevice = 0x9022,
  2699. .card = CX88_BOARD_TEVII_S460,
  2700. }, {
  2701. .subvendor = 0xd464,
  2702. .subdevice = 0x9022,
  2703. .card = CX88_BOARD_TEVII_S464,
  2704. }, {
  2705. .subvendor = 0xA044,
  2706. .subdevice = 0x2011,
  2707. .card = CX88_BOARD_OMICOM_SS4_PCI,
  2708. }, {
  2709. .subvendor = 0x8910,
  2710. .subdevice = 0x8888,
  2711. .card = CX88_BOARD_TBS_8910,
  2712. }, {
  2713. .subvendor = 0x8920,
  2714. .subdevice = 0x8888,
  2715. .card = CX88_BOARD_TBS_8920,
  2716. }, {
  2717. .subvendor = 0xb022,
  2718. .subdevice = 0x3022,
  2719. .card = CX88_BOARD_PROF_6200,
  2720. }, {
  2721. .subvendor = 0xB033,
  2722. .subdevice = 0x3033,
  2723. .card = CX88_BOARD_PROF_7300,
  2724. }, {
  2725. .subvendor = 0xb200,
  2726. .subdevice = 0x4200,
  2727. .card = CX88_BOARD_SATTRADE_ST4200,
  2728. }, {
  2729. .subvendor = 0x153b,
  2730. .subdevice = 0x1177,
  2731. .card = CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII,
  2732. }, {
  2733. .subvendor = 0x0070,
  2734. .subdevice = 0x9290,
  2735. .card = CX88_BOARD_HAUPPAUGE_IRONLY,
  2736. }, {
  2737. .subvendor = 0x107d,
  2738. .subdevice = 0x6654,
  2739. .card = CX88_BOARD_WINFAST_DTV1800H,
  2740. }, {
  2741. /* WinFast DTV1800 H with XC4000 tuner */
  2742. .subvendor = 0x107d,
  2743. .subdevice = 0x6f38,
  2744. .card = CX88_BOARD_WINFAST_DTV1800H_XC4000,
  2745. }, {
  2746. .subvendor = 0x107d,
  2747. .subdevice = 0x6f42,
  2748. .card = CX88_BOARD_WINFAST_DTV2000H_PLUS,
  2749. }, {
  2750. /* PVR2000 PAL Model [107d:6630] */
  2751. .subvendor = 0x107d,
  2752. .subdevice = 0x6630,
  2753. .card = CX88_BOARD_LEADTEK_PVR2000,
  2754. }, {
  2755. /* PVR2000 PAL Model [107d:6638] */
  2756. .subvendor = 0x107d,
  2757. .subdevice = 0x6638,
  2758. .card = CX88_BOARD_LEADTEK_PVR2000,
  2759. }, {
  2760. /* PVR2000 NTSC Model [107d:6631] */
  2761. .subvendor = 0x107d,
  2762. .subdevice = 0x6631,
  2763. .card = CX88_BOARD_LEADTEK_PVR2000,
  2764. }, {
  2765. /* PVR2000 NTSC Model [107d:6637] */
  2766. .subvendor = 0x107d,
  2767. .subdevice = 0x6637,
  2768. .card = CX88_BOARD_LEADTEK_PVR2000,
  2769. }, {
  2770. /* PVR2000 NTSC Model [107d:663d] */
  2771. .subvendor = 0x107d,
  2772. .subdevice = 0x663d,
  2773. .card = CX88_BOARD_LEADTEK_PVR2000,
  2774. }, {
  2775. /* DV2000 NTSC Model [107d:6621] */
  2776. .subvendor = 0x107d,
  2777. .subdevice = 0x6621,
  2778. .card = CX88_BOARD_WINFAST_DV2000,
  2779. }, {
  2780. /* TV2000 XP Global [107d:6618] */
  2781. .subvendor = 0x107d,
  2782. .subdevice = 0x6618,
  2783. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
  2784. }, {
  2785. /* TV2000 XP Global [107d:6618] */
  2786. .subvendor = 0x107d,
  2787. .subdevice = 0x6619,
  2788. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
  2789. }, {
  2790. /* WinFast TV2000 XP Global with XC4000 tuner */
  2791. .subvendor = 0x107d,
  2792. .subdevice = 0x6f36,
  2793. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36,
  2794. }, {
  2795. /* WinFast TV2000 XP Global with XC4000 tuner and different GPIOs */
  2796. .subvendor = 0x107d,
  2797. .subdevice = 0x6f43,
  2798. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43,
  2799. }, {
  2800. .subvendor = 0xb034,
  2801. .subdevice = 0x3034,
  2802. .card = CX88_BOARD_PROF_7301,
  2803. }, {
  2804. .subvendor = 0x1822,
  2805. .subdevice = 0x0023,
  2806. .card = CX88_BOARD_TWINHAN_VP1027_DVBS,
  2807. },
  2808. };
  2809. /*
  2810. * some leadtek specific stuff
  2811. */
  2812. static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2813. {
  2814. if (eeprom_data[4] != 0x7d ||
  2815. eeprom_data[5] != 0x10 ||
  2816. eeprom_data[7] != 0x66) {
  2817. pr_warn("Leadtek eeprom invalid.\n");
  2818. return;
  2819. }
  2820. /* Terry Wu <terrywu2009@gmail.com> */
  2821. switch (eeprom_data[6]) {
  2822. case 0x13: /* SSID 6613 for TV2000 XP Expert NTSC Model */
  2823. case 0x21: /* SSID 6621 for DV2000 NTSC Model */
  2824. case 0x31: /* SSID 6631 for PVR2000 NTSC Model */
  2825. case 0x37: /* SSID 6637 for PVR2000 NTSC Model */
  2826. case 0x3d: /* SSID 6637 for PVR2000 NTSC Model */
  2827. core->board.tuner_type = TUNER_PHILIPS_FM1236_MK3;
  2828. break;
  2829. default:
  2830. core->board.tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
  2831. break;
  2832. }
  2833. pr_info("Leadtek Winfast 2000XP Expert config: tuner=%d, eeprom[0]=0x%02x\n",
  2834. core->board.tuner_type, eeprom_data[0]);
  2835. }
  2836. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2837. {
  2838. struct tveeprom tv;
  2839. tveeprom_hauppauge_analog(&tv, eeprom_data);
  2840. core->board.tuner_type = tv.tuner_type;
  2841. core->tuner_formats = tv.tuner_formats;
  2842. core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
  2843. core->model = tv.model;
  2844. /* Make sure we support the board model */
  2845. switch (tv.model) {
  2846. case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
  2847. case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
  2848. case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
  2849. case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
  2850. case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
  2851. case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
  2852. case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
  2853. case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
  2854. case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
  2855. case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
  2856. case 34519: /* WinTV-PCI-FM */
  2857. case 69009:
  2858. /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
  2859. case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
  2860. case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
  2861. case 69559:
  2862. /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
  2863. case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
  2864. case 90002: /* Nova-T-PCI (9002) */
  2865. case 92001: /* Nova-S-Plus (Video and IR) */
  2866. case 92002: /* Nova-S-Plus (Video and IR) */
  2867. case 90003: /* Nova-T-PCI (9002 No RF out) */
  2868. case 90500: /* Nova-T-PCI (oem) */
  2869. case 90501: /* Nova-T-PCI (oem/IR) */
  2870. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  2871. case 92900: /* WinTV-IROnly (No analog or digital Video inputs) */
  2872. case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
  2873. case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
  2874. case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
  2875. case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
  2876. case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
  2877. case 96569: /* WinTV-HVR1300 () */
  2878. case 96659: /* WinTV-HVR1300 () */
  2879. case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
  2880. /* known */
  2881. break;
  2882. case CX88_BOARD_SAMSUNG_SMT_7020:
  2883. cx_set(MO_GP0_IO, 0x008989FF);
  2884. break;
  2885. default:
  2886. pr_warn("warning: unknown hauppauge model #%d\n", tv.model);
  2887. break;
  2888. }
  2889. pr_info("hauppauge eeprom: model=%d\n", tv.model);
  2890. }
  2891. /*
  2892. * some GDI (was: Modular Technology) specific stuff
  2893. */
  2894. static const struct {
  2895. int id;
  2896. int fm;
  2897. const char *name;
  2898. } gdi_tuner[] = {
  2899. [0x01] = { .id = UNSET,
  2900. .name = "NTSC_M" },
  2901. [0x02] = { .id = UNSET,
  2902. .name = "PAL_B" },
  2903. [0x03] = { .id = UNSET,
  2904. .name = "PAL_I" },
  2905. [0x04] = { .id = UNSET,
  2906. .name = "PAL_D" },
  2907. [0x05] = { .id = UNSET,
  2908. .name = "SECAM" },
  2909. [0x10] = { .id = UNSET,
  2910. .fm = 1,
  2911. .name = "TEMIC_4049" },
  2912. [0x11] = { .id = TUNER_TEMIC_4136FY5,
  2913. .name = "TEMIC_4136" },
  2914. [0x12] = { .id = UNSET,
  2915. .name = "TEMIC_4146" },
  2916. [0x20] = { .id = TUNER_PHILIPS_FQ1216ME,
  2917. .fm = 1,
  2918. .name = "PHILIPS_FQ1216_MK3" },
  2919. [0x21] = { .id = UNSET, .fm = 1,
  2920. .name = "PHILIPS_FQ1236_MK3" },
  2921. [0x22] = { .id = UNSET,
  2922. .name = "PHILIPS_FI1236_MK3" },
  2923. [0x23] = { .id = UNSET,
  2924. .name = "PHILIPS_FI1216_MK3" },
  2925. };
  2926. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2927. {
  2928. const char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  2929. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  2930. pr_info("GDI: tuner=%s\n", name ? name : "unknown");
  2931. if (!name)
  2932. return;
  2933. core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  2934. core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
  2935. CX88_RADIO : 0;
  2936. }
  2937. /*
  2938. * some Divco specific stuff
  2939. */
  2940. static int cx88_dvico_xc2028_callback(struct cx88_core *core,
  2941. int command, int arg)
  2942. {
  2943. switch (command) {
  2944. case XC2028_TUNER_RESET:
  2945. switch (core->boardnr) {
  2946. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2947. /* GPIO-4 xc3028 tuner */
  2948. cx_set(MO_GP0_IO, 0x00001000);
  2949. cx_clear(MO_GP0_IO, 0x00000010);
  2950. msleep(100);
  2951. cx_set(MO_GP0_IO, 0x00000010);
  2952. msleep(100);
  2953. break;
  2954. default:
  2955. cx_write(MO_GP0_IO, 0x101000);
  2956. mdelay(5);
  2957. cx_set(MO_GP0_IO, 0x101010);
  2958. }
  2959. break;
  2960. default:
  2961. return -EINVAL;
  2962. }
  2963. return 0;
  2964. }
  2965. /*
  2966. * some Geniatech specific stuff
  2967. */
  2968. static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
  2969. int command, int mode)
  2970. {
  2971. switch (command) {
  2972. case XC2028_TUNER_RESET:
  2973. switch (INPUT(core->input).type) {
  2974. case CX88_RADIO:
  2975. break;
  2976. case CX88_VMUX_DVB:
  2977. cx_write(MO_GP1_IO, 0x030302);
  2978. mdelay(50);
  2979. break;
  2980. default:
  2981. cx_write(MO_GP1_IO, 0x030301);
  2982. mdelay(50);
  2983. }
  2984. cx_write(MO_GP1_IO, 0x101010);
  2985. mdelay(50);
  2986. cx_write(MO_GP1_IO, 0x101000);
  2987. mdelay(50);
  2988. cx_write(MO_GP1_IO, 0x101010);
  2989. mdelay(50);
  2990. return 0;
  2991. }
  2992. return -EINVAL;
  2993. }
  2994. static int cx88_xc3028_winfast1800h_callback(struct cx88_core *core,
  2995. int command, int arg)
  2996. {
  2997. switch (command) {
  2998. case XC2028_TUNER_RESET:
  2999. /* GPIO 12 (xc3028 tuner reset) */
  3000. cx_set(MO_GP1_IO, 0x1010);
  3001. mdelay(50);
  3002. cx_clear(MO_GP1_IO, 0x10);
  3003. mdelay(75);
  3004. cx_set(MO_GP1_IO, 0x10);
  3005. mdelay(75);
  3006. return 0;
  3007. }
  3008. return -EINVAL;
  3009. }
  3010. static int cx88_xc4000_winfast2000h_plus_callback(struct cx88_core *core,
  3011. int command, int arg)
  3012. {
  3013. switch (command) {
  3014. case XC4000_TUNER_RESET:
  3015. /* GPIO 12 (xc4000 tuner reset) */
  3016. cx_set(MO_GP1_IO, 0x1010);
  3017. mdelay(50);
  3018. cx_clear(MO_GP1_IO, 0x10);
  3019. mdelay(75);
  3020. cx_set(MO_GP1_IO, 0x10);
  3021. mdelay(75);
  3022. return 0;
  3023. }
  3024. return -EINVAL;
  3025. }
  3026. /*
  3027. * some Divco specific stuff
  3028. */
  3029. static int cx88_pv_8000gt_callback(struct cx88_core *core,
  3030. int command, int arg)
  3031. {
  3032. switch (command) {
  3033. case XC2028_TUNER_RESET:
  3034. cx_write(MO_GP2_IO, 0xcf7);
  3035. mdelay(50);
  3036. cx_write(MO_GP2_IO, 0xef5);
  3037. mdelay(50);
  3038. cx_write(MO_GP2_IO, 0xcf7);
  3039. break;
  3040. default:
  3041. return -EINVAL;
  3042. }
  3043. return 0;
  3044. }
  3045. /*
  3046. * some DViCO specific stuff
  3047. */
  3048. static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
  3049. {
  3050. struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
  3051. int i, err;
  3052. static u8 init_bufs[13][5] = {
  3053. { 0x10, 0x00, 0x20, 0x01, 0x03 },
  3054. { 0x10, 0x10, 0x01, 0x00, 0x21 },
  3055. { 0x10, 0x10, 0x10, 0x00, 0xCA },
  3056. { 0x10, 0x10, 0x12, 0x00, 0x08 },
  3057. { 0x10, 0x10, 0x13, 0x00, 0x0A },
  3058. { 0x10, 0x10, 0x16, 0x01, 0xC0 },
  3059. { 0x10, 0x10, 0x22, 0x01, 0x3D },
  3060. { 0x10, 0x10, 0x73, 0x01, 0x2E },
  3061. { 0x10, 0x10, 0x72, 0x00, 0xC5 },
  3062. { 0x10, 0x10, 0x71, 0x01, 0x97 },
  3063. { 0x10, 0x10, 0x70, 0x00, 0x0F },
  3064. { 0x10, 0x10, 0xB0, 0x00, 0x01 },
  3065. { 0x03, 0x0C },
  3066. };
  3067. for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
  3068. msg.buf = init_bufs[i];
  3069. msg.len = (i != 12 ? 5 : 2);
  3070. err = i2c_transfer(&core->i2c_adap, &msg, 1);
  3071. if (err != 1) {
  3072. pr_warn("dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n",
  3073. i, err);
  3074. return;
  3075. }
  3076. }
  3077. }
  3078. static int cx88_xc2028_tuner_callback(struct cx88_core *core,
  3079. int command, int arg)
  3080. {
  3081. /* Board-specific callbacks */
  3082. switch (core->boardnr) {
  3083. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  3084. case CX88_BOARD_GENIATECH_X8000_MT:
  3085. case CX88_BOARD_KWORLD_ATSC_120:
  3086. return cx88_xc3028_geniatech_tuner_callback(core,
  3087. command, arg);
  3088. case CX88_BOARD_PROLINK_PV_8000GT:
  3089. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  3090. return cx88_pv_8000gt_callback(core, command, arg);
  3091. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  3092. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  3093. return cx88_dvico_xc2028_callback(core, command, arg);
  3094. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  3095. case CX88_BOARD_WINFAST_DTV1800H:
  3096. return cx88_xc3028_winfast1800h_callback(core, command, arg);
  3097. }
  3098. switch (command) {
  3099. case XC2028_TUNER_RESET:
  3100. switch (INPUT(core->input).type) {
  3101. case CX88_RADIO:
  3102. dprintk(1, "setting GPIO to radio!\n");
  3103. cx_write(MO_GP0_IO, 0x4ff);
  3104. mdelay(250);
  3105. cx_write(MO_GP2_IO, 0xff);
  3106. mdelay(250);
  3107. break;
  3108. case CX88_VMUX_DVB: /* Digital TV*/
  3109. default: /* Analog TV */
  3110. dprintk(1, "setting GPIO to TV!\n");
  3111. break;
  3112. }
  3113. cx_write(MO_GP1_IO, 0x101010);
  3114. mdelay(250);
  3115. cx_write(MO_GP1_IO, 0x101000);
  3116. mdelay(250);
  3117. cx_write(MO_GP1_IO, 0x101010);
  3118. mdelay(250);
  3119. return 0;
  3120. }
  3121. return -EINVAL;
  3122. }
  3123. static int cx88_xc4000_tuner_callback(struct cx88_core *core,
  3124. int command, int arg)
  3125. {
  3126. /* Board-specific callbacks */
  3127. switch (core->boardnr) {
  3128. case CX88_BOARD_WINFAST_DTV1800H_XC4000:
  3129. case CX88_BOARD_WINFAST_DTV2000H_PLUS:
  3130. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36:
  3131. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43:
  3132. return cx88_xc4000_winfast2000h_plus_callback(core,
  3133. command, arg);
  3134. }
  3135. return -EINVAL;
  3136. }
  3137. /*
  3138. * Tuner callback function. Currently only needed for the Pinnacle
  3139. * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both
  3140. * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c)
  3141. */
  3142. static int cx88_xc5000_tuner_callback(struct cx88_core *core,
  3143. int command, int arg)
  3144. {
  3145. switch (core->boardnr) {
  3146. case CX88_BOARD_PINNACLE_PCTV_HD_800i:
  3147. if (command == 0) { /* This is the reset command from xc5000 */
  3148. /*
  3149. * djh - According to the engineer at PCTV Systems,
  3150. * the xc5000 reset pin is supposed to be on GPIO12.
  3151. * However, despite three nights of effort, pulling
  3152. * that GPIO low didn't reset the xc5000. While
  3153. * pulling MO_SRST_IO low does reset the xc5000, this
  3154. * also resets in the s5h1409 being reset as well.
  3155. * This causes tuning to always fail since the internal
  3156. * state of the s5h1409 does not match the driver's
  3157. * state. Given that the only two conditions in which
  3158. * the driver performs a reset is during firmware load
  3159. * and powering down the chip, I am taking out the
  3160. * reset. We know that the chip is being reset
  3161. * when the cx88 comes online, and not being able to
  3162. * do power management for this board is worse than
  3163. * not having any tuning at all.
  3164. */
  3165. return 0;
  3166. }
  3167. dprintk(1, "xc5000: unknown tuner callback command.\n");
  3168. return -EINVAL;
  3169. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  3170. if (command == 0) { /* This is the reset command from xc5000 */
  3171. cx_clear(MO_GP0_IO, 0x00000010);
  3172. usleep_range(10000, 20000);
  3173. cx_set(MO_GP0_IO, 0x00000010);
  3174. return 0;
  3175. }
  3176. dprintk(1, "xc5000: unknown tuner callback command.\n");
  3177. return -EINVAL;
  3178. }
  3179. return 0; /* Should never be here */
  3180. }
  3181. int cx88_tuner_callback(void *priv, int component, int command, int arg)
  3182. {
  3183. struct i2c_algo_bit_data *i2c_algo = priv;
  3184. struct cx88_core *core;
  3185. if (!i2c_algo) {
  3186. pr_err("Error - i2c private data undefined.\n");
  3187. return -EINVAL;
  3188. }
  3189. core = i2c_algo->data;
  3190. if (!core) {
  3191. pr_err("Error - device struct undefined.\n");
  3192. return -EINVAL;
  3193. }
  3194. if (component != DVB_FRONTEND_COMPONENT_TUNER)
  3195. return -EINVAL;
  3196. switch (core->board.tuner_type) {
  3197. case TUNER_XC2028:
  3198. dprintk(1, "Calling XC2028/3028 callback\n");
  3199. return cx88_xc2028_tuner_callback(core, command, arg);
  3200. case TUNER_XC4000:
  3201. dprintk(1, "Calling XC4000 callback\n");
  3202. return cx88_xc4000_tuner_callback(core, command, arg);
  3203. case TUNER_XC5000:
  3204. dprintk(1, "Calling XC5000 callback\n");
  3205. return cx88_xc5000_tuner_callback(core, command, arg);
  3206. }
  3207. pr_err("Error: Calling callback for tuner %d\n",
  3208. core->board.tuner_type);
  3209. return -EINVAL;
  3210. }
  3211. EXPORT_SYMBOL(cx88_tuner_callback);
  3212. /* ----------------------------------------------------------------------- */
  3213. static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  3214. {
  3215. int i;
  3216. if (!pci->subsystem_vendor && !pci->subsystem_device) {
  3217. pr_err("Your board has no valid PCI Subsystem ID and thus can't\n");
  3218. pr_err("be autodetected. Please pass card=<n> insmod option to\n");
  3219. pr_err("workaround that. Redirect complaints to the vendor of\n");
  3220. pr_err("the TV card\n");
  3221. } else {
  3222. pr_err("Your board isn't known (yet) to the driver. You can\n");
  3223. pr_err("try to pick one of the existing card configs via\n");
  3224. pr_err("card=<n> insmod option. Updating to the latest\n");
  3225. pr_err("version might help as well.\n");
  3226. }
  3227. pr_err("Here is a list of valid choices for the card=<n> insmod option:\n");
  3228. for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
  3229. pr_err(" card=%d -> %s\n", i, cx88_boards[i].name);
  3230. }
  3231. static void cx88_card_setup_pre_i2c(struct cx88_core *core)
  3232. {
  3233. switch (core->boardnr) {
  3234. case CX88_BOARD_HAUPPAUGE_HVR1300:
  3235. /*
  3236. * Bring the 702 demod up before i2c scanning/attach or
  3237. * devices are hidden.
  3238. *
  3239. * We leave here with the 702 on the bus
  3240. *
  3241. * "reset the IR receiver on GPIO[3]"
  3242. * Reported by Mike Crash <mike AT mikecrash.com>
  3243. */
  3244. cx_write(MO_GP0_IO, 0x0000ef88);
  3245. udelay(1000);
  3246. cx_clear(MO_GP0_IO, 0x00000088);
  3247. udelay(50);
  3248. cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
  3249. udelay(1000);
  3250. break;
  3251. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  3252. case CX88_BOARD_PROLINK_PV_8000GT:
  3253. cx_write(MO_GP2_IO, 0xcf7);
  3254. msleep(50);
  3255. cx_write(MO_GP2_IO, 0xef5);
  3256. msleep(50);
  3257. cx_write(MO_GP2_IO, 0xcf7);
  3258. usleep_range(10000, 20000);
  3259. break;
  3260. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  3261. /* Enable the xc5000 tuner */
  3262. cx_set(MO_GP0_IO, 0x00001010);
  3263. break;
  3264. case CX88_BOARD_WINFAST_DTV2000H_J:
  3265. case CX88_BOARD_HAUPPAUGE_HVR3000:
  3266. case CX88_BOARD_HAUPPAUGE_HVR4000:
  3267. /* Init GPIO */
  3268. cx_write(MO_GP0_IO, core->board.input[0].gpio0);
  3269. udelay(1000);
  3270. cx_clear(MO_GP0_IO, 0x00000080);
  3271. udelay(50);
  3272. cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
  3273. udelay(1000);
  3274. break;
  3275. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  3276. case CX88_BOARD_WINFAST_DTV1800H:
  3277. cx88_xc3028_winfast1800h_callback(core, XC2028_TUNER_RESET, 0);
  3278. break;
  3279. case CX88_BOARD_WINFAST_DTV1800H_XC4000:
  3280. case CX88_BOARD_WINFAST_DTV2000H_PLUS:
  3281. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36:
  3282. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43:
  3283. cx88_xc4000_winfast2000h_plus_callback(core,
  3284. XC4000_TUNER_RESET, 0);
  3285. break;
  3286. case CX88_BOARD_TWINHAN_VP1027_DVBS:
  3287. cx_write(MO_GP0_IO, 0x00003230);
  3288. cx_write(MO_GP0_IO, 0x00003210);
  3289. usleep_range(10000, 20000);
  3290. cx_write(MO_GP0_IO, 0x00001230);
  3291. break;
  3292. }
  3293. }
  3294. /*
  3295. * Sets board-dependent xc3028 configuration
  3296. */
  3297. void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
  3298. {
  3299. memset(ctl, 0, sizeof(*ctl));
  3300. ctl->fname = XC2028_DEFAULT_FIRMWARE;
  3301. ctl->max_len = 64;
  3302. switch (core->boardnr) {
  3303. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  3304. /* Now works with firmware version 2.7 */
  3305. if (core->i2c_algo.udelay < 16)
  3306. core->i2c_algo.udelay = 16;
  3307. break;
  3308. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  3309. case CX88_BOARD_WINFAST_DTV1800H:
  3310. ctl->demod = XC3028_FE_ZARLINK456;
  3311. break;
  3312. case CX88_BOARD_KWORLD_ATSC_120:
  3313. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  3314. ctl->demod = XC3028_FE_OREN538;
  3315. break;
  3316. case CX88_BOARD_GENIATECH_X8000_MT:
  3317. /*
  3318. * FIXME: For this board, the xc3028 never recovers after being
  3319. * powered down (the reset GPIO probably is not set properly).
  3320. * We don't have access to the hardware so we cannot determine
  3321. * which GPIO is used for xc3028, so just disable power xc3028
  3322. * power management for now
  3323. */
  3324. ctl->disable_power_mgmt = 1;
  3325. break;
  3326. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  3327. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  3328. case CX88_BOARD_PROLINK_PV_8000GT:
  3329. /*
  3330. * Those boards uses non-MTS firmware
  3331. */
  3332. break;
  3333. case CX88_BOARD_PINNACLE_HYBRID_PCTV:
  3334. case CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII:
  3335. ctl->demod = XC3028_FE_ZARLINK456;
  3336. ctl->mts = 1;
  3337. break;
  3338. default:
  3339. ctl->demod = XC3028_FE_OREN538;
  3340. ctl->mts = 1;
  3341. }
  3342. }
  3343. EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
  3344. static void cx88_card_setup(struct cx88_core *core)
  3345. {
  3346. static u8 eeprom[256];
  3347. struct tuner_setup tun_setup;
  3348. unsigned int mode_mask = T_RADIO | T_ANALOG_TV;
  3349. memset(&tun_setup, 0, sizeof(tun_setup));
  3350. if (!core->i2c_rc) {
  3351. core->i2c_client.addr = 0xa0 >> 1;
  3352. tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
  3353. }
  3354. switch (core->boardnr) {
  3355. case CX88_BOARD_HAUPPAUGE:
  3356. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  3357. if (!core->i2c_rc)
  3358. hauppauge_eeprom(core, eeprom + 8);
  3359. break;
  3360. case CX88_BOARD_GDI:
  3361. if (!core->i2c_rc)
  3362. gdi_eeprom(core, eeprom);
  3363. break;
  3364. case CX88_BOARD_LEADTEK_PVR2000:
  3365. case CX88_BOARD_WINFAST_DV2000:
  3366. case CX88_BOARD_WINFAST2000XP_EXPERT:
  3367. if (!core->i2c_rc)
  3368. leadtek_eeprom(core, eeprom);
  3369. break;
  3370. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  3371. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  3372. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  3373. case CX88_BOARD_HAUPPAUGE_HVR1100:
  3374. case CX88_BOARD_HAUPPAUGE_HVR1100LP:
  3375. case CX88_BOARD_HAUPPAUGE_HVR3000:
  3376. case CX88_BOARD_HAUPPAUGE_HVR1300:
  3377. case CX88_BOARD_HAUPPAUGE_HVR4000:
  3378. case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
  3379. case CX88_BOARD_HAUPPAUGE_IRONLY:
  3380. if (!core->i2c_rc)
  3381. hauppauge_eeprom(core, eeprom);
  3382. break;
  3383. case CX88_BOARD_KWORLD_DVBS_100:
  3384. cx_write(MO_GP0_IO, 0x000007f8);
  3385. cx_write(MO_GP1_IO, 0x00000001);
  3386. break;
  3387. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  3388. /* GPIO0:0 is hooked to demod reset */
  3389. /* GPIO0:4 is hooked to xc3028 reset */
  3390. cx_write(MO_GP0_IO, 0x00111100);
  3391. usleep_range(10000, 20000);
  3392. cx_write(MO_GP0_IO, 0x00111111);
  3393. break;
  3394. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
  3395. /* GPIO0:6 is hooked to FX2 reset pin */
  3396. cx_set(MO_GP0_IO, 0x00004040);
  3397. cx_clear(MO_GP0_IO, 0x00000040);
  3398. msleep(1000);
  3399. cx_set(MO_GP0_IO, 0x00004040);
  3400. /* FALLTHROUGH */
  3401. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  3402. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  3403. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
  3404. /* GPIO0:0 is hooked to mt352 reset pin */
  3405. cx_set(MO_GP0_IO, 0x00000101);
  3406. cx_clear(MO_GP0_IO, 0x00000001);
  3407. usleep_range(10000, 20000);
  3408. cx_set(MO_GP0_IO, 0x00000101);
  3409. if (!core->i2c_rc &&
  3410. core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
  3411. dvico_fusionhdtv_hybrid_init(core);
  3412. break;
  3413. case CX88_BOARD_KWORLD_DVB_T:
  3414. case CX88_BOARD_DNTV_LIVE_DVB_T:
  3415. cx_set(MO_GP0_IO, 0x00000707);
  3416. cx_set(MO_GP2_IO, 0x00000101);
  3417. cx_clear(MO_GP2_IO, 0x00000001);
  3418. usleep_range(10000, 20000);
  3419. cx_clear(MO_GP0_IO, 0x00000007);
  3420. cx_set(MO_GP2_IO, 0x00000101);
  3421. break;
  3422. case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
  3423. cx_write(MO_GP0_IO, 0x00080808);
  3424. break;
  3425. case CX88_BOARD_ATI_HDTVWONDER:
  3426. if (!core->i2c_rc) {
  3427. /* enable tuner */
  3428. int i;
  3429. static const u8 buffer[][2] = {
  3430. {0x10, 0x12},
  3431. {0x13, 0x04},
  3432. {0x16, 0x00},
  3433. {0x14, 0x04},
  3434. {0x17, 0x00}
  3435. };
  3436. core->i2c_client.addr = 0x0a;
  3437. for (i = 0; i < ARRAY_SIZE(buffer); i++)
  3438. if (i2c_master_send(&core->i2c_client,
  3439. buffer[i], 2) != 2)
  3440. pr_warn("Unable to enable tuner(%i).\n",
  3441. i);
  3442. }
  3443. break;
  3444. case CX88_BOARD_MSI_TVANYWHERE_MASTER:
  3445. {
  3446. struct v4l2_priv_tun_config tea5767_cfg;
  3447. struct tea5767_ctrl ctl;
  3448. memset(&ctl, 0, sizeof(ctl));
  3449. ctl.high_cut = 1;
  3450. ctl.st_noise = 1;
  3451. ctl.deemph_75 = 1;
  3452. ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
  3453. tea5767_cfg.tuner = TUNER_TEA5767;
  3454. tea5767_cfg.priv = &ctl;
  3455. call_all(core, tuner, s_config, &tea5767_cfg);
  3456. break;
  3457. }
  3458. case CX88_BOARD_TEVII_S420:
  3459. case CX88_BOARD_TEVII_S460:
  3460. case CX88_BOARD_TEVII_S464:
  3461. case CX88_BOARD_OMICOM_SS4_PCI:
  3462. case CX88_BOARD_TBS_8910:
  3463. case CX88_BOARD_TBS_8920:
  3464. case CX88_BOARD_PROF_6200:
  3465. case CX88_BOARD_PROF_7300:
  3466. case CX88_BOARD_PROF_7301:
  3467. case CX88_BOARD_SATTRADE_ST4200:
  3468. cx_write(MO_GP0_IO, 0x8000);
  3469. msleep(100);
  3470. cx_write(MO_SRST_IO, 0);
  3471. usleep_range(10000, 20000);
  3472. cx_write(MO_GP0_IO, 0x8080);
  3473. msleep(100);
  3474. cx_write(MO_SRST_IO, 1);
  3475. msleep(100);
  3476. break;
  3477. } /*end switch() */
  3478. /* Setup tuners */
  3479. if (core->board.radio_type != UNSET) {
  3480. tun_setup.mode_mask = T_RADIO;
  3481. tun_setup.type = core->board.radio_type;
  3482. tun_setup.addr = core->board.radio_addr;
  3483. tun_setup.tuner_callback = cx88_tuner_callback;
  3484. call_all(core, tuner, s_type_addr, &tun_setup);
  3485. mode_mask &= ~T_RADIO;
  3486. }
  3487. if (core->board.tuner_type != UNSET) {
  3488. tun_setup.mode_mask = mode_mask;
  3489. tun_setup.type = core->board.tuner_type;
  3490. tun_setup.addr = core->board.tuner_addr;
  3491. tun_setup.tuner_callback = cx88_tuner_callback;
  3492. call_all(core, tuner, s_type_addr, &tun_setup);
  3493. }
  3494. if (core->board.tda9887_conf) {
  3495. struct v4l2_priv_tun_config tda9887_cfg;
  3496. tda9887_cfg.tuner = TUNER_TDA9887;
  3497. tda9887_cfg.priv = &core->board.tda9887_conf;
  3498. call_all(core, tuner, s_config, &tda9887_cfg);
  3499. }
  3500. if (core->board.tuner_type == TUNER_XC2028) {
  3501. struct v4l2_priv_tun_config xc2028_cfg;
  3502. struct xc2028_ctrl ctl;
  3503. /* Fills device-dependent initialization parameters */
  3504. cx88_setup_xc3028(core, &ctl);
  3505. /* Sends parameters to xc2028/3028 tuner */
  3506. memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
  3507. xc2028_cfg.tuner = TUNER_XC2028;
  3508. xc2028_cfg.priv = &ctl;
  3509. dprintk(1, "Asking xc2028/3028 to load firmware %s\n",
  3510. ctl.fname);
  3511. call_all(core, tuner, s_config, &xc2028_cfg);
  3512. }
  3513. call_all(core, tuner, standby);
  3514. }
  3515. /* ------------------------------------------------------------------ */
  3516. static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
  3517. {
  3518. unsigned int lat = UNSET;
  3519. u8 ctrl = 0;
  3520. u8 value;
  3521. /* check pci quirks */
  3522. if (pci_pci_problems & PCIPCI_TRITON) {
  3523. pr_info("quirk: PCIPCI_TRITON -- set TBFX\n");
  3524. ctrl |= CX88X_EN_TBFX;
  3525. }
  3526. if (pci_pci_problems & PCIPCI_NATOMA) {
  3527. pr_info("quirk: PCIPCI_NATOMA -- set TBFX\n");
  3528. ctrl |= CX88X_EN_TBFX;
  3529. }
  3530. if (pci_pci_problems & PCIPCI_VIAETBF) {
  3531. pr_info("quirk: PCIPCI_VIAETBF -- set TBFX\n");
  3532. ctrl |= CX88X_EN_TBFX;
  3533. }
  3534. if (pci_pci_problems & PCIPCI_VSFX) {
  3535. pr_info("quirk: PCIPCI_VSFX -- set VSFX\n");
  3536. ctrl |= CX88X_EN_VSFX;
  3537. }
  3538. #ifdef PCIPCI_ALIMAGIK
  3539. if (pci_pci_problems & PCIPCI_ALIMAGIK) {
  3540. pr_info("quirk: PCIPCI_ALIMAGIK -- latency fixup\n");
  3541. lat = 0x0A;
  3542. }
  3543. #endif
  3544. /* check insmod options */
  3545. if (latency != UNSET)
  3546. lat = latency;
  3547. /* apply stuff */
  3548. if (ctrl) {
  3549. pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
  3550. value |= ctrl;
  3551. pci_write_config_byte(pci, CX88X_DEVCTRL, value);
  3552. }
  3553. if (lat != UNSET) {
  3554. pr_info("setting pci latency timer to %d\n", latency);
  3555. pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
  3556. }
  3557. return 0;
  3558. }
  3559. int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
  3560. {
  3561. if (request_mem_region(pci_resource_start(pci, 0),
  3562. pci_resource_len(pci, 0),
  3563. core->name))
  3564. return 0;
  3565. pr_err("func %d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
  3566. PCI_FUNC(pci->devfn),
  3567. (unsigned long long)pci_resource_start(pci, 0),
  3568. pci->subsystem_vendor, pci->subsystem_device);
  3569. return -EBUSY;
  3570. }
  3571. /*
  3572. * Allocate and initialize the cx88 core struct. One should hold the
  3573. * devlist mutex before calling this.
  3574. */
  3575. struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
  3576. {
  3577. struct cx88_core *core;
  3578. int i;
  3579. core = kzalloc(sizeof(*core), GFP_KERNEL);
  3580. if (!core)
  3581. return NULL;
  3582. refcount_set(&core->refcount, 1);
  3583. core->pci_bus = pci->bus->number;
  3584. core->pci_slot = PCI_SLOT(pci->devfn);
  3585. core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
  3586. PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
  3587. PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
  3588. mutex_init(&core->lock);
  3589. core->nr = nr;
  3590. sprintf(core->name, "cx88[%d]", core->nr);
  3591. /*
  3592. * Note: Setting initial standard here would cause first call to
  3593. * cx88_set_tvnorm() to return without programming any registers. Leave
  3594. * it blank for at this point and it will get set later in
  3595. * cx8800_initdev()
  3596. */
  3597. core->tvnorm = 0;
  3598. core->width = 320;
  3599. core->height = 240;
  3600. core->field = V4L2_FIELD_INTERLACED;
  3601. strcpy(core->v4l2_dev.name, core->name);
  3602. if (v4l2_device_register(NULL, &core->v4l2_dev)) {
  3603. kfree(core);
  3604. return NULL;
  3605. }
  3606. if (v4l2_ctrl_handler_init(&core->video_hdl, 13)) {
  3607. v4l2_device_unregister(&core->v4l2_dev);
  3608. kfree(core);
  3609. return NULL;
  3610. }
  3611. if (v4l2_ctrl_handler_init(&core->audio_hdl, 13)) {
  3612. v4l2_ctrl_handler_free(&core->video_hdl);
  3613. v4l2_device_unregister(&core->v4l2_dev);
  3614. kfree(core);
  3615. return NULL;
  3616. }
  3617. if (cx88_get_resources(core, pci) != 0) {
  3618. v4l2_ctrl_handler_free(&core->video_hdl);
  3619. v4l2_ctrl_handler_free(&core->audio_hdl);
  3620. v4l2_device_unregister(&core->v4l2_dev);
  3621. kfree(core);
  3622. return NULL;
  3623. }
  3624. /* PCI stuff */
  3625. cx88_pci_quirks(core->name, pci);
  3626. core->lmmio = ioremap(pci_resource_start(pci, 0),
  3627. pci_resource_len(pci, 0));
  3628. core->bmmio = (u8 __iomem *)core->lmmio;
  3629. if (!core->lmmio) {
  3630. release_mem_region(pci_resource_start(pci, 0),
  3631. pci_resource_len(pci, 0));
  3632. v4l2_ctrl_handler_free(&core->video_hdl);
  3633. v4l2_ctrl_handler_free(&core->audio_hdl);
  3634. v4l2_device_unregister(&core->v4l2_dev);
  3635. kfree(core);
  3636. return NULL;
  3637. }
  3638. /* board config */
  3639. core->boardnr = UNSET;
  3640. if (card[core->nr] < ARRAY_SIZE(cx88_boards))
  3641. core->boardnr = card[core->nr];
  3642. for (i = 0; core->boardnr == UNSET && i < ARRAY_SIZE(cx88_subids); i++)
  3643. if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
  3644. pci->subsystem_device == cx88_subids[i].subdevice)
  3645. core->boardnr = cx88_subids[i].card;
  3646. if (core->boardnr == UNSET) {
  3647. core->boardnr = CX88_BOARD_UNKNOWN;
  3648. cx88_card_list(core, pci);
  3649. }
  3650. core->board = cx88_boards[core->boardnr];
  3651. if (!core->board.num_frontends && (core->board.mpeg & CX88_MPEG_DVB))
  3652. core->board.num_frontends = 1;
  3653. pr_info("subsystem: %04x:%04x, board: %s [card=%d,%s], frontend(s): %d\n",
  3654. pci->subsystem_vendor, pci->subsystem_device, core->board.name,
  3655. core->boardnr, card[core->nr] == core->boardnr ?
  3656. "insmod option" : "autodetected",
  3657. core->board.num_frontends);
  3658. if (tuner[core->nr] != UNSET)
  3659. core->board.tuner_type = tuner[core->nr];
  3660. if (radio[core->nr] != UNSET)
  3661. core->board.radio_type = radio[core->nr];
  3662. dprintk(1, "TV tuner type %d, Radio tuner type %d\n",
  3663. core->board.tuner_type, core->board.radio_type);
  3664. /* init hardware */
  3665. cx88_reset(core);
  3666. cx88_card_setup_pre_i2c(core);
  3667. cx88_i2c_init(core, pci);
  3668. /* load tuner module, if needed */
  3669. if (core->board.tuner_type != UNSET) {
  3670. /*
  3671. * Ignore 0x6b and 0x6f on cx88 boards.
  3672. * FusionHDTV5 RT Gold has an ir receiver at 0x6b
  3673. * and an RTC at 0x6f which can get corrupted if probed.
  3674. */
  3675. static const unsigned short tv_addrs[] = {
  3676. 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */
  3677. 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
  3678. 0x68, 0x69, 0x6a, 0x6c, 0x6d, 0x6e,
  3679. I2C_CLIENT_END
  3680. };
  3681. int has_demod = (core->board.tda9887_conf & TDA9887_PRESENT);
  3682. /*
  3683. * I don't trust the radio_type as is stored in the card
  3684. * definitions, so we just probe for it.
  3685. * The radio_type is sometimes missing, or set to UNSET but
  3686. * later code configures a tea5767.
  3687. */
  3688. v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
  3689. "tuner", 0,
  3690. v4l2_i2c_tuner_addrs(ADDRS_RADIO));
  3691. if (has_demod)
  3692. v4l2_i2c_new_subdev(&core->v4l2_dev,
  3693. &core->i2c_adap, "tuner",
  3694. 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
  3695. if (core->board.tuner_addr == ADDR_UNSET) {
  3696. v4l2_i2c_new_subdev(&core->v4l2_dev,
  3697. &core->i2c_adap, "tuner",
  3698. 0, has_demod ? tv_addrs + 4 : tv_addrs);
  3699. } else {
  3700. v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
  3701. "tuner", core->board.tuner_addr,
  3702. NULL);
  3703. }
  3704. }
  3705. cx88_card_setup(core);
  3706. if (!disable_ir) {
  3707. cx88_i2c_init_ir(core);
  3708. cx88_ir_init(core, pci);
  3709. }
  3710. return core;
  3711. }