cx88-cards.c 65 KB

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