cx88-cards.c 40 KB

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