cx88-cards.c 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973
  1. /*
  2. *
  3. * device driver for Conexant 2388x based TV cards
  4. * card-specific stuff.
  5. *
  6. * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. #include <linux/init.h>
  23. #include <linux/module.h>
  24. #include <linux/pci.h>
  25. #include <linux/delay.h>
  26. #include "cx88.h"
  27. #include "tea5767.h"
  28. static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  29. static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  30. static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  31. module_param_array(tuner, int, NULL, 0444);
  32. module_param_array(radio, int, NULL, 0444);
  33. module_param_array(card, int, NULL, 0444);
  34. MODULE_PARM_DESC(tuner,"tuner type");
  35. MODULE_PARM_DESC(radio,"radio tuner type");
  36. MODULE_PARM_DESC(card,"card type");
  37. static unsigned int latency = UNSET;
  38. module_param(latency,int,0444);
  39. MODULE_PARM_DESC(latency,"pci latency timer");
  40. #define info_printk(core, fmt, arg...) \
  41. printk(KERN_INFO "%s: " fmt, core->name , ## arg)
  42. #define warn_printk(core, fmt, arg...) \
  43. printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
  44. #define err_printk(core, fmt, arg...) \
  45. printk(KERN_ERR "%s: " fmt, core->name , ## arg)
  46. /* ------------------------------------------------------------------ */
  47. /* board config info */
  48. /* If radio_type !=UNSET, radio_addr should be specified
  49. */
  50. static const struct cx88_board cx88_boards[] = {
  51. [CX88_BOARD_UNKNOWN] = {
  52. .name = "UNKNOWN/GENERIC",
  53. .tuner_type = UNSET,
  54. .radio_type = UNSET,
  55. .tuner_addr = ADDR_UNSET,
  56. .radio_addr = ADDR_UNSET,
  57. .input = {{
  58. .type = CX88_VMUX_COMPOSITE1,
  59. .vmux = 0,
  60. },{
  61. .type = CX88_VMUX_COMPOSITE2,
  62. .vmux = 1,
  63. },{
  64. .type = CX88_VMUX_COMPOSITE3,
  65. .vmux = 2,
  66. },{
  67. .type = CX88_VMUX_COMPOSITE4,
  68. .vmux = 3,
  69. }},
  70. },
  71. [CX88_BOARD_HAUPPAUGE] = {
  72. .name = "Hauppauge WinTV 34xxx models",
  73. .tuner_type = UNSET,
  74. .radio_type = UNSET,
  75. .tuner_addr = ADDR_UNSET,
  76. .radio_addr = ADDR_UNSET,
  77. .tda9887_conf = TDA9887_PRESENT,
  78. .input = {{
  79. .type = CX88_VMUX_TELEVISION,
  80. .vmux = 0,
  81. .gpio0 = 0xff00, // internal decoder
  82. },{
  83. .type = CX88_VMUX_DEBUG,
  84. .vmux = 0,
  85. .gpio0 = 0xff01, // mono from tuner chip
  86. },{
  87. .type = CX88_VMUX_COMPOSITE1,
  88. .vmux = 1,
  89. .gpio0 = 0xff02,
  90. },{
  91. .type = CX88_VMUX_SVIDEO,
  92. .vmux = 2,
  93. .gpio0 = 0xff02,
  94. }},
  95. .radio = {
  96. .type = CX88_RADIO,
  97. .gpio0 = 0xff01,
  98. },
  99. },
  100. [CX88_BOARD_GDI] = {
  101. .name = "GDI Black Gold",
  102. .tuner_type = UNSET,
  103. .radio_type = UNSET,
  104. .tuner_addr = ADDR_UNSET,
  105. .radio_addr = ADDR_UNSET,
  106. .input = {{
  107. .type = CX88_VMUX_TELEVISION,
  108. .vmux = 0,
  109. },{
  110. .type = CX88_VMUX_SVIDEO,
  111. .vmux = 2,
  112. }},
  113. },
  114. [CX88_BOARD_PIXELVIEW] = {
  115. .name = "PixelView",
  116. .tuner_type = TUNER_PHILIPS_PAL,
  117. .radio_type = UNSET,
  118. .tuner_addr = ADDR_UNSET,
  119. .radio_addr = ADDR_UNSET,
  120. .input = {{
  121. .type = CX88_VMUX_TELEVISION,
  122. .vmux = 0,
  123. .gpio0 = 0xff00, // internal decoder
  124. },{
  125. .type = CX88_VMUX_COMPOSITE1,
  126. .vmux = 1,
  127. },{
  128. .type = CX88_VMUX_SVIDEO,
  129. .vmux = 2,
  130. }},
  131. .radio = {
  132. .type = CX88_RADIO,
  133. .gpio0 = 0xff10,
  134. },
  135. },
  136. [CX88_BOARD_ATI_WONDER_PRO] = {
  137. .name = "ATI TV Wonder Pro",
  138. .tuner_type = TUNER_PHILIPS_4IN1,
  139. .radio_type = UNSET,
  140. .tuner_addr = ADDR_UNSET,
  141. .radio_addr = ADDR_UNSET,
  142. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
  143. .input = {{
  144. .type = CX88_VMUX_TELEVISION,
  145. .vmux = 0,
  146. .gpio0 = 0x03ff,
  147. },{
  148. .type = CX88_VMUX_COMPOSITE1,
  149. .vmux = 1,
  150. .gpio0 = 0x03fe,
  151. },{
  152. .type = CX88_VMUX_SVIDEO,
  153. .vmux = 2,
  154. .gpio0 = 0x03fe,
  155. }},
  156. },
  157. [CX88_BOARD_WINFAST2000XP_EXPERT] = {
  158. .name = "Leadtek Winfast 2000XP Expert",
  159. .tuner_type = TUNER_PHILIPS_4IN1,
  160. .radio_type = UNSET,
  161. .tuner_addr = ADDR_UNSET,
  162. .radio_addr = ADDR_UNSET,
  163. .tda9887_conf = TDA9887_PRESENT,
  164. .input = {{
  165. .type = CX88_VMUX_TELEVISION,
  166. .vmux = 0,
  167. .gpio0 = 0x00F5e700,
  168. .gpio1 = 0x00003004,
  169. .gpio2 = 0x00F5e700,
  170. .gpio3 = 0x02000000,
  171. },{
  172. .type = CX88_VMUX_COMPOSITE1,
  173. .vmux = 1,
  174. .gpio0 = 0x00F5c700,
  175. .gpio1 = 0x00003004,
  176. .gpio2 = 0x00F5c700,
  177. .gpio3 = 0x02000000,
  178. },{
  179. .type = CX88_VMUX_SVIDEO,
  180. .vmux = 2,
  181. .gpio0 = 0x00F5c700,
  182. .gpio1 = 0x00003004,
  183. .gpio2 = 0x00F5c700,
  184. .gpio3 = 0x02000000,
  185. }},
  186. .radio = {
  187. .type = CX88_RADIO,
  188. .gpio0 = 0x00F5d700,
  189. .gpio1 = 0x00003004,
  190. .gpio2 = 0x00F5d700,
  191. .gpio3 = 0x02000000,
  192. },
  193. },
  194. [CX88_BOARD_AVERTV_STUDIO_303] = {
  195. .name = "AverTV Studio 303 (M126)",
  196. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  197. .radio_type = UNSET,
  198. .tuner_addr = ADDR_UNSET,
  199. .radio_addr = ADDR_UNSET,
  200. .tda9887_conf = TDA9887_PRESENT,
  201. .input = {{
  202. .type = CX88_VMUX_TELEVISION,
  203. .vmux = 0,
  204. .gpio1 = 0xe09f,
  205. },{
  206. .type = CX88_VMUX_COMPOSITE1,
  207. .vmux = 1,
  208. .gpio1 = 0xe05f,
  209. },{
  210. .type = CX88_VMUX_SVIDEO,
  211. .vmux = 2,
  212. .gpio1 = 0xe05f,
  213. }},
  214. .radio = {
  215. .gpio1 = 0xe0df,
  216. .type = CX88_RADIO,
  217. },
  218. },
  219. [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
  220. // added gpio values thanks to Michal
  221. // values for PAL from DScaler
  222. .name = "MSI TV-@nywhere Master",
  223. .tuner_type = TUNER_MT2032,
  224. .radio_type = UNSET,
  225. .tuner_addr = ADDR_UNSET,
  226. .radio_addr = ADDR_UNSET,
  227. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
  228. .input = {{
  229. .type = CX88_VMUX_TELEVISION,
  230. .vmux = 0,
  231. .gpio0 = 0x000040bf,
  232. .gpio1 = 0x000080c0,
  233. .gpio2 = 0x0000ff40,
  234. },{
  235. .type = CX88_VMUX_COMPOSITE1,
  236. .vmux = 1,
  237. .gpio0 = 0x000040bf,
  238. .gpio1 = 0x000080c0,
  239. .gpio2 = 0x0000ff40,
  240. },{
  241. .type = CX88_VMUX_SVIDEO,
  242. .vmux = 2,
  243. .gpio0 = 0x000040bf,
  244. .gpio1 = 0x000080c0,
  245. .gpio2 = 0x0000ff40,
  246. }},
  247. .radio = {
  248. .type = CX88_RADIO,
  249. .vmux = 3,
  250. .gpio0 = 0x000040bf,
  251. .gpio1 = 0x000080c0,
  252. .gpio2 = 0x0000ff20,
  253. },
  254. },
  255. [CX88_BOARD_WINFAST_DV2000] = {
  256. .name = "Leadtek Winfast DV2000",
  257. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  258. .radio_type = UNSET,
  259. .tuner_addr = ADDR_UNSET,
  260. .radio_addr = ADDR_UNSET,
  261. .tda9887_conf = TDA9887_PRESENT,
  262. .input = {{
  263. .type = CX88_VMUX_TELEVISION,
  264. .vmux = 0,
  265. .gpio0 = 0x0035e700,
  266. .gpio1 = 0x00003004,
  267. .gpio2 = 0x0035e700,
  268. .gpio3 = 0x02000000,
  269. },{
  270. .type = CX88_VMUX_COMPOSITE1,
  271. .vmux = 1,
  272. .gpio0 = 0x0035c700,
  273. .gpio1 = 0x00003004,
  274. .gpio2 = 0x0035c700,
  275. .gpio3 = 0x02000000,
  276. },{
  277. .type = CX88_VMUX_SVIDEO,
  278. .vmux = 2,
  279. .gpio0 = 0x0035c700,
  280. .gpio1 = 0x0035c700,
  281. .gpio2 = 0x02000000,
  282. .gpio3 = 0x02000000,
  283. }},
  284. .radio = {
  285. .type = CX88_RADIO,
  286. .gpio0 = 0x0035d700,
  287. .gpio1 = 0x00007004,
  288. .gpio2 = 0x0035d700,
  289. .gpio3 = 0x02000000,
  290. },
  291. },
  292. [CX88_BOARD_LEADTEK_PVR2000] = {
  293. // gpio values for PAL version from regspy by DScaler
  294. .name = "Leadtek PVR 2000",
  295. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  296. .radio_type = UNSET,
  297. .tuner_addr = ADDR_UNSET,
  298. .radio_addr = ADDR_UNSET,
  299. .tda9887_conf = TDA9887_PRESENT,
  300. .input = {{
  301. .type = CX88_VMUX_TELEVISION,
  302. .vmux = 0,
  303. .gpio0 = 0x0000bde2,
  304. .audioroute = 1,
  305. },{
  306. .type = CX88_VMUX_COMPOSITE1,
  307. .vmux = 1,
  308. .gpio0 = 0x0000bde6,
  309. .audioroute = 1,
  310. },{
  311. .type = CX88_VMUX_SVIDEO,
  312. .vmux = 2,
  313. .gpio0 = 0x0000bde6,
  314. .audioroute = 1,
  315. }},
  316. .radio = {
  317. .type = CX88_RADIO,
  318. .gpio0 = 0x0000bd62,
  319. .audioroute = 1,
  320. },
  321. .mpeg = CX88_MPEG_BLACKBIRD,
  322. },
  323. [CX88_BOARD_IODATA_GVVCP3PCI] = {
  324. .name = "IODATA GV-VCP3/PCI",
  325. .tuner_type = TUNER_ABSENT,
  326. .radio_type = UNSET,
  327. .tuner_addr = ADDR_UNSET,
  328. .radio_addr = ADDR_UNSET,
  329. .input = {{
  330. .type = CX88_VMUX_COMPOSITE1,
  331. .vmux = 0,
  332. },{
  333. .type = CX88_VMUX_COMPOSITE2,
  334. .vmux = 1,
  335. },{
  336. .type = CX88_VMUX_SVIDEO,
  337. .vmux = 2,
  338. }},
  339. },
  340. [CX88_BOARD_PROLINK_PLAYTVPVR] = {
  341. .name = "Prolink PlayTV PVR",
  342. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  343. .radio_type = UNSET,
  344. .tuner_addr = ADDR_UNSET,
  345. .radio_addr = ADDR_UNSET,
  346. .tda9887_conf = TDA9887_PRESENT,
  347. .input = {{
  348. .type = CX88_VMUX_TELEVISION,
  349. .vmux = 0,
  350. .gpio0 = 0xbff0,
  351. },{
  352. .type = CX88_VMUX_COMPOSITE1,
  353. .vmux = 1,
  354. .gpio0 = 0xbff3,
  355. },{
  356. .type = CX88_VMUX_SVIDEO,
  357. .vmux = 2,
  358. .gpio0 = 0xbff3,
  359. }},
  360. .radio = {
  361. .type = CX88_RADIO,
  362. .gpio0 = 0xbff0,
  363. },
  364. },
  365. [CX88_BOARD_ASUS_PVR_416] = {
  366. .name = "ASUS PVR-416",
  367. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  368. .radio_type = UNSET,
  369. .tuner_addr = ADDR_UNSET,
  370. .radio_addr = ADDR_UNSET,
  371. .tda9887_conf = TDA9887_PRESENT,
  372. .input = {{
  373. .type = CX88_VMUX_TELEVISION,
  374. .vmux = 0,
  375. .gpio0 = 0x0000fde6,
  376. },{
  377. .type = CX88_VMUX_SVIDEO,
  378. .vmux = 2,
  379. .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
  380. .audioroute = 1,
  381. }},
  382. .radio = {
  383. .type = CX88_RADIO,
  384. .gpio0 = 0x0000fde2,
  385. },
  386. .mpeg = CX88_MPEG_BLACKBIRD,
  387. },
  388. [CX88_BOARD_MSI_TVANYWHERE] = {
  389. .name = "MSI TV-@nywhere",
  390. .tuner_type = TUNER_MT2032,
  391. .radio_type = UNSET,
  392. .tuner_addr = ADDR_UNSET,
  393. .radio_addr = ADDR_UNSET,
  394. .tda9887_conf = TDA9887_PRESENT,
  395. .input = {{
  396. .type = CX88_VMUX_TELEVISION,
  397. .vmux = 0,
  398. .gpio0 = 0x00000fbf,
  399. .gpio2 = 0x0000fc08,
  400. },{
  401. .type = CX88_VMUX_COMPOSITE1,
  402. .vmux = 1,
  403. .gpio0 = 0x00000fbf,
  404. .gpio2 = 0x0000fc68,
  405. },{
  406. .type = CX88_VMUX_SVIDEO,
  407. .vmux = 2,
  408. .gpio0 = 0x00000fbf,
  409. .gpio2 = 0x0000fc68,
  410. }},
  411. },
  412. [CX88_BOARD_KWORLD_DVB_T] = {
  413. .name = "KWorld/VStream XPert DVB-T",
  414. .tuner_type = TUNER_ABSENT,
  415. .radio_type = UNSET,
  416. .tuner_addr = ADDR_UNSET,
  417. .radio_addr = ADDR_UNSET,
  418. .input = {{
  419. .type = CX88_VMUX_COMPOSITE1,
  420. .vmux = 1,
  421. .gpio0 = 0x0700,
  422. .gpio2 = 0x0101,
  423. },{
  424. .type = CX88_VMUX_SVIDEO,
  425. .vmux = 2,
  426. .gpio0 = 0x0700,
  427. .gpio2 = 0x0101,
  428. }},
  429. .mpeg = CX88_MPEG_DVB,
  430. },
  431. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
  432. .name = "DViCO FusionHDTV DVB-T1",
  433. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  434. .radio_type = UNSET,
  435. .tuner_addr = ADDR_UNSET,
  436. .radio_addr = ADDR_UNSET,
  437. .input = {{
  438. .type = CX88_VMUX_COMPOSITE1,
  439. .vmux = 1,
  440. .gpio0 = 0x000027df,
  441. },{
  442. .type = CX88_VMUX_SVIDEO,
  443. .vmux = 2,
  444. .gpio0 = 0x000027df,
  445. }},
  446. .mpeg = CX88_MPEG_DVB,
  447. },
  448. [CX88_BOARD_KWORLD_LTV883] = {
  449. .name = "KWorld LTV883RF",
  450. .tuner_type = TUNER_TNF_8831BGFF,
  451. .radio_type = UNSET,
  452. .tuner_addr = ADDR_UNSET,
  453. .radio_addr = ADDR_UNSET,
  454. .input = {{
  455. .type = CX88_VMUX_TELEVISION,
  456. .vmux = 0,
  457. .gpio0 = 0x07f8,
  458. },{
  459. .type = CX88_VMUX_DEBUG,
  460. .vmux = 0,
  461. .gpio0 = 0x07f9, // mono from tuner chip
  462. },{
  463. .type = CX88_VMUX_COMPOSITE1,
  464. .vmux = 1,
  465. .gpio0 = 0x000007fa,
  466. },{
  467. .type = CX88_VMUX_SVIDEO,
  468. .vmux = 2,
  469. .gpio0 = 0x000007fa,
  470. }},
  471. .radio = {
  472. .type = CX88_RADIO,
  473. .gpio0 = 0x000007f8,
  474. },
  475. },
  476. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
  477. .name = "DViCO FusionHDTV 3 Gold-Q",
  478. .tuner_type = TUNER_MICROTUNE_4042FI5,
  479. .radio_type = UNSET,
  480. .tuner_addr = ADDR_UNSET,
  481. .radio_addr = ADDR_UNSET,
  482. /*
  483. GPIO[0] resets DT3302 DTV receiver
  484. 0 - reset asserted
  485. 1 - normal operation
  486. GPIO[1] mutes analog audio output connector
  487. 0 - enable selected source
  488. 1 - mute
  489. GPIO[2] selects source for analog audio output connector
  490. 0 - analog audio input connector on tab
  491. 1 - analog DAC output from CX23881 chip
  492. GPIO[3] selects RF input connector on tuner module
  493. 0 - RF connector labeled CABLE
  494. 1 - RF connector labeled ANT
  495. GPIO[4] selects high RF for QAM256 mode
  496. 0 - normal RF
  497. 1 - high RF
  498. */
  499. .input = {{
  500. .type = CX88_VMUX_TELEVISION,
  501. .vmux = 0,
  502. .gpio0 = 0x0f0d,
  503. },{
  504. .type = CX88_VMUX_CABLE,
  505. .vmux = 0,
  506. .gpio0 = 0x0f05,
  507. },{
  508. .type = CX88_VMUX_COMPOSITE1,
  509. .vmux = 1,
  510. .gpio0 = 0x0f00,
  511. },{
  512. .type = CX88_VMUX_SVIDEO,
  513. .vmux = 2,
  514. .gpio0 = 0x0f00,
  515. }},
  516. .mpeg = CX88_MPEG_DVB,
  517. },
  518. [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
  519. .name = "Hauppauge Nova-T DVB-T",
  520. .tuner_type = TUNER_ABSENT,
  521. .radio_type = UNSET,
  522. .tuner_addr = ADDR_UNSET,
  523. .radio_addr = ADDR_UNSET,
  524. .input = {{
  525. .type = CX88_VMUX_DVB,
  526. .vmux = 0,
  527. }},
  528. .mpeg = CX88_MPEG_DVB,
  529. },
  530. [CX88_BOARD_CONEXANT_DVB_T1] = {
  531. .name = "Conexant DVB-T reference design",
  532. .tuner_type = TUNER_ABSENT,
  533. .radio_type = UNSET,
  534. .tuner_addr = ADDR_UNSET,
  535. .radio_addr = ADDR_UNSET,
  536. .input = {{
  537. .type = CX88_VMUX_DVB,
  538. .vmux = 0,
  539. }},
  540. .mpeg = CX88_MPEG_DVB,
  541. },
  542. [CX88_BOARD_PROVIDEO_PV259] = {
  543. .name = "Provideo PV259",
  544. .tuner_type = TUNER_PHILIPS_FQ1216ME,
  545. .radio_type = UNSET,
  546. .tuner_addr = ADDR_UNSET,
  547. .radio_addr = ADDR_UNSET,
  548. .input = {{
  549. .type = CX88_VMUX_TELEVISION,
  550. .vmux = 0,
  551. .audioroute = 1,
  552. }},
  553. .mpeg = CX88_MPEG_BLACKBIRD,
  554. },
  555. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
  556. .name = "DViCO FusionHDTV DVB-T Plus",
  557. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  558. .radio_type = UNSET,
  559. .tuner_addr = ADDR_UNSET,
  560. .radio_addr = ADDR_UNSET,
  561. .input = {{
  562. .type = CX88_VMUX_COMPOSITE1,
  563. .vmux = 1,
  564. .gpio0 = 0x000027df,
  565. },{
  566. .type = CX88_VMUX_SVIDEO,
  567. .vmux = 2,
  568. .gpio0 = 0x000027df,
  569. }},
  570. .mpeg = CX88_MPEG_DVB,
  571. },
  572. [CX88_BOARD_DNTV_LIVE_DVB_T] = {
  573. .name = "digitalnow DNTV Live! DVB-T",
  574. .tuner_type = TUNER_ABSENT,
  575. .radio_type = UNSET,
  576. .tuner_addr = ADDR_UNSET,
  577. .radio_addr = ADDR_UNSET,
  578. .input = {{
  579. .type = CX88_VMUX_COMPOSITE1,
  580. .vmux = 1,
  581. .gpio0 = 0x00000700,
  582. .gpio2 = 0x00000101,
  583. },{
  584. .type = CX88_VMUX_SVIDEO,
  585. .vmux = 2,
  586. .gpio0 = 0x00000700,
  587. .gpio2 = 0x00000101,
  588. }},
  589. .mpeg = CX88_MPEG_DVB,
  590. },
  591. [CX88_BOARD_PCHDTV_HD3000] = {
  592. .name = "pcHDTV HD3000 HDTV",
  593. .tuner_type = TUNER_THOMSON_DTT761X,
  594. .radio_type = UNSET,
  595. .tuner_addr = ADDR_UNSET,
  596. .radio_addr = ADDR_UNSET,
  597. .tda9887_conf = TDA9887_PRESENT,
  598. /* GPIO[2] = audio source for analog audio out connector
  599. * 0 = analog audio input connector
  600. * 1 = CX88 audio DACs
  601. *
  602. * GPIO[7] = input to CX88's audio/chroma ADC
  603. * 0 = FM 10.7 MHz IF
  604. * 1 = Sound 4.5 MHz IF
  605. *
  606. * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
  607. *
  608. * GPIO[16] = Remote control input
  609. */
  610. .input = {{
  611. .type = CX88_VMUX_TELEVISION,
  612. .vmux = 0,
  613. .gpio0 = 0x00008484,
  614. },{
  615. .type = CX88_VMUX_COMPOSITE1,
  616. .vmux = 1,
  617. .gpio0 = 0x00008400,
  618. },{
  619. .type = CX88_VMUX_SVIDEO,
  620. .vmux = 2,
  621. .gpio0 = 0x00008400,
  622. }},
  623. .radio = {
  624. .type = CX88_RADIO,
  625. .gpio0 = 0x00008404,
  626. },
  627. .mpeg = CX88_MPEG_DVB,
  628. },
  629. [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
  630. // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
  631. // GPIO values obtained from regspy, courtesy Sean Covel
  632. .name = "Hauppauge WinTV 28xxx (Roslyn) models",
  633. .tuner_type = UNSET,
  634. .radio_type = UNSET,
  635. .tuner_addr = ADDR_UNSET,
  636. .radio_addr = ADDR_UNSET,
  637. .input = {{
  638. .type = CX88_VMUX_TELEVISION,
  639. .vmux = 0,
  640. .gpio0 = 0xed1a,
  641. .gpio2 = 0x00ff,
  642. },{
  643. .type = CX88_VMUX_DEBUG,
  644. .vmux = 0,
  645. .gpio0 = 0xff01,
  646. },{
  647. .type = CX88_VMUX_COMPOSITE1,
  648. .vmux = 1,
  649. .gpio0 = 0xff02,
  650. },{
  651. .type = CX88_VMUX_SVIDEO,
  652. .vmux = 2,
  653. .gpio0 = 0xed92,
  654. .gpio2 = 0x00ff,
  655. }},
  656. .radio = {
  657. .type = CX88_RADIO,
  658. .gpio0 = 0xed96,
  659. .gpio2 = 0x00ff,
  660. },
  661. .mpeg = CX88_MPEG_BLACKBIRD,
  662. },
  663. [CX88_BOARD_DIGITALLOGIC_MEC] = {
  664. .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
  665. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  666. .radio_type = UNSET,
  667. .tuner_addr = ADDR_UNSET,
  668. .radio_addr = ADDR_UNSET,
  669. .tda9887_conf = TDA9887_PRESENT,
  670. .input = {{
  671. .type = CX88_VMUX_TELEVISION,
  672. .vmux = 0,
  673. .gpio0 = 0x00009d80,
  674. .audioroute = 1,
  675. },{
  676. .type = CX88_VMUX_COMPOSITE1,
  677. .vmux = 1,
  678. .gpio0 = 0x00009d76,
  679. .audioroute = 1,
  680. },{
  681. .type = CX88_VMUX_SVIDEO,
  682. .vmux = 2,
  683. .gpio0 = 0x00009d76,
  684. .audioroute = 1,
  685. }},
  686. .radio = {
  687. .type = CX88_RADIO,
  688. .gpio0 = 0x00009d00,
  689. .audioroute = 1,
  690. },
  691. .mpeg = CX88_MPEG_BLACKBIRD,
  692. },
  693. [CX88_BOARD_IODATA_GVBCTV7E] = {
  694. .name = "IODATA GV/BCTV7E",
  695. .tuner_type = TUNER_PHILIPS_FQ1286,
  696. .radio_type = UNSET,
  697. .tuner_addr = ADDR_UNSET,
  698. .radio_addr = ADDR_UNSET,
  699. .tda9887_conf = TDA9887_PRESENT,
  700. .input = {{
  701. .type = CX88_VMUX_TELEVISION,
  702. .vmux = 1,
  703. .gpio1 = 0x0000e03f,
  704. },{
  705. .type = CX88_VMUX_COMPOSITE1,
  706. .vmux = 2,
  707. .gpio1 = 0x0000e07f,
  708. },{
  709. .type = CX88_VMUX_SVIDEO,
  710. .vmux = 3,
  711. .gpio1 = 0x0000e07f,
  712. }}
  713. },
  714. [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
  715. .name = "PixelView PlayTV Ultra Pro (Stereo)",
  716. /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
  717. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  718. .radio_type = UNSET,
  719. .tuner_addr = ADDR_UNSET,
  720. .radio_addr = ADDR_UNSET,
  721. .input = {{
  722. .type = CX88_VMUX_TELEVISION,
  723. .vmux = 0,
  724. .gpio0 = 0xbf61, /* internal decoder */
  725. },{
  726. .type = CX88_VMUX_COMPOSITE1,
  727. .vmux = 1,
  728. .gpio0 = 0xbf63,
  729. },{
  730. .type = CX88_VMUX_SVIDEO,
  731. .vmux = 2,
  732. .gpio0 = 0xbf63,
  733. }},
  734. .radio = {
  735. .type = CX88_RADIO,
  736. .gpio0 = 0xbf60,
  737. },
  738. },
  739. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
  740. .name = "DViCO FusionHDTV 3 Gold-T",
  741. .tuner_type = TUNER_THOMSON_DTT761X,
  742. .radio_type = UNSET,
  743. .tuner_addr = ADDR_UNSET,
  744. .radio_addr = ADDR_UNSET,
  745. .tda9887_conf = TDA9887_PRESENT,
  746. .input = {{
  747. .type = CX88_VMUX_TELEVISION,
  748. .vmux = 0,
  749. .gpio0 = 0x97ed,
  750. },{
  751. .type = CX88_VMUX_COMPOSITE1,
  752. .vmux = 1,
  753. .gpio0 = 0x97e9,
  754. },{
  755. .type = CX88_VMUX_SVIDEO,
  756. .vmux = 2,
  757. .gpio0 = 0x97e9,
  758. }},
  759. .mpeg = CX88_MPEG_DVB,
  760. },
  761. [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
  762. .name = "ADS Tech Instant TV DVB-T PCI",
  763. .tuner_type = TUNER_ABSENT,
  764. .radio_type = UNSET,
  765. .tuner_addr = ADDR_UNSET,
  766. .radio_addr = ADDR_UNSET,
  767. .input = {{
  768. .type = CX88_VMUX_COMPOSITE1,
  769. .vmux = 1,
  770. .gpio0 = 0x0700,
  771. .gpio2 = 0x0101,
  772. },{
  773. .type = CX88_VMUX_SVIDEO,
  774. .vmux = 2,
  775. .gpio0 = 0x0700,
  776. .gpio2 = 0x0101,
  777. }},
  778. .mpeg = CX88_MPEG_DVB,
  779. },
  780. [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
  781. .name = "TerraTec Cinergy 1400 DVB-T",
  782. .tuner_type = TUNER_ABSENT,
  783. .input = {{
  784. .type = CX88_VMUX_DVB,
  785. .vmux = 0,
  786. },{
  787. .type = CX88_VMUX_COMPOSITE1,
  788. .vmux = 2,
  789. },{
  790. .type = CX88_VMUX_SVIDEO,
  791. .vmux = 2,
  792. }},
  793. .mpeg = CX88_MPEG_DVB,
  794. },
  795. [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
  796. .name = "DViCO FusionHDTV 5 Gold",
  797. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
  798. .radio_type = UNSET,
  799. .tuner_addr = ADDR_UNSET,
  800. .radio_addr = ADDR_UNSET,
  801. .tda9887_conf = TDA9887_PRESENT,
  802. .input = {{
  803. .type = CX88_VMUX_TELEVISION,
  804. .vmux = 0,
  805. .gpio0 = 0x87fd,
  806. },{
  807. .type = CX88_VMUX_COMPOSITE1,
  808. .vmux = 1,
  809. .gpio0 = 0x87f9,
  810. },{
  811. .type = CX88_VMUX_SVIDEO,
  812. .vmux = 2,
  813. .gpio0 = 0x87f9,
  814. }},
  815. .mpeg = CX88_MPEG_DVB,
  816. },
  817. [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
  818. .name = "AverMedia UltraTV Media Center PCI 550",
  819. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  820. .radio_type = UNSET,
  821. .tuner_addr = ADDR_UNSET,
  822. .radio_addr = ADDR_UNSET,
  823. .tda9887_conf = TDA9887_PRESENT,
  824. .input = {{
  825. .type = CX88_VMUX_COMPOSITE1,
  826. .vmux = 0,
  827. .gpio0 = 0x0000cd73,
  828. .audioroute = 1,
  829. },{
  830. .type = CX88_VMUX_SVIDEO,
  831. .vmux = 1,
  832. .gpio0 = 0x0000cd73,
  833. .audioroute = 1,
  834. },{
  835. .type = CX88_VMUX_TELEVISION,
  836. .vmux = 3,
  837. .gpio0 = 0x0000cdb3,
  838. .audioroute = 1,
  839. }},
  840. .radio = {
  841. .type = CX88_RADIO,
  842. .vmux = 2,
  843. .gpio0 = 0x0000cdf3,
  844. .audioroute = 1,
  845. },
  846. .mpeg = CX88_MPEG_BLACKBIRD,
  847. },
  848. [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
  849. /* Alexander Wold <awold@bigfoot.com> */
  850. .name = "Kworld V-Stream Xpert DVD",
  851. .tuner_type = UNSET,
  852. .input = {{
  853. .type = CX88_VMUX_COMPOSITE1,
  854. .vmux = 1,
  855. .gpio0 = 0x03000000,
  856. .gpio1 = 0x01000000,
  857. .gpio2 = 0x02000000,
  858. .gpio3 = 0x00100000,
  859. },{
  860. .type = CX88_VMUX_SVIDEO,
  861. .vmux = 2,
  862. .gpio0 = 0x03000000,
  863. .gpio1 = 0x01000000,
  864. .gpio2 = 0x02000000,
  865. .gpio3 = 0x00100000,
  866. }},
  867. },
  868. [CX88_BOARD_ATI_HDTVWONDER] = {
  869. .name = "ATI HDTV Wonder",
  870. .tuner_type = TUNER_PHILIPS_TUV1236D,
  871. .radio_type = UNSET,
  872. .tuner_addr = ADDR_UNSET,
  873. .radio_addr = ADDR_UNSET,
  874. .input = {{
  875. .type = CX88_VMUX_TELEVISION,
  876. .vmux = 0,
  877. .gpio0 = 0x00000ff7,
  878. .gpio1 = 0x000000ff,
  879. .gpio2 = 0x00000001,
  880. .gpio3 = 0x00000000,
  881. },{
  882. .type = CX88_VMUX_COMPOSITE1,
  883. .vmux = 1,
  884. .gpio0 = 0x00000ffe,
  885. .gpio1 = 0x000000ff,
  886. .gpio2 = 0x00000001,
  887. .gpio3 = 0x00000000,
  888. },{
  889. .type = CX88_VMUX_SVIDEO,
  890. .vmux = 2,
  891. .gpio0 = 0x00000ffe,
  892. .gpio1 = 0x000000ff,
  893. .gpio2 = 0x00000001,
  894. .gpio3 = 0x00000000,
  895. }},
  896. .mpeg = CX88_MPEG_DVB,
  897. },
  898. [CX88_BOARD_WINFAST_DTV1000] = {
  899. .name = "WinFast DTV1000-T",
  900. .tuner_type = TUNER_ABSENT,
  901. .radio_type = UNSET,
  902. .tuner_addr = ADDR_UNSET,
  903. .radio_addr = ADDR_UNSET,
  904. .input = {{
  905. .type = CX88_VMUX_DVB,
  906. .vmux = 0,
  907. },{
  908. .type = CX88_VMUX_COMPOSITE1,
  909. .vmux = 1,
  910. },{
  911. .type = CX88_VMUX_SVIDEO,
  912. .vmux = 2,
  913. }},
  914. .mpeg = CX88_MPEG_DVB,
  915. },
  916. [CX88_BOARD_AVERTV_303] = {
  917. .name = "AVerTV 303 (M126)",
  918. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  919. .radio_type = UNSET,
  920. .tuner_addr = ADDR_UNSET,
  921. .radio_addr = ADDR_UNSET,
  922. .tda9887_conf = TDA9887_PRESENT,
  923. .input = {{
  924. .type = CX88_VMUX_TELEVISION,
  925. .vmux = 0,
  926. .gpio0 = 0x00ff,
  927. .gpio1 = 0xe09f,
  928. .gpio2 = 0x0010,
  929. .gpio3 = 0x0000,
  930. },{
  931. .type = CX88_VMUX_COMPOSITE1,
  932. .vmux = 1,
  933. .gpio0 = 0x00ff,
  934. .gpio1 = 0xe05f,
  935. .gpio2 = 0x0010,
  936. .gpio3 = 0x0000,
  937. },{
  938. .type = CX88_VMUX_SVIDEO,
  939. .vmux = 2,
  940. .gpio0 = 0x00ff,
  941. .gpio1 = 0xe05f,
  942. .gpio2 = 0x0010,
  943. .gpio3 = 0x0000,
  944. }},
  945. },
  946. [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
  947. .name = "Hauppauge Nova-S-Plus DVB-S",
  948. .tuner_type = TUNER_ABSENT,
  949. .radio_type = UNSET,
  950. .tuner_addr = ADDR_UNSET,
  951. .radio_addr = ADDR_UNSET,
  952. .input = {{
  953. .type = CX88_VMUX_DVB,
  954. .vmux = 0,
  955. },{
  956. .type = CX88_VMUX_COMPOSITE1,
  957. .vmux = 1,
  958. },{
  959. .type = CX88_VMUX_SVIDEO,
  960. .vmux = 2,
  961. }},
  962. .mpeg = CX88_MPEG_DVB,
  963. },
  964. [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
  965. .name = "Hauppauge Nova-SE2 DVB-S",
  966. .tuner_type = TUNER_ABSENT,
  967. .radio_type = UNSET,
  968. .tuner_addr = ADDR_UNSET,
  969. .radio_addr = ADDR_UNSET,
  970. .input = {{
  971. .type = CX88_VMUX_DVB,
  972. .vmux = 0,
  973. }},
  974. .mpeg = CX88_MPEG_DVB,
  975. },
  976. [CX88_BOARD_KWORLD_DVBS_100] = {
  977. .name = "KWorld DVB-S 100",
  978. .tuner_type = TUNER_ABSENT,
  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. .type = CX88_VMUX_COMPOSITE1,
  987. .vmux = 1,
  988. },{
  989. .type = CX88_VMUX_SVIDEO,
  990. .vmux = 2,
  991. }},
  992. .mpeg = CX88_MPEG_DVB,
  993. },
  994. [CX88_BOARD_HAUPPAUGE_HVR1100] = {
  995. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
  996. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  997. .radio_type = UNSET,
  998. .tuner_addr = ADDR_UNSET,
  999. .radio_addr = ADDR_UNSET,
  1000. .tda9887_conf = TDA9887_PRESENT,
  1001. .input = {{
  1002. .type = CX88_VMUX_TELEVISION,
  1003. .vmux = 0,
  1004. },{
  1005. .type = CX88_VMUX_COMPOSITE1,
  1006. .vmux = 1,
  1007. },{
  1008. .type = CX88_VMUX_SVIDEO,
  1009. .vmux = 2,
  1010. }},
  1011. /* fixme: Add radio support */
  1012. .mpeg = CX88_MPEG_DVB,
  1013. },
  1014. [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
  1015. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
  1016. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1017. .radio_type = UNSET,
  1018. .tuner_addr = ADDR_UNSET,
  1019. .radio_addr = ADDR_UNSET,
  1020. .tda9887_conf = TDA9887_PRESENT,
  1021. .input = {{
  1022. .type = CX88_VMUX_TELEVISION,
  1023. .vmux = 0,
  1024. },{
  1025. .type = CX88_VMUX_COMPOSITE1,
  1026. .vmux = 1,
  1027. }},
  1028. /* fixme: Add radio support */
  1029. .mpeg = CX88_MPEG_DVB,
  1030. },
  1031. [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
  1032. .name = "digitalnow DNTV Live! DVB-T Pro",
  1033. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1034. .radio_type = UNSET,
  1035. .tuner_addr = ADDR_UNSET,
  1036. .radio_addr = ADDR_UNSET,
  1037. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1038. TDA9887_PORT2_ACTIVE,
  1039. .input = {{
  1040. .type = CX88_VMUX_TELEVISION,
  1041. .vmux = 0,
  1042. .gpio0 = 0xf80808,
  1043. },{
  1044. .type = CX88_VMUX_COMPOSITE1,
  1045. .vmux = 1,
  1046. .gpio0 = 0xf80808,
  1047. },{
  1048. .type = CX88_VMUX_SVIDEO,
  1049. .vmux = 2,
  1050. .gpio0 = 0xf80808,
  1051. }},
  1052. .radio = {
  1053. .type = CX88_RADIO,
  1054. .gpio0 = 0xf80808,
  1055. },
  1056. .mpeg = CX88_MPEG_DVB,
  1057. },
  1058. [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
  1059. /* Kworld V-stream Xpert DVB-T with Thomson tuner */
  1060. /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
  1061. /* Manenti Marco <marco_manenti@colman.it> */
  1062. .name = "KWorld/VStream XPert DVB-T with cx22702",
  1063. .tuner_type = TUNER_ABSENT,
  1064. .radio_type = UNSET,
  1065. .tuner_addr = ADDR_UNSET,
  1066. .radio_addr = ADDR_UNSET,
  1067. .input = {{
  1068. .type = CX88_VMUX_COMPOSITE1,
  1069. .vmux = 1,
  1070. .gpio0 = 0x0700,
  1071. .gpio2 = 0x0101,
  1072. },{
  1073. .type = CX88_VMUX_SVIDEO,
  1074. .vmux = 2,
  1075. .gpio0 = 0x0700,
  1076. .gpio2 = 0x0101,
  1077. }},
  1078. .mpeg = CX88_MPEG_DVB,
  1079. },
  1080. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
  1081. .name = "DViCO FusionHDTV DVB-T Dual Digital",
  1082. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  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 = 0x000067df,
  1090. },{
  1091. .type = CX88_VMUX_SVIDEO,
  1092. .vmux = 2,
  1093. .gpio0 = 0x000067df,
  1094. }},
  1095. .mpeg = CX88_MPEG_DVB,
  1096. },
  1097. [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
  1098. .name = "KWorld HardwareMpegTV XPert",
  1099. .tuner_type = TUNER_PHILIPS_TDA8290,
  1100. .radio_type = UNSET,
  1101. .tuner_addr = ADDR_UNSET,
  1102. .radio_addr = ADDR_UNSET,
  1103. .input = {{
  1104. .type = CX88_VMUX_TELEVISION,
  1105. .vmux = 0,
  1106. .gpio0 = 0x3de2,
  1107. .gpio2 = 0x00ff,
  1108. },{
  1109. .type = CX88_VMUX_COMPOSITE1,
  1110. .vmux = 1,
  1111. .gpio0 = 0x3de6,
  1112. .audioroute = 1,
  1113. },{
  1114. .type = CX88_VMUX_SVIDEO,
  1115. .vmux = 2,
  1116. .gpio0 = 0x3de6,
  1117. .audioroute = 1,
  1118. }},
  1119. .radio = {
  1120. .type = CX88_RADIO,
  1121. .gpio0 = 0x3de6,
  1122. .gpio2 = 0x00ff,
  1123. },
  1124. .mpeg = CX88_MPEG_BLACKBIRD,
  1125. },
  1126. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
  1127. .name = "DViCO FusionHDTV DVB-T Hybrid",
  1128. .tuner_type = TUNER_THOMSON_FE6600,
  1129. .radio_type = UNSET,
  1130. .tuner_addr = ADDR_UNSET,
  1131. .radio_addr = ADDR_UNSET,
  1132. .input = {{
  1133. .type = CX88_VMUX_TELEVISION,
  1134. .vmux = 0,
  1135. .gpio0 = 0x0000a75f,
  1136. },{
  1137. .type = CX88_VMUX_COMPOSITE1,
  1138. .vmux = 1,
  1139. .gpio0 = 0x0000a75b,
  1140. },{
  1141. .type = CX88_VMUX_SVIDEO,
  1142. .vmux = 2,
  1143. .gpio0 = 0x0000a75b,
  1144. }},
  1145. .mpeg = CX88_MPEG_DVB,
  1146. },
  1147. [CX88_BOARD_PCHDTV_HD5500] = {
  1148. .name = "pcHDTV HD5500 HDTV",
  1149. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
  1150. .radio_type = UNSET,
  1151. .tuner_addr = ADDR_UNSET,
  1152. .radio_addr = ADDR_UNSET,
  1153. .tda9887_conf = TDA9887_PRESENT,
  1154. .input = {{
  1155. .type = CX88_VMUX_TELEVISION,
  1156. .vmux = 0,
  1157. .gpio0 = 0x87fd,
  1158. },{
  1159. .type = CX88_VMUX_COMPOSITE1,
  1160. .vmux = 1,
  1161. .gpio0 = 0x87f9,
  1162. },{
  1163. .type = CX88_VMUX_SVIDEO,
  1164. .vmux = 2,
  1165. .gpio0 = 0x87f9,
  1166. }},
  1167. .mpeg = CX88_MPEG_DVB,
  1168. },
  1169. [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
  1170. /* FIXME: tested TV input only, disabled composite,
  1171. svideo and radio until they can be tested also. */
  1172. .name = "Kworld MCE 200 Deluxe",
  1173. .tuner_type = TUNER_TENA_9533_DI,
  1174. .radio_type = UNSET,
  1175. .tda9887_conf = TDA9887_PRESENT,
  1176. .tuner_addr = ADDR_UNSET,
  1177. .radio_addr = ADDR_UNSET,
  1178. .input = {{
  1179. .type = CX88_VMUX_TELEVISION,
  1180. .vmux = 0,
  1181. .gpio0 = 0x0000BDE6
  1182. }},
  1183. .mpeg = CX88_MPEG_BLACKBIRD,
  1184. },
  1185. [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
  1186. /* FIXME: SVideo, Composite and FM inputs are untested */
  1187. .name = "PixelView PlayTV P7000",
  1188. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  1189. .radio_type = UNSET,
  1190. .tuner_addr = ADDR_UNSET,
  1191. .radio_addr = ADDR_UNSET,
  1192. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1193. TDA9887_PORT2_ACTIVE,
  1194. .input = {{
  1195. .type = CX88_VMUX_TELEVISION,
  1196. .vmux = 0,
  1197. .gpio0 = 0x5da6,
  1198. }},
  1199. .mpeg = CX88_MPEG_BLACKBIRD,
  1200. },
  1201. [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
  1202. .name = "NPG Tech Real TV FM Top 10",
  1203. .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
  1204. .radio_type = UNSET,
  1205. .tuner_addr = ADDR_UNSET,
  1206. .radio_addr = ADDR_UNSET,
  1207. .input = {{
  1208. .type = CX88_VMUX_TELEVISION,
  1209. .vmux = 0,
  1210. .gpio0 = 0x0788,
  1211. },{
  1212. .type = CX88_VMUX_COMPOSITE1,
  1213. .vmux = 1,
  1214. .gpio0 = 0x078b,
  1215. },{
  1216. .type = CX88_VMUX_SVIDEO,
  1217. .vmux = 2,
  1218. .gpio0 = 0x078b,
  1219. }},
  1220. .radio = {
  1221. .type = CX88_RADIO,
  1222. .gpio0 = 0x074a,
  1223. },
  1224. },
  1225. [CX88_BOARD_WINFAST_DTV2000H] = {
  1226. /* video inputs and radio still in testing */
  1227. .name = "WinFast DTV2000 H",
  1228. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1229. .radio_type = UNSET,
  1230. .tuner_addr = ADDR_UNSET,
  1231. .radio_addr = ADDR_UNSET,
  1232. .tda9887_conf = TDA9887_PRESENT,
  1233. .input = {{
  1234. .type = CX88_VMUX_TELEVISION,
  1235. .vmux = 0,
  1236. .gpio0 = 0x00017304,
  1237. .gpio1 = 0x00008203,
  1238. .gpio2 = 0x00017304,
  1239. .gpio3 = 0x02000000,
  1240. }},
  1241. .mpeg = CX88_MPEG_DVB,
  1242. },
  1243. [CX88_BOARD_GENIATECH_DVBS] = {
  1244. .name = "Geniatech DVB-S",
  1245. .tuner_type = TUNER_ABSENT,
  1246. .radio_type = UNSET,
  1247. .tuner_addr = ADDR_UNSET,
  1248. .radio_addr = ADDR_UNSET,
  1249. .input = {{
  1250. .type = CX88_VMUX_DVB,
  1251. .vmux = 0,
  1252. },{
  1253. .type = CX88_VMUX_COMPOSITE1,
  1254. .vmux = 1,
  1255. }},
  1256. .mpeg = CX88_MPEG_DVB,
  1257. },
  1258. [CX88_BOARD_HAUPPAUGE_HVR3000] = {
  1259. /* FIXME: Add dvb & radio support */
  1260. .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
  1261. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1262. .radio_type = UNSET,
  1263. .tuner_addr = ADDR_UNSET,
  1264. .radio_addr = ADDR_UNSET,
  1265. .tda9887_conf = TDA9887_PRESENT,
  1266. .input = {{
  1267. .type = CX88_VMUX_TELEVISION,
  1268. .vmux = 0,
  1269. .gpio0 = 0x84bf,
  1270. },{
  1271. .type = CX88_VMUX_COMPOSITE1,
  1272. .vmux = 1,
  1273. .gpio0 = 0x84bf,
  1274. },{
  1275. .type = CX88_VMUX_SVIDEO,
  1276. .vmux = 2,
  1277. .gpio0 = 0x84bf,
  1278. }},
  1279. .mpeg = CX88_MPEG_DVB,
  1280. },
  1281. [CX88_BOARD_NORWOOD_MICRO] = {
  1282. .name = "Norwood Micro TV Tuner",
  1283. .tuner_type = TUNER_TNF_5335MF,
  1284. .radio_type = UNSET,
  1285. .tuner_addr = ADDR_UNSET,
  1286. .radio_addr = ADDR_UNSET,
  1287. .input = {{
  1288. .type = CX88_VMUX_TELEVISION,
  1289. .vmux = 0,
  1290. .gpio0 = 0x0709,
  1291. },{
  1292. .type = CX88_VMUX_COMPOSITE1,
  1293. .vmux = 1,
  1294. .gpio0 = 0x070b,
  1295. },{
  1296. .type = CX88_VMUX_SVIDEO,
  1297. .vmux = 2,
  1298. .gpio0 = 0x070b,
  1299. }},
  1300. },
  1301. [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
  1302. .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
  1303. .tuner_type = TUNER_LG_PAL_NEW_TAPC,
  1304. .radio_type = UNSET,
  1305. .tuner_addr = ADDR_UNSET,
  1306. .radio_addr = ADDR_UNSET,
  1307. .input = {{
  1308. .type = CX88_VMUX_TELEVISION,
  1309. .vmux = 0,
  1310. .gpio0 = 0x003fffff,
  1311. .gpio1 = 0x00e00000,
  1312. .gpio2 = 0x003fffff,
  1313. .gpio3 = 0x02000000,
  1314. },{
  1315. .type = CX88_VMUX_COMPOSITE1,
  1316. .vmux = 1,
  1317. .gpio0 = 0x003fffff,
  1318. .gpio1 = 0x00e00000,
  1319. .gpio2 = 0x003fffff,
  1320. .gpio3 = 0x02000000,
  1321. },{
  1322. .type = CX88_VMUX_SVIDEO,
  1323. .vmux = 2,
  1324. .gpio0 = 0x003fffff,
  1325. .gpio1 = 0x00e00000,
  1326. .gpio2 = 0x003fffff,
  1327. .gpio3 = 0x02000000,
  1328. }},
  1329. },
  1330. [CX88_BOARD_HAUPPAUGE_HVR1300] = {
  1331. .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
  1332. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1333. .radio_type = UNSET,
  1334. .tuner_addr = ADDR_UNSET,
  1335. .radio_addr = ADDR_UNSET,
  1336. .tda9887_conf = TDA9887_PRESENT,
  1337. .audio_chip = V4L2_IDENT_WM8775,
  1338. /*
  1339. * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
  1340. */
  1341. .input = {{
  1342. .type = CX88_VMUX_TELEVISION,
  1343. .vmux = 0,
  1344. .gpio0 = 0xef88,
  1345. .audioroute = 1,
  1346. },{
  1347. .type = CX88_VMUX_COMPOSITE1,
  1348. .vmux = 1,
  1349. .gpio0 = 0xef88,
  1350. .audioroute = 2,
  1351. },{
  1352. .type = CX88_VMUX_SVIDEO,
  1353. .vmux = 2,
  1354. .gpio0 = 0xef88,
  1355. .audioroute = 2,
  1356. }},
  1357. /* fixme: Add radio support */
  1358. .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
  1359. .radio = {
  1360. .type = CX88_RADIO,
  1361. .gpio0 = 0xef88,
  1362. },
  1363. },
  1364. [CX88_BOARD_ADSTECH_PTV_390] = {
  1365. .name = "ADS Tech Instant Video PCI",
  1366. .tuner_type = TUNER_ABSENT,
  1367. .radio_type = UNSET,
  1368. .tuner_addr = ADDR_UNSET,
  1369. .radio_addr = ADDR_UNSET,
  1370. .input = {{
  1371. .type = CX88_VMUX_DEBUG,
  1372. .vmux = 3,
  1373. .gpio0 = 0x04ff,
  1374. },{
  1375. .type = CX88_VMUX_COMPOSITE1,
  1376. .vmux = 1,
  1377. .gpio0 = 0x07fa,
  1378. },{
  1379. .type = CX88_VMUX_SVIDEO,
  1380. .vmux = 2,
  1381. .gpio0 = 0x07fa,
  1382. }},
  1383. },
  1384. [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
  1385. .name = "Pinnacle PCTV HD 800i",
  1386. .tuner_type = TUNER_XC5000,
  1387. .radio_type = UNSET,
  1388. .tuner_addr = ADDR_UNSET,
  1389. .radio_addr = ADDR_UNSET,
  1390. .input = {{
  1391. .type = CX88_VMUX_TELEVISION,
  1392. .vmux = 0,
  1393. .gpio0 = 0x04fb,
  1394. .gpio1 = 0x10ff,
  1395. },{
  1396. .type = CX88_VMUX_COMPOSITE1,
  1397. .vmux = 1,
  1398. .gpio0 = 0x04fb,
  1399. .gpio1 = 0x10ef,
  1400. .audioroute = 1,
  1401. },{
  1402. .type = CX88_VMUX_SVIDEO,
  1403. .vmux = 2,
  1404. .gpio0 = 0x04fb,
  1405. .gpio1 = 0x10ef,
  1406. .audioroute = 1,
  1407. }},
  1408. .mpeg = CX88_MPEG_DVB,
  1409. },
  1410. [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
  1411. .name = "DViCO FusionHDTV 5 PCI nano",
  1412. /* xc3008 tuner, digital only for now */
  1413. .tuner_type = TUNER_ABSENT,
  1414. .radio_type = UNSET,
  1415. .tuner_addr = ADDR_UNSET,
  1416. .radio_addr = ADDR_UNSET,
  1417. .input = {{
  1418. .type = CX88_VMUX_TELEVISION,
  1419. .vmux = 0,
  1420. .gpio0 = 0x000027df, /* Unconfirmed */
  1421. }, {
  1422. .type = CX88_VMUX_COMPOSITE1,
  1423. .vmux = 1,
  1424. .gpio0 = 0x000027df, /* Unconfirmed */
  1425. .audioroute = 1,
  1426. }, {
  1427. .type = CX88_VMUX_SVIDEO,
  1428. .vmux = 2,
  1429. .gpio0 = 0x000027df, /* Unconfirmed */
  1430. .audioroute = 1,
  1431. } },
  1432. .mpeg = CX88_MPEG_DVB,
  1433. },
  1434. [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
  1435. .name = "Pinnacle Hybrid PCTV",
  1436. .tuner_type = TUNER_XC2028,
  1437. .tuner_addr = 0x61,
  1438. .input = { {
  1439. .type = CX88_VMUX_TELEVISION,
  1440. .vmux = 0,
  1441. }, {
  1442. .type = CX88_VMUX_COMPOSITE1,
  1443. .vmux = 1,
  1444. }, {
  1445. .type = CX88_VMUX_SVIDEO,
  1446. .vmux = 2,
  1447. } },
  1448. .radio = {
  1449. .type = CX88_RADIO,
  1450. .gpio0 = 0x004ff,
  1451. .gpio1 = 0x010ff,
  1452. .gpio2 = 0x0ff,
  1453. },
  1454. },
  1455. [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
  1456. .name = "Winfast TV2000 XP Global",
  1457. .tuner_type = TUNER_XC2028,
  1458. .tuner_addr = 0x61,
  1459. .input = { {
  1460. .type = CX88_VMUX_TELEVISION,
  1461. .vmux = 0,
  1462. .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
  1463. .gpio1 = 0x0000,
  1464. .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
  1465. }, {
  1466. .type = CX88_VMUX_COMPOSITE1,
  1467. .vmux = 1,
  1468. .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
  1469. .gpio1 = 0x0000,
  1470. .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
  1471. }, {
  1472. .type = CX88_VMUX_SVIDEO,
  1473. .vmux = 2,
  1474. } },
  1475. .radio = {
  1476. .type = CX88_RADIO,
  1477. .gpio0 = 0x004ff,
  1478. .gpio1 = 0x010ff,
  1479. .gpio2 = 0x0ff,
  1480. },
  1481. },
  1482. [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
  1483. .name = "PowerColor RA330", /* Long names may confuse LIRC. */
  1484. .tuner_type = TUNER_XC2028,
  1485. .tuner_addr = 0x61,
  1486. .input = { {
  1487. .type = CX88_VMUX_DEBUG,
  1488. .vmux = 3, /* Due to the way the cx88 driver is written, */
  1489. .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
  1490. .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
  1491. .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
  1492. }, { /* from the tuner on boot for a little while. */
  1493. .type = CX88_VMUX_TELEVISION,
  1494. .vmux = 0,
  1495. .gpio0 = 0x00ff,
  1496. .gpio1 = 0xf35d,
  1497. .gpio3 = 0x0000,
  1498. }, {
  1499. .type = CX88_VMUX_COMPOSITE1,
  1500. .vmux = 1,
  1501. .gpio0 = 0x00ff,
  1502. .gpio1 = 0xf37d,
  1503. .gpio3 = 0x0000,
  1504. }, {
  1505. .type = CX88_VMUX_SVIDEO,
  1506. .vmux = 2,
  1507. .gpio0 = 0x000ff,
  1508. .gpio1 = 0x0f37d,
  1509. .gpio3 = 0x00000,
  1510. } },
  1511. .radio = {
  1512. .type = CX88_RADIO,
  1513. .gpio0 = 0x000ff,
  1514. .gpio1 = 0x0f35d,
  1515. .gpio3 = 0x00000,
  1516. },
  1517. },
  1518. [CX88_BOARD_GENIATECH_X8000_MT] = {
  1519. /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
  1520. .name = "Geniatech X8000-MT DVBT",
  1521. .tuner_type = TUNER_XC2028,
  1522. .tuner_addr = 0x61,
  1523. .input = { {
  1524. .type = CX88_VMUX_TELEVISION,
  1525. .vmux = 0,
  1526. .gpio0 = 0x00000000,
  1527. .gpio1 = 0x00e3e341,
  1528. .gpio2 = 0x00000000,
  1529. .gpio3 = 0x00000000,
  1530. }, {
  1531. .type = CX88_VMUX_COMPOSITE1,
  1532. .vmux = 1,
  1533. .gpio0 = 0x00000000,
  1534. .gpio1 = 0x00e3e361,
  1535. .gpio2 = 0x00000000,
  1536. .gpio3 = 0x00000000,
  1537. }, {
  1538. .type = CX88_VMUX_SVIDEO,
  1539. .vmux = 2,
  1540. .gpio0 = 0x00000000,
  1541. .gpio1 = 0x00e3e361,
  1542. .gpio2 = 0x00000000,
  1543. .gpio3 = 0x00000000,
  1544. } },
  1545. .radio = {
  1546. .type = CX88_RADIO,
  1547. .gpio0 = 0x00000000,
  1548. .gpio1 = 0x00e3e341,
  1549. .gpio2 = 0x00000000,
  1550. .gpio3 = 0x00000000,
  1551. },
  1552. .mpeg = CX88_MPEG_DVB,
  1553. },
  1554. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
  1555. .name = "DViCO FusionHDTV DVB-T PRO",
  1556. .tuner_type = TUNER_ABSENT, /* XXX: Has XC3028 */
  1557. .radio_type = UNSET,
  1558. .tuner_addr = ADDR_UNSET,
  1559. .radio_addr = ADDR_UNSET,
  1560. .input = { {
  1561. .type = CX88_VMUX_COMPOSITE1,
  1562. .vmux = 1,
  1563. .gpio0 = 0x000067df,
  1564. }, {
  1565. .type = CX88_VMUX_SVIDEO,
  1566. .vmux = 2,
  1567. .gpio0 = 0x000067df,
  1568. } },
  1569. .mpeg = CX88_MPEG_DVB,
  1570. },
  1571. [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
  1572. .name = "DViCO FusionHDTV 7 Gold",
  1573. .tuner_type = TUNER_XC5000,
  1574. .radio_type = UNSET,
  1575. .tuner_addr = ADDR_UNSET,
  1576. .radio_addr = ADDR_UNSET,
  1577. .input = {{
  1578. .type = CX88_VMUX_TELEVISION,
  1579. .vmux = 0,
  1580. .gpio0 = 0x10df,
  1581. },{
  1582. .type = CX88_VMUX_COMPOSITE1,
  1583. .vmux = 1,
  1584. .gpio0 = 0x16d9,
  1585. },{
  1586. .type = CX88_VMUX_SVIDEO,
  1587. .vmux = 2,
  1588. .gpio0 = 0x16d9,
  1589. }},
  1590. .mpeg = CX88_MPEG_DVB,
  1591. },
  1592. [CX88_BOARD_PROLINK_PV_8000GT] = {
  1593. .name = "Prolink Pixelview MPEG 8000GT",
  1594. .tuner_type = TUNER_XC2028,
  1595. .tuner_addr = 0x61,
  1596. .input = { {
  1597. .type = CX88_VMUX_TELEVISION,
  1598. .vmux = 0,
  1599. .gpio0 = 0x0ff,
  1600. .gpio2 = 0x0cfb,
  1601. }, {
  1602. .type = CX88_VMUX_COMPOSITE1,
  1603. .vmux = 1,
  1604. .gpio2 = 0x0cfb,
  1605. }, {
  1606. .type = CX88_VMUX_SVIDEO,
  1607. .vmux = 2,
  1608. .gpio2 = 0x0cfb,
  1609. } },
  1610. .radio = {
  1611. .type = CX88_RADIO,
  1612. .gpio2 = 0x0cfb,
  1613. },
  1614. },
  1615. /* Both radio, analog and ATSC work with this board.
  1616. However, for analog to work, s5h1409 gate should be open,
  1617. otherwise, tuner-xc3028 won't be detected.
  1618. A proper fix require using the newer i2c methods to add
  1619. tuner-xc3028 without doing an i2c probe.
  1620. */
  1621. [CX88_BOARD_KWORLD_ATSC_120] = {
  1622. .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
  1623. .tuner_type = TUNER_XC2028,
  1624. .radio_type = UNSET,
  1625. .tuner_addr = ADDR_UNSET,
  1626. .radio_addr = ADDR_UNSET,
  1627. .input = { {
  1628. .type = CX88_VMUX_TELEVISION,
  1629. .vmux = 0,
  1630. .gpio0 = 0x000000ff,
  1631. .gpio1 = 0x0000f35d,
  1632. .gpio2 = 0x00000000,
  1633. }, {
  1634. .type = CX88_VMUX_COMPOSITE1,
  1635. .vmux = 1,
  1636. .gpio0 = 0x000000ff,
  1637. .gpio1 = 0x0000f37e,
  1638. .gpio2 = 0x00000000,
  1639. }, {
  1640. .type = CX88_VMUX_SVIDEO,
  1641. .vmux = 2,
  1642. .gpio0 = 0x000000ff,
  1643. .gpio1 = 0x0000f37e,
  1644. .gpio2 = 0x00000000,
  1645. } },
  1646. .radio = {
  1647. .type = CX88_RADIO,
  1648. .gpio0 = 0x000000ff,
  1649. .gpio1 = 0x0000f35d,
  1650. .gpio2 = 0x00000000,
  1651. },
  1652. .mpeg = CX88_MPEG_DVB,
  1653. },
  1654. [CX88_BOARD_HAUPPAUGE_HVR4000] = {
  1655. .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
  1656. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1657. .radio_type = UNSET,
  1658. .tuner_addr = ADDR_UNSET,
  1659. .radio_addr = ADDR_UNSET,
  1660. .tda9887_conf = TDA9887_PRESENT,
  1661. /*
  1662. * GPIO0 (WINTV2000)
  1663. *
  1664. * Analogue SAT DVB-T
  1665. * Antenna 0xc4bf 0xc4bb
  1666. * Composite 0xc4bf 0xc4bb
  1667. * S-Video 0xc4bf 0xc4bb
  1668. * Composite1 0xc4ff 0xc4fb
  1669. * S-Video1 0xc4ff 0xc4fb
  1670. *
  1671. * BIT VALUE FUNCTION GP{x}_IO
  1672. * 0 1 I:?
  1673. * 1 1 I:?
  1674. * 2 1 O:DVB-T DEMOD ENABLE LOW/ANALOG DEMOD ENABLE HIGH
  1675. * 3 1 I:?
  1676. * 4 1 I:?
  1677. * 5 1 I:?
  1678. * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
  1679. * 7 1 O:DVB-T DEMOD RESET LOW
  1680. *
  1681. * BIT VALUE FUNCTION GP{x}_OE
  1682. * 8 0 I
  1683. * 9 0 I
  1684. * a 1 O
  1685. * b 0 I
  1686. * c 0 I
  1687. * d 0 I
  1688. * e 1 O
  1689. * f 1 O
  1690. */
  1691. .input = {{
  1692. .type = CX88_VMUX_TELEVISION,
  1693. .vmux = 0,
  1694. .gpio0 = 0xc4bf,
  1695. }, {
  1696. .type = CX88_VMUX_COMPOSITE1,
  1697. .vmux = 1,
  1698. .gpio0 = 0xc4bf,
  1699. }, {
  1700. .type = CX88_VMUX_SVIDEO,
  1701. .vmux = 2,
  1702. .gpio0 = 0xc4bf,
  1703. } },
  1704. /* fixme: Add radio support */
  1705. .mpeg = CX88_MPEG_DVB,
  1706. },
  1707. [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
  1708. .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
  1709. .tuner_type = UNSET,
  1710. .radio_type = UNSET,
  1711. .tuner_addr = ADDR_UNSET,
  1712. .radio_addr = ADDR_UNSET,
  1713. .input = {{
  1714. .type = CX88_VMUX_DVB,
  1715. .vmux = 0,
  1716. } },
  1717. .mpeg = CX88_MPEG_DVB,
  1718. },
  1719. [CX88_BOARD_TEVII_S420] = {
  1720. .name = "TeVii S420 DVB-S",
  1721. .tuner_type = UNSET,
  1722. .radio_type = UNSET,
  1723. .tuner_addr = ADDR_UNSET,
  1724. .radio_addr = ADDR_UNSET,
  1725. .input = {{
  1726. .type = CX88_VMUX_DVB,
  1727. .vmux = 0,
  1728. } },
  1729. .mpeg = CX88_MPEG_DVB,
  1730. },
  1731. [CX88_BOARD_TEVII_S460] = {
  1732. .name = "TeVii S460 DVB-S/S2",
  1733. .tuner_type = UNSET,
  1734. .radio_type = UNSET,
  1735. .tuner_addr = ADDR_UNSET,
  1736. .radio_addr = ADDR_UNSET,
  1737. .input = {{
  1738. .type = CX88_VMUX_DVB,
  1739. .vmux = 0,
  1740. } },
  1741. .mpeg = CX88_MPEG_DVB,
  1742. },
  1743. [CX88_BOARD_OMICOM_SS4_PCI] = {
  1744. .name = "Omicom SS4 DVB-S/S2 PCI",
  1745. .tuner_type = UNSET,
  1746. .radio_type = UNSET,
  1747. .tuner_addr = ADDR_UNSET,
  1748. .radio_addr = ADDR_UNSET,
  1749. .input = {{
  1750. .type = CX88_VMUX_DVB,
  1751. .vmux = 0,
  1752. } },
  1753. .mpeg = CX88_MPEG_DVB,
  1754. },
  1755. [CX88_BOARD_TBS_8920] = {
  1756. .name = "TBS 8920 DVB-S/S2",
  1757. .tuner_type = TUNER_ABSENT,
  1758. .radio_type = UNSET,
  1759. .tuner_addr = ADDR_UNSET,
  1760. .radio_addr = ADDR_UNSET,
  1761. .input = {{
  1762. .type = CX88_VMUX_DVB,
  1763. .vmux = 1,
  1764. } },
  1765. .mpeg = CX88_MPEG_DVB,
  1766. },
  1767. };
  1768. /* ------------------------------------------------------------------ */
  1769. /* PCI subsystem IDs */
  1770. static const struct cx88_subid cx88_subids[] = {
  1771. {
  1772. .subvendor = 0x0070,
  1773. .subdevice = 0x3400,
  1774. .card = CX88_BOARD_HAUPPAUGE,
  1775. },{
  1776. .subvendor = 0x0070,
  1777. .subdevice = 0x3401,
  1778. .card = CX88_BOARD_HAUPPAUGE,
  1779. },{
  1780. .subvendor = 0x14c7,
  1781. .subdevice = 0x0106,
  1782. .card = CX88_BOARD_GDI,
  1783. },{
  1784. .subvendor = 0x14c7,
  1785. .subdevice = 0x0107, /* with mpeg encoder */
  1786. .card = CX88_BOARD_GDI,
  1787. },{
  1788. .subvendor = PCI_VENDOR_ID_ATI,
  1789. .subdevice = 0x00f8,
  1790. .card = CX88_BOARD_ATI_WONDER_PRO,
  1791. },{
  1792. .subvendor = 0x107d,
  1793. .subdevice = 0x6611,
  1794. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1795. },{
  1796. .subvendor = 0x107d,
  1797. .subdevice = 0x6613, /* NTSC */
  1798. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1799. },{
  1800. .subvendor = 0x107d,
  1801. .subdevice = 0x6620,
  1802. .card = CX88_BOARD_WINFAST_DV2000,
  1803. },{
  1804. .subvendor = 0x107d,
  1805. .subdevice = 0x663b,
  1806. .card = CX88_BOARD_LEADTEK_PVR2000,
  1807. },{
  1808. .subvendor = 0x107d,
  1809. .subdevice = 0x663c,
  1810. .card = CX88_BOARD_LEADTEK_PVR2000,
  1811. },{
  1812. .subvendor = 0x1461,
  1813. .subdevice = 0x000b,
  1814. .card = CX88_BOARD_AVERTV_STUDIO_303,
  1815. },{
  1816. .subvendor = 0x1462,
  1817. .subdevice = 0x8606,
  1818. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  1819. },{
  1820. .subvendor = 0x10fc,
  1821. .subdevice = 0xd003,
  1822. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  1823. },{
  1824. .subvendor = 0x1043,
  1825. .subdevice = 0x4823, /* with mpeg encoder */
  1826. .card = CX88_BOARD_ASUS_PVR_416,
  1827. },{
  1828. .subvendor = 0x17de,
  1829. .subdevice = 0x08a6,
  1830. .card = CX88_BOARD_KWORLD_DVB_T,
  1831. },{
  1832. .subvendor = 0x18ac,
  1833. .subdevice = 0xd810,
  1834. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1835. },{
  1836. .subvendor = 0x18ac,
  1837. .subdevice = 0xd820,
  1838. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  1839. },{
  1840. .subvendor = 0x18ac,
  1841. .subdevice = 0xdb00,
  1842. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  1843. },{
  1844. .subvendor = 0x0070,
  1845. .subdevice = 0x9002,
  1846. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1847. },{
  1848. .subvendor = 0x14f1,
  1849. .subdevice = 0x0187,
  1850. .card = CX88_BOARD_CONEXANT_DVB_T1,
  1851. },{
  1852. .subvendor = 0x1540,
  1853. .subdevice = 0x2580,
  1854. .card = CX88_BOARD_PROVIDEO_PV259,
  1855. },{
  1856. .subvendor = 0x18ac,
  1857. .subdevice = 0xdb10,
  1858. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1859. },{
  1860. .subvendor = 0x1554,
  1861. .subdevice = 0x4811,
  1862. .card = CX88_BOARD_PIXELVIEW,
  1863. },{
  1864. .subvendor = 0x7063,
  1865. .subdevice = 0x3000, /* HD-3000 card */
  1866. .card = CX88_BOARD_PCHDTV_HD3000,
  1867. },{
  1868. .subvendor = 0x17de,
  1869. .subdevice = 0xa8a6,
  1870. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  1871. },{
  1872. .subvendor = 0x0070,
  1873. .subdevice = 0x2801,
  1874. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  1875. },{
  1876. .subvendor = 0x14f1,
  1877. .subdevice = 0x0342,
  1878. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  1879. },{
  1880. .subvendor = 0x10fc,
  1881. .subdevice = 0xd035,
  1882. .card = CX88_BOARD_IODATA_GVBCTV7E,
  1883. },{
  1884. .subvendor = 0x1421,
  1885. .subdevice = 0x0334,
  1886. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  1887. },{
  1888. .subvendor = 0x153b,
  1889. .subdevice = 0x1166,
  1890. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  1891. },{
  1892. .subvendor = 0x18ac,
  1893. .subdevice = 0xd500,
  1894. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  1895. },{
  1896. .subvendor = 0x1461,
  1897. .subdevice = 0x8011,
  1898. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  1899. },{
  1900. .subvendor = PCI_VENDOR_ID_ATI,
  1901. .subdevice = 0xa101,
  1902. .card = CX88_BOARD_ATI_HDTVWONDER,
  1903. },{
  1904. .subvendor = 0x107d,
  1905. .subdevice = 0x665f,
  1906. .card = CX88_BOARD_WINFAST_DTV1000,
  1907. },{
  1908. .subvendor = 0x1461,
  1909. .subdevice = 0x000a,
  1910. .card = CX88_BOARD_AVERTV_303,
  1911. },{
  1912. .subvendor = 0x0070,
  1913. .subdevice = 0x9200,
  1914. .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
  1915. },{
  1916. .subvendor = 0x0070,
  1917. .subdevice = 0x9201,
  1918. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1919. },{
  1920. .subvendor = 0x0070,
  1921. .subdevice = 0x9202,
  1922. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1923. },{
  1924. .subvendor = 0x17de,
  1925. .subdevice = 0x08b2,
  1926. .card = CX88_BOARD_KWORLD_DVBS_100,
  1927. },{
  1928. .subvendor = 0x0070,
  1929. .subdevice = 0x9400,
  1930. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1931. },{
  1932. .subvendor = 0x0070,
  1933. .subdevice = 0x9402,
  1934. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1935. },{
  1936. .subvendor = 0x0070,
  1937. .subdevice = 0x9800,
  1938. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1939. },{
  1940. .subvendor = 0x0070,
  1941. .subdevice = 0x9802,
  1942. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1943. },{
  1944. .subvendor = 0x0070,
  1945. .subdevice = 0x9001,
  1946. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1947. },{
  1948. .subvendor = 0x1822,
  1949. .subdevice = 0x0025,
  1950. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1951. },{
  1952. .subvendor = 0x17de,
  1953. .subdevice = 0x08a1,
  1954. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  1955. },{
  1956. .subvendor = 0x18ac,
  1957. .subdevice = 0xdb50,
  1958. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1959. },{
  1960. .subvendor = 0x18ac,
  1961. .subdevice = 0xdb54,
  1962. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1963. /* Re-branded DViCO: DigitalNow DVB-T Dual */
  1964. },{
  1965. .subvendor = 0x18ac,
  1966. .subdevice = 0xdb11,
  1967. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1968. /* Re-branded DViCO: UltraView DVB-T Plus */
  1969. }, {
  1970. .subvendor = 0x18ac,
  1971. .subdevice = 0xdb30,
  1972. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
  1973. }, {
  1974. .subvendor = 0x17de,
  1975. .subdevice = 0x0840,
  1976. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  1977. },{
  1978. .subvendor = 0x1421,
  1979. .subdevice = 0x0305,
  1980. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  1981. },{
  1982. .subvendor = 0x18ac,
  1983. .subdevice = 0xdb40,
  1984. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1985. },{
  1986. .subvendor = 0x18ac,
  1987. .subdevice = 0xdb44,
  1988. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1989. },{
  1990. .subvendor = 0x7063,
  1991. .subdevice = 0x5500,
  1992. .card = CX88_BOARD_PCHDTV_HD5500,
  1993. },{
  1994. .subvendor = 0x17de,
  1995. .subdevice = 0x0841,
  1996. .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
  1997. },{
  1998. .subvendor = 0x1822,
  1999. .subdevice = 0x0019,
  2000. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  2001. },{
  2002. .subvendor = 0x1554,
  2003. .subdevice = 0x4813,
  2004. .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
  2005. },{
  2006. .subvendor = 0x14f1,
  2007. .subdevice = 0x0842,
  2008. .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
  2009. },{
  2010. .subvendor = 0x107d,
  2011. .subdevice = 0x665e,
  2012. .card = CX88_BOARD_WINFAST_DTV2000H,
  2013. },{
  2014. .subvendor = 0x18ac,
  2015. .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
  2016. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  2017. },{
  2018. .subvendor = 0x14f1,
  2019. .subdevice = 0x0084,
  2020. .card = CX88_BOARD_GENIATECH_DVBS,
  2021. },{
  2022. .subvendor = 0x0070,
  2023. .subdevice = 0x1404,
  2024. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2025. },{
  2026. .subvendor = 0x1461,
  2027. .subdevice = 0xc111, /* AverMedia M150-D */
  2028. /* This board is known to work with the ASUS PVR416 config */
  2029. .card = CX88_BOARD_ASUS_PVR_416,
  2030. },{
  2031. .subvendor = 0xc180,
  2032. .subdevice = 0xc980,
  2033. .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
  2034. },{
  2035. .subvendor = 0x0070,
  2036. .subdevice = 0x9600,
  2037. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2038. },{
  2039. .subvendor = 0x0070,
  2040. .subdevice = 0x9601,
  2041. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2042. },{
  2043. .subvendor = 0x0070,
  2044. .subdevice = 0x9602,
  2045. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2046. },{
  2047. .subvendor = 0x107d,
  2048. .subdevice = 0x6632,
  2049. .card = CX88_BOARD_LEADTEK_PVR2000,
  2050. },{
  2051. .subvendor = 0x12ab,
  2052. .subdevice = 0x2300, /* Club3D Zap TV2100 */
  2053. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  2054. },{
  2055. .subvendor = 0x0070,
  2056. .subdevice = 0x9000,
  2057. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2058. },{
  2059. .subvendor = 0x0070,
  2060. .subdevice = 0x1400,
  2061. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2062. },{
  2063. .subvendor = 0x0070,
  2064. .subdevice = 0x1401,
  2065. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2066. },{
  2067. .subvendor = 0x0070,
  2068. .subdevice = 0x1402,
  2069. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2070. },{
  2071. .subvendor = 0x1421,
  2072. .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
  2073. .card = CX88_BOARD_KWORLD_DVBS_100,
  2074. },{
  2075. .subvendor = 0x1421,
  2076. .subdevice = 0x0390,
  2077. .card = CX88_BOARD_ADSTECH_PTV_390,
  2078. },{
  2079. .subvendor = 0x11bd,
  2080. .subdevice = 0x0051,
  2081. .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
  2082. }, {
  2083. .subvendor = 0x18ac,
  2084. .subdevice = 0xd530,
  2085. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
  2086. }, {
  2087. .subvendor = 0x12ab,
  2088. .subdevice = 0x1788,
  2089. .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
  2090. }, {
  2091. .subvendor = 0x14f1,
  2092. .subdevice = 0xea3d,
  2093. .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
  2094. }, {
  2095. .subvendor = 0x107d,
  2096. .subdevice = 0x6f18,
  2097. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
  2098. }, {
  2099. .subvendor = 0x14f1,
  2100. .subdevice = 0x8852,
  2101. .card = CX88_BOARD_GENIATECH_X8000_MT,
  2102. }, {
  2103. .subvendor = 0x18ac,
  2104. .subdevice = 0xd610,
  2105. .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
  2106. }, {
  2107. .subvendor = 0x1554,
  2108. .subdevice = 0x4935,
  2109. .card = CX88_BOARD_PROLINK_PV_8000GT,
  2110. }, {
  2111. .subvendor = 0x17de,
  2112. .subdevice = 0x08c1,
  2113. .card = CX88_BOARD_KWORLD_ATSC_120,
  2114. }, {
  2115. .subvendor = 0x0070,
  2116. .subdevice = 0x6900,
  2117. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2118. }, {
  2119. .subvendor = 0x0070,
  2120. .subdevice = 0x6904,
  2121. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2122. }, {
  2123. .subvendor = 0x0070,
  2124. .subdevice = 0x6902,
  2125. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2126. }, {
  2127. .subvendor = 0x0070,
  2128. .subdevice = 0x6905,
  2129. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2130. }, {
  2131. .subvendor = 0x0070,
  2132. .subdevice = 0x6906,
  2133. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2134. }, {
  2135. .subvendor = 0xd420,
  2136. .subdevice = 0x9022,
  2137. .card = CX88_BOARD_TEVII_S420,
  2138. }, {
  2139. .subvendor = 0xd460,
  2140. .subdevice = 0x9022,
  2141. .card = CX88_BOARD_TEVII_S460,
  2142. }, {
  2143. .subvendor = 0xA044,
  2144. .subdevice = 0x2011,
  2145. .card = CX88_BOARD_OMICOM_SS4_PCI,
  2146. }, {
  2147. .subvendor = 0x8920,
  2148. .subdevice = 0x8888,
  2149. .card = CX88_BOARD_TBS_8920,
  2150. },
  2151. };
  2152. /* ----------------------------------------------------------------------- */
  2153. /* some leadtek specific stuff */
  2154. static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2155. {
  2156. /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
  2157. * any others.
  2158. *
  2159. * Byte 0 is 1 on the NTSC board.
  2160. */
  2161. if (eeprom_data[4] != 0x7d ||
  2162. eeprom_data[5] != 0x10 ||
  2163. eeprom_data[7] != 0x66) {
  2164. warn_printk(core, "Leadtek eeprom invalid.\n");
  2165. return;
  2166. }
  2167. core->board.tuner_type = (eeprom_data[6] == 0x13) ?
  2168. TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
  2169. info_printk(core, "Leadtek Winfast 2000XP Expert config: "
  2170. "tuner=%d, eeprom[0]=0x%02x\n",
  2171. core->board.tuner_type, eeprom_data[0]);
  2172. }
  2173. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2174. {
  2175. struct tveeprom tv;
  2176. tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
  2177. core->board.tuner_type = tv.tuner_type;
  2178. core->tuner_formats = tv.tuner_formats;
  2179. core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
  2180. /* Make sure we support the board model */
  2181. switch (tv.model)
  2182. {
  2183. case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
  2184. case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
  2185. case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
  2186. case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
  2187. case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
  2188. case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
  2189. case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
  2190. case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
  2191. case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
  2192. case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
  2193. case 34519: /* WinTV-PCI-FM */
  2194. case 69009:
  2195. /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
  2196. case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
  2197. case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
  2198. case 69559:
  2199. /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
  2200. case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
  2201. case 90002: /* Nova-T-PCI (9002) */
  2202. case 92001: /* Nova-S-Plus (Video and IR) */
  2203. case 92002: /* Nova-S-Plus (Video and IR) */
  2204. case 90003: /* Nova-T-PCI (9002 No RF out) */
  2205. case 90500: /* Nova-T-PCI (oem) */
  2206. case 90501: /* Nova-T-PCI (oem/IR) */
  2207. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  2208. case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
  2209. case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
  2210. case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
  2211. case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
  2212. case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
  2213. case 96569: /* WinTV-HVR1300 () */
  2214. case 96659: /* WinTV-HVR1300 () */
  2215. case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
  2216. /* known */
  2217. break;
  2218. default:
  2219. warn_printk(core, "warning: unknown hauppauge model #%d\n",
  2220. tv.model);
  2221. break;
  2222. }
  2223. info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
  2224. }
  2225. /* ----------------------------------------------------------------------- */
  2226. /* some GDI (was: Modular Technology) specific stuff */
  2227. static struct {
  2228. int id;
  2229. int fm;
  2230. char *name;
  2231. } gdi_tuner[] = {
  2232. [ 0x01 ] = { .id = TUNER_ABSENT,
  2233. .name = "NTSC_M" },
  2234. [ 0x02 ] = { .id = TUNER_ABSENT,
  2235. .name = "PAL_B" },
  2236. [ 0x03 ] = { .id = TUNER_ABSENT,
  2237. .name = "PAL_I" },
  2238. [ 0x04 ] = { .id = TUNER_ABSENT,
  2239. .name = "PAL_D" },
  2240. [ 0x05 ] = { .id = TUNER_ABSENT,
  2241. .name = "SECAM" },
  2242. [ 0x10 ] = { .id = TUNER_ABSENT,
  2243. .fm = 1,
  2244. .name = "TEMIC_4049" },
  2245. [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
  2246. .name = "TEMIC_4136" },
  2247. [ 0x12 ] = { .id = TUNER_ABSENT,
  2248. .name = "TEMIC_4146" },
  2249. [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
  2250. .fm = 1,
  2251. .name = "PHILIPS_FQ1216_MK3" },
  2252. [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
  2253. .name = "PHILIPS_FQ1236_MK3" },
  2254. [ 0x22 ] = { .id = TUNER_ABSENT,
  2255. .name = "PHILIPS_FI1236_MK3" },
  2256. [ 0x23 ] = { .id = TUNER_ABSENT,
  2257. .name = "PHILIPS_FI1216_MK3" },
  2258. };
  2259. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2260. {
  2261. char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  2262. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  2263. info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
  2264. if (NULL == name)
  2265. return;
  2266. core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  2267. core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
  2268. CX88_RADIO : 0;
  2269. }
  2270. /* ------------------------------------------------------------------- */
  2271. /* some Divco specific stuff */
  2272. static int cx88_dvico_xc2028_callback(struct cx88_core *core,
  2273. int command, int arg)
  2274. {
  2275. switch (command) {
  2276. case XC2028_TUNER_RESET:
  2277. switch (core->boardnr) {
  2278. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2279. /* GPIO-4 xc3028 tuner */
  2280. cx_set(MO_GP0_IO, 0x00001000);
  2281. cx_clear(MO_GP0_IO, 0x00000010);
  2282. msleep(100);
  2283. cx_set(MO_GP0_IO, 0x00000010);
  2284. msleep(100);
  2285. break;
  2286. default:
  2287. cx_write(MO_GP0_IO, 0x101000);
  2288. mdelay(5);
  2289. cx_set(MO_GP0_IO, 0x101010);
  2290. }
  2291. break;
  2292. default:
  2293. return -EINVAL;
  2294. }
  2295. return 0;
  2296. }
  2297. /* ----------------------------------------------------------------------- */
  2298. /* some Geniatech specific stuff */
  2299. static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
  2300. int command, int mode)
  2301. {
  2302. switch (command) {
  2303. case XC2028_TUNER_RESET:
  2304. switch (INPUT(core->input).type) {
  2305. case CX88_RADIO:
  2306. break;
  2307. case CX88_VMUX_DVB:
  2308. cx_write(MO_GP1_IO, 0x030302);
  2309. mdelay(50);
  2310. break;
  2311. default:
  2312. cx_write(MO_GP1_IO, 0x030301);
  2313. mdelay(50);
  2314. }
  2315. cx_write(MO_GP1_IO, 0x101010);
  2316. mdelay(50);
  2317. cx_write(MO_GP1_IO, 0x101000);
  2318. mdelay(50);
  2319. cx_write(MO_GP1_IO, 0x101010);
  2320. mdelay(50);
  2321. return 0;
  2322. }
  2323. return -EINVAL;
  2324. }
  2325. /* ------------------------------------------------------------------- */
  2326. /* some Divco specific stuff */
  2327. static int cx88_pv_8000gt_callback(struct cx88_core *core,
  2328. int command, int arg)
  2329. {
  2330. switch (command) {
  2331. case XC2028_TUNER_RESET:
  2332. cx_write(MO_GP2_IO, 0xcf7);
  2333. mdelay(50);
  2334. cx_write(MO_GP2_IO, 0xef5);
  2335. mdelay(50);
  2336. cx_write(MO_GP2_IO, 0xcf7);
  2337. break;
  2338. default:
  2339. return -EINVAL;
  2340. }
  2341. return 0;
  2342. }
  2343. /* ----------------------------------------------------------------------- */
  2344. /* some DViCO specific stuff */
  2345. static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
  2346. {
  2347. struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
  2348. int i, err;
  2349. static u8 init_bufs[13][5] = {
  2350. { 0x10, 0x00, 0x20, 0x01, 0x03 },
  2351. { 0x10, 0x10, 0x01, 0x00, 0x21 },
  2352. { 0x10, 0x10, 0x10, 0x00, 0xCA },
  2353. { 0x10, 0x10, 0x12, 0x00, 0x08 },
  2354. { 0x10, 0x10, 0x13, 0x00, 0x0A },
  2355. { 0x10, 0x10, 0x16, 0x01, 0xC0 },
  2356. { 0x10, 0x10, 0x22, 0x01, 0x3D },
  2357. { 0x10, 0x10, 0x73, 0x01, 0x2E },
  2358. { 0x10, 0x10, 0x72, 0x00, 0xC5 },
  2359. { 0x10, 0x10, 0x71, 0x01, 0x97 },
  2360. { 0x10, 0x10, 0x70, 0x00, 0x0F },
  2361. { 0x10, 0x10, 0xB0, 0x00, 0x01 },
  2362. { 0x03, 0x0C },
  2363. };
  2364. for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
  2365. msg.buf = init_bufs[i];
  2366. msg.len = (i != 12 ? 5 : 2);
  2367. err = i2c_transfer(&core->i2c_adap, &msg, 1);
  2368. if (err != 1) {
  2369. warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
  2370. "failed (err = %d)!\n", i, err);
  2371. return;
  2372. }
  2373. }
  2374. }
  2375. static int cx88_xc2028_tuner_callback(struct cx88_core *core,
  2376. int command, int arg)
  2377. {
  2378. /* Board-specific callbacks */
  2379. switch (core->boardnr) {
  2380. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  2381. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  2382. case CX88_BOARD_GENIATECH_X8000_MT:
  2383. case CX88_BOARD_KWORLD_ATSC_120:
  2384. return cx88_xc3028_geniatech_tuner_callback(core,
  2385. command, arg);
  2386. case CX88_BOARD_PROLINK_PV_8000GT:
  2387. return cx88_pv_8000gt_callback(core, command, arg);
  2388. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2389. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2390. return cx88_dvico_xc2028_callback(core, command, arg);
  2391. }
  2392. switch (command) {
  2393. case XC2028_TUNER_RESET:
  2394. switch (INPUT(core->input).type) {
  2395. case CX88_RADIO:
  2396. info_printk(core, "setting GPIO to radio!\n");
  2397. cx_write(MO_GP0_IO, 0x4ff);
  2398. mdelay(250);
  2399. cx_write(MO_GP2_IO, 0xff);
  2400. mdelay(250);
  2401. break;
  2402. case CX88_VMUX_DVB: /* Digital TV*/
  2403. default: /* Analog TV */
  2404. info_printk(core, "setting GPIO to TV!\n");
  2405. break;
  2406. }
  2407. cx_write(MO_GP1_IO, 0x101010);
  2408. mdelay(250);
  2409. cx_write(MO_GP1_IO, 0x101000);
  2410. mdelay(250);
  2411. cx_write(MO_GP1_IO, 0x101010);
  2412. mdelay(250);
  2413. return 0;
  2414. }
  2415. return -EINVAL;
  2416. }
  2417. /* ----------------------------------------------------------------------- */
  2418. /* Tuner callback function. Currently only needed for the Pinnacle *
  2419. * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
  2420. * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
  2421. static int cx88_xc5000_tuner_callback(struct cx88_core *core,
  2422. int command, int arg)
  2423. {
  2424. switch (core->boardnr) {
  2425. case CX88_BOARD_PINNACLE_PCTV_HD_800i:
  2426. if (command == 0) { /* This is the reset command from xc5000 */
  2427. /* Reset XC5000 tuner via SYS_RSTO_pin */
  2428. cx_write(MO_SRST_IO, 0);
  2429. msleep(10);
  2430. cx_write(MO_SRST_IO, 1);
  2431. return 0;
  2432. } else {
  2433. err_printk(core, "xc5000: unknown tuner "
  2434. "callback command.\n");
  2435. return -EINVAL;
  2436. }
  2437. break;
  2438. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  2439. if (command == 0) { /* This is the reset command from xc5000 */
  2440. cx_clear(MO_GP0_IO, 0x00000010);
  2441. msleep(10);
  2442. cx_set(MO_GP0_IO, 0x00000010);
  2443. return 0;
  2444. } else {
  2445. printk(KERN_ERR
  2446. "xc5000: unknown tuner callback command.\n");
  2447. return -EINVAL;
  2448. }
  2449. break;
  2450. }
  2451. return 0; /* Should never be here */
  2452. }
  2453. int cx88_tuner_callback(void *priv, int component, int command, int arg)
  2454. {
  2455. struct i2c_algo_bit_data *i2c_algo = priv;
  2456. struct cx88_core *core;
  2457. if (!i2c_algo) {
  2458. printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
  2459. return -EINVAL;
  2460. }
  2461. core = i2c_algo->data;
  2462. if (!core) {
  2463. printk(KERN_ERR "cx88: Error - device struct undefined.\n");
  2464. return -EINVAL;
  2465. }
  2466. if (component != DVB_FRONTEND_COMPONENT_TUNER)
  2467. return -EINVAL;
  2468. switch (core->board.tuner_type) {
  2469. case TUNER_XC2028:
  2470. info_printk(core, "Calling XC2028/3028 callback\n");
  2471. return cx88_xc2028_tuner_callback(core, command, arg);
  2472. case TUNER_XC5000:
  2473. info_printk(core, "Calling XC5000 callback\n");
  2474. return cx88_xc5000_tuner_callback(core, command, arg);
  2475. }
  2476. err_printk(core, "Error: Calling callback for tuner %d\n",
  2477. core->board.tuner_type);
  2478. return -EINVAL;
  2479. }
  2480. EXPORT_SYMBOL(cx88_tuner_callback);
  2481. /* ----------------------------------------------------------------------- */
  2482. static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  2483. {
  2484. int i;
  2485. if (0 == pci->subsystem_vendor &&
  2486. 0 == pci->subsystem_device) {
  2487. printk(KERN_ERR
  2488. "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
  2489. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  2490. "%s: workaround that. Redirect complaints to the vendor of\n"
  2491. "%s: the TV card. Best regards,\n"
  2492. "%s: -- tux\n",
  2493. core->name,core->name,core->name,core->name,core->name);
  2494. } else {
  2495. printk(KERN_ERR
  2496. "%s: Your board isn't known (yet) to the driver. You can\n"
  2497. "%s: try to pick one of the existing card configs via\n"
  2498. "%s: card=<n> insmod option. Updating to the latest\n"
  2499. "%s: version might help as well.\n",
  2500. core->name,core->name,core->name,core->name);
  2501. }
  2502. err_printk(core, "Here is a list of valid choices for the card=<n> "
  2503. "insmod option:\n");
  2504. for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
  2505. printk(KERN_ERR "%s: card=%d -> %s\n",
  2506. core->name, i, cx88_boards[i].name);
  2507. }
  2508. static void cx88_card_setup_pre_i2c(struct cx88_core *core)
  2509. {
  2510. switch (core->boardnr) {
  2511. case CX88_BOARD_HAUPPAUGE_HVR1300:
  2512. /*
  2513. * Bring the 702 demod up before i2c scanning/attach or devices are hidden
  2514. * We leave here with the 702 on the bus
  2515. *
  2516. * "reset the IR receiver on GPIO[3]"
  2517. * Reported by Mike Crash <mike AT mikecrash.com>
  2518. */
  2519. cx_write(MO_GP0_IO, 0x0000ef88);
  2520. udelay(1000);
  2521. cx_clear(MO_GP0_IO, 0x00000088);
  2522. udelay(50);
  2523. cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
  2524. udelay(1000);
  2525. break;
  2526. case CX88_BOARD_PROLINK_PV_8000GT:
  2527. cx_write(MO_GP2_IO, 0xcf7);
  2528. mdelay(50);
  2529. cx_write(MO_GP2_IO, 0xef5);
  2530. mdelay(50);
  2531. cx_write(MO_GP2_IO, 0xcf7);
  2532. msleep(10);
  2533. break;
  2534. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  2535. /* Enable the xc5000 tuner */
  2536. cx_set(MO_GP0_IO, 0x00001010);
  2537. break;
  2538. case CX88_BOARD_HAUPPAUGE_HVR3000:
  2539. case CX88_BOARD_HAUPPAUGE_HVR4000:
  2540. case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
  2541. /* Init GPIO */
  2542. cx_write(MO_GP0_IO, core->board.input[0].gpio0);
  2543. udelay(1000);
  2544. break;
  2545. }
  2546. }
  2547. /*
  2548. * Sets board-dependent xc3028 configuration
  2549. */
  2550. void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
  2551. {
  2552. memset(ctl, 0, sizeof(*ctl));
  2553. ctl->fname = XC2028_DEFAULT_FIRMWARE;
  2554. ctl->max_len = 64;
  2555. switch (core->boardnr) {
  2556. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  2557. /* Now works with firmware version 2.7 */
  2558. if (core->i2c_algo.udelay < 16)
  2559. core->i2c_algo.udelay = 16;
  2560. break;
  2561. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2562. ctl->scode_table = XC3028_FE_ZARLINK456;
  2563. break;
  2564. case CX88_BOARD_KWORLD_ATSC_120:
  2565. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2566. ctl->demod = XC3028_FE_OREN538;
  2567. break;
  2568. case CX88_BOARD_PROLINK_PV_8000GT:
  2569. /*
  2570. * This board uses non-MTS firmware
  2571. */
  2572. break;
  2573. default:
  2574. ctl->demod = XC3028_FE_OREN538;
  2575. ctl->mts = 1;
  2576. }
  2577. }
  2578. EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
  2579. static void cx88_card_setup(struct cx88_core *core)
  2580. {
  2581. static u8 eeprom[256];
  2582. struct tuner_setup tun_setup;
  2583. unsigned int mode_mask = T_RADIO |
  2584. T_ANALOG_TV |
  2585. T_DIGITAL_TV;
  2586. memset(&tun_setup, 0, sizeof(tun_setup));
  2587. if (0 == core->i2c_rc) {
  2588. core->i2c_client.addr = 0xa0 >> 1;
  2589. tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
  2590. }
  2591. switch (core->boardnr) {
  2592. case CX88_BOARD_HAUPPAUGE:
  2593. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  2594. if (0 == core->i2c_rc)
  2595. hauppauge_eeprom(core, eeprom+8);
  2596. break;
  2597. case CX88_BOARD_GDI:
  2598. if (0 == core->i2c_rc)
  2599. gdi_eeprom(core, eeprom);
  2600. break;
  2601. case CX88_BOARD_WINFAST2000XP_EXPERT:
  2602. if (0 == core->i2c_rc)
  2603. leadtek_eeprom(core, eeprom);
  2604. break;
  2605. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  2606. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  2607. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  2608. case CX88_BOARD_HAUPPAUGE_HVR1100:
  2609. case CX88_BOARD_HAUPPAUGE_HVR1100LP:
  2610. case CX88_BOARD_HAUPPAUGE_HVR3000:
  2611. case CX88_BOARD_HAUPPAUGE_HVR1300:
  2612. case CX88_BOARD_HAUPPAUGE_HVR4000:
  2613. case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
  2614. if (0 == core->i2c_rc)
  2615. hauppauge_eeprom(core, eeprom);
  2616. break;
  2617. case CX88_BOARD_KWORLD_DVBS_100:
  2618. cx_write(MO_GP0_IO, 0x000007f8);
  2619. cx_write(MO_GP1_IO, 0x00000001);
  2620. break;
  2621. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2622. /* GPIO0:0 is hooked to demod reset */
  2623. /* GPIO0:4 is hooked to xc3028 reset */
  2624. cx_write(MO_GP0_IO, 0x00111100);
  2625. msleep(1);
  2626. cx_write(MO_GP0_IO, 0x00111111);
  2627. break;
  2628. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
  2629. /* GPIO0:6 is hooked to FX2 reset pin */
  2630. cx_set(MO_GP0_IO, 0x00004040);
  2631. cx_clear(MO_GP0_IO, 0x00000040);
  2632. msleep(1000);
  2633. cx_set(MO_GP0_IO, 0x00004040);
  2634. /* FALLTHROUGH */
  2635. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  2636. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  2637. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
  2638. /* GPIO0:0 is hooked to mt352 reset pin */
  2639. cx_set(MO_GP0_IO, 0x00000101);
  2640. cx_clear(MO_GP0_IO, 0x00000001);
  2641. msleep(1);
  2642. cx_set(MO_GP0_IO, 0x00000101);
  2643. if (0 == core->i2c_rc &&
  2644. core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
  2645. dvico_fusionhdtv_hybrid_init(core);
  2646. break;
  2647. case CX88_BOARD_KWORLD_DVB_T:
  2648. case CX88_BOARD_DNTV_LIVE_DVB_T:
  2649. cx_set(MO_GP0_IO, 0x00000707);
  2650. cx_set(MO_GP2_IO, 0x00000101);
  2651. cx_clear(MO_GP2_IO, 0x00000001);
  2652. msleep(1);
  2653. cx_clear(MO_GP0_IO, 0x00000007);
  2654. cx_set(MO_GP2_IO, 0x00000101);
  2655. break;
  2656. case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
  2657. cx_write(MO_GP0_IO, 0x00080808);
  2658. break;
  2659. case CX88_BOARD_ATI_HDTVWONDER:
  2660. if (0 == core->i2c_rc) {
  2661. /* enable tuner */
  2662. int i;
  2663. static const u8 buffer [][2] = {
  2664. {0x10,0x12},
  2665. {0x13,0x04},
  2666. {0x16,0x00},
  2667. {0x14,0x04},
  2668. {0x17,0x00}
  2669. };
  2670. core->i2c_client.addr = 0x0a;
  2671. for (i = 0; i < ARRAY_SIZE(buffer); i++)
  2672. if (2 != i2c_master_send(&core->i2c_client,
  2673. buffer[i],2))
  2674. warn_printk(core, "Unable to enable "
  2675. "tuner(%i).\n", i);
  2676. }
  2677. break;
  2678. case CX88_BOARD_MSI_TVANYWHERE_MASTER:
  2679. {
  2680. struct v4l2_priv_tun_config tea5767_cfg;
  2681. struct tea5767_ctrl ctl;
  2682. memset(&ctl, 0, sizeof(ctl));
  2683. ctl.high_cut = 1;
  2684. ctl.st_noise = 1;
  2685. ctl.deemph_75 = 1;
  2686. ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
  2687. tea5767_cfg.tuner = TUNER_TEA5767;
  2688. tea5767_cfg.priv = &ctl;
  2689. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
  2690. break;
  2691. }
  2692. case CX88_BOARD_TEVII_S420:
  2693. case CX88_BOARD_TEVII_S460:
  2694. cx_write(MO_SRST_IO, 0);
  2695. msleep(100);
  2696. cx_write(MO_SRST_IO, 1);
  2697. msleep(100);
  2698. break;
  2699. case CX88_BOARD_OMICOM_SS4_PCI:
  2700. cx_write(MO_SRST_IO, 0);
  2701. msleep(100);
  2702. cx_write(MO_SRST_IO, 1);
  2703. msleep(100);
  2704. break;
  2705. case CX88_BOARD_TBS_8920:
  2706. cx_write(MO_SRST_IO, 0);
  2707. msleep(100);
  2708. cx_write(MO_SRST_IO, 1);
  2709. msleep(100);
  2710. break;
  2711. } /*end switch() */
  2712. /* Setup tuners */
  2713. if ((core->board.radio_type != UNSET)) {
  2714. tun_setup.mode_mask = T_RADIO;
  2715. tun_setup.type = core->board.radio_type;
  2716. tun_setup.addr = core->board.radio_addr;
  2717. tun_setup.tuner_callback = cx88_tuner_callback;
  2718. cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
  2719. mode_mask &= ~T_RADIO;
  2720. }
  2721. if (core->board.tuner_type != TUNER_ABSENT) {
  2722. tun_setup.mode_mask = mode_mask;
  2723. tun_setup.type = core->board.tuner_type;
  2724. tun_setup.addr = core->board.tuner_addr;
  2725. tun_setup.tuner_callback = cx88_tuner_callback;
  2726. cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
  2727. }
  2728. if (core->board.tda9887_conf) {
  2729. struct v4l2_priv_tun_config tda9887_cfg;
  2730. tda9887_cfg.tuner = TUNER_TDA9887;
  2731. tda9887_cfg.priv = &core->board.tda9887_conf;
  2732. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tda9887_cfg);
  2733. }
  2734. if (core->board.tuner_type == TUNER_XC2028) {
  2735. struct v4l2_priv_tun_config xc2028_cfg;
  2736. struct xc2028_ctrl ctl;
  2737. /* Fills device-dependent initialization parameters */
  2738. cx88_setup_xc3028(core, &ctl);
  2739. /* Sends parameters to xc2028/3028 tuner */
  2740. memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
  2741. xc2028_cfg.tuner = TUNER_XC2028;
  2742. xc2028_cfg.priv = &ctl;
  2743. info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
  2744. ctl.fname);
  2745. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg);
  2746. }
  2747. cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
  2748. }
  2749. /* ------------------------------------------------------------------ */
  2750. static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
  2751. {
  2752. unsigned int lat = UNSET;
  2753. u8 ctrl = 0;
  2754. u8 value;
  2755. /* check pci quirks */
  2756. if (pci_pci_problems & PCIPCI_TRITON) {
  2757. printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
  2758. name);
  2759. ctrl |= CX88X_EN_TBFX;
  2760. }
  2761. if (pci_pci_problems & PCIPCI_NATOMA) {
  2762. printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
  2763. name);
  2764. ctrl |= CX88X_EN_TBFX;
  2765. }
  2766. if (pci_pci_problems & PCIPCI_VIAETBF) {
  2767. printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
  2768. name);
  2769. ctrl |= CX88X_EN_TBFX;
  2770. }
  2771. if (pci_pci_problems & PCIPCI_VSFX) {
  2772. printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
  2773. name);
  2774. ctrl |= CX88X_EN_VSFX;
  2775. }
  2776. #ifdef PCIPCI_ALIMAGIK
  2777. if (pci_pci_problems & PCIPCI_ALIMAGIK) {
  2778. printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
  2779. name);
  2780. lat = 0x0A;
  2781. }
  2782. #endif
  2783. /* check insmod options */
  2784. if (UNSET != latency)
  2785. lat = latency;
  2786. /* apply stuff */
  2787. if (ctrl) {
  2788. pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
  2789. value |= ctrl;
  2790. pci_write_config_byte(pci, CX88X_DEVCTRL, value);
  2791. }
  2792. if (UNSET != lat) {
  2793. printk(KERN_INFO "%s: setting pci latency timer to %d\n",
  2794. name, latency);
  2795. pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
  2796. }
  2797. return 0;
  2798. }
  2799. int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
  2800. {
  2801. if (request_mem_region(pci_resource_start(pci,0),
  2802. pci_resource_len(pci,0),
  2803. core->name))
  2804. return 0;
  2805. printk(KERN_ERR
  2806. "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
  2807. core->name, PCI_FUNC(pci->devfn),
  2808. (unsigned long long)pci_resource_start(pci, 0),
  2809. pci->subsystem_vendor, pci->subsystem_device);
  2810. return -EBUSY;
  2811. }
  2812. /* Allocate and initialize the cx88 core struct. One should hold the
  2813. * devlist mutex before calling this. */
  2814. struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
  2815. {
  2816. struct cx88_core *core;
  2817. int i;
  2818. core = kzalloc(sizeof(*core), GFP_KERNEL);
  2819. atomic_inc(&core->refcount);
  2820. core->pci_bus = pci->bus->number;
  2821. core->pci_slot = PCI_SLOT(pci->devfn);
  2822. core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
  2823. PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
  2824. PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
  2825. mutex_init(&core->lock);
  2826. core->nr = nr;
  2827. sprintf(core->name, "cx88[%d]", core->nr);
  2828. if (0 != cx88_get_resources(core, pci)) {
  2829. kfree(core);
  2830. return NULL;
  2831. }
  2832. /* PCI stuff */
  2833. cx88_pci_quirks(core->name, pci);
  2834. core->lmmio = ioremap(pci_resource_start(pci, 0),
  2835. pci_resource_len(pci, 0));
  2836. core->bmmio = (u8 __iomem *)core->lmmio;
  2837. /* board config */
  2838. core->boardnr = UNSET;
  2839. if (card[core->nr] < ARRAY_SIZE(cx88_boards))
  2840. core->boardnr = card[core->nr];
  2841. for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
  2842. if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
  2843. pci->subsystem_device == cx88_subids[i].subdevice)
  2844. core->boardnr = cx88_subids[i].card;
  2845. if (UNSET == core->boardnr) {
  2846. core->boardnr = CX88_BOARD_UNKNOWN;
  2847. cx88_card_list(core, pci);
  2848. }
  2849. memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
  2850. info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
  2851. pci->subsystem_vendor, pci->subsystem_device, core->board.name,
  2852. core->boardnr, card[core->nr] == core->boardnr ?
  2853. "insmod option" : "autodetected");
  2854. if (tuner[core->nr] != UNSET)
  2855. core->board.tuner_type = tuner[core->nr];
  2856. if (radio[core->nr] != UNSET)
  2857. core->board.radio_type = radio[core->nr];
  2858. info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
  2859. core->board.tuner_type, core->board.radio_type);
  2860. /* init hardware */
  2861. cx88_reset(core);
  2862. cx88_card_setup_pre_i2c(core);
  2863. cx88_i2c_init(core, pci);
  2864. /* load tuner module, if needed */
  2865. if (TUNER_ABSENT != core->board.tuner_type)
  2866. request_module("tuner");
  2867. cx88_card_setup(core);
  2868. cx88_ir_init(core, pci);
  2869. return core;
  2870. }