cx88-cards.c 66 KB

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