cx88-cards.c 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585
  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. /* ------------------------------------------------------------------ */
  28. /* board config info */
  29. struct cx88_board cx88_boards[] = {
  30. [CX88_BOARD_UNKNOWN] = {
  31. .name = "UNKNOWN/GENERIC",
  32. .tuner_type = UNSET,
  33. .radio_type = UNSET,
  34. .tuner_addr = ADDR_UNSET,
  35. .radio_addr = ADDR_UNSET,
  36. .input = {{
  37. .type = CX88_VMUX_COMPOSITE1,
  38. .vmux = 0,
  39. },{
  40. .type = CX88_VMUX_COMPOSITE2,
  41. .vmux = 1,
  42. },{
  43. .type = CX88_VMUX_COMPOSITE3,
  44. .vmux = 2,
  45. },{
  46. .type = CX88_VMUX_COMPOSITE4,
  47. .vmux = 3,
  48. }},
  49. },
  50. [CX88_BOARD_HAUPPAUGE] = {
  51. .name = "Hauppauge WinTV 34xxx models",
  52. .tuner_type = UNSET,
  53. .radio_type = UNSET,
  54. .tuner_addr = ADDR_UNSET,
  55. .radio_addr = ADDR_UNSET,
  56. .tda9887_conf = TDA9887_PRESENT,
  57. .input = {{
  58. .type = CX88_VMUX_TELEVISION,
  59. .vmux = 0,
  60. .gpio0 = 0xff00, // internal decoder
  61. },{
  62. .type = CX88_VMUX_DEBUG,
  63. .vmux = 0,
  64. .gpio0 = 0xff01, // mono from tuner chip
  65. },{
  66. .type = CX88_VMUX_COMPOSITE1,
  67. .vmux = 1,
  68. .gpio0 = 0xff02,
  69. },{
  70. .type = CX88_VMUX_SVIDEO,
  71. .vmux = 2,
  72. .gpio0 = 0xff02,
  73. }},
  74. .radio = {
  75. .type = CX88_RADIO,
  76. .gpio0 = 0xff01,
  77. },
  78. },
  79. [CX88_BOARD_GDI] = {
  80. .name = "GDI Black Gold",
  81. .tuner_type = UNSET,
  82. .radio_type = UNSET,
  83. .tuner_addr = ADDR_UNSET,
  84. .radio_addr = ADDR_UNSET,
  85. .input = {{
  86. .type = CX88_VMUX_TELEVISION,
  87. .vmux = 0,
  88. },{
  89. .type = CX88_VMUX_SVIDEO,
  90. .vmux = 2,
  91. }},
  92. },
  93. [CX88_BOARD_PIXELVIEW] = {
  94. .name = "PixelView",
  95. .tuner_type = TUNER_PHILIPS_PAL,
  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. .gpio0 = 0xff00, // internal decoder
  103. },{
  104. .type = CX88_VMUX_COMPOSITE1,
  105. .vmux = 1,
  106. },{
  107. .type = CX88_VMUX_SVIDEO,
  108. .vmux = 2,
  109. }},
  110. .radio = {
  111. .type = CX88_RADIO,
  112. .gpio0 = 0xff10,
  113. },
  114. },
  115. [CX88_BOARD_ATI_WONDER_PRO] = {
  116. .name = "ATI TV Wonder Pro",
  117. .tuner_type = TUNER_PHILIPS_4IN1,
  118. .radio_type = UNSET,
  119. .tuner_addr = ADDR_UNSET,
  120. .radio_addr = ADDR_UNSET,
  121. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
  122. .input = {{
  123. .type = CX88_VMUX_TELEVISION,
  124. .vmux = 0,
  125. .gpio0 = 0x03ff,
  126. },{
  127. .type = CX88_VMUX_COMPOSITE1,
  128. .vmux = 1,
  129. .gpio0 = 0x03fe,
  130. },{
  131. .type = CX88_VMUX_SVIDEO,
  132. .vmux = 2,
  133. .gpio0 = 0x03fe,
  134. }},
  135. },
  136. [CX88_BOARD_WINFAST2000XP_EXPERT] = {
  137. .name = "Leadtek Winfast 2000XP Expert",
  138. .tuner_type = TUNER_PHILIPS_4IN1,
  139. .radio_type = UNSET,
  140. .tuner_addr = ADDR_UNSET,
  141. .radio_addr = ADDR_UNSET,
  142. .tda9887_conf = TDA9887_PRESENT,
  143. .input = {{
  144. .type = CX88_VMUX_TELEVISION,
  145. .vmux = 0,
  146. .gpio0 = 0x00F5e700,
  147. .gpio1 = 0x00003004,
  148. .gpio2 = 0x00F5e700,
  149. .gpio3 = 0x02000000,
  150. },{
  151. .type = CX88_VMUX_COMPOSITE1,
  152. .vmux = 1,
  153. .gpio0 = 0x00F5c700,
  154. .gpio1 = 0x00003004,
  155. .gpio2 = 0x00F5c700,
  156. .gpio3 = 0x02000000,
  157. },{
  158. .type = CX88_VMUX_SVIDEO,
  159. .vmux = 2,
  160. .gpio0 = 0x00F5c700,
  161. .gpio1 = 0x00003004,
  162. .gpio2 = 0x00F5c700,
  163. .gpio3 = 0x02000000,
  164. }},
  165. .radio = {
  166. .type = CX88_RADIO,
  167. .gpio0 = 0x00F5d700,
  168. .gpio1 = 0x00003004,
  169. .gpio2 = 0x00F5d700,
  170. .gpio3 = 0x02000000,
  171. },
  172. },
  173. [CX88_BOARD_AVERTV_STUDIO_303] = {
  174. .name = "AverTV Studio 303 (M126)",
  175. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  176. .radio_type = UNSET,
  177. .tuner_addr = ADDR_UNSET,
  178. .radio_addr = ADDR_UNSET,
  179. .tda9887_conf = TDA9887_PRESENT,
  180. .input = {{
  181. .type = CX88_VMUX_TELEVISION,
  182. .vmux = 0,
  183. .gpio1 = 0x309f,
  184. },{
  185. .type = CX88_VMUX_COMPOSITE1,
  186. .vmux = 1,
  187. .gpio1 = 0x305f,
  188. },{
  189. .type = CX88_VMUX_SVIDEO,
  190. .vmux = 2,
  191. .gpio1 = 0x305f,
  192. }},
  193. .radio = {
  194. .type = CX88_RADIO,
  195. },
  196. },
  197. [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
  198. // added gpio values thanks to Michal
  199. // values for PAL from DScaler
  200. .name = "MSI TV-@nywhere Master",
  201. .tuner_type = TUNER_MT2032,
  202. .radio_type = UNSET,
  203. .tuner_addr = ADDR_UNSET,
  204. .radio_addr = ADDR_UNSET,
  205. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
  206. .input = {{
  207. .type = CX88_VMUX_TELEVISION,
  208. .vmux = 0,
  209. .gpio0 = 0x000040bf,
  210. .gpio1 = 0x000080c0,
  211. .gpio2 = 0x0000ff40,
  212. },{
  213. .type = CX88_VMUX_COMPOSITE1,
  214. .vmux = 1,
  215. .gpio0 = 0x000040bf,
  216. .gpio1 = 0x000080c0,
  217. .gpio2 = 0x0000ff40,
  218. },{
  219. .type = CX88_VMUX_SVIDEO,
  220. .vmux = 2,
  221. .gpio0 = 0x000040bf,
  222. .gpio1 = 0x000080c0,
  223. .gpio2 = 0x0000ff40,
  224. }},
  225. .radio = {
  226. .type = CX88_RADIO,
  227. },
  228. },
  229. [CX88_BOARD_WINFAST_DV2000] = {
  230. .name = "Leadtek Winfast DV2000",
  231. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  232. .radio_type = UNSET,
  233. .tuner_addr = ADDR_UNSET,
  234. .radio_addr = ADDR_UNSET,
  235. .tda9887_conf = TDA9887_PRESENT,
  236. .input = {{
  237. .type = CX88_VMUX_TELEVISION,
  238. .vmux = 0,
  239. .gpio0 = 0x0035e700,
  240. .gpio1 = 0x00003004,
  241. .gpio2 = 0x0035e700,
  242. .gpio3 = 0x02000000,
  243. },{
  244. .type = CX88_VMUX_COMPOSITE1,
  245. .vmux = 1,
  246. .gpio0 = 0x0035c700,
  247. .gpio1 = 0x00003004,
  248. .gpio2 = 0x0035c700,
  249. .gpio3 = 0x02000000,
  250. },{
  251. .type = CX88_VMUX_SVIDEO,
  252. .vmux = 2,
  253. .gpio0 = 0x0035c700,
  254. .gpio1 = 0x0035c700,
  255. .gpio2 = 0x02000000,
  256. .gpio3 = 0x02000000,
  257. }},
  258. .radio = {
  259. .type = CX88_RADIO,
  260. .gpio0 = 0x0035d700,
  261. .gpio1 = 0x00007004,
  262. .gpio2 = 0x0035d700,
  263. .gpio3 = 0x02000000,
  264. },
  265. },
  266. [CX88_BOARD_LEADTEK_PVR2000] = {
  267. // gpio values for PAL version from regspy by DScaler
  268. .name = "Leadtek PVR 2000",
  269. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  270. .radio_type = UNSET,
  271. .tuner_addr = ADDR_UNSET,
  272. .radio_addr = ADDR_UNSET,
  273. .tda9887_conf = TDA9887_PRESENT,
  274. .input = {{
  275. .type = CX88_VMUX_TELEVISION,
  276. .vmux = 0,
  277. .gpio0 = 0x0000bde2,
  278. },{
  279. .type = CX88_VMUX_COMPOSITE1,
  280. .vmux = 1,
  281. .gpio0 = 0x0000bde6,
  282. },{
  283. .type = CX88_VMUX_SVIDEO,
  284. .vmux = 2,
  285. .gpio0 = 0x0000bde6,
  286. }},
  287. .radio = {
  288. .type = CX88_RADIO,
  289. .gpio0 = 0x0000bd62,
  290. },
  291. .blackbird = 1,
  292. },
  293. [CX88_BOARD_IODATA_GVVCP3PCI] = {
  294. .name = "IODATA GV-VCP3/PCI",
  295. .tuner_type = TUNER_ABSENT,
  296. .radio_type = UNSET,
  297. .tuner_addr = ADDR_UNSET,
  298. .radio_addr = ADDR_UNSET,
  299. .input = {{
  300. .type = CX88_VMUX_COMPOSITE1,
  301. .vmux = 0,
  302. },{
  303. .type = CX88_VMUX_COMPOSITE2,
  304. .vmux = 1,
  305. },{
  306. .type = CX88_VMUX_SVIDEO,
  307. .vmux = 2,
  308. }},
  309. },
  310. [CX88_BOARD_PROLINK_PLAYTVPVR] = {
  311. .name = "Prolink PlayTV PVR",
  312. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  313. .radio_type = UNSET,
  314. .tuner_addr = ADDR_UNSET,
  315. .radio_addr = ADDR_UNSET,
  316. .tda9887_conf = TDA9887_PRESENT,
  317. .input = {{
  318. .type = CX88_VMUX_TELEVISION,
  319. .vmux = 0,
  320. .gpio0 = 0xff00,
  321. },{
  322. .type = CX88_VMUX_COMPOSITE1,
  323. .vmux = 1,
  324. .gpio0 = 0xff03,
  325. },{
  326. .type = CX88_VMUX_SVIDEO,
  327. .vmux = 2,
  328. .gpio0 = 0xff03,
  329. }},
  330. .radio = {
  331. .type = CX88_RADIO,
  332. .gpio0 = 0xff00,
  333. },
  334. },
  335. [CX88_BOARD_ASUS_PVR_416] = {
  336. .name = "ASUS PVR-416",
  337. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  338. .radio_type = UNSET,
  339. .tuner_addr = ADDR_UNSET,
  340. .radio_addr = ADDR_UNSET,
  341. .tda9887_conf = TDA9887_PRESENT,
  342. .input = {{
  343. .type = CX88_VMUX_TELEVISION,
  344. .vmux = 0,
  345. .gpio0 = 0x0000fde6,
  346. },{
  347. .type = CX88_VMUX_SVIDEO,
  348. .vmux = 2,
  349. .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
  350. }},
  351. .radio = {
  352. .type = CX88_RADIO,
  353. .gpio0 = 0x0000fde2,
  354. },
  355. .blackbird = 1,
  356. },
  357. [CX88_BOARD_MSI_TVANYWHERE] = {
  358. .name = "MSI TV-@nywhere",
  359. .tuner_type = TUNER_MT2032,
  360. .radio_type = UNSET,
  361. .tuner_addr = ADDR_UNSET,
  362. .radio_addr = ADDR_UNSET,
  363. .tda9887_conf = TDA9887_PRESENT,
  364. .input = {{
  365. .type = CX88_VMUX_TELEVISION,
  366. .vmux = 0,
  367. .gpio0 = 0x00000fbf,
  368. .gpio2 = 0x0000fc08,
  369. },{
  370. .type = CX88_VMUX_COMPOSITE1,
  371. .vmux = 1,
  372. .gpio0 = 0x00000fbf,
  373. .gpio2 = 0x0000fc68,
  374. },{
  375. .type = CX88_VMUX_SVIDEO,
  376. .vmux = 2,
  377. .gpio0 = 0x00000fbf,
  378. .gpio2 = 0x0000fc68,
  379. }},
  380. },
  381. [CX88_BOARD_KWORLD_DVB_T] = {
  382. .name = "KWorld/VStream XPert DVB-T",
  383. .tuner_type = TUNER_ABSENT,
  384. .radio_type = UNSET,
  385. .tuner_addr = ADDR_UNSET,
  386. .radio_addr = ADDR_UNSET,
  387. .input = {{
  388. .type = CX88_VMUX_COMPOSITE1,
  389. .vmux = 1,
  390. .gpio0 = 0x0700,
  391. .gpio2 = 0x0101,
  392. },{
  393. .type = CX88_VMUX_SVIDEO,
  394. .vmux = 2,
  395. .gpio0 = 0x0700,
  396. .gpio2 = 0x0101,
  397. }},
  398. .dvb = 1,
  399. },
  400. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
  401. .name = "DViCO FusionHDTV DVB-T1",
  402. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  403. .radio_type = UNSET,
  404. .tuner_addr = ADDR_UNSET,
  405. .radio_addr = ADDR_UNSET,
  406. .input = {{
  407. .type = CX88_VMUX_COMPOSITE1,
  408. .vmux = 1,
  409. .gpio0 = 0x000027df,
  410. },{
  411. .type = CX88_VMUX_SVIDEO,
  412. .vmux = 2,
  413. .gpio0 = 0x000027df,
  414. }},
  415. .dvb = 1,
  416. },
  417. [CX88_BOARD_KWORLD_LTV883] = {
  418. .name = "KWorld LTV883RF",
  419. .tuner_type = TUNER_TNF_8831BGFF,
  420. .radio_type = UNSET,
  421. .tuner_addr = ADDR_UNSET,
  422. .radio_addr = ADDR_UNSET,
  423. .input = {{
  424. .type = CX88_VMUX_TELEVISION,
  425. .vmux = 0,
  426. .gpio0 = 0x07f8,
  427. },{
  428. .type = CX88_VMUX_DEBUG,
  429. .vmux = 0,
  430. .gpio0 = 0x07f9, // mono from tuner chip
  431. },{
  432. .type = CX88_VMUX_COMPOSITE1,
  433. .vmux = 1,
  434. .gpio0 = 0x000007fa,
  435. },{
  436. .type = CX88_VMUX_SVIDEO,
  437. .vmux = 2,
  438. .gpio0 = 0x000007fa,
  439. }},
  440. .radio = {
  441. .type = CX88_RADIO,
  442. .gpio0 = 0x000007f8,
  443. },
  444. },
  445. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
  446. .name = "DViCO FusionHDTV 3 Gold-Q",
  447. .tuner_type = TUNER_MICROTUNE_4042FI5,
  448. .radio_type = UNSET,
  449. .tuner_addr = ADDR_UNSET,
  450. .radio_addr = ADDR_UNSET,
  451. /*
  452. GPIO[0] resets DT3302 DTV receiver
  453. 0 - reset asserted
  454. 1 - normal operation
  455. GPIO[1] mutes analog audio output connector
  456. 0 - enable selected source
  457. 1 - mute
  458. GPIO[2] selects source for analog audio output connector
  459. 0 - analog audio input connector on tab
  460. 1 - analog DAC output from CX23881 chip
  461. GPIO[3] selects RF input connector on tuner module
  462. 0 - RF connector labeled CABLE
  463. 1 - RF connector labeled ANT
  464. GPIO[4] selects high RF for QAM256 mode
  465. 0 - normal RF
  466. 1 - high RF
  467. */
  468. .input = {{
  469. .type = CX88_VMUX_TELEVISION,
  470. .vmux = 0,
  471. .gpio0 = 0x0f0d,
  472. },{
  473. .type = CX88_VMUX_CABLE,
  474. .vmux = 0,
  475. .gpio0 = 0x0f05,
  476. },{
  477. .type = CX88_VMUX_COMPOSITE1,
  478. .vmux = 1,
  479. .gpio0 = 0x0f00,
  480. },{
  481. .type = CX88_VMUX_SVIDEO,
  482. .vmux = 2,
  483. .gpio0 = 0x0f00,
  484. }},
  485. .dvb = 1,
  486. },
  487. [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
  488. .name = "Hauppauge Nova-T DVB-T",
  489. .tuner_type = TUNER_ABSENT,
  490. .radio_type = UNSET,
  491. .tuner_addr = ADDR_UNSET,
  492. .radio_addr = ADDR_UNSET,
  493. .input = {{
  494. .type = CX88_VMUX_DVB,
  495. .vmux = 0,
  496. }},
  497. .dvb = 1,
  498. },
  499. [CX88_BOARD_CONEXANT_DVB_T1] = {
  500. .name = "Conexant DVB-T reference design",
  501. .tuner_type = TUNER_ABSENT,
  502. .radio_type = UNSET,
  503. .tuner_addr = ADDR_UNSET,
  504. .radio_addr = ADDR_UNSET,
  505. .input = {{
  506. .type = CX88_VMUX_DVB,
  507. .vmux = 0,
  508. }},
  509. .dvb = 1,
  510. },
  511. [CX88_BOARD_PROVIDEO_PV259] = {
  512. .name = "Provideo PV259",
  513. .tuner_type = TUNER_PHILIPS_FQ1216ME,
  514. .radio_type = UNSET,
  515. .tuner_addr = ADDR_UNSET,
  516. .radio_addr = ADDR_UNSET,
  517. .input = {{
  518. .type = CX88_VMUX_TELEVISION,
  519. .vmux = 0,
  520. }},
  521. .blackbird = 1,
  522. },
  523. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
  524. .name = "DViCO FusionHDTV DVB-T Plus",
  525. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  526. .radio_type = UNSET,
  527. .tuner_addr = ADDR_UNSET,
  528. .radio_addr = ADDR_UNSET,
  529. .input = {{
  530. .type = CX88_VMUX_COMPOSITE1,
  531. .vmux = 1,
  532. .gpio0 = 0x000027df,
  533. },{
  534. .type = CX88_VMUX_SVIDEO,
  535. .vmux = 2,
  536. .gpio0 = 0x000027df,
  537. }},
  538. .dvb = 1,
  539. },
  540. [CX88_BOARD_DNTV_LIVE_DVB_T] = {
  541. .name = "digitalnow DNTV Live! DVB-T",
  542. .tuner_type = TUNER_ABSENT,
  543. .radio_type = UNSET,
  544. .tuner_addr = ADDR_UNSET,
  545. .radio_addr = ADDR_UNSET,
  546. .input = {{
  547. .type = CX88_VMUX_COMPOSITE1,
  548. .vmux = 1,
  549. .gpio0 = 0x00000700,
  550. .gpio2 = 0x00000101,
  551. },{
  552. .type = CX88_VMUX_SVIDEO,
  553. .vmux = 2,
  554. .gpio0 = 0x00000700,
  555. .gpio2 = 0x00000101,
  556. }},
  557. .dvb = 1,
  558. },
  559. [CX88_BOARD_PCHDTV_HD3000] = {
  560. .name = "pcHDTV HD3000 HDTV",
  561. .tuner_type = TUNER_THOMSON_DTT7610,
  562. .radio_type = UNSET,
  563. .tuner_addr = ADDR_UNSET,
  564. .radio_addr = ADDR_UNSET,
  565. .tda9887_conf = TDA9887_PRESENT,
  566. .input = {{
  567. .type = CX88_VMUX_TELEVISION,
  568. .vmux = 0,
  569. .gpio0 = 0x00008484,
  570. .gpio1 = 0x00000000,
  571. .gpio2 = 0x00000000,
  572. .gpio3 = 0x00000000,
  573. },{
  574. .type = CX88_VMUX_COMPOSITE1,
  575. .vmux = 1,
  576. .gpio0 = 0x00008400,
  577. .gpio1 = 0x00000000,
  578. .gpio2 = 0x00000000,
  579. .gpio3 = 0x00000000,
  580. },{
  581. .type = CX88_VMUX_SVIDEO,
  582. .vmux = 2,
  583. .gpio0 = 0x00008400,
  584. .gpio1 = 0x00000000,
  585. .gpio2 = 0x00000000,
  586. .gpio3 = 0x00000000,
  587. }},
  588. .radio = {
  589. .type = CX88_RADIO,
  590. .vmux = 2,
  591. .gpio0 = 0x00008400,
  592. .gpio1 = 0x00000000,
  593. .gpio2 = 0x00000000,
  594. .gpio3 = 0x00000000,
  595. },
  596. .dvb = 1,
  597. },
  598. [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
  599. // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
  600. // GPIO values obtained from regspy, courtesy Sean Covel
  601. .name = "Hauppauge WinTV 28xxx (Roslyn) models",
  602. .tuner_type = UNSET,
  603. .radio_type = UNSET,
  604. .tuner_addr = ADDR_UNSET,
  605. .radio_addr = ADDR_UNSET,
  606. .input = {{
  607. .type = CX88_VMUX_TELEVISION,
  608. .vmux = 0,
  609. .gpio0 = 0xed1a,
  610. .gpio2 = 0x00ff,
  611. },{
  612. .type = CX88_VMUX_DEBUG,
  613. .vmux = 0,
  614. .gpio0 = 0xff01,
  615. },{
  616. .type = CX88_VMUX_COMPOSITE1,
  617. .vmux = 1,
  618. .gpio0 = 0xff02,
  619. },{
  620. .type = CX88_VMUX_SVIDEO,
  621. .vmux = 2,
  622. .gpio0 = 0xed92,
  623. .gpio2 = 0x00ff,
  624. }},
  625. .radio = {
  626. .type = CX88_RADIO,
  627. .gpio0 = 0xed96,
  628. .gpio2 = 0x00ff,
  629. },
  630. .blackbird = 1,
  631. },
  632. [CX88_BOARD_DIGITALLOGIC_MEC] = {
  633. .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
  634. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  635. .radio_type = UNSET,
  636. .tuner_addr = ADDR_UNSET,
  637. .radio_addr = ADDR_UNSET,
  638. .tda9887_conf = TDA9887_PRESENT,
  639. .input = {{
  640. .type = CX88_VMUX_TELEVISION,
  641. .vmux = 0,
  642. .gpio0 = 0x00009d80,
  643. },{
  644. .type = CX88_VMUX_COMPOSITE1,
  645. .vmux = 1,
  646. .gpio0 = 0x00009d76,
  647. },{
  648. .type = CX88_VMUX_SVIDEO,
  649. .vmux = 2,
  650. .gpio0 = 0x00009d76,
  651. }},
  652. .radio = {
  653. .type = CX88_RADIO,
  654. .gpio0 = 0x00009d00,
  655. },
  656. .blackbird = 1,
  657. },
  658. [CX88_BOARD_IODATA_GVBCTV7E] = {
  659. .name = "IODATA GV/BCTV7E",
  660. .tuner_type = TUNER_PHILIPS_FQ1286,
  661. .radio_type = UNSET,
  662. .tuner_addr = ADDR_UNSET,
  663. .radio_addr = ADDR_UNSET,
  664. .tda9887_conf = TDA9887_PRESENT,
  665. .input = {{
  666. .type = CX88_VMUX_TELEVISION,
  667. .vmux = 1,
  668. .gpio1 = 0x0000e03f,
  669. },{
  670. .type = CX88_VMUX_COMPOSITE1,
  671. .vmux = 2,
  672. .gpio1 = 0x0000e07f,
  673. },{
  674. .type = CX88_VMUX_SVIDEO,
  675. .vmux = 3,
  676. .gpio1 = 0x0000e07f,
  677. }}
  678. },
  679. [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
  680. .name = "PixelView PlayTV Ultra Pro (Stereo)",
  681. /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
  682. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  683. .radio_type = UNSET,
  684. .tuner_addr = ADDR_UNSET,
  685. .radio_addr = ADDR_UNSET,
  686. .input = {{
  687. .type = CX88_VMUX_TELEVISION,
  688. .vmux = 0,
  689. .gpio0 = 0xbf61, /* internal decoder */
  690. },{
  691. .type = CX88_VMUX_COMPOSITE1,
  692. .vmux = 1,
  693. .gpio0 = 0xbf63,
  694. },{
  695. .type = CX88_VMUX_SVIDEO,
  696. .vmux = 2,
  697. .gpio0 = 0xbf63,
  698. }},
  699. .radio = {
  700. .type = CX88_RADIO,
  701. .gpio0 = 0xbf60,
  702. },
  703. },
  704. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
  705. .name = "DViCO FusionHDTV 3 Gold-T",
  706. .tuner_type = TUNER_THOMSON_DTT761X,
  707. .radio_type = UNSET,
  708. .tuner_addr = ADDR_UNSET,
  709. .radio_addr = ADDR_UNSET,
  710. .tda9887_conf = TDA9887_PRESENT,
  711. .input = {{
  712. .type = CX88_VMUX_TELEVISION,
  713. .vmux = 0,
  714. .gpio0 = 0x97ed,
  715. },{
  716. .type = CX88_VMUX_COMPOSITE1,
  717. .vmux = 1,
  718. .gpio0 = 0x97e9,
  719. },{
  720. .type = CX88_VMUX_SVIDEO,
  721. .vmux = 2,
  722. .gpio0 = 0x97e9,
  723. }},
  724. .dvb = 1,
  725. },
  726. [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
  727. .name = "ADS Tech Instant TV DVB-T PCI",
  728. .tuner_type = TUNER_ABSENT,
  729. .radio_type = UNSET,
  730. .tuner_addr = ADDR_UNSET,
  731. .radio_addr = ADDR_UNSET,
  732. .input = {{
  733. .type = CX88_VMUX_COMPOSITE1,
  734. .vmux = 1,
  735. .gpio0 = 0x0700,
  736. .gpio2 = 0x0101,
  737. },{
  738. .type = CX88_VMUX_SVIDEO,
  739. .vmux = 2,
  740. .gpio0 = 0x0700,
  741. .gpio2 = 0x0101,
  742. }},
  743. .dvb = 1,
  744. },
  745. [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
  746. .name = "TerraTec Cinergy 1400 DVB-T",
  747. .tuner_type = TUNER_ABSENT,
  748. .input = {{
  749. .type = CX88_VMUX_DVB,
  750. .vmux = 0,
  751. }},
  752. .dvb = 1,
  753. },
  754. [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
  755. .name = "DViCO FusionHDTV 5 Gold",
  756. .tuner_type = TUNER_LG_TDVS_H062F,
  757. .radio_type = UNSET,
  758. .tuner_addr = ADDR_UNSET,
  759. .radio_addr = ADDR_UNSET,
  760. .tda9887_conf = TDA9887_PRESENT,
  761. .input = {{
  762. .type = CX88_VMUX_TELEVISION,
  763. .vmux = 0,
  764. .gpio0 = 0x87fd,
  765. },{
  766. .type = CX88_VMUX_COMPOSITE1,
  767. .vmux = 1,
  768. .gpio0 = 0x87f9,
  769. },{
  770. .type = CX88_VMUX_SVIDEO,
  771. .vmux = 2,
  772. .gpio0 = 0x87f9,
  773. }},
  774. .dvb = 1,
  775. },
  776. [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
  777. .name = "AverMedia UltraTV Media Center PCI 550",
  778. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  779. .radio_type = UNSET,
  780. .tuner_addr = ADDR_UNSET,
  781. .radio_addr = ADDR_UNSET,
  782. .tda9887_conf = TDA9887_PRESENT,
  783. .blackbird = 1,
  784. .input = {{
  785. .type = CX88_VMUX_COMPOSITE1,
  786. .vmux = 0,
  787. .gpio0 = 0x0000cd73,
  788. },{
  789. .type = CX88_VMUX_SVIDEO,
  790. .vmux = 1,
  791. .gpio0 = 0x0000cd73,
  792. },{
  793. .type = CX88_VMUX_TELEVISION,
  794. .vmux = 3,
  795. .gpio0 = 0x0000cdb3,
  796. }},
  797. .radio = {
  798. .type = CX88_RADIO,
  799. .vmux = 2,
  800. .gpio0 = 0x0000cdf3,
  801. },
  802. },
  803. [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
  804. /* Alexander Wold <awold@bigfoot.com> */
  805. .name = "Kworld V-Stream Xpert DVD",
  806. .tuner_type = UNSET,
  807. .input = {{
  808. .type = CX88_VMUX_COMPOSITE1,
  809. .vmux = 1,
  810. .gpio0 = 0x03000000,
  811. .gpio1 = 0x01000000,
  812. .gpio2 = 0x02000000,
  813. .gpio3 = 0x00100000,
  814. },{
  815. .type = CX88_VMUX_SVIDEO,
  816. .vmux = 2,
  817. .gpio0 = 0x03000000,
  818. .gpio1 = 0x01000000,
  819. .gpio2 = 0x02000000,
  820. .gpio3 = 0x00100000,
  821. }},
  822. },
  823. [CX88_BOARD_ATI_HDTVWONDER] = {
  824. .name = "ATI HDTV Wonder",
  825. .tuner_type = TUNER_PHILIPS_TUV1236D,
  826. .radio_type = UNSET,
  827. .tuner_addr = ADDR_UNSET,
  828. .radio_addr = ADDR_UNSET,
  829. .input = {{
  830. .type = CX88_VMUX_TELEVISION,
  831. .vmux = 0,
  832. .gpio0 = 0x00000ff7,
  833. .gpio1 = 0x000000ff,
  834. .gpio2 = 0x00000001,
  835. .gpio3 = 0x00000000,
  836. },{
  837. .type = CX88_VMUX_COMPOSITE1,
  838. .vmux = 1,
  839. .gpio0 = 0x00000ffe,
  840. .gpio1 = 0x000000ff,
  841. .gpio2 = 0x00000001,
  842. .gpio3 = 0x00000000,
  843. },{
  844. .type = CX88_VMUX_SVIDEO,
  845. .vmux = 2,
  846. .gpio0 = 0x00000ffe,
  847. .gpio1 = 0x000000ff,
  848. .gpio2 = 0x00000001,
  849. .gpio3 = 0x00000000,
  850. }},
  851. .dvb = 1,
  852. },
  853. [CX88_BOARD_WINFAST_DTV1000] = {
  854. .name = "WinFast DTV1000-T",
  855. .tuner_type = TUNER_ABSENT,
  856. .radio_type = UNSET,
  857. .tuner_addr = ADDR_UNSET,
  858. .radio_addr = ADDR_UNSET,
  859. .input = {{
  860. .type = CX88_VMUX_DVB,
  861. .vmux = 0,
  862. }},
  863. .dvb = 1,
  864. },
  865. [CX88_BOARD_AVERTV_303] = {
  866. .name = "AVerTV 303 (M126)",
  867. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  868. .radio_type = UNSET,
  869. .tuner_addr = ADDR_UNSET,
  870. .radio_addr = ADDR_UNSET,
  871. .tda9887_conf = TDA9887_PRESENT,
  872. .input = {{
  873. .type = CX88_VMUX_TELEVISION,
  874. .vmux = 0,
  875. .gpio0 = 0x00ff,
  876. .gpio1 = 0xe09f,
  877. .gpio2 = 0x0010,
  878. .gpio3 = 0x0000,
  879. },{
  880. .type = CX88_VMUX_COMPOSITE1,
  881. .vmux = 1,
  882. .gpio0 = 0x00ff,
  883. .gpio1 = 0xe05f,
  884. .gpio2 = 0x0010,
  885. .gpio3 = 0x0000,
  886. },{
  887. .type = CX88_VMUX_SVIDEO,
  888. .vmux = 2,
  889. .gpio0 = 0x00ff,
  890. .gpio1 = 0xe05f,
  891. .gpio2 = 0x0010,
  892. .gpio3 = 0x0000,
  893. }},
  894. },
  895. [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
  896. .name = "Hauppauge Nova-S-Plus DVB-S",
  897. .tuner_type = TUNER_ABSENT,
  898. .radio_type = UNSET,
  899. .tuner_addr = ADDR_UNSET,
  900. .radio_addr = ADDR_UNSET,
  901. .input = {{
  902. .type = CX88_VMUX_DVB,
  903. .vmux = 0,
  904. },{
  905. .type = CX88_VMUX_COMPOSITE1,
  906. .vmux = 1,
  907. },{
  908. .type = CX88_VMUX_SVIDEO,
  909. .vmux = 2,
  910. }},
  911. .dvb = 1,
  912. },
  913. [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
  914. .name = "Hauppauge Nova-SE2 DVB-S",
  915. .tuner_type = TUNER_ABSENT,
  916. .radio_type = UNSET,
  917. .tuner_addr = ADDR_UNSET,
  918. .radio_addr = ADDR_UNSET,
  919. .input = {{
  920. .type = CX88_VMUX_DVB,
  921. .vmux = 0,
  922. }},
  923. .dvb = 1,
  924. },
  925. [CX88_BOARD_KWORLD_DVBS_100] = {
  926. .name = "KWorld DVB-S 100",
  927. .tuner_type = TUNER_ABSENT,
  928. .radio_type = UNSET,
  929. .tuner_addr = ADDR_UNSET,
  930. .radio_addr = ADDR_UNSET,
  931. .input = {{
  932. .type = CX88_VMUX_DVB,
  933. .vmux = 0,
  934. },{
  935. .type = CX88_VMUX_COMPOSITE1,
  936. .vmux = 1,
  937. },{
  938. .type = CX88_VMUX_SVIDEO,
  939. .vmux = 2,
  940. }},
  941. .dvb = 1,
  942. },
  943. [CX88_BOARD_HAUPPAUGE_HVR1100] = {
  944. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
  945. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  946. .radio_type = UNSET,
  947. .tuner_addr = ADDR_UNSET,
  948. .radio_addr = ADDR_UNSET,
  949. .tda9887_conf = TDA9887_PRESENT,
  950. .input = {{
  951. .type = CX88_VMUX_TELEVISION,
  952. .vmux = 0,
  953. },{
  954. .type = CX88_VMUX_COMPOSITE1,
  955. .vmux = 1,
  956. },{
  957. .type = CX88_VMUX_SVIDEO,
  958. .vmux = 2,
  959. }},
  960. /* fixme: Add radio support */
  961. .dvb = 1,
  962. },
  963. [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
  964. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
  965. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  966. .radio_type = UNSET,
  967. .tuner_addr = ADDR_UNSET,
  968. .radio_addr = ADDR_UNSET,
  969. .tda9887_conf = TDA9887_PRESENT,
  970. .input = {{
  971. .type = CX88_VMUX_TELEVISION,
  972. .vmux = 0,
  973. },{
  974. .type = CX88_VMUX_COMPOSITE1,
  975. .vmux = 1,
  976. }},
  977. /* fixme: Add radio support */
  978. .dvb = 1,
  979. },
  980. [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
  981. .name = "digitalnow DNTV Live! DVB-T Pro",
  982. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  983. .radio_type = UNSET,
  984. .tuner_addr = ADDR_UNSET,
  985. .radio_addr = ADDR_UNSET,
  986. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  987. TDA9887_PORT2_ACTIVE,
  988. .input = {{
  989. .type = CX88_VMUX_TELEVISION,
  990. .vmux = 0,
  991. .gpio0 = 0xf80808,
  992. },{
  993. .type = CX88_VMUX_COMPOSITE1,
  994. .vmux = 1,
  995. .gpio0 = 0xf80808,
  996. },{
  997. .type = CX88_VMUX_SVIDEO,
  998. .vmux = 2,
  999. .gpio0 = 0xf80808,
  1000. }},
  1001. .radio = {
  1002. .type = CX88_RADIO,
  1003. .gpio0 = 0xf80808,
  1004. },
  1005. .dvb = 1,
  1006. },
  1007. [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
  1008. /* Kworld V-stream Xpert DVB-T with Thomson tuner */
  1009. /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
  1010. /* Manenti Marco <marco_manenti@colman.it> */
  1011. .name = "KWorld/VStream XPert DVB-T with cx22702",
  1012. .tuner_type = TUNER_ABSENT,
  1013. .radio_type = UNSET,
  1014. .tuner_addr = ADDR_UNSET,
  1015. .radio_addr = ADDR_UNSET,
  1016. .input = {{
  1017. .type = CX88_VMUX_COMPOSITE1,
  1018. .vmux = 1,
  1019. .gpio0 = 0x0700,
  1020. .gpio2 = 0x0101,
  1021. },{
  1022. .type = CX88_VMUX_SVIDEO,
  1023. .vmux = 2,
  1024. .gpio0 = 0x0700,
  1025. .gpio2 = 0x0101,
  1026. }},
  1027. .dvb = 1,
  1028. },
  1029. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
  1030. .name = "DViCO FusionHDTV DVB-T Dual Digital",
  1031. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  1032. .radio_type = UNSET,
  1033. .tuner_addr = ADDR_UNSET,
  1034. .radio_addr = ADDR_UNSET,
  1035. .input = {{
  1036. .type = CX88_VMUX_COMPOSITE1,
  1037. .vmux = 1,
  1038. .gpio0 = 0x000027df,
  1039. },{
  1040. .type = CX88_VMUX_SVIDEO,
  1041. .vmux = 2,
  1042. .gpio0 = 0x000027df,
  1043. }},
  1044. .dvb = 1,
  1045. },
  1046. [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
  1047. /* FIXME: Standard video using the cx88 broadcast decoder is
  1048. * working, but blackbird isn't working yet, audio is only
  1049. * working correctly for television mode. S-Video and Composite
  1050. * are working for video-only, so I have them disabled for now.
  1051. */
  1052. .name = "KWorld HardwareMpegTV XPert",
  1053. .tuner_type = TUNER_PHILIPS_TDA8290,
  1054. .radio_type = UNSET,
  1055. .tuner_addr = ADDR_UNSET,
  1056. .radio_addr = ADDR_UNSET,
  1057. .input = {{
  1058. .type = CX88_VMUX_TELEVISION,
  1059. .vmux = 0,
  1060. .gpio0 = 0x3de2,
  1061. .gpio2 = 0x00ff,
  1062. }},
  1063. .radio = {
  1064. .type = CX88_RADIO,
  1065. .gpio0 = 0x3de6,
  1066. .gpio2 = 0x00ff,
  1067. },
  1068. },
  1069. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
  1070. .name = "DViCO FusionHDTV DVB-T Hybrid",
  1071. .tuner_type = TUNER_FE6600,
  1072. .radio_type = UNSET,
  1073. .tuner_addr = ADDR_UNSET,
  1074. .radio_addr = ADDR_UNSET,
  1075. .input = {{
  1076. .type = CX88_VMUX_TELEVISION,
  1077. .vmux = 0,
  1078. .gpio0 = 0x0000a75f,
  1079. },{
  1080. .type = CX88_VMUX_COMPOSITE1,
  1081. .vmux = 1,
  1082. .gpio0 = 0x0000a75b,
  1083. },{
  1084. .type = CX88_VMUX_SVIDEO,
  1085. .vmux = 2,
  1086. .gpio0 = 0x0000a75b,
  1087. }},
  1088. .dvb = 1,
  1089. },
  1090. };
  1091. const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
  1092. /* ------------------------------------------------------------------ */
  1093. /* PCI subsystem IDs */
  1094. struct cx88_subid cx88_subids[] = {
  1095. {
  1096. .subvendor = 0x0070,
  1097. .subdevice = 0x3400,
  1098. .card = CX88_BOARD_HAUPPAUGE,
  1099. },{
  1100. .subvendor = 0x0070,
  1101. .subdevice = 0x3401,
  1102. .card = CX88_BOARD_HAUPPAUGE,
  1103. },{
  1104. .subvendor = 0x14c7,
  1105. .subdevice = 0x0106,
  1106. .card = CX88_BOARD_GDI,
  1107. },{
  1108. .subvendor = 0x14c7,
  1109. .subdevice = 0x0107, /* with mpeg encoder */
  1110. .card = CX88_BOARD_GDI,
  1111. },{
  1112. .subvendor = PCI_VENDOR_ID_ATI,
  1113. .subdevice = 0x00f8,
  1114. .card = CX88_BOARD_ATI_WONDER_PRO,
  1115. },{
  1116. .subvendor = 0x107d,
  1117. .subdevice = 0x6611,
  1118. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1119. },{
  1120. .subvendor = 0x107d,
  1121. .subdevice = 0x6613, /* NTSC */
  1122. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1123. },{
  1124. .subvendor = 0x107d,
  1125. .subdevice = 0x6620,
  1126. .card = CX88_BOARD_WINFAST_DV2000,
  1127. },{
  1128. .subvendor = 0x107d,
  1129. .subdevice = 0x663b,
  1130. .card = CX88_BOARD_LEADTEK_PVR2000,
  1131. },{
  1132. .subvendor = 0x107d,
  1133. .subdevice = 0x663C,
  1134. .card = CX88_BOARD_LEADTEK_PVR2000,
  1135. },{
  1136. .subvendor = 0x1461,
  1137. .subdevice = 0x000b,
  1138. .card = CX88_BOARD_AVERTV_STUDIO_303,
  1139. },{
  1140. .subvendor = 0x1462,
  1141. .subdevice = 0x8606,
  1142. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  1143. },{
  1144. .subvendor = 0x10fc,
  1145. .subdevice = 0xd003,
  1146. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  1147. },{
  1148. .subvendor = 0x1043,
  1149. .subdevice = 0x4823, /* with mpeg encoder */
  1150. .card = CX88_BOARD_ASUS_PVR_416,
  1151. },{
  1152. .subvendor = 0x17de,
  1153. .subdevice = 0x08a6,
  1154. .card = CX88_BOARD_KWORLD_DVB_T,
  1155. },{
  1156. .subvendor = 0x18ac,
  1157. .subdevice = 0xd810,
  1158. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1159. },{
  1160. .subvendor = 0x18ac,
  1161. .subdevice = 0xd820,
  1162. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  1163. },{
  1164. .subvendor = 0x18ac,
  1165. .subdevice = 0xdb00,
  1166. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  1167. },{
  1168. .subvendor = 0x0070,
  1169. .subdevice = 0x9002,
  1170. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1171. },{
  1172. .subvendor = 0x14f1,
  1173. .subdevice = 0x0187,
  1174. .card = CX88_BOARD_CONEXANT_DVB_T1,
  1175. },{
  1176. .subvendor = 0x1540,
  1177. .subdevice = 0x2580,
  1178. .card = CX88_BOARD_PROVIDEO_PV259,
  1179. },{
  1180. .subvendor = 0x18ac,
  1181. .subdevice = 0xdb10,
  1182. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1183. },{
  1184. .subvendor = 0x1554,
  1185. .subdevice = 0x4811,
  1186. .card = CX88_BOARD_PIXELVIEW,
  1187. },{
  1188. .subvendor = 0x7063,
  1189. .subdevice = 0x3000, /* HD-3000 card */
  1190. .card = CX88_BOARD_PCHDTV_HD3000,
  1191. },{
  1192. .subvendor = 0x17de,
  1193. .subdevice = 0xa8a6,
  1194. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  1195. },{
  1196. .subvendor = 0x0070,
  1197. .subdevice = 0x2801,
  1198. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  1199. },{
  1200. .subvendor = 0x14f1,
  1201. .subdevice = 0x0342,
  1202. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  1203. },{
  1204. .subvendor = 0x10fc,
  1205. .subdevice = 0xd035,
  1206. .card = CX88_BOARD_IODATA_GVBCTV7E,
  1207. },{
  1208. .subvendor = 0x1421,
  1209. .subdevice = 0x0334,
  1210. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  1211. },{
  1212. .subvendor = 0x153b,
  1213. .subdevice = 0x1166,
  1214. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  1215. },{
  1216. .subvendor = 0x18ac,
  1217. .subdevice = 0xd500,
  1218. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  1219. },{
  1220. .subvendor = 0x1461,
  1221. .subdevice = 0x8011,
  1222. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  1223. },{
  1224. .subvendor = PCI_VENDOR_ID_ATI,
  1225. .subdevice = 0xa101,
  1226. .card = CX88_BOARD_ATI_HDTVWONDER,
  1227. },{
  1228. .subvendor = 0x107d,
  1229. .subdevice = 0x665f,
  1230. .card = CX88_BOARD_WINFAST_DTV1000,
  1231. },{
  1232. .subvendor = 0x1461,
  1233. .subdevice = 0x000a,
  1234. .card = CX88_BOARD_AVERTV_303,
  1235. },{
  1236. .subvendor = 0x0070,
  1237. .subdevice = 0x9200,
  1238. .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
  1239. },{
  1240. .subvendor = 0x0070,
  1241. .subdevice = 0x9201,
  1242. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1243. },{
  1244. .subvendor = 0x0070,
  1245. .subdevice = 0x9202,
  1246. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1247. },{
  1248. .subvendor = 0x17de,
  1249. .subdevice = 0x08b2,
  1250. .card = CX88_BOARD_KWORLD_DVBS_100,
  1251. },{
  1252. .subvendor = 0x0070,
  1253. .subdevice = 0x9400,
  1254. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1255. },{
  1256. .subvendor = 0x0070,
  1257. .subdevice = 0x9402,
  1258. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1259. },{
  1260. .subvendor = 0x0070,
  1261. .subdevice = 0x9800,
  1262. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1263. },{
  1264. .subvendor = 0x0070,
  1265. .subdevice = 0x9802,
  1266. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1267. },{
  1268. .subvendor = 0x0070,
  1269. .subdevice = 0x9001,
  1270. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1271. },{
  1272. .subvendor = 0x1822,
  1273. .subdevice = 0x0025,
  1274. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1275. },{
  1276. .subvendor = 0x17de,
  1277. .subdevice = 0x08a1,
  1278. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  1279. },{
  1280. .subvendor = 0x18ac,
  1281. .subdevice = 0xdb50,
  1282. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1283. },{
  1284. .subvendor = 0x18ac,
  1285. .subdevice = 0xdb54,
  1286. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1287. /* Re-branded DViCO: DigitalNow DVB-T Dual */
  1288. },{
  1289. .subvendor = 0x18ac,
  1290. .subdevice = 0xdb11,
  1291. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1292. /* Re-branded DViCO: UltraView DVB-T Plus */
  1293. },{
  1294. .subvendor = 0x17de,
  1295. .subdevice = 0x0840,
  1296. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  1297. },{
  1298. .subvendor = 0x18ac,
  1299. .subdevice = 0xdb40,
  1300. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1301. },{
  1302. .subvendor = 0x18ac,
  1303. .subdevice = 0xdb44,
  1304. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1305. },
  1306. };
  1307. const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
  1308. /* ----------------------------------------------------------------------- */
  1309. /* some leadtek specific stuff */
  1310. static void __devinit leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1311. {
  1312. /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
  1313. * any others.
  1314. *
  1315. * Byte 0 is 1 on the NTSC board.
  1316. */
  1317. if (eeprom_data[4] != 0x7d ||
  1318. eeprom_data[5] != 0x10 ||
  1319. eeprom_data[7] != 0x66) {
  1320. printk(KERN_WARNING "%s: Leadtek eeprom invalid.\n",
  1321. core->name);
  1322. return;
  1323. }
  1324. core->has_radio = 1;
  1325. core->tuner_type = (eeprom_data[6] == 0x13) ? 43 : 38;
  1326. printk(KERN_INFO "%s: Leadtek Winfast 2000XP Expert config: "
  1327. "tuner=%d, eeprom[0]=0x%02x\n",
  1328. core->name, core->tuner_type, eeprom_data[0]);
  1329. }
  1330. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1331. {
  1332. struct tveeprom tv;
  1333. tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
  1334. core->tuner_type = tv.tuner_type;
  1335. core->tuner_formats = tv.tuner_formats;
  1336. core->has_radio = tv.has_radio;
  1337. /* Make sure we support the board model */
  1338. switch (tv.model)
  1339. {
  1340. case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
  1341. case 34519: /* WinTV-PCI-FM */
  1342. case 90002: /* Nova-T-PCI (9002) */
  1343. case 92001: /* Nova-S-Plus (Video and IR) */
  1344. case 92002: /* Nova-S-Plus (Video and IR) */
  1345. case 90003: /* Nova-T-PCI (9002 No RF out) */
  1346. case 90500: /* Nova-T-PCI (oem) */
  1347. case 90501: /* Nova-T-PCI (oem/IR) */
  1348. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  1349. case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
  1350. case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
  1351. case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
  1352. /* known */
  1353. break;
  1354. default:
  1355. printk("%s: warning: unknown hauppauge model #%d\n",
  1356. core->name, tv.model);
  1357. break;
  1358. }
  1359. printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
  1360. core->name, tv.model);
  1361. }
  1362. /* ----------------------------------------------------------------------- */
  1363. /* some GDI (was: Modular Technology) specific stuff */
  1364. static struct {
  1365. int id;
  1366. int fm;
  1367. char *name;
  1368. } gdi_tuner[] = {
  1369. [ 0x01 ] = { .id = TUNER_ABSENT,
  1370. .name = "NTSC_M" },
  1371. [ 0x02 ] = { .id = TUNER_ABSENT,
  1372. .name = "PAL_B" },
  1373. [ 0x03 ] = { .id = TUNER_ABSENT,
  1374. .name = "PAL_I" },
  1375. [ 0x04 ] = { .id = TUNER_ABSENT,
  1376. .name = "PAL_D" },
  1377. [ 0x05 ] = { .id = TUNER_ABSENT,
  1378. .name = "SECAM" },
  1379. [ 0x10 ] = { .id = TUNER_ABSENT,
  1380. .fm = 1,
  1381. .name = "TEMIC_4049" },
  1382. [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
  1383. .name = "TEMIC_4136" },
  1384. [ 0x12 ] = { .id = TUNER_ABSENT,
  1385. .name = "TEMIC_4146" },
  1386. [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
  1387. .fm = 1,
  1388. .name = "PHILIPS_FQ1216_MK3" },
  1389. [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
  1390. .name = "PHILIPS_FQ1236_MK3" },
  1391. [ 0x22 ] = { .id = TUNER_ABSENT,
  1392. .name = "PHILIPS_FI1236_MK3" },
  1393. [ 0x23 ] = { .id = TUNER_ABSENT,
  1394. .name = "PHILIPS_FI1216_MK3" },
  1395. };
  1396. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1397. {
  1398. char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  1399. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  1400. printk(KERN_INFO "%s: GDI: tuner=%s\n", core->name,
  1401. name ? name : "unknown");
  1402. if (NULL == name)
  1403. return;
  1404. core->tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  1405. core->has_radio = gdi_tuner[eeprom_data[0x0d]].fm;
  1406. }
  1407. /* ----------------------------------------------------------------------- */
  1408. /* some DViCO specific stuff */
  1409. static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
  1410. {
  1411. struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
  1412. int i, err;
  1413. u8 init_bufs[13][5] = {
  1414. { 0x10, 0x00, 0x20, 0x01, 0x03 },
  1415. { 0x10, 0x10, 0x01, 0x00, 0x21 },
  1416. { 0x10, 0x10, 0x10, 0x00, 0xCA },
  1417. { 0x10, 0x10, 0x12, 0x00, 0x08 },
  1418. { 0x10, 0x10, 0x13, 0x00, 0x0A },
  1419. { 0x10, 0x10, 0x16, 0x01, 0xC0 },
  1420. { 0x10, 0x10, 0x22, 0x01, 0x3D },
  1421. { 0x10, 0x10, 0x73, 0x01, 0x2E },
  1422. { 0x10, 0x10, 0x72, 0x00, 0xC5 },
  1423. { 0x10, 0x10, 0x71, 0x01, 0x97 },
  1424. { 0x10, 0x10, 0x70, 0x00, 0x0F },
  1425. { 0x10, 0x10, 0xB0, 0x00, 0x01 },
  1426. { 0x03, 0x0C },
  1427. };
  1428. for (i = 0; i < 13; i++) {
  1429. msg.buf = init_bufs[i];
  1430. msg.len = (i != 12 ? 5 : 2);
  1431. err = i2c_transfer(&core->i2c_adap, &msg, 1);
  1432. if (err != 1) {
  1433. printk("dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n", i, err);
  1434. return;
  1435. }
  1436. }
  1437. }
  1438. /* ----------------------------------------------------------------------- */
  1439. void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  1440. {
  1441. int i;
  1442. if (0 == pci->subsystem_vendor &&
  1443. 0 == pci->subsystem_device) {
  1444. printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
  1445. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  1446. "%s: workaround that. Redirect complaints to the vendor of\n"
  1447. "%s: the TV card. Best regards,\n"
  1448. "%s: -- tux\n",
  1449. core->name,core->name,core->name,core->name,core->name);
  1450. } else {
  1451. printk("%s: Your board isn't known (yet) to the driver. You can\n"
  1452. "%s: try to pick one of the existing card configs via\n"
  1453. "%s: card=<n> insmod option. Updating to the latest\n"
  1454. "%s: version might help as well.\n",
  1455. core->name,core->name,core->name,core->name);
  1456. }
  1457. printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
  1458. core->name);
  1459. for (i = 0; i < cx88_bcount; i++)
  1460. printk("%s: card=%d -> %s\n",
  1461. core->name, i, cx88_boards[i].name);
  1462. }
  1463. void cx88_card_setup(struct cx88_core *core)
  1464. {
  1465. static u8 eeprom[256];
  1466. if (0 == core->i2c_rc) {
  1467. core->i2c_client.addr = 0xa0 >> 1;
  1468. tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom));
  1469. }
  1470. switch (core->board) {
  1471. case CX88_BOARD_HAUPPAUGE:
  1472. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  1473. if (0 == core->i2c_rc)
  1474. hauppauge_eeprom(core,eeprom+8);
  1475. break;
  1476. case CX88_BOARD_GDI:
  1477. if (0 == core->i2c_rc)
  1478. gdi_eeprom(core,eeprom);
  1479. break;
  1480. case CX88_BOARD_WINFAST2000XP_EXPERT:
  1481. if (0 == core->i2c_rc)
  1482. leadtek_eeprom(core,eeprom);
  1483. break;
  1484. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  1485. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  1486. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  1487. case CX88_BOARD_HAUPPAUGE_HVR1100:
  1488. case CX88_BOARD_HAUPPAUGE_HVR1100LP:
  1489. if (0 == core->i2c_rc)
  1490. hauppauge_eeprom(core,eeprom);
  1491. break;
  1492. case CX88_BOARD_KWORLD_DVBS_100:
  1493. cx_write(MO_GP0_IO, 0x000007f8);
  1494. cx_write(MO_GP1_IO, 0x00000001);
  1495. break;
  1496. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  1497. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  1498. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
  1499. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
  1500. /* GPIO0:0 is hooked to mt352 reset pin */
  1501. cx_set(MO_GP0_IO, 0x00000101);
  1502. cx_clear(MO_GP0_IO, 0x00000001);
  1503. msleep(1);
  1504. cx_set(MO_GP0_IO, 0x00000101);
  1505. if (0 == core->i2c_rc &&
  1506. core->board == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
  1507. dvico_fusionhdtv_hybrid_init(core);
  1508. break;
  1509. case CX88_BOARD_KWORLD_DVB_T:
  1510. case CX88_BOARD_DNTV_LIVE_DVB_T:
  1511. cx_set(MO_GP0_IO, 0x00000707);
  1512. cx_set(MO_GP2_IO, 0x00000101);
  1513. cx_clear(MO_GP2_IO, 0x00000001);
  1514. msleep(1);
  1515. cx_clear(MO_GP0_IO, 0x00000007);
  1516. cx_set(MO_GP2_IO, 0x00000101);
  1517. break;
  1518. case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
  1519. cx_write(MO_GP0_IO, 0x00080808);
  1520. break;
  1521. case CX88_BOARD_ATI_HDTVWONDER:
  1522. if (0 == core->i2c_rc) {
  1523. /* enable tuner */
  1524. int i;
  1525. static const u8 buffer [] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 };
  1526. core->i2c_client.addr = 0x0a;
  1527. for (i = 0; i < 5; i++)
  1528. if (2 != i2c_master_send(&core->i2c_client,&buffer[i*2],2))
  1529. printk(KERN_WARNING "%s: Unable to enable tuner(%i).\n",
  1530. core->name, i);
  1531. }
  1532. break;
  1533. }
  1534. if (cx88_boards[core->board].radio.type == CX88_RADIO)
  1535. core->has_radio = 1;
  1536. }
  1537. /* ------------------------------------------------------------------ */
  1538. EXPORT_SYMBOL(cx88_boards);
  1539. EXPORT_SYMBOL(cx88_bcount);
  1540. EXPORT_SYMBOL(cx88_subids);
  1541. EXPORT_SYMBOL(cx88_idcount);
  1542. EXPORT_SYMBOL(cx88_card_list);
  1543. EXPORT_SYMBOL(cx88_card_setup);
  1544. /*
  1545. * Local variables:
  1546. * c-basic-offset: 8
  1547. * End:
  1548. * kate: eol "unix"; indent-width 3; remove-trailing-space on; replace-trailing-space-save on; tab-width 8; replace-tabs off; space-indent off; mixed-indent off
  1549. */