cx88-cards.c 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033
  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. .radio_type = TUNER_XC2028,
  1439. .radio_addr = 0x61,
  1440. .input = { {
  1441. .type = CX88_VMUX_TELEVISION,
  1442. .vmux = 0,
  1443. .gpio0 = 0x004ff,
  1444. .gpio1 = 0x010ff,
  1445. .gpio2 = 0x00001,
  1446. }, {
  1447. .type = CX88_VMUX_COMPOSITE1,
  1448. .vmux = 1,
  1449. .gpio0 = 0x004fb,
  1450. .gpio1 = 0x010ef,
  1451. .audioroute = 1,
  1452. }, {
  1453. .type = CX88_VMUX_SVIDEO,
  1454. .vmux = 2,
  1455. .gpio0 = 0x004fb,
  1456. .gpio1 = 0x010ef,
  1457. .audioroute = 1,
  1458. } },
  1459. .radio = {
  1460. .type = CX88_RADIO,
  1461. .gpio0 = 0x004ff,
  1462. .gpio1 = 0x010ff,
  1463. .gpio2 = 0x0ff,
  1464. },
  1465. .mpeg = CX88_MPEG_DVB,
  1466. },
  1467. [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
  1468. .name = "Winfast TV2000 XP Global",
  1469. .tuner_type = TUNER_XC2028,
  1470. .tuner_addr = 0x61,
  1471. .input = { {
  1472. .type = CX88_VMUX_TELEVISION,
  1473. .vmux = 0,
  1474. .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
  1475. .gpio1 = 0x0000,
  1476. .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
  1477. }, {
  1478. .type = CX88_VMUX_COMPOSITE1,
  1479. .vmux = 1,
  1480. .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
  1481. .gpio1 = 0x0000,
  1482. .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
  1483. }, {
  1484. .type = CX88_VMUX_SVIDEO,
  1485. .vmux = 2,
  1486. } },
  1487. .radio = {
  1488. .type = CX88_RADIO,
  1489. .gpio0 = 0x004ff,
  1490. .gpio1 = 0x010ff,
  1491. .gpio2 = 0x0ff,
  1492. },
  1493. },
  1494. [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
  1495. .name = "PowerColor RA330", /* Long names may confuse LIRC. */
  1496. .tuner_type = TUNER_XC2028,
  1497. .tuner_addr = 0x61,
  1498. .input = { {
  1499. .type = CX88_VMUX_DEBUG,
  1500. .vmux = 3, /* Due to the way the cx88 driver is written, */
  1501. .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
  1502. .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
  1503. .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
  1504. }, { /* from the tuner on boot for a little while. */
  1505. .type = CX88_VMUX_TELEVISION,
  1506. .vmux = 0,
  1507. .gpio0 = 0x00ff,
  1508. .gpio1 = 0xf35d,
  1509. .gpio3 = 0x0000,
  1510. }, {
  1511. .type = CX88_VMUX_COMPOSITE1,
  1512. .vmux = 1,
  1513. .gpio0 = 0x00ff,
  1514. .gpio1 = 0xf37d,
  1515. .gpio3 = 0x0000,
  1516. }, {
  1517. .type = CX88_VMUX_SVIDEO,
  1518. .vmux = 2,
  1519. .gpio0 = 0x000ff,
  1520. .gpio1 = 0x0f37d,
  1521. .gpio3 = 0x00000,
  1522. } },
  1523. .radio = {
  1524. .type = CX88_RADIO,
  1525. .gpio0 = 0x000ff,
  1526. .gpio1 = 0x0f35d,
  1527. .gpio3 = 0x00000,
  1528. },
  1529. },
  1530. [CX88_BOARD_GENIATECH_X8000_MT] = {
  1531. /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
  1532. .name = "Geniatech X8000-MT DVBT",
  1533. .tuner_type = TUNER_XC2028,
  1534. .tuner_addr = 0x61,
  1535. .input = { {
  1536. .type = CX88_VMUX_TELEVISION,
  1537. .vmux = 0,
  1538. .gpio0 = 0x00000000,
  1539. .gpio1 = 0x00e3e341,
  1540. .gpio2 = 0x00000000,
  1541. .gpio3 = 0x00000000,
  1542. }, {
  1543. .type = CX88_VMUX_COMPOSITE1,
  1544. .vmux = 1,
  1545. .gpio0 = 0x00000000,
  1546. .gpio1 = 0x00e3e361,
  1547. .gpio2 = 0x00000000,
  1548. .gpio3 = 0x00000000,
  1549. }, {
  1550. .type = CX88_VMUX_SVIDEO,
  1551. .vmux = 2,
  1552. .gpio0 = 0x00000000,
  1553. .gpio1 = 0x00e3e361,
  1554. .gpio2 = 0x00000000,
  1555. .gpio3 = 0x00000000,
  1556. } },
  1557. .radio = {
  1558. .type = CX88_RADIO,
  1559. .gpio0 = 0x00000000,
  1560. .gpio1 = 0x00e3e341,
  1561. .gpio2 = 0x00000000,
  1562. .gpio3 = 0x00000000,
  1563. },
  1564. .mpeg = CX88_MPEG_DVB,
  1565. },
  1566. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
  1567. .name = "DViCO FusionHDTV DVB-T PRO",
  1568. .tuner_type = TUNER_XC2028,
  1569. .tuner_addr = 0x61,
  1570. .radio_type = UNSET,
  1571. .radio_addr = ADDR_UNSET,
  1572. .input = { {
  1573. .type = CX88_VMUX_COMPOSITE1,
  1574. .vmux = 1,
  1575. .gpio0 = 0x000067df,
  1576. }, {
  1577. .type = CX88_VMUX_SVIDEO,
  1578. .vmux = 2,
  1579. .gpio0 = 0x000067df,
  1580. } },
  1581. .mpeg = CX88_MPEG_DVB,
  1582. },
  1583. [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
  1584. .name = "DViCO FusionHDTV 7 Gold",
  1585. .tuner_type = TUNER_XC5000,
  1586. .radio_type = UNSET,
  1587. .tuner_addr = ADDR_UNSET,
  1588. .radio_addr = ADDR_UNSET,
  1589. .input = {{
  1590. .type = CX88_VMUX_TELEVISION,
  1591. .vmux = 0,
  1592. .gpio0 = 0x10df,
  1593. },{
  1594. .type = CX88_VMUX_COMPOSITE1,
  1595. .vmux = 1,
  1596. .gpio0 = 0x16d9,
  1597. },{
  1598. .type = CX88_VMUX_SVIDEO,
  1599. .vmux = 2,
  1600. .gpio0 = 0x16d9,
  1601. }},
  1602. .mpeg = CX88_MPEG_DVB,
  1603. },
  1604. [CX88_BOARD_PROLINK_PV_8000GT] = {
  1605. .name = "Prolink Pixelview MPEG 8000GT",
  1606. .tuner_type = TUNER_XC2028,
  1607. .tuner_addr = 0x61,
  1608. .input = { {
  1609. .type = CX88_VMUX_TELEVISION,
  1610. .vmux = 0,
  1611. .gpio0 = 0x0ff,
  1612. .gpio2 = 0x0cfb,
  1613. }, {
  1614. .type = CX88_VMUX_COMPOSITE1,
  1615. .vmux = 1,
  1616. .gpio2 = 0x0cfb,
  1617. }, {
  1618. .type = CX88_VMUX_SVIDEO,
  1619. .vmux = 2,
  1620. .gpio2 = 0x0cfb,
  1621. } },
  1622. .radio = {
  1623. .type = CX88_RADIO,
  1624. .gpio2 = 0x0cfb,
  1625. },
  1626. },
  1627. [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
  1628. .name = "Prolink Pixelview Global Extreme",
  1629. .tuner_type = TUNER_XC2028,
  1630. .tuner_addr = 0x61,
  1631. .input = { {
  1632. .type = CX88_VMUX_TELEVISION,
  1633. .vmux = 0,
  1634. .gpio0 = 0x04fb,
  1635. .gpio1 = 0x04080,
  1636. .gpio2 = 0x0cf7,
  1637. }, {
  1638. .type = CX88_VMUX_COMPOSITE1,
  1639. .vmux = 1,
  1640. .gpio0 = 0x04fb,
  1641. .gpio1 = 0x04080,
  1642. .gpio2 = 0x0cfb,
  1643. }, {
  1644. .type = CX88_VMUX_SVIDEO,
  1645. .vmux = 2,
  1646. .gpio0 = 0x04fb,
  1647. .gpio1 = 0x04080,
  1648. .gpio2 = 0x0cfb,
  1649. } },
  1650. .radio = {
  1651. .type = CX88_RADIO,
  1652. .gpio0 = 0x04ff,
  1653. .gpio1 = 0x04080,
  1654. .gpio2 = 0x0cf7,
  1655. },
  1656. },
  1657. /* Both radio, analog and ATSC work with this board.
  1658. However, for analog to work, s5h1409 gate should be open,
  1659. otherwise, tuner-xc3028 won't be detected.
  1660. A proper fix require using the newer i2c methods to add
  1661. tuner-xc3028 without doing an i2c probe.
  1662. */
  1663. [CX88_BOARD_KWORLD_ATSC_120] = {
  1664. .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
  1665. .tuner_type = TUNER_XC2028,
  1666. .radio_type = UNSET,
  1667. .tuner_addr = ADDR_UNSET,
  1668. .radio_addr = ADDR_UNSET,
  1669. .input = { {
  1670. .type = CX88_VMUX_TELEVISION,
  1671. .vmux = 0,
  1672. .gpio0 = 0x000000ff,
  1673. .gpio1 = 0x0000f35d,
  1674. .gpio2 = 0x00000000,
  1675. }, {
  1676. .type = CX88_VMUX_COMPOSITE1,
  1677. .vmux = 1,
  1678. .gpio0 = 0x000000ff,
  1679. .gpio1 = 0x0000f37e,
  1680. .gpio2 = 0x00000000,
  1681. }, {
  1682. .type = CX88_VMUX_SVIDEO,
  1683. .vmux = 2,
  1684. .gpio0 = 0x000000ff,
  1685. .gpio1 = 0x0000f37e,
  1686. .gpio2 = 0x00000000,
  1687. } },
  1688. .radio = {
  1689. .type = CX88_RADIO,
  1690. .gpio0 = 0x000000ff,
  1691. .gpio1 = 0x0000f35d,
  1692. .gpio2 = 0x00000000,
  1693. },
  1694. .mpeg = CX88_MPEG_DVB,
  1695. },
  1696. [CX88_BOARD_HAUPPAUGE_HVR4000] = {
  1697. .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
  1698. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1699. .radio_type = UNSET,
  1700. .tuner_addr = ADDR_UNSET,
  1701. .radio_addr = ADDR_UNSET,
  1702. .tda9887_conf = TDA9887_PRESENT,
  1703. /*
  1704. * GPIO0 (WINTV2000)
  1705. *
  1706. * Analogue SAT DVB-T
  1707. * Antenna 0xc4bf 0xc4bb
  1708. * Composite 0xc4bf 0xc4bb
  1709. * S-Video 0xc4bf 0xc4bb
  1710. * Composite1 0xc4ff 0xc4fb
  1711. * S-Video1 0xc4ff 0xc4fb
  1712. *
  1713. * BIT VALUE FUNCTION GP{x}_IO
  1714. * 0 1 I:?
  1715. * 1 1 I:?
  1716. * 2 1 O:DVB-T DEMOD ENABLE LOW/ANALOG DEMOD ENABLE HIGH
  1717. * 3 1 I:?
  1718. * 4 1 I:?
  1719. * 5 1 I:?
  1720. * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
  1721. * 7 1 O:DVB-T DEMOD RESET LOW
  1722. *
  1723. * BIT VALUE FUNCTION GP{x}_OE
  1724. * 8 0 I
  1725. * 9 0 I
  1726. * a 1 O
  1727. * b 0 I
  1728. * c 0 I
  1729. * d 0 I
  1730. * e 1 O
  1731. * f 1 O
  1732. */
  1733. .input = {{
  1734. .type = CX88_VMUX_TELEVISION,
  1735. .vmux = 0,
  1736. .gpio0 = 0xc4bf,
  1737. }, {
  1738. .type = CX88_VMUX_COMPOSITE1,
  1739. .vmux = 1,
  1740. .gpio0 = 0xc4bf,
  1741. }, {
  1742. .type = CX88_VMUX_SVIDEO,
  1743. .vmux = 2,
  1744. .gpio0 = 0xc4bf,
  1745. } },
  1746. /* fixme: Add radio support */
  1747. .mpeg = CX88_MPEG_DVB,
  1748. },
  1749. [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
  1750. .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
  1751. .tuner_type = UNSET,
  1752. .radio_type = UNSET,
  1753. .tuner_addr = ADDR_UNSET,
  1754. .radio_addr = ADDR_UNSET,
  1755. .input = {{
  1756. .type = CX88_VMUX_DVB,
  1757. .vmux = 0,
  1758. } },
  1759. .mpeg = CX88_MPEG_DVB,
  1760. },
  1761. [CX88_BOARD_TEVII_S420] = {
  1762. .name = "TeVii S420 DVB-S",
  1763. .tuner_type = UNSET,
  1764. .radio_type = UNSET,
  1765. .tuner_addr = ADDR_UNSET,
  1766. .radio_addr = ADDR_UNSET,
  1767. .input = {{
  1768. .type = CX88_VMUX_DVB,
  1769. .vmux = 0,
  1770. } },
  1771. .mpeg = CX88_MPEG_DVB,
  1772. },
  1773. [CX88_BOARD_TEVII_S460] = {
  1774. .name = "TeVii S460 DVB-S/S2",
  1775. .tuner_type = UNSET,
  1776. .radio_type = UNSET,
  1777. .tuner_addr = ADDR_UNSET,
  1778. .radio_addr = ADDR_UNSET,
  1779. .input = {{
  1780. .type = CX88_VMUX_DVB,
  1781. .vmux = 0,
  1782. } },
  1783. .mpeg = CX88_MPEG_DVB,
  1784. },
  1785. [CX88_BOARD_OMICOM_SS4_PCI] = {
  1786. .name = "Omicom SS4 DVB-S/S2 PCI",
  1787. .tuner_type = UNSET,
  1788. .radio_type = UNSET,
  1789. .tuner_addr = ADDR_UNSET,
  1790. .radio_addr = ADDR_UNSET,
  1791. .input = {{
  1792. .type = CX88_VMUX_DVB,
  1793. .vmux = 0,
  1794. } },
  1795. .mpeg = CX88_MPEG_DVB,
  1796. },
  1797. [CX88_BOARD_TBS_8920] = {
  1798. .name = "TBS 8920 DVB-S/S2",
  1799. .tuner_type = TUNER_ABSENT,
  1800. .radio_type = UNSET,
  1801. .tuner_addr = ADDR_UNSET,
  1802. .radio_addr = ADDR_UNSET,
  1803. .input = {{
  1804. .type = CX88_VMUX_DVB,
  1805. .vmux = 1,
  1806. } },
  1807. .mpeg = CX88_MPEG_DVB,
  1808. },
  1809. [CX88_BOARD_PROF_7300] = {
  1810. .name = "PROF 7300 DVB-S/S2",
  1811. .tuner_type = UNSET,
  1812. .radio_type = UNSET,
  1813. .tuner_addr = ADDR_UNSET,
  1814. .radio_addr = ADDR_UNSET,
  1815. .input = {{
  1816. .type = CX88_VMUX_DVB,
  1817. .vmux = 0,
  1818. } },
  1819. .mpeg = CX88_MPEG_DVB,
  1820. },
  1821. };
  1822. /* ------------------------------------------------------------------ */
  1823. /* PCI subsystem IDs */
  1824. static const struct cx88_subid cx88_subids[] = {
  1825. {
  1826. .subvendor = 0x0070,
  1827. .subdevice = 0x3400,
  1828. .card = CX88_BOARD_HAUPPAUGE,
  1829. },{
  1830. .subvendor = 0x0070,
  1831. .subdevice = 0x3401,
  1832. .card = CX88_BOARD_HAUPPAUGE,
  1833. },{
  1834. .subvendor = 0x14c7,
  1835. .subdevice = 0x0106,
  1836. .card = CX88_BOARD_GDI,
  1837. },{
  1838. .subvendor = 0x14c7,
  1839. .subdevice = 0x0107, /* with mpeg encoder */
  1840. .card = CX88_BOARD_GDI,
  1841. },{
  1842. .subvendor = PCI_VENDOR_ID_ATI,
  1843. .subdevice = 0x00f8,
  1844. .card = CX88_BOARD_ATI_WONDER_PRO,
  1845. },{
  1846. .subvendor = 0x107d,
  1847. .subdevice = 0x6611,
  1848. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1849. },{
  1850. .subvendor = 0x107d,
  1851. .subdevice = 0x6613, /* NTSC */
  1852. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1853. },{
  1854. .subvendor = 0x107d,
  1855. .subdevice = 0x6620,
  1856. .card = CX88_BOARD_WINFAST_DV2000,
  1857. },{
  1858. .subvendor = 0x107d,
  1859. .subdevice = 0x663b,
  1860. .card = CX88_BOARD_LEADTEK_PVR2000,
  1861. },{
  1862. .subvendor = 0x107d,
  1863. .subdevice = 0x663c,
  1864. .card = CX88_BOARD_LEADTEK_PVR2000,
  1865. },{
  1866. .subvendor = 0x1461,
  1867. .subdevice = 0x000b,
  1868. .card = CX88_BOARD_AVERTV_STUDIO_303,
  1869. },{
  1870. .subvendor = 0x1462,
  1871. .subdevice = 0x8606,
  1872. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  1873. },{
  1874. .subvendor = 0x10fc,
  1875. .subdevice = 0xd003,
  1876. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  1877. },{
  1878. .subvendor = 0x1043,
  1879. .subdevice = 0x4823, /* with mpeg encoder */
  1880. .card = CX88_BOARD_ASUS_PVR_416,
  1881. },{
  1882. .subvendor = 0x17de,
  1883. .subdevice = 0x08a6,
  1884. .card = CX88_BOARD_KWORLD_DVB_T,
  1885. },{
  1886. .subvendor = 0x18ac,
  1887. .subdevice = 0xd810,
  1888. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1889. },{
  1890. .subvendor = 0x18ac,
  1891. .subdevice = 0xd820,
  1892. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  1893. },{
  1894. .subvendor = 0x18ac,
  1895. .subdevice = 0xdb00,
  1896. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  1897. },{
  1898. .subvendor = 0x0070,
  1899. .subdevice = 0x9002,
  1900. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1901. },{
  1902. .subvendor = 0x14f1,
  1903. .subdevice = 0x0187,
  1904. .card = CX88_BOARD_CONEXANT_DVB_T1,
  1905. },{
  1906. .subvendor = 0x1540,
  1907. .subdevice = 0x2580,
  1908. .card = CX88_BOARD_PROVIDEO_PV259,
  1909. },{
  1910. .subvendor = 0x18ac,
  1911. .subdevice = 0xdb10,
  1912. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1913. },{
  1914. .subvendor = 0x1554,
  1915. .subdevice = 0x4811,
  1916. .card = CX88_BOARD_PIXELVIEW,
  1917. },{
  1918. .subvendor = 0x7063,
  1919. .subdevice = 0x3000, /* HD-3000 card */
  1920. .card = CX88_BOARD_PCHDTV_HD3000,
  1921. },{
  1922. .subvendor = 0x17de,
  1923. .subdevice = 0xa8a6,
  1924. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  1925. },{
  1926. .subvendor = 0x0070,
  1927. .subdevice = 0x2801,
  1928. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  1929. },{
  1930. .subvendor = 0x14f1,
  1931. .subdevice = 0x0342,
  1932. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  1933. },{
  1934. .subvendor = 0x10fc,
  1935. .subdevice = 0xd035,
  1936. .card = CX88_BOARD_IODATA_GVBCTV7E,
  1937. },{
  1938. .subvendor = 0x1421,
  1939. .subdevice = 0x0334,
  1940. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  1941. },{
  1942. .subvendor = 0x153b,
  1943. .subdevice = 0x1166,
  1944. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  1945. },{
  1946. .subvendor = 0x18ac,
  1947. .subdevice = 0xd500,
  1948. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  1949. },{
  1950. .subvendor = 0x1461,
  1951. .subdevice = 0x8011,
  1952. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  1953. },{
  1954. .subvendor = PCI_VENDOR_ID_ATI,
  1955. .subdevice = 0xa101,
  1956. .card = CX88_BOARD_ATI_HDTVWONDER,
  1957. },{
  1958. .subvendor = 0x107d,
  1959. .subdevice = 0x665f,
  1960. .card = CX88_BOARD_WINFAST_DTV1000,
  1961. },{
  1962. .subvendor = 0x1461,
  1963. .subdevice = 0x000a,
  1964. .card = CX88_BOARD_AVERTV_303,
  1965. },{
  1966. .subvendor = 0x0070,
  1967. .subdevice = 0x9200,
  1968. .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
  1969. },{
  1970. .subvendor = 0x0070,
  1971. .subdevice = 0x9201,
  1972. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1973. },{
  1974. .subvendor = 0x0070,
  1975. .subdevice = 0x9202,
  1976. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1977. },{
  1978. .subvendor = 0x17de,
  1979. .subdevice = 0x08b2,
  1980. .card = CX88_BOARD_KWORLD_DVBS_100,
  1981. },{
  1982. .subvendor = 0x0070,
  1983. .subdevice = 0x9400,
  1984. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1985. },{
  1986. .subvendor = 0x0070,
  1987. .subdevice = 0x9402,
  1988. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1989. },{
  1990. .subvendor = 0x0070,
  1991. .subdevice = 0x9800,
  1992. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1993. },{
  1994. .subvendor = 0x0070,
  1995. .subdevice = 0x9802,
  1996. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1997. },{
  1998. .subvendor = 0x0070,
  1999. .subdevice = 0x9001,
  2000. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2001. },{
  2002. .subvendor = 0x1822,
  2003. .subdevice = 0x0025,
  2004. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  2005. },{
  2006. .subvendor = 0x17de,
  2007. .subdevice = 0x08a1,
  2008. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  2009. },{
  2010. .subvendor = 0x18ac,
  2011. .subdevice = 0xdb50,
  2012. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  2013. },{
  2014. .subvendor = 0x18ac,
  2015. .subdevice = 0xdb54,
  2016. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  2017. /* Re-branded DViCO: DigitalNow DVB-T Dual */
  2018. },{
  2019. .subvendor = 0x18ac,
  2020. .subdevice = 0xdb11,
  2021. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  2022. /* Re-branded DViCO: UltraView DVB-T Plus */
  2023. }, {
  2024. .subvendor = 0x18ac,
  2025. .subdevice = 0xdb30,
  2026. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
  2027. }, {
  2028. .subvendor = 0x17de,
  2029. .subdevice = 0x0840,
  2030. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  2031. },{
  2032. .subvendor = 0x1421,
  2033. .subdevice = 0x0305,
  2034. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  2035. },{
  2036. .subvendor = 0x18ac,
  2037. .subdevice = 0xdb40,
  2038. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  2039. },{
  2040. .subvendor = 0x18ac,
  2041. .subdevice = 0xdb44,
  2042. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  2043. },{
  2044. .subvendor = 0x7063,
  2045. .subdevice = 0x5500,
  2046. .card = CX88_BOARD_PCHDTV_HD5500,
  2047. },{
  2048. .subvendor = 0x17de,
  2049. .subdevice = 0x0841,
  2050. .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
  2051. },{
  2052. .subvendor = 0x1822,
  2053. .subdevice = 0x0019,
  2054. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  2055. },{
  2056. .subvendor = 0x1554,
  2057. .subdevice = 0x4813,
  2058. .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
  2059. },{
  2060. .subvendor = 0x14f1,
  2061. .subdevice = 0x0842,
  2062. .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
  2063. },{
  2064. .subvendor = 0x107d,
  2065. .subdevice = 0x665e,
  2066. .card = CX88_BOARD_WINFAST_DTV2000H,
  2067. },{
  2068. .subvendor = 0x18ac,
  2069. .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
  2070. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  2071. },{
  2072. .subvendor = 0x14f1,
  2073. .subdevice = 0x0084,
  2074. .card = CX88_BOARD_GENIATECH_DVBS,
  2075. },{
  2076. .subvendor = 0x0070,
  2077. .subdevice = 0x1404,
  2078. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2079. },{
  2080. .subvendor = 0x1461,
  2081. .subdevice = 0xc111, /* AverMedia M150-D */
  2082. /* This board is known to work with the ASUS PVR416 config */
  2083. .card = CX88_BOARD_ASUS_PVR_416,
  2084. },{
  2085. .subvendor = 0xc180,
  2086. .subdevice = 0xc980,
  2087. .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
  2088. },{
  2089. .subvendor = 0x0070,
  2090. .subdevice = 0x9600,
  2091. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2092. },{
  2093. .subvendor = 0x0070,
  2094. .subdevice = 0x9601,
  2095. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2096. },{
  2097. .subvendor = 0x0070,
  2098. .subdevice = 0x9602,
  2099. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2100. },{
  2101. .subvendor = 0x107d,
  2102. .subdevice = 0x6632,
  2103. .card = CX88_BOARD_LEADTEK_PVR2000,
  2104. },{
  2105. .subvendor = 0x12ab,
  2106. .subdevice = 0x2300, /* Club3D Zap TV2100 */
  2107. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  2108. },{
  2109. .subvendor = 0x0070,
  2110. .subdevice = 0x9000,
  2111. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2112. },{
  2113. .subvendor = 0x0070,
  2114. .subdevice = 0x1400,
  2115. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2116. },{
  2117. .subvendor = 0x0070,
  2118. .subdevice = 0x1401,
  2119. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2120. },{
  2121. .subvendor = 0x0070,
  2122. .subdevice = 0x1402,
  2123. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2124. },{
  2125. .subvendor = 0x1421,
  2126. .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
  2127. .card = CX88_BOARD_KWORLD_DVBS_100,
  2128. },{
  2129. .subvendor = 0x1421,
  2130. .subdevice = 0x0390,
  2131. .card = CX88_BOARD_ADSTECH_PTV_390,
  2132. },{
  2133. .subvendor = 0x11bd,
  2134. .subdevice = 0x0051,
  2135. .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
  2136. }, {
  2137. .subvendor = 0x18ac,
  2138. .subdevice = 0xd530,
  2139. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
  2140. }, {
  2141. .subvendor = 0x12ab,
  2142. .subdevice = 0x1788,
  2143. .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
  2144. }, {
  2145. .subvendor = 0x14f1,
  2146. .subdevice = 0xea3d,
  2147. .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
  2148. }, {
  2149. .subvendor = 0x107d,
  2150. .subdevice = 0x6f18,
  2151. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
  2152. }, {
  2153. .subvendor = 0x14f1,
  2154. .subdevice = 0x8852,
  2155. .card = CX88_BOARD_GENIATECH_X8000_MT,
  2156. }, {
  2157. .subvendor = 0x18ac,
  2158. .subdevice = 0xd610,
  2159. .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
  2160. }, {
  2161. .subvendor = 0x1554,
  2162. .subdevice = 0x4935,
  2163. .card = CX88_BOARD_PROLINK_PV_8000GT,
  2164. }, {
  2165. .subvendor = 0x1554,
  2166. .subdevice = 0x4976,
  2167. .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
  2168. }, {
  2169. .subvendor = 0x17de,
  2170. .subdevice = 0x08c1,
  2171. .card = CX88_BOARD_KWORLD_ATSC_120,
  2172. }, {
  2173. .subvendor = 0x0070,
  2174. .subdevice = 0x6900,
  2175. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2176. }, {
  2177. .subvendor = 0x0070,
  2178. .subdevice = 0x6904,
  2179. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2180. }, {
  2181. .subvendor = 0x0070,
  2182. .subdevice = 0x6902,
  2183. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2184. }, {
  2185. .subvendor = 0x0070,
  2186. .subdevice = 0x6905,
  2187. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2188. }, {
  2189. .subvendor = 0x0070,
  2190. .subdevice = 0x6906,
  2191. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2192. }, {
  2193. .subvendor = 0xd420,
  2194. .subdevice = 0x9022,
  2195. .card = CX88_BOARD_TEVII_S420,
  2196. }, {
  2197. .subvendor = 0xd460,
  2198. .subdevice = 0x9022,
  2199. .card = CX88_BOARD_TEVII_S460,
  2200. }, {
  2201. .subvendor = 0xA044,
  2202. .subdevice = 0x2011,
  2203. .card = CX88_BOARD_OMICOM_SS4_PCI,
  2204. }, {
  2205. .subvendor = 0x8920,
  2206. .subdevice = 0x8888,
  2207. .card = CX88_BOARD_TBS_8920,
  2208. }, {
  2209. .subvendor = 0xB033,
  2210. .subdevice = 0x3033,
  2211. .card = CX88_BOARD_PROF_7300,
  2212. },
  2213. };
  2214. /* ----------------------------------------------------------------------- */
  2215. /* some leadtek specific stuff */
  2216. static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2217. {
  2218. /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
  2219. * any others.
  2220. *
  2221. * Byte 0 is 1 on the NTSC board.
  2222. */
  2223. if (eeprom_data[4] != 0x7d ||
  2224. eeprom_data[5] != 0x10 ||
  2225. eeprom_data[7] != 0x66) {
  2226. warn_printk(core, "Leadtek eeprom invalid.\n");
  2227. return;
  2228. }
  2229. core->board.tuner_type = (eeprom_data[6] == 0x13) ?
  2230. TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
  2231. info_printk(core, "Leadtek Winfast 2000XP Expert config: "
  2232. "tuner=%d, eeprom[0]=0x%02x\n",
  2233. core->board.tuner_type, eeprom_data[0]);
  2234. }
  2235. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2236. {
  2237. struct tveeprom tv;
  2238. tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
  2239. core->board.tuner_type = tv.tuner_type;
  2240. core->tuner_formats = tv.tuner_formats;
  2241. core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
  2242. /* Make sure we support the board model */
  2243. switch (tv.model)
  2244. {
  2245. case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
  2246. case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
  2247. case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
  2248. case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
  2249. case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
  2250. case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
  2251. case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
  2252. case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
  2253. case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
  2254. case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
  2255. case 34519: /* WinTV-PCI-FM */
  2256. case 69009:
  2257. /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
  2258. case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
  2259. case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
  2260. case 69559:
  2261. /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
  2262. case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
  2263. case 90002: /* Nova-T-PCI (9002) */
  2264. case 92001: /* Nova-S-Plus (Video and IR) */
  2265. case 92002: /* Nova-S-Plus (Video and IR) */
  2266. case 90003: /* Nova-T-PCI (9002 No RF out) */
  2267. case 90500: /* Nova-T-PCI (oem) */
  2268. case 90501: /* Nova-T-PCI (oem/IR) */
  2269. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  2270. case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
  2271. case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
  2272. case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
  2273. case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
  2274. case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
  2275. case 96569: /* WinTV-HVR1300 () */
  2276. case 96659: /* WinTV-HVR1300 () */
  2277. case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
  2278. /* known */
  2279. break;
  2280. default:
  2281. warn_printk(core, "warning: unknown hauppauge model #%d\n",
  2282. tv.model);
  2283. break;
  2284. }
  2285. info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
  2286. }
  2287. /* ----------------------------------------------------------------------- */
  2288. /* some GDI (was: Modular Technology) specific stuff */
  2289. static struct {
  2290. int id;
  2291. int fm;
  2292. char *name;
  2293. } gdi_tuner[] = {
  2294. [ 0x01 ] = { .id = TUNER_ABSENT,
  2295. .name = "NTSC_M" },
  2296. [ 0x02 ] = { .id = TUNER_ABSENT,
  2297. .name = "PAL_B" },
  2298. [ 0x03 ] = { .id = TUNER_ABSENT,
  2299. .name = "PAL_I" },
  2300. [ 0x04 ] = { .id = TUNER_ABSENT,
  2301. .name = "PAL_D" },
  2302. [ 0x05 ] = { .id = TUNER_ABSENT,
  2303. .name = "SECAM" },
  2304. [ 0x10 ] = { .id = TUNER_ABSENT,
  2305. .fm = 1,
  2306. .name = "TEMIC_4049" },
  2307. [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
  2308. .name = "TEMIC_4136" },
  2309. [ 0x12 ] = { .id = TUNER_ABSENT,
  2310. .name = "TEMIC_4146" },
  2311. [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
  2312. .fm = 1,
  2313. .name = "PHILIPS_FQ1216_MK3" },
  2314. [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
  2315. .name = "PHILIPS_FQ1236_MK3" },
  2316. [ 0x22 ] = { .id = TUNER_ABSENT,
  2317. .name = "PHILIPS_FI1236_MK3" },
  2318. [ 0x23 ] = { .id = TUNER_ABSENT,
  2319. .name = "PHILIPS_FI1216_MK3" },
  2320. };
  2321. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2322. {
  2323. char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  2324. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  2325. info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
  2326. if (NULL == name)
  2327. return;
  2328. core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  2329. core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
  2330. CX88_RADIO : 0;
  2331. }
  2332. /* ------------------------------------------------------------------- */
  2333. /* some Divco specific stuff */
  2334. static int cx88_dvico_xc2028_callback(struct cx88_core *core,
  2335. int command, int arg)
  2336. {
  2337. switch (command) {
  2338. case XC2028_TUNER_RESET:
  2339. switch (core->boardnr) {
  2340. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2341. /* GPIO-4 xc3028 tuner */
  2342. cx_set(MO_GP0_IO, 0x00001000);
  2343. cx_clear(MO_GP0_IO, 0x00000010);
  2344. msleep(100);
  2345. cx_set(MO_GP0_IO, 0x00000010);
  2346. msleep(100);
  2347. break;
  2348. default:
  2349. cx_write(MO_GP0_IO, 0x101000);
  2350. mdelay(5);
  2351. cx_set(MO_GP0_IO, 0x101010);
  2352. }
  2353. break;
  2354. default:
  2355. return -EINVAL;
  2356. }
  2357. return 0;
  2358. }
  2359. /* ----------------------------------------------------------------------- */
  2360. /* some Geniatech specific stuff */
  2361. static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
  2362. int command, int mode)
  2363. {
  2364. switch (command) {
  2365. case XC2028_TUNER_RESET:
  2366. switch (INPUT(core->input).type) {
  2367. case CX88_RADIO:
  2368. break;
  2369. case CX88_VMUX_DVB:
  2370. cx_write(MO_GP1_IO, 0x030302);
  2371. mdelay(50);
  2372. break;
  2373. default:
  2374. cx_write(MO_GP1_IO, 0x030301);
  2375. mdelay(50);
  2376. }
  2377. cx_write(MO_GP1_IO, 0x101010);
  2378. mdelay(50);
  2379. cx_write(MO_GP1_IO, 0x101000);
  2380. mdelay(50);
  2381. cx_write(MO_GP1_IO, 0x101010);
  2382. mdelay(50);
  2383. return 0;
  2384. }
  2385. return -EINVAL;
  2386. }
  2387. /* ------------------------------------------------------------------- */
  2388. /* some Divco specific stuff */
  2389. static int cx88_pv_8000gt_callback(struct cx88_core *core,
  2390. int command, int arg)
  2391. {
  2392. switch (command) {
  2393. case XC2028_TUNER_RESET:
  2394. cx_write(MO_GP2_IO, 0xcf7);
  2395. mdelay(50);
  2396. cx_write(MO_GP2_IO, 0xef5);
  2397. mdelay(50);
  2398. cx_write(MO_GP2_IO, 0xcf7);
  2399. break;
  2400. default:
  2401. return -EINVAL;
  2402. }
  2403. return 0;
  2404. }
  2405. /* ----------------------------------------------------------------------- */
  2406. /* some DViCO specific stuff */
  2407. static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
  2408. {
  2409. struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
  2410. int i, err;
  2411. static u8 init_bufs[13][5] = {
  2412. { 0x10, 0x00, 0x20, 0x01, 0x03 },
  2413. { 0x10, 0x10, 0x01, 0x00, 0x21 },
  2414. { 0x10, 0x10, 0x10, 0x00, 0xCA },
  2415. { 0x10, 0x10, 0x12, 0x00, 0x08 },
  2416. { 0x10, 0x10, 0x13, 0x00, 0x0A },
  2417. { 0x10, 0x10, 0x16, 0x01, 0xC0 },
  2418. { 0x10, 0x10, 0x22, 0x01, 0x3D },
  2419. { 0x10, 0x10, 0x73, 0x01, 0x2E },
  2420. { 0x10, 0x10, 0x72, 0x00, 0xC5 },
  2421. { 0x10, 0x10, 0x71, 0x01, 0x97 },
  2422. { 0x10, 0x10, 0x70, 0x00, 0x0F },
  2423. { 0x10, 0x10, 0xB0, 0x00, 0x01 },
  2424. { 0x03, 0x0C },
  2425. };
  2426. for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
  2427. msg.buf = init_bufs[i];
  2428. msg.len = (i != 12 ? 5 : 2);
  2429. err = i2c_transfer(&core->i2c_adap, &msg, 1);
  2430. if (err != 1) {
  2431. warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
  2432. "failed (err = %d)!\n", i, err);
  2433. return;
  2434. }
  2435. }
  2436. }
  2437. static int cx88_xc2028_tuner_callback(struct cx88_core *core,
  2438. int command, int arg)
  2439. {
  2440. /* Board-specific callbacks */
  2441. switch (core->boardnr) {
  2442. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  2443. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  2444. case CX88_BOARD_GENIATECH_X8000_MT:
  2445. case CX88_BOARD_KWORLD_ATSC_120:
  2446. return cx88_xc3028_geniatech_tuner_callback(core,
  2447. command, arg);
  2448. case CX88_BOARD_PROLINK_PV_8000GT:
  2449. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  2450. return cx88_pv_8000gt_callback(core, command, arg);
  2451. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2452. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2453. return cx88_dvico_xc2028_callback(core, command, arg);
  2454. }
  2455. switch (command) {
  2456. case XC2028_TUNER_RESET:
  2457. switch (INPUT(core->input).type) {
  2458. case CX88_RADIO:
  2459. info_printk(core, "setting GPIO to radio!\n");
  2460. cx_write(MO_GP0_IO, 0x4ff);
  2461. mdelay(250);
  2462. cx_write(MO_GP2_IO, 0xff);
  2463. mdelay(250);
  2464. break;
  2465. case CX88_VMUX_DVB: /* Digital TV*/
  2466. default: /* Analog TV */
  2467. info_printk(core, "setting GPIO to TV!\n");
  2468. break;
  2469. }
  2470. cx_write(MO_GP1_IO, 0x101010);
  2471. mdelay(250);
  2472. cx_write(MO_GP1_IO, 0x101000);
  2473. mdelay(250);
  2474. cx_write(MO_GP1_IO, 0x101010);
  2475. mdelay(250);
  2476. return 0;
  2477. }
  2478. return -EINVAL;
  2479. }
  2480. /* ----------------------------------------------------------------------- */
  2481. /* Tuner callback function. Currently only needed for the Pinnacle *
  2482. * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
  2483. * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
  2484. static int cx88_xc5000_tuner_callback(struct cx88_core *core,
  2485. int command, int arg)
  2486. {
  2487. switch (core->boardnr) {
  2488. case CX88_BOARD_PINNACLE_PCTV_HD_800i:
  2489. if (command == 0) { /* This is the reset command from xc5000 */
  2490. /* Reset XC5000 tuner via SYS_RSTO_pin */
  2491. cx_write(MO_SRST_IO, 0);
  2492. msleep(10);
  2493. cx_write(MO_SRST_IO, 1);
  2494. return 0;
  2495. } else {
  2496. err_printk(core, "xc5000: unknown tuner "
  2497. "callback command.\n");
  2498. return -EINVAL;
  2499. }
  2500. break;
  2501. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  2502. if (command == 0) { /* This is the reset command from xc5000 */
  2503. cx_clear(MO_GP0_IO, 0x00000010);
  2504. msleep(10);
  2505. cx_set(MO_GP0_IO, 0x00000010);
  2506. return 0;
  2507. } else {
  2508. printk(KERN_ERR
  2509. "xc5000: unknown tuner callback command.\n");
  2510. return -EINVAL;
  2511. }
  2512. break;
  2513. }
  2514. return 0; /* Should never be here */
  2515. }
  2516. int cx88_tuner_callback(void *priv, int component, int command, int arg)
  2517. {
  2518. struct i2c_algo_bit_data *i2c_algo = priv;
  2519. struct cx88_core *core;
  2520. if (!i2c_algo) {
  2521. printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
  2522. return -EINVAL;
  2523. }
  2524. core = i2c_algo->data;
  2525. if (!core) {
  2526. printk(KERN_ERR "cx88: Error - device struct undefined.\n");
  2527. return -EINVAL;
  2528. }
  2529. if (component != DVB_FRONTEND_COMPONENT_TUNER)
  2530. return -EINVAL;
  2531. switch (core->board.tuner_type) {
  2532. case TUNER_XC2028:
  2533. info_printk(core, "Calling XC2028/3028 callback\n");
  2534. return cx88_xc2028_tuner_callback(core, command, arg);
  2535. case TUNER_XC5000:
  2536. info_printk(core, "Calling XC5000 callback\n");
  2537. return cx88_xc5000_tuner_callback(core, command, arg);
  2538. }
  2539. err_printk(core, "Error: Calling callback for tuner %d\n",
  2540. core->board.tuner_type);
  2541. return -EINVAL;
  2542. }
  2543. EXPORT_SYMBOL(cx88_tuner_callback);
  2544. /* ----------------------------------------------------------------------- */
  2545. static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  2546. {
  2547. int i;
  2548. if (0 == pci->subsystem_vendor &&
  2549. 0 == pci->subsystem_device) {
  2550. printk(KERN_ERR
  2551. "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
  2552. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  2553. "%s: workaround that. Redirect complaints to the vendor of\n"
  2554. "%s: the TV card. Best regards,\n"
  2555. "%s: -- tux\n",
  2556. core->name,core->name,core->name,core->name,core->name);
  2557. } else {
  2558. printk(KERN_ERR
  2559. "%s: Your board isn't known (yet) to the driver. You can\n"
  2560. "%s: try to pick one of the existing card configs via\n"
  2561. "%s: card=<n> insmod option. Updating to the latest\n"
  2562. "%s: version might help as well.\n",
  2563. core->name,core->name,core->name,core->name);
  2564. }
  2565. err_printk(core, "Here is a list of valid choices for the card=<n> "
  2566. "insmod option:\n");
  2567. for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
  2568. printk(KERN_ERR "%s: card=%d -> %s\n",
  2569. core->name, i, cx88_boards[i].name);
  2570. }
  2571. static void cx88_card_setup_pre_i2c(struct cx88_core *core)
  2572. {
  2573. switch (core->boardnr) {
  2574. case CX88_BOARD_HAUPPAUGE_HVR1300:
  2575. /*
  2576. * Bring the 702 demod up before i2c scanning/attach or devices are hidden
  2577. * We leave here with the 702 on the bus
  2578. *
  2579. * "reset the IR receiver on GPIO[3]"
  2580. * Reported by Mike Crash <mike AT mikecrash.com>
  2581. */
  2582. cx_write(MO_GP0_IO, 0x0000ef88);
  2583. udelay(1000);
  2584. cx_clear(MO_GP0_IO, 0x00000088);
  2585. udelay(50);
  2586. cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
  2587. udelay(1000);
  2588. break;
  2589. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  2590. case CX88_BOARD_PROLINK_PV_8000GT:
  2591. cx_write(MO_GP2_IO, 0xcf7);
  2592. mdelay(50);
  2593. cx_write(MO_GP2_IO, 0xef5);
  2594. mdelay(50);
  2595. cx_write(MO_GP2_IO, 0xcf7);
  2596. msleep(10);
  2597. break;
  2598. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  2599. /* Enable the xc5000 tuner */
  2600. cx_set(MO_GP0_IO, 0x00001010);
  2601. break;
  2602. case CX88_BOARD_HAUPPAUGE_HVR3000:
  2603. case CX88_BOARD_HAUPPAUGE_HVR4000:
  2604. case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
  2605. /* Init GPIO */
  2606. cx_write(MO_GP0_IO, core->board.input[0].gpio0);
  2607. udelay(1000);
  2608. break;
  2609. }
  2610. }
  2611. /*
  2612. * Sets board-dependent xc3028 configuration
  2613. */
  2614. void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
  2615. {
  2616. memset(ctl, 0, sizeof(*ctl));
  2617. ctl->fname = XC2028_DEFAULT_FIRMWARE;
  2618. ctl->max_len = 64;
  2619. switch (core->boardnr) {
  2620. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  2621. /* Now works with firmware version 2.7 */
  2622. if (core->i2c_algo.udelay < 16)
  2623. core->i2c_algo.udelay = 16;
  2624. break;
  2625. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2626. ctl->demod = XC3028_FE_ZARLINK456;
  2627. break;
  2628. case CX88_BOARD_KWORLD_ATSC_120:
  2629. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2630. ctl->demod = XC3028_FE_OREN538;
  2631. break;
  2632. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  2633. case CX88_BOARD_PROLINK_PV_8000GT:
  2634. /*
  2635. * Those boards uses non-MTS firmware
  2636. */
  2637. break;
  2638. case CX88_BOARD_PINNACLE_HYBRID_PCTV:
  2639. ctl->demod = XC3028_FE_ZARLINK456;
  2640. ctl->mts = 1;
  2641. break;
  2642. default:
  2643. ctl->demod = XC3028_FE_OREN538;
  2644. ctl->mts = 1;
  2645. }
  2646. }
  2647. EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
  2648. static void cx88_card_setup(struct cx88_core *core)
  2649. {
  2650. static u8 eeprom[256];
  2651. struct tuner_setup tun_setup;
  2652. unsigned int mode_mask = T_RADIO |
  2653. T_ANALOG_TV |
  2654. T_DIGITAL_TV;
  2655. memset(&tun_setup, 0, sizeof(tun_setup));
  2656. if (0 == core->i2c_rc) {
  2657. core->i2c_client.addr = 0xa0 >> 1;
  2658. tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
  2659. }
  2660. switch (core->boardnr) {
  2661. case CX88_BOARD_HAUPPAUGE:
  2662. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  2663. if (0 == core->i2c_rc)
  2664. hauppauge_eeprom(core, eeprom+8);
  2665. break;
  2666. case CX88_BOARD_GDI:
  2667. if (0 == core->i2c_rc)
  2668. gdi_eeprom(core, eeprom);
  2669. break;
  2670. case CX88_BOARD_WINFAST2000XP_EXPERT:
  2671. if (0 == core->i2c_rc)
  2672. leadtek_eeprom(core, eeprom);
  2673. break;
  2674. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  2675. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  2676. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  2677. case CX88_BOARD_HAUPPAUGE_HVR1100:
  2678. case CX88_BOARD_HAUPPAUGE_HVR1100LP:
  2679. case CX88_BOARD_HAUPPAUGE_HVR3000:
  2680. case CX88_BOARD_HAUPPAUGE_HVR1300:
  2681. case CX88_BOARD_HAUPPAUGE_HVR4000:
  2682. case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
  2683. if (0 == core->i2c_rc)
  2684. hauppauge_eeprom(core, eeprom);
  2685. break;
  2686. case CX88_BOARD_KWORLD_DVBS_100:
  2687. cx_write(MO_GP0_IO, 0x000007f8);
  2688. cx_write(MO_GP1_IO, 0x00000001);
  2689. break;
  2690. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2691. /* GPIO0:0 is hooked to demod reset */
  2692. /* GPIO0:4 is hooked to xc3028 reset */
  2693. cx_write(MO_GP0_IO, 0x00111100);
  2694. msleep(1);
  2695. cx_write(MO_GP0_IO, 0x00111111);
  2696. break;
  2697. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
  2698. /* GPIO0:6 is hooked to FX2 reset pin */
  2699. cx_set(MO_GP0_IO, 0x00004040);
  2700. cx_clear(MO_GP0_IO, 0x00000040);
  2701. msleep(1000);
  2702. cx_set(MO_GP0_IO, 0x00004040);
  2703. /* FALLTHROUGH */
  2704. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  2705. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  2706. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
  2707. /* GPIO0:0 is hooked to mt352 reset pin */
  2708. cx_set(MO_GP0_IO, 0x00000101);
  2709. cx_clear(MO_GP0_IO, 0x00000001);
  2710. msleep(1);
  2711. cx_set(MO_GP0_IO, 0x00000101);
  2712. if (0 == core->i2c_rc &&
  2713. core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
  2714. dvico_fusionhdtv_hybrid_init(core);
  2715. break;
  2716. case CX88_BOARD_KWORLD_DVB_T:
  2717. case CX88_BOARD_DNTV_LIVE_DVB_T:
  2718. cx_set(MO_GP0_IO, 0x00000707);
  2719. cx_set(MO_GP2_IO, 0x00000101);
  2720. cx_clear(MO_GP2_IO, 0x00000001);
  2721. msleep(1);
  2722. cx_clear(MO_GP0_IO, 0x00000007);
  2723. cx_set(MO_GP2_IO, 0x00000101);
  2724. break;
  2725. case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
  2726. cx_write(MO_GP0_IO, 0x00080808);
  2727. break;
  2728. case CX88_BOARD_ATI_HDTVWONDER:
  2729. if (0 == core->i2c_rc) {
  2730. /* enable tuner */
  2731. int i;
  2732. static const u8 buffer [][2] = {
  2733. {0x10,0x12},
  2734. {0x13,0x04},
  2735. {0x16,0x00},
  2736. {0x14,0x04},
  2737. {0x17,0x00}
  2738. };
  2739. core->i2c_client.addr = 0x0a;
  2740. for (i = 0; i < ARRAY_SIZE(buffer); i++)
  2741. if (2 != i2c_master_send(&core->i2c_client,
  2742. buffer[i],2))
  2743. warn_printk(core, "Unable to enable "
  2744. "tuner(%i).\n", i);
  2745. }
  2746. break;
  2747. case CX88_BOARD_MSI_TVANYWHERE_MASTER:
  2748. {
  2749. struct v4l2_priv_tun_config tea5767_cfg;
  2750. struct tea5767_ctrl ctl;
  2751. memset(&ctl, 0, sizeof(ctl));
  2752. ctl.high_cut = 1;
  2753. ctl.st_noise = 1;
  2754. ctl.deemph_75 = 1;
  2755. ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
  2756. tea5767_cfg.tuner = TUNER_TEA5767;
  2757. tea5767_cfg.priv = &ctl;
  2758. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
  2759. break;
  2760. }
  2761. case CX88_BOARD_TEVII_S420:
  2762. case CX88_BOARD_TEVII_S460:
  2763. case CX88_BOARD_OMICOM_SS4_PCI:
  2764. case CX88_BOARD_TBS_8920:
  2765. case CX88_BOARD_PROF_7300:
  2766. cx_write(MO_SRST_IO, 0);
  2767. msleep(100);
  2768. cx_write(MO_SRST_IO, 1);
  2769. msleep(100);
  2770. break;
  2771. } /*end switch() */
  2772. /* Setup tuners */
  2773. if ((core->board.radio_type != UNSET)) {
  2774. tun_setup.mode_mask = T_RADIO;
  2775. tun_setup.type = core->board.radio_type;
  2776. tun_setup.addr = core->board.radio_addr;
  2777. tun_setup.tuner_callback = cx88_tuner_callback;
  2778. cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
  2779. mode_mask &= ~T_RADIO;
  2780. }
  2781. if (core->board.tuner_type != TUNER_ABSENT) {
  2782. tun_setup.mode_mask = mode_mask;
  2783. tun_setup.type = core->board.tuner_type;
  2784. tun_setup.addr = core->board.tuner_addr;
  2785. tun_setup.tuner_callback = cx88_tuner_callback;
  2786. cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
  2787. }
  2788. if (core->board.tda9887_conf) {
  2789. struct v4l2_priv_tun_config tda9887_cfg;
  2790. tda9887_cfg.tuner = TUNER_TDA9887;
  2791. tda9887_cfg.priv = &core->board.tda9887_conf;
  2792. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tda9887_cfg);
  2793. }
  2794. if (core->board.tuner_type == TUNER_XC2028) {
  2795. struct v4l2_priv_tun_config xc2028_cfg;
  2796. struct xc2028_ctrl ctl;
  2797. /* Fills device-dependent initialization parameters */
  2798. cx88_setup_xc3028(core, &ctl);
  2799. /* Sends parameters to xc2028/3028 tuner */
  2800. memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
  2801. xc2028_cfg.tuner = TUNER_XC2028;
  2802. xc2028_cfg.priv = &ctl;
  2803. info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
  2804. ctl.fname);
  2805. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg);
  2806. }
  2807. cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
  2808. }
  2809. /* ------------------------------------------------------------------ */
  2810. static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
  2811. {
  2812. unsigned int lat = UNSET;
  2813. u8 ctrl = 0;
  2814. u8 value;
  2815. /* check pci quirks */
  2816. if (pci_pci_problems & PCIPCI_TRITON) {
  2817. printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
  2818. name);
  2819. ctrl |= CX88X_EN_TBFX;
  2820. }
  2821. if (pci_pci_problems & PCIPCI_NATOMA) {
  2822. printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
  2823. name);
  2824. ctrl |= CX88X_EN_TBFX;
  2825. }
  2826. if (pci_pci_problems & PCIPCI_VIAETBF) {
  2827. printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
  2828. name);
  2829. ctrl |= CX88X_EN_TBFX;
  2830. }
  2831. if (pci_pci_problems & PCIPCI_VSFX) {
  2832. printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
  2833. name);
  2834. ctrl |= CX88X_EN_VSFX;
  2835. }
  2836. #ifdef PCIPCI_ALIMAGIK
  2837. if (pci_pci_problems & PCIPCI_ALIMAGIK) {
  2838. printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
  2839. name);
  2840. lat = 0x0A;
  2841. }
  2842. #endif
  2843. /* check insmod options */
  2844. if (UNSET != latency)
  2845. lat = latency;
  2846. /* apply stuff */
  2847. if (ctrl) {
  2848. pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
  2849. value |= ctrl;
  2850. pci_write_config_byte(pci, CX88X_DEVCTRL, value);
  2851. }
  2852. if (UNSET != lat) {
  2853. printk(KERN_INFO "%s: setting pci latency timer to %d\n",
  2854. name, latency);
  2855. pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
  2856. }
  2857. return 0;
  2858. }
  2859. int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
  2860. {
  2861. if (request_mem_region(pci_resource_start(pci,0),
  2862. pci_resource_len(pci,0),
  2863. core->name))
  2864. return 0;
  2865. printk(KERN_ERR
  2866. "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
  2867. core->name, PCI_FUNC(pci->devfn),
  2868. (unsigned long long)pci_resource_start(pci, 0),
  2869. pci->subsystem_vendor, pci->subsystem_device);
  2870. return -EBUSY;
  2871. }
  2872. /* Allocate and initialize the cx88 core struct. One should hold the
  2873. * devlist mutex before calling this. */
  2874. struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
  2875. {
  2876. struct cx88_core *core;
  2877. int i;
  2878. core = kzalloc(sizeof(*core), GFP_KERNEL);
  2879. atomic_inc(&core->refcount);
  2880. core->pci_bus = pci->bus->number;
  2881. core->pci_slot = PCI_SLOT(pci->devfn);
  2882. core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
  2883. PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
  2884. PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
  2885. mutex_init(&core->lock);
  2886. core->nr = nr;
  2887. sprintf(core->name, "cx88[%d]", core->nr);
  2888. if (0 != cx88_get_resources(core, pci)) {
  2889. kfree(core);
  2890. return NULL;
  2891. }
  2892. /* PCI stuff */
  2893. cx88_pci_quirks(core->name, pci);
  2894. core->lmmio = ioremap(pci_resource_start(pci, 0),
  2895. pci_resource_len(pci, 0));
  2896. core->bmmio = (u8 __iomem *)core->lmmio;
  2897. /* board config */
  2898. core->boardnr = UNSET;
  2899. if (card[core->nr] < ARRAY_SIZE(cx88_boards))
  2900. core->boardnr = card[core->nr];
  2901. for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
  2902. if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
  2903. pci->subsystem_device == cx88_subids[i].subdevice)
  2904. core->boardnr = cx88_subids[i].card;
  2905. if (UNSET == core->boardnr) {
  2906. core->boardnr = CX88_BOARD_UNKNOWN;
  2907. cx88_card_list(core, pci);
  2908. }
  2909. memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
  2910. info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
  2911. pci->subsystem_vendor, pci->subsystem_device, core->board.name,
  2912. core->boardnr, card[core->nr] == core->boardnr ?
  2913. "insmod option" : "autodetected");
  2914. if (tuner[core->nr] != UNSET)
  2915. core->board.tuner_type = tuner[core->nr];
  2916. if (radio[core->nr] != UNSET)
  2917. core->board.radio_type = radio[core->nr];
  2918. info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
  2919. core->board.tuner_type, core->board.radio_type);
  2920. /* init hardware */
  2921. cx88_reset(core);
  2922. cx88_card_setup_pre_i2c(core);
  2923. cx88_i2c_init(core, pci);
  2924. /* load tuner module, if needed */
  2925. if (TUNER_ABSENT != core->board.tuner_type)
  2926. request_module("tuner");
  2927. cx88_card_setup(core);
  2928. cx88_ir_init(core, pci);
  2929. return core;
  2930. }