cx88-cards.c 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781
  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_DTT761X,
  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_H06XF, /* 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: Audio not working for s-video / composite inputs. */
  1049. .name = "KWorld HardwareMpegTV XPert",
  1050. .tuner_type = TUNER_PHILIPS_TDA8290,
  1051. .radio_type = UNSET,
  1052. .tuner_addr = ADDR_UNSET,
  1053. .radio_addr = ADDR_UNSET,
  1054. .input = {{
  1055. .type = CX88_VMUX_TELEVISION,
  1056. .vmux = 0,
  1057. .gpio0 = 0x3de2,
  1058. .gpio2 = 0x00ff,
  1059. },{
  1060. .type = CX88_VMUX_COMPOSITE1,
  1061. .vmux = 1,
  1062. .gpio0 = 0x3de6,
  1063. },{
  1064. .type = CX88_VMUX_SVIDEO,
  1065. .vmux = 2,
  1066. .gpio0 = 0x3de6,
  1067. }},
  1068. .radio = {
  1069. .type = CX88_RADIO,
  1070. .gpio0 = 0x3de6,
  1071. .gpio2 = 0x00ff,
  1072. },
  1073. .blackbird = 1,
  1074. },
  1075. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
  1076. .name = "DViCO FusionHDTV DVB-T Hybrid",
  1077. .tuner_type = TUNER_THOMSON_FE6600,
  1078. .radio_type = UNSET,
  1079. .tuner_addr = ADDR_UNSET,
  1080. .radio_addr = ADDR_UNSET,
  1081. .input = {{
  1082. .type = CX88_VMUX_TELEVISION,
  1083. .vmux = 0,
  1084. .gpio0 = 0x0000a75f,
  1085. },{
  1086. .type = CX88_VMUX_COMPOSITE1,
  1087. .vmux = 1,
  1088. .gpio0 = 0x0000a75b,
  1089. },{
  1090. .type = CX88_VMUX_SVIDEO,
  1091. .vmux = 2,
  1092. .gpio0 = 0x0000a75b,
  1093. }},
  1094. .dvb = 1,
  1095. },
  1096. [CX88_BOARD_PCHDTV_HD5500] = {
  1097. .name = "pcHDTV HD5500 HDTV",
  1098. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
  1099. .radio_type = UNSET,
  1100. .tuner_addr = ADDR_UNSET,
  1101. .radio_addr = ADDR_UNSET,
  1102. .tda9887_conf = TDA9887_PRESENT,
  1103. .input = {{
  1104. .type = CX88_VMUX_TELEVISION,
  1105. .vmux = 0,
  1106. .gpio0 = 0x87fd,
  1107. },{
  1108. .type = CX88_VMUX_COMPOSITE1,
  1109. .vmux = 1,
  1110. .gpio0 = 0x87f9,
  1111. },{
  1112. .type = CX88_VMUX_SVIDEO,
  1113. .vmux = 2,
  1114. .gpio0 = 0x87f9,
  1115. }},
  1116. .dvb = 1,
  1117. },
  1118. [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
  1119. /* FIXME: tested TV input only, disabled composite,
  1120. svideo and radio until they can be tested also. */
  1121. .name = "Kworld MCE 200 Deluxe",
  1122. .tuner_type = TUNER_TENA_9533_DI,
  1123. .radio_type = UNSET,
  1124. .tda9887_conf = TDA9887_PRESENT,
  1125. .tuner_addr = ADDR_UNSET,
  1126. .radio_addr = ADDR_UNSET,
  1127. .input = {{
  1128. .type = CX88_VMUX_TELEVISION,
  1129. .vmux = 0,
  1130. .gpio0 = 0x0000BDE6
  1131. }},
  1132. .blackbird = 1,
  1133. },
  1134. [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
  1135. /* FIXME: SVideo, Composite and FM inputs are untested */
  1136. .name = "PixelView PlayTV P7000",
  1137. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  1138. .radio_type = UNSET,
  1139. .tuner_addr = ADDR_UNSET,
  1140. .radio_addr = ADDR_UNSET,
  1141. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1142. TDA9887_PORT2_ACTIVE,
  1143. .input = {{
  1144. .type = CX88_VMUX_TELEVISION,
  1145. .vmux = 0,
  1146. .gpio0 = 0x5da6,
  1147. }},
  1148. .blackbird = 1,
  1149. },
  1150. [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
  1151. .name = "NPG Tech Real TV FM Top 10",
  1152. .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
  1153. .radio_type = UNSET,
  1154. .tuner_addr = ADDR_UNSET,
  1155. .radio_addr = ADDR_UNSET,
  1156. .input = {{
  1157. .type = CX88_VMUX_TELEVISION,
  1158. .vmux = 0,
  1159. .gpio0 = 0x0788,
  1160. },{
  1161. .type = CX88_VMUX_COMPOSITE1,
  1162. .vmux = 1,
  1163. .gpio0 = 0x078b,
  1164. },{
  1165. .type = CX88_VMUX_SVIDEO,
  1166. .vmux = 2,
  1167. .gpio0 = 0x078b,
  1168. }},
  1169. .radio = {
  1170. .type = CX88_RADIO,
  1171. .gpio0 = 0x074a,
  1172. },
  1173. },
  1174. [CX88_BOARD_WINFAST_DTV2000H] = {
  1175. /* video inputs and radio still in testing */
  1176. .name = "WinFast DTV2000 H",
  1177. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1178. .radio_type = UNSET,
  1179. .tuner_addr = ADDR_UNSET,
  1180. .radio_addr = ADDR_UNSET,
  1181. .tda9887_conf = TDA9887_PRESENT,
  1182. .input = {{
  1183. .type = CX88_VMUX_TELEVISION,
  1184. .vmux = 0,
  1185. .gpio0 = 0x00017304,
  1186. .gpio1 = 0x00008203,
  1187. .gpio2 = 0x00017304,
  1188. .gpio3 = 0x02000000,
  1189. }},
  1190. .dvb = 1,
  1191. },
  1192. [CX88_BOARD_GENIATECH_DVBS] = {
  1193. .name = "Geniatech DVB-S",
  1194. .tuner_type = TUNER_ABSENT,
  1195. .radio_type = UNSET,
  1196. .tuner_addr = ADDR_UNSET,
  1197. .radio_addr = ADDR_UNSET,
  1198. .input = {{
  1199. .type = CX88_VMUX_DVB,
  1200. .vmux = 0,
  1201. },{
  1202. .type = CX88_VMUX_COMPOSITE1,
  1203. .vmux = 1,
  1204. }},
  1205. .dvb = 1,
  1206. },
  1207. [CX88_BOARD_HAUPPAUGE_HVR3000] = {
  1208. /* FIXME: Add dvb & radio support */
  1209. .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
  1210. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1211. .radio_type = UNSET,
  1212. .tuner_addr = ADDR_UNSET,
  1213. .radio_addr = ADDR_UNSET,
  1214. .tda9887_conf = TDA9887_PRESENT,
  1215. .input = {{
  1216. .type = CX88_VMUX_TELEVISION,
  1217. .vmux = 0,
  1218. .gpio0 = 0x84bf,
  1219. },{
  1220. .type = CX88_VMUX_COMPOSITE1,
  1221. .vmux = 1,
  1222. .gpio0 = 0x84bf,
  1223. },{
  1224. .type = CX88_VMUX_SVIDEO,
  1225. .vmux = 2,
  1226. .gpio0 = 0x84bf,
  1227. }},
  1228. },
  1229. [CX88_BOARD_NORWOOD_MICRO] = {
  1230. .name = "Norwood Micro TV Tuner",
  1231. .tuner_type = TUNER_TNF_5335MF,
  1232. .radio_type = UNSET,
  1233. .tuner_addr = ADDR_UNSET,
  1234. .radio_addr = ADDR_UNSET,
  1235. .input = {{
  1236. .type = CX88_VMUX_TELEVISION,
  1237. .vmux = 0,
  1238. .gpio0 = 0x0709,
  1239. },{
  1240. .type = CX88_VMUX_COMPOSITE1,
  1241. .vmux = 1,
  1242. .gpio0 = 0x070b,
  1243. },{
  1244. .type = CX88_VMUX_SVIDEO,
  1245. .vmux = 2,
  1246. .gpio0 = 0x070b,
  1247. }},
  1248. },
  1249. };
  1250. const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
  1251. /* ------------------------------------------------------------------ */
  1252. /* PCI subsystem IDs */
  1253. struct cx88_subid cx88_subids[] = {
  1254. {
  1255. .subvendor = 0x0070,
  1256. .subdevice = 0x3400,
  1257. .card = CX88_BOARD_HAUPPAUGE,
  1258. },{
  1259. .subvendor = 0x0070,
  1260. .subdevice = 0x3401,
  1261. .card = CX88_BOARD_HAUPPAUGE,
  1262. },{
  1263. .subvendor = 0x14c7,
  1264. .subdevice = 0x0106,
  1265. .card = CX88_BOARD_GDI,
  1266. },{
  1267. .subvendor = 0x14c7,
  1268. .subdevice = 0x0107, /* with mpeg encoder */
  1269. .card = CX88_BOARD_GDI,
  1270. },{
  1271. .subvendor = PCI_VENDOR_ID_ATI,
  1272. .subdevice = 0x00f8,
  1273. .card = CX88_BOARD_ATI_WONDER_PRO,
  1274. },{
  1275. .subvendor = 0x107d,
  1276. .subdevice = 0x6611,
  1277. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1278. },{
  1279. .subvendor = 0x107d,
  1280. .subdevice = 0x6613, /* NTSC */
  1281. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1282. },{
  1283. .subvendor = 0x107d,
  1284. .subdevice = 0x6620,
  1285. .card = CX88_BOARD_WINFAST_DV2000,
  1286. },{
  1287. .subvendor = 0x107d,
  1288. .subdevice = 0x663b,
  1289. .card = CX88_BOARD_LEADTEK_PVR2000,
  1290. },{
  1291. .subvendor = 0x107d,
  1292. .subdevice = 0x663C,
  1293. .card = CX88_BOARD_LEADTEK_PVR2000,
  1294. },{
  1295. .subvendor = 0x1461,
  1296. .subdevice = 0x000b,
  1297. .card = CX88_BOARD_AVERTV_STUDIO_303,
  1298. },{
  1299. .subvendor = 0x1462,
  1300. .subdevice = 0x8606,
  1301. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  1302. },{
  1303. .subvendor = 0x10fc,
  1304. .subdevice = 0xd003,
  1305. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  1306. },{
  1307. .subvendor = 0x1043,
  1308. .subdevice = 0x4823, /* with mpeg encoder */
  1309. .card = CX88_BOARD_ASUS_PVR_416,
  1310. },{
  1311. .subvendor = 0x17de,
  1312. .subdevice = 0x08a6,
  1313. .card = CX88_BOARD_KWORLD_DVB_T,
  1314. },{
  1315. .subvendor = 0x18ac,
  1316. .subdevice = 0xd810,
  1317. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1318. },{
  1319. .subvendor = 0x18ac,
  1320. .subdevice = 0xd820,
  1321. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  1322. },{
  1323. .subvendor = 0x18ac,
  1324. .subdevice = 0xdb00,
  1325. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  1326. },{
  1327. .subvendor = 0x0070,
  1328. .subdevice = 0x9002,
  1329. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1330. },{
  1331. .subvendor = 0x14f1,
  1332. .subdevice = 0x0187,
  1333. .card = CX88_BOARD_CONEXANT_DVB_T1,
  1334. },{
  1335. .subvendor = 0x1540,
  1336. .subdevice = 0x2580,
  1337. .card = CX88_BOARD_PROVIDEO_PV259,
  1338. },{
  1339. .subvendor = 0x18ac,
  1340. .subdevice = 0xdb10,
  1341. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1342. },{
  1343. .subvendor = 0x1554,
  1344. .subdevice = 0x4811,
  1345. .card = CX88_BOARD_PIXELVIEW,
  1346. },{
  1347. .subvendor = 0x7063,
  1348. .subdevice = 0x3000, /* HD-3000 card */
  1349. .card = CX88_BOARD_PCHDTV_HD3000,
  1350. },{
  1351. .subvendor = 0x17de,
  1352. .subdevice = 0xa8a6,
  1353. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  1354. },{
  1355. .subvendor = 0x0070,
  1356. .subdevice = 0x2801,
  1357. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  1358. },{
  1359. .subvendor = 0x14f1,
  1360. .subdevice = 0x0342,
  1361. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  1362. },{
  1363. .subvendor = 0x10fc,
  1364. .subdevice = 0xd035,
  1365. .card = CX88_BOARD_IODATA_GVBCTV7E,
  1366. },{
  1367. .subvendor = 0x1421,
  1368. .subdevice = 0x0334,
  1369. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  1370. },{
  1371. .subvendor = 0x153b,
  1372. .subdevice = 0x1166,
  1373. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  1374. },{
  1375. .subvendor = 0x18ac,
  1376. .subdevice = 0xd500,
  1377. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  1378. },{
  1379. .subvendor = 0x1461,
  1380. .subdevice = 0x8011,
  1381. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  1382. },{
  1383. .subvendor = PCI_VENDOR_ID_ATI,
  1384. .subdevice = 0xa101,
  1385. .card = CX88_BOARD_ATI_HDTVWONDER,
  1386. },{
  1387. .subvendor = 0x107d,
  1388. .subdevice = 0x665f,
  1389. .card = CX88_BOARD_WINFAST_DTV1000,
  1390. },{
  1391. .subvendor = 0x1461,
  1392. .subdevice = 0x000a,
  1393. .card = CX88_BOARD_AVERTV_303,
  1394. },{
  1395. .subvendor = 0x0070,
  1396. .subdevice = 0x9200,
  1397. .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
  1398. },{
  1399. .subvendor = 0x0070,
  1400. .subdevice = 0x9201,
  1401. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1402. },{
  1403. .subvendor = 0x0070,
  1404. .subdevice = 0x9202,
  1405. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1406. },{
  1407. .subvendor = 0x17de,
  1408. .subdevice = 0x08b2,
  1409. .card = CX88_BOARD_KWORLD_DVBS_100,
  1410. },{
  1411. .subvendor = 0x0070,
  1412. .subdevice = 0x9400,
  1413. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1414. },{
  1415. .subvendor = 0x0070,
  1416. .subdevice = 0x9402,
  1417. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1418. },{
  1419. .subvendor = 0x0070,
  1420. .subdevice = 0x9800,
  1421. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1422. },{
  1423. .subvendor = 0x0070,
  1424. .subdevice = 0x9802,
  1425. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1426. },{
  1427. .subvendor = 0x0070,
  1428. .subdevice = 0x9001,
  1429. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1430. },{
  1431. .subvendor = 0x1822,
  1432. .subdevice = 0x0025,
  1433. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1434. },{
  1435. .subvendor = 0x17de,
  1436. .subdevice = 0x08a1,
  1437. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  1438. },{
  1439. .subvendor = 0x18ac,
  1440. .subdevice = 0xdb50,
  1441. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1442. },{
  1443. .subvendor = 0x18ac,
  1444. .subdevice = 0xdb54,
  1445. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1446. /* Re-branded DViCO: DigitalNow DVB-T Dual */
  1447. },{
  1448. .subvendor = 0x18ac,
  1449. .subdevice = 0xdb11,
  1450. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1451. /* Re-branded DViCO: UltraView DVB-T Plus */
  1452. },{
  1453. .subvendor = 0x17de,
  1454. .subdevice = 0x0840,
  1455. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  1456. },{
  1457. .subvendor = 0x18ac,
  1458. .subdevice = 0xdb40,
  1459. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1460. },{
  1461. .subvendor = 0x18ac,
  1462. .subdevice = 0xdb44,
  1463. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1464. },{
  1465. .subvendor = 0x7063,
  1466. .subdevice = 0x5500,
  1467. .card = CX88_BOARD_PCHDTV_HD5500,
  1468. },{
  1469. .subvendor = 0x17de,
  1470. .subdevice = 0x0841,
  1471. .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
  1472. },{
  1473. .subvendor = 0x1822,
  1474. .subdevice = 0x0019,
  1475. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1476. },{
  1477. .subvendor = 0x1554,
  1478. .subdevice = 0x4813,
  1479. .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
  1480. },{
  1481. .subvendor = 0x14f1,
  1482. .subdevice = 0x0842,
  1483. .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
  1484. },{
  1485. .subvendor = 0x107d,
  1486. .subdevice = 0x665e,
  1487. .card = CX88_BOARD_WINFAST_DTV2000H,
  1488. },{
  1489. .subvendor = 0x18ac,
  1490. .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
  1491. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1492. },{
  1493. .subvendor = 0x14f1,
  1494. .subdevice = 0x0084,
  1495. .card = CX88_BOARD_GENIATECH_DVBS,
  1496. },{
  1497. .subvendor = 0x0070,
  1498. .subdevice = 0x1404,
  1499. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  1500. },{
  1501. .subvendor = 0x1461,
  1502. .subdevice = 0xc111, /* AverMedia M150-D */
  1503. /* This board is known to work with the ASUS PVR416 config */
  1504. .card = CX88_BOARD_ASUS_PVR_416,
  1505. },
  1506. };
  1507. const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
  1508. /* ----------------------------------------------------------------------- */
  1509. /* some leadtek specific stuff */
  1510. static void __devinit leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1511. {
  1512. /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
  1513. * any others.
  1514. *
  1515. * Byte 0 is 1 on the NTSC board.
  1516. */
  1517. if (eeprom_data[4] != 0x7d ||
  1518. eeprom_data[5] != 0x10 ||
  1519. eeprom_data[7] != 0x66) {
  1520. printk(KERN_WARNING "%s: Leadtek eeprom invalid.\n",
  1521. core->name);
  1522. return;
  1523. }
  1524. core->has_radio = 1;
  1525. core->tuner_type = (eeprom_data[6] == 0x13) ? 43 : 38;
  1526. printk(KERN_INFO "%s: Leadtek Winfast 2000XP Expert config: "
  1527. "tuner=%d, eeprom[0]=0x%02x\n",
  1528. core->name, core->tuner_type, eeprom_data[0]);
  1529. }
  1530. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1531. {
  1532. struct tveeprom tv;
  1533. tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
  1534. core->tuner_type = tv.tuner_type;
  1535. core->tuner_formats = tv.tuner_formats;
  1536. core->has_radio = tv.has_radio;
  1537. /* Make sure we support the board model */
  1538. switch (tv.model)
  1539. {
  1540. case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
  1541. case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
  1542. case 34519: /* WinTV-PCI-FM */
  1543. case 90002: /* Nova-T-PCI (9002) */
  1544. case 92001: /* Nova-S-Plus (Video and IR) */
  1545. case 92002: /* Nova-S-Plus (Video and IR) */
  1546. case 90003: /* Nova-T-PCI (9002 No RF out) */
  1547. case 90500: /* Nova-T-PCI (oem) */
  1548. case 90501: /* Nova-T-PCI (oem/IR) */
  1549. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  1550. case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
  1551. case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
  1552. case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
  1553. /* known */
  1554. break;
  1555. default:
  1556. printk("%s: warning: unknown hauppauge model #%d\n",
  1557. core->name, tv.model);
  1558. break;
  1559. }
  1560. printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
  1561. core->name, tv.model);
  1562. }
  1563. /* ----------------------------------------------------------------------- */
  1564. /* some GDI (was: Modular Technology) specific stuff */
  1565. static struct {
  1566. int id;
  1567. int fm;
  1568. char *name;
  1569. } gdi_tuner[] = {
  1570. [ 0x01 ] = { .id = TUNER_ABSENT,
  1571. .name = "NTSC_M" },
  1572. [ 0x02 ] = { .id = TUNER_ABSENT,
  1573. .name = "PAL_B" },
  1574. [ 0x03 ] = { .id = TUNER_ABSENT,
  1575. .name = "PAL_I" },
  1576. [ 0x04 ] = { .id = TUNER_ABSENT,
  1577. .name = "PAL_D" },
  1578. [ 0x05 ] = { .id = TUNER_ABSENT,
  1579. .name = "SECAM" },
  1580. [ 0x10 ] = { .id = TUNER_ABSENT,
  1581. .fm = 1,
  1582. .name = "TEMIC_4049" },
  1583. [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
  1584. .name = "TEMIC_4136" },
  1585. [ 0x12 ] = { .id = TUNER_ABSENT,
  1586. .name = "TEMIC_4146" },
  1587. [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
  1588. .fm = 1,
  1589. .name = "PHILIPS_FQ1216_MK3" },
  1590. [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
  1591. .name = "PHILIPS_FQ1236_MK3" },
  1592. [ 0x22 ] = { .id = TUNER_ABSENT,
  1593. .name = "PHILIPS_FI1236_MK3" },
  1594. [ 0x23 ] = { .id = TUNER_ABSENT,
  1595. .name = "PHILIPS_FI1216_MK3" },
  1596. };
  1597. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1598. {
  1599. char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  1600. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  1601. printk(KERN_INFO "%s: GDI: tuner=%s\n", core->name,
  1602. name ? name : "unknown");
  1603. if (NULL == name)
  1604. return;
  1605. core->tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  1606. core->has_radio = gdi_tuner[eeprom_data[0x0d]].fm;
  1607. }
  1608. /* ----------------------------------------------------------------------- */
  1609. /* some DViCO specific stuff */
  1610. static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
  1611. {
  1612. struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
  1613. int i, err;
  1614. static u8 init_bufs[13][5] = {
  1615. { 0x10, 0x00, 0x20, 0x01, 0x03 },
  1616. { 0x10, 0x10, 0x01, 0x00, 0x21 },
  1617. { 0x10, 0x10, 0x10, 0x00, 0xCA },
  1618. { 0x10, 0x10, 0x12, 0x00, 0x08 },
  1619. { 0x10, 0x10, 0x13, 0x00, 0x0A },
  1620. { 0x10, 0x10, 0x16, 0x01, 0xC0 },
  1621. { 0x10, 0x10, 0x22, 0x01, 0x3D },
  1622. { 0x10, 0x10, 0x73, 0x01, 0x2E },
  1623. { 0x10, 0x10, 0x72, 0x00, 0xC5 },
  1624. { 0x10, 0x10, 0x71, 0x01, 0x97 },
  1625. { 0x10, 0x10, 0x70, 0x00, 0x0F },
  1626. { 0x10, 0x10, 0xB0, 0x00, 0x01 },
  1627. { 0x03, 0x0C },
  1628. };
  1629. for (i = 0; i < 13; i++) {
  1630. msg.buf = init_bufs[i];
  1631. msg.len = (i != 12 ? 5 : 2);
  1632. err = i2c_transfer(&core->i2c_adap, &msg, 1);
  1633. if (err != 1) {
  1634. printk("dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n", i, err);
  1635. return;
  1636. }
  1637. }
  1638. }
  1639. /* ----------------------------------------------------------------------- */
  1640. void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  1641. {
  1642. int i;
  1643. if (0 == pci->subsystem_vendor &&
  1644. 0 == pci->subsystem_device) {
  1645. printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
  1646. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  1647. "%s: workaround that. Redirect complaints to the vendor of\n"
  1648. "%s: the TV card. Best regards,\n"
  1649. "%s: -- tux\n",
  1650. core->name,core->name,core->name,core->name,core->name);
  1651. } else {
  1652. printk("%s: Your board isn't known (yet) to the driver. You can\n"
  1653. "%s: try to pick one of the existing card configs via\n"
  1654. "%s: card=<n> insmod option. Updating to the latest\n"
  1655. "%s: version might help as well.\n",
  1656. core->name,core->name,core->name,core->name);
  1657. }
  1658. printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
  1659. core->name);
  1660. for (i = 0; i < cx88_bcount; i++)
  1661. printk("%s: card=%d -> %s\n",
  1662. core->name, i, cx88_boards[i].name);
  1663. }
  1664. void cx88_card_setup(struct cx88_core *core)
  1665. {
  1666. static u8 eeprom[256];
  1667. if (0 == core->i2c_rc) {
  1668. core->i2c_client.addr = 0xa0 >> 1;
  1669. tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom));
  1670. }
  1671. switch (core->board) {
  1672. case CX88_BOARD_HAUPPAUGE:
  1673. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  1674. if (0 == core->i2c_rc)
  1675. hauppauge_eeprom(core,eeprom+8);
  1676. break;
  1677. case CX88_BOARD_GDI:
  1678. if (0 == core->i2c_rc)
  1679. gdi_eeprom(core,eeprom);
  1680. break;
  1681. case CX88_BOARD_WINFAST2000XP_EXPERT:
  1682. if (0 == core->i2c_rc)
  1683. leadtek_eeprom(core,eeprom);
  1684. break;
  1685. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  1686. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  1687. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  1688. case CX88_BOARD_HAUPPAUGE_HVR1100:
  1689. case CX88_BOARD_HAUPPAUGE_HVR1100LP:
  1690. case CX88_BOARD_HAUPPAUGE_HVR3000:
  1691. if (0 == core->i2c_rc)
  1692. hauppauge_eeprom(core,eeprom);
  1693. break;
  1694. case CX88_BOARD_KWORLD_DVBS_100:
  1695. cx_write(MO_GP0_IO, 0x000007f8);
  1696. cx_write(MO_GP1_IO, 0x00000001);
  1697. break;
  1698. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  1699. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  1700. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
  1701. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
  1702. /* GPIO0:0 is hooked to mt352 reset pin */
  1703. cx_set(MO_GP0_IO, 0x00000101);
  1704. cx_clear(MO_GP0_IO, 0x00000001);
  1705. msleep(1);
  1706. cx_set(MO_GP0_IO, 0x00000101);
  1707. if (0 == core->i2c_rc &&
  1708. core->board == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
  1709. dvico_fusionhdtv_hybrid_init(core);
  1710. break;
  1711. case CX88_BOARD_KWORLD_DVB_T:
  1712. case CX88_BOARD_DNTV_LIVE_DVB_T:
  1713. cx_set(MO_GP0_IO, 0x00000707);
  1714. cx_set(MO_GP2_IO, 0x00000101);
  1715. cx_clear(MO_GP2_IO, 0x00000001);
  1716. msleep(1);
  1717. cx_clear(MO_GP0_IO, 0x00000007);
  1718. cx_set(MO_GP2_IO, 0x00000101);
  1719. break;
  1720. case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
  1721. cx_write(MO_GP0_IO, 0x00080808);
  1722. break;
  1723. case CX88_BOARD_ATI_HDTVWONDER:
  1724. if (0 == core->i2c_rc) {
  1725. /* enable tuner */
  1726. int i;
  1727. static const u8 buffer [] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 };
  1728. core->i2c_client.addr = 0x0a;
  1729. for (i = 0; i < 5; i++)
  1730. if (2 != i2c_master_send(&core->i2c_client,&buffer[i*2],2))
  1731. printk(KERN_WARNING "%s: Unable to enable tuner(%i).\n",
  1732. core->name, i);
  1733. }
  1734. break;
  1735. }
  1736. if (cx88_boards[core->board].radio.type == CX88_RADIO)
  1737. core->has_radio = 1;
  1738. }
  1739. /* ------------------------------------------------------------------ */
  1740. EXPORT_SYMBOL(cx88_boards);
  1741. /*
  1742. * Local variables:
  1743. * c-basic-offset: 8
  1744. * End:
  1745. * 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
  1746. */