cx88-cards.c 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265
  1. /*
  2. *
  3. * device driver for Conexant 2388x based TV cards
  4. * card-specific stuff.
  5. *
  6. * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. #include <linux/init.h>
  23. #include <linux/module.h>
  24. #include <linux/pci.h>
  25. #include <linux/delay.h>
  26. #include "cx88.h"
  27. /* ------------------------------------------------------------------ */
  28. /* board config info */
  29. struct cx88_board cx88_boards[] = {
  30. [CX88_BOARD_UNKNOWN] = {
  31. .name = "UNKNOWN/GENERIC",
  32. .tuner_type = UNSET,
  33. .radio_type = UNSET,
  34. .tuner_addr = ADDR_UNSET,
  35. .radio_addr = ADDR_UNSET,
  36. .input = {{
  37. .type = CX88_VMUX_COMPOSITE1,
  38. .vmux = 0,
  39. },{
  40. .type = CX88_VMUX_COMPOSITE2,
  41. .vmux = 1,
  42. },{
  43. .type = CX88_VMUX_COMPOSITE3,
  44. .vmux = 2,
  45. },{
  46. .type = CX88_VMUX_COMPOSITE4,
  47. .vmux = 3,
  48. }},
  49. },
  50. [CX88_BOARD_HAUPPAUGE] = {
  51. .name = "Hauppauge WinTV 34xxx models",
  52. .tuner_type = UNSET,
  53. .radio_type = UNSET,
  54. .tuner_addr = ADDR_UNSET,
  55. .radio_addr = ADDR_UNSET,
  56. .tda9887_conf = TDA9887_PRESENT,
  57. .input = {{
  58. .type = CX88_VMUX_TELEVISION,
  59. .vmux = 0,
  60. .gpio0 = 0xff00, // internal decoder
  61. },{
  62. .type = CX88_VMUX_DEBUG,
  63. .vmux = 0,
  64. .gpio0 = 0xff01, // mono from tuner chip
  65. },{
  66. .type = CX88_VMUX_COMPOSITE1,
  67. .vmux = 1,
  68. .gpio0 = 0xff02,
  69. },{
  70. .type = CX88_VMUX_SVIDEO,
  71. .vmux = 2,
  72. .gpio0 = 0xff02,
  73. }},
  74. .radio = {
  75. .type = CX88_RADIO,
  76. .gpio0 = 0xff01,
  77. },
  78. },
  79. [CX88_BOARD_GDI] = {
  80. .name = "GDI Black Gold",
  81. .tuner_type = UNSET,
  82. .radio_type = UNSET,
  83. .tuner_addr = ADDR_UNSET,
  84. .radio_addr = ADDR_UNSET,
  85. .input = {{
  86. .type = CX88_VMUX_TELEVISION,
  87. .vmux = 0,
  88. },{
  89. .type = CX88_VMUX_SVIDEO,
  90. .vmux = 2,
  91. }},
  92. },
  93. [CX88_BOARD_PIXELVIEW] = {
  94. .name = "PixelView",
  95. .tuner_type = TUNER_PHILIPS_PAL,
  96. .radio_type = UNSET,
  97. .tuner_addr = ADDR_UNSET,
  98. .radio_addr = ADDR_UNSET,
  99. .input = {{
  100. .type = CX88_VMUX_TELEVISION,
  101. .vmux = 0,
  102. .gpio0 = 0xff00, // internal decoder
  103. },{
  104. .type = CX88_VMUX_COMPOSITE1,
  105. .vmux = 1,
  106. },{
  107. .type = CX88_VMUX_SVIDEO,
  108. .vmux = 2,
  109. }},
  110. .radio = {
  111. .type = CX88_RADIO,
  112. .gpio0 = 0xff10,
  113. },
  114. },
  115. [CX88_BOARD_ATI_WONDER_PRO] = {
  116. .name = "ATI TV Wonder Pro",
  117. .tuner_type = TUNER_PHILIPS_4IN1,
  118. .radio_type = UNSET,
  119. .tuner_addr = ADDR_UNSET,
  120. .radio_addr = ADDR_UNSET,
  121. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
  122. .input = {{
  123. .type = CX88_VMUX_TELEVISION,
  124. .vmux = 0,
  125. .gpio0 = 0x03ff,
  126. },{
  127. .type = CX88_VMUX_COMPOSITE1,
  128. .vmux = 1,
  129. .gpio0 = 0x03fe,
  130. },{
  131. .type = CX88_VMUX_SVIDEO,
  132. .vmux = 2,
  133. .gpio0 = 0x03fe,
  134. }},
  135. },
  136. [CX88_BOARD_WINFAST2000XP_EXPERT] = {
  137. .name = "Leadtek Winfast 2000XP Expert",
  138. .tuner_type = TUNER_PHILIPS_4IN1,
  139. .radio_type = UNSET,
  140. .tuner_addr = ADDR_UNSET,
  141. .radio_addr = ADDR_UNSET,
  142. .tda9887_conf = TDA9887_PRESENT,
  143. .input = {{
  144. .type = CX88_VMUX_TELEVISION,
  145. .vmux = 0,
  146. .gpio0 = 0x00F5e700,
  147. .gpio1 = 0x00003004,
  148. .gpio2 = 0x00F5e700,
  149. .gpio3 = 0x02000000,
  150. },{
  151. .type = CX88_VMUX_COMPOSITE1,
  152. .vmux = 1,
  153. .gpio0 = 0x00F5c700,
  154. .gpio1 = 0x00003004,
  155. .gpio2 = 0x00F5c700,
  156. .gpio3 = 0x02000000,
  157. },{
  158. .type = CX88_VMUX_SVIDEO,
  159. .vmux = 2,
  160. .gpio0 = 0x00F5c700,
  161. .gpio1 = 0x00003004,
  162. .gpio2 = 0x00F5c700,
  163. .gpio3 = 0x02000000,
  164. }},
  165. .radio = {
  166. .type = CX88_RADIO,
  167. .gpio0 = 0x00F5d700,
  168. .gpio1 = 0x00003004,
  169. .gpio2 = 0x00F5d700,
  170. .gpio3 = 0x02000000,
  171. },
  172. },
  173. [CX88_BOARD_AVERTV_STUDIO_303] = {
  174. .name = "AverTV Studio 303 (M126)",
  175. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  176. .radio_type = UNSET,
  177. .tuner_addr = ADDR_UNSET,
  178. .radio_addr = ADDR_UNSET,
  179. .tda9887_conf = TDA9887_PRESENT,
  180. .input = {{
  181. .type = CX88_VMUX_TELEVISION,
  182. .vmux = 0,
  183. .gpio1 = 0x309f,
  184. },{
  185. .type = CX88_VMUX_COMPOSITE1,
  186. .vmux = 1,
  187. .gpio1 = 0x305f,
  188. },{
  189. .type = CX88_VMUX_SVIDEO,
  190. .vmux = 2,
  191. .gpio1 = 0x305f,
  192. }},
  193. .radio = {
  194. .type = CX88_RADIO,
  195. },
  196. },
  197. [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
  198. // added gpio values thanks to Michal
  199. // values for PAL from DScaler
  200. .name = "MSI TV-@nywhere Master",
  201. .tuner_type = TUNER_MT2032,
  202. .radio_type = UNSET,
  203. .tuner_addr = ADDR_UNSET,
  204. .radio_addr = ADDR_UNSET,
  205. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
  206. .input = {{
  207. .type = CX88_VMUX_TELEVISION,
  208. .vmux = 0,
  209. .gpio0 = 0x000040bf,
  210. .gpio1 = 0x000080c0,
  211. .gpio2 = 0x0000ff40,
  212. },{
  213. .type = CX88_VMUX_COMPOSITE1,
  214. .vmux = 1,
  215. .gpio0 = 0x000040bf,
  216. .gpio1 = 0x000080c0,
  217. .gpio2 = 0x0000ff40,
  218. },{
  219. .type = CX88_VMUX_SVIDEO,
  220. .vmux = 2,
  221. .gpio0 = 0x000040bf,
  222. .gpio1 = 0x000080c0,
  223. .gpio2 = 0x0000ff40,
  224. }},
  225. .radio = {
  226. .type = CX88_RADIO,
  227. },
  228. },
  229. [CX88_BOARD_WINFAST_DV2000] = {
  230. .name = "Leadtek Winfast DV2000",
  231. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  232. .radio_type = UNSET,
  233. .tuner_addr = ADDR_UNSET,
  234. .radio_addr = ADDR_UNSET,
  235. .tda9887_conf = TDA9887_PRESENT,
  236. .input = {{
  237. .type = CX88_VMUX_TELEVISION,
  238. .vmux = 0,
  239. .gpio0 = 0x0035e700,
  240. .gpio1 = 0x00003004,
  241. .gpio2 = 0x0035e700,
  242. .gpio3 = 0x02000000,
  243. },{
  244. .type = CX88_VMUX_COMPOSITE1,
  245. .vmux = 1,
  246. .gpio0 = 0x0035c700,
  247. .gpio1 = 0x00003004,
  248. .gpio2 = 0x0035c700,
  249. .gpio3 = 0x02000000,
  250. },{
  251. .type = CX88_VMUX_SVIDEO,
  252. .vmux = 2,
  253. .gpio0 = 0x0035c700,
  254. .gpio1 = 0x0035c700,
  255. .gpio2 = 0x02000000,
  256. .gpio3 = 0x02000000,
  257. }},
  258. .radio = {
  259. .type = CX88_RADIO,
  260. .gpio0 = 0x0035d700,
  261. .gpio1 = 0x00007004,
  262. .gpio2 = 0x0035d700,
  263. .gpio3 = 0x02000000,
  264. },
  265. },
  266. [CX88_BOARD_LEADTEK_PVR2000] = {
  267. // gpio values for PAL version from regspy by DScaler
  268. .name = "Leadtek PVR 2000",
  269. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  270. .radio_type = UNSET,
  271. .tuner_addr = ADDR_UNSET,
  272. .radio_addr = ADDR_UNSET,
  273. .tda9887_conf = TDA9887_PRESENT,
  274. .input = {{
  275. .type = CX88_VMUX_TELEVISION,
  276. .vmux = 0,
  277. .gpio0 = 0x0000bde2,
  278. },{
  279. .type = CX88_VMUX_COMPOSITE1,
  280. .vmux = 1,
  281. .gpio0 = 0x0000bde6,
  282. },{
  283. .type = CX88_VMUX_SVIDEO,
  284. .vmux = 2,
  285. .gpio0 = 0x0000bde6,
  286. }},
  287. .radio = {
  288. .type = CX88_RADIO,
  289. .gpio0 = 0x0000bd62,
  290. },
  291. .blackbird = 1,
  292. },
  293. [CX88_BOARD_IODATA_GVVCP3PCI] = {
  294. .name = "IODATA GV-VCP3/PCI",
  295. .tuner_type = TUNER_ABSENT,
  296. .radio_type = UNSET,
  297. .tuner_addr = ADDR_UNSET,
  298. .radio_addr = ADDR_UNSET,
  299. .input = {{
  300. .type = CX88_VMUX_COMPOSITE1,
  301. .vmux = 0,
  302. },{
  303. .type = CX88_VMUX_COMPOSITE2,
  304. .vmux = 1,
  305. },{
  306. .type = CX88_VMUX_SVIDEO,
  307. .vmux = 2,
  308. }},
  309. },
  310. [CX88_BOARD_PROLINK_PLAYTVPVR] = {
  311. .name = "Prolink PlayTV PVR",
  312. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  313. .radio_type = UNSET,
  314. .tuner_addr = ADDR_UNSET,
  315. .radio_addr = ADDR_UNSET,
  316. .tda9887_conf = TDA9887_PRESENT,
  317. .input = {{
  318. .type = CX88_VMUX_TELEVISION,
  319. .vmux = 0,
  320. .gpio0 = 0xff00,
  321. },{
  322. .type = CX88_VMUX_COMPOSITE1,
  323. .vmux = 1,
  324. .gpio0 = 0xff03,
  325. },{
  326. .type = CX88_VMUX_SVIDEO,
  327. .vmux = 2,
  328. .gpio0 = 0xff03,
  329. }},
  330. .radio = {
  331. .type = CX88_RADIO,
  332. .gpio0 = 0xff00,
  333. },
  334. },
  335. [CX88_BOARD_ASUS_PVR_416] = {
  336. .name = "ASUS PVR-416",
  337. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  338. .radio_type = UNSET,
  339. .tuner_addr = ADDR_UNSET,
  340. .radio_addr = ADDR_UNSET,
  341. .tda9887_conf = TDA9887_PRESENT,
  342. .input = {{
  343. .type = CX88_VMUX_TELEVISION,
  344. .vmux = 0,
  345. .gpio0 = 0x0000fde6,
  346. },{
  347. .type = CX88_VMUX_SVIDEO,
  348. .vmux = 2,
  349. .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
  350. }},
  351. .radio = {
  352. .type = CX88_RADIO,
  353. .gpio0 = 0x0000fde2,
  354. },
  355. .blackbird = 1,
  356. },
  357. [CX88_BOARD_MSI_TVANYWHERE] = {
  358. .name = "MSI TV-@nywhere",
  359. .tuner_type = TUNER_MT2032,
  360. .radio_type = UNSET,
  361. .tuner_addr = ADDR_UNSET,
  362. .radio_addr = ADDR_UNSET,
  363. .tda9887_conf = TDA9887_PRESENT,
  364. .input = {{
  365. .type = CX88_VMUX_TELEVISION,
  366. .vmux = 0,
  367. .gpio0 = 0x00000fbf,
  368. .gpio2 = 0x0000fc08,
  369. },{
  370. .type = CX88_VMUX_COMPOSITE1,
  371. .vmux = 1,
  372. .gpio0 = 0x00000fbf,
  373. .gpio2 = 0x0000fc68,
  374. },{
  375. .type = CX88_VMUX_SVIDEO,
  376. .vmux = 2,
  377. .gpio0 = 0x00000fbf,
  378. .gpio2 = 0x0000fc68,
  379. }},
  380. },
  381. [CX88_BOARD_KWORLD_DVB_T] = {
  382. .name = "KWorld/VStream XPert DVB-T",
  383. .tuner_type = TUNER_ABSENT,
  384. .radio_type = UNSET,
  385. .tuner_addr = ADDR_UNSET,
  386. .radio_addr = ADDR_UNSET,
  387. .input = {{
  388. .type = CX88_VMUX_COMPOSITE1,
  389. .vmux = 1,
  390. .gpio0 = 0x0700,
  391. .gpio2 = 0x0101,
  392. },{
  393. .type = CX88_VMUX_SVIDEO,
  394. .vmux = 2,
  395. .gpio0 = 0x0700,
  396. .gpio2 = 0x0101,
  397. }},
  398. .dvb = 1,
  399. },
  400. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
  401. .name = "DViCO FusionHDTV DVB-T1",
  402. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  403. .radio_type = UNSET,
  404. .tuner_addr = ADDR_UNSET,
  405. .radio_addr = ADDR_UNSET,
  406. .input = {{
  407. .type = CX88_VMUX_COMPOSITE1,
  408. .vmux = 1,
  409. .gpio0 = 0x000027df,
  410. },{
  411. .type = CX88_VMUX_SVIDEO,
  412. .vmux = 2,
  413. .gpio0 = 0x000027df,
  414. }},
  415. .dvb = 1,
  416. },
  417. [CX88_BOARD_KWORLD_LTV883] = {
  418. .name = "KWorld LTV883RF",
  419. .tuner_type = TUNER_TNF_8831BGFF,
  420. .radio_type = UNSET,
  421. .tuner_addr = ADDR_UNSET,
  422. .radio_addr = ADDR_UNSET,
  423. .input = {{
  424. .type = CX88_VMUX_TELEVISION,
  425. .vmux = 0,
  426. .gpio0 = 0x07f8,
  427. },{
  428. .type = CX88_VMUX_DEBUG,
  429. .vmux = 0,
  430. .gpio0 = 0x07f9, // mono from tuner chip
  431. },{
  432. .type = CX88_VMUX_COMPOSITE1,
  433. .vmux = 1,
  434. .gpio0 = 0x000007fa,
  435. },{
  436. .type = CX88_VMUX_SVIDEO,
  437. .vmux = 2,
  438. .gpio0 = 0x000007fa,
  439. }},
  440. .radio = {
  441. .type = CX88_RADIO,
  442. .gpio0 = 0x000007f8,
  443. },
  444. },
  445. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
  446. .name = "DViCO FusionHDTV 3 Gold-Q",
  447. .tuner_type = TUNER_MICROTUNE_4042FI5,
  448. .radio_type = UNSET,
  449. .tuner_addr = ADDR_UNSET,
  450. .radio_addr = ADDR_UNSET,
  451. /*
  452. GPIO[0] resets DT3302 DTV receiver
  453. 0 - reset asserted
  454. 1 - normal operation
  455. GPIO[1] mutes analog audio output connector
  456. 0 - enable selected source
  457. 1 - mute
  458. GPIO[2] selects source for analog audio output connector
  459. 0 - analog audio input connector on tab
  460. 1 - analog DAC output from CX23881 chip
  461. GPIO[3] selects RF input connector on tuner module
  462. 0 - RF connector labeled CABLE
  463. 1 - RF connector labeled ANT
  464. GPIO[4] selects high RF for QAM256 mode
  465. 0 - normal RF
  466. 1 - high RF
  467. */
  468. .input = {{
  469. .type = CX88_VMUX_TELEVISION,
  470. .vmux = 0,
  471. .gpio0 = 0x0f0d,
  472. },{
  473. .type = CX88_VMUX_CABLE,
  474. .vmux = 0,
  475. .gpio0 = 0x0f05,
  476. },{
  477. .type = CX88_VMUX_COMPOSITE1,
  478. .vmux = 1,
  479. .gpio0 = 0x0f00,
  480. },{
  481. .type = CX88_VMUX_SVIDEO,
  482. .vmux = 2,
  483. .gpio0 = 0x0f00,
  484. }},
  485. .dvb = 1,
  486. },
  487. [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
  488. .name = "Hauppauge Nova-T DVB-T",
  489. .tuner_type = TUNER_ABSENT,
  490. .radio_type = UNSET,
  491. .tuner_addr = ADDR_UNSET,
  492. .radio_addr = ADDR_UNSET,
  493. .input = {{
  494. .type = CX88_VMUX_DVB,
  495. .vmux = 0,
  496. }},
  497. .dvb = 1,
  498. },
  499. [CX88_BOARD_CONEXANT_DVB_T1] = {
  500. .name = "Conexant DVB-T reference design",
  501. .tuner_type = TUNER_ABSENT,
  502. .radio_type = UNSET,
  503. .tuner_addr = ADDR_UNSET,
  504. .radio_addr = ADDR_UNSET,
  505. .input = {{
  506. .type = CX88_VMUX_DVB,
  507. .vmux = 0,
  508. }},
  509. .dvb = 1,
  510. },
  511. [CX88_BOARD_PROVIDEO_PV259] = {
  512. .name = "Provideo PV259",
  513. .tuner_type = TUNER_PHILIPS_FQ1216ME,
  514. .radio_type = UNSET,
  515. .tuner_addr = ADDR_UNSET,
  516. .radio_addr = ADDR_UNSET,
  517. .input = {{
  518. .type = CX88_VMUX_TELEVISION,
  519. .vmux = 0,
  520. }},
  521. .blackbird = 1,
  522. },
  523. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
  524. .name = "DViCO FusionHDTV DVB-T Plus",
  525. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  526. .radio_type = UNSET,
  527. .tuner_addr = ADDR_UNSET,
  528. .radio_addr = ADDR_UNSET,
  529. .input = {{
  530. .type = CX88_VMUX_COMPOSITE1,
  531. .vmux = 1,
  532. .gpio0 = 0x000027df,
  533. },{
  534. .type = CX88_VMUX_SVIDEO,
  535. .vmux = 2,
  536. .gpio0 = 0x000027df,
  537. }},
  538. .dvb = 1,
  539. },
  540. [CX88_BOARD_DNTV_LIVE_DVB_T] = {
  541. .name = "digitalnow DNTV Live! DVB-T",
  542. .tuner_type = TUNER_ABSENT,
  543. .radio_type = UNSET,
  544. .tuner_addr = ADDR_UNSET,
  545. .radio_addr = ADDR_UNSET,
  546. .input = {{
  547. .type = CX88_VMUX_COMPOSITE1,
  548. .vmux = 1,
  549. .gpio0 = 0x00000700,
  550. .gpio2 = 0x00000101,
  551. },{
  552. .type = CX88_VMUX_SVIDEO,
  553. .vmux = 2,
  554. .gpio0 = 0x00000700,
  555. .gpio2 = 0x00000101,
  556. }},
  557. .dvb = 1,
  558. },
  559. [CX88_BOARD_PCHDTV_HD3000] = {
  560. .name = "pcHDTV HD3000 HDTV",
  561. .tuner_type = TUNER_THOMSON_DTT7610,
  562. .radio_type = UNSET,
  563. .tuner_addr = ADDR_UNSET,
  564. .radio_addr = ADDR_UNSET,
  565. .input = {{
  566. .type = CX88_VMUX_TELEVISION,
  567. .vmux = 0,
  568. .gpio0 = 0x00008484,
  569. .gpio1 = 0x00000000,
  570. .gpio2 = 0x00000000,
  571. .gpio3 = 0x00000000,
  572. },{
  573. .type = CX88_VMUX_COMPOSITE1,
  574. .vmux = 1,
  575. .gpio0 = 0x00008400,
  576. .gpio1 = 0x00000000,
  577. .gpio2 = 0x00000000,
  578. .gpio3 = 0x00000000,
  579. },{
  580. .type = CX88_VMUX_SVIDEO,
  581. .vmux = 2,
  582. .gpio0 = 0x00008400,
  583. .gpio1 = 0x00000000,
  584. .gpio2 = 0x00000000,
  585. .gpio3 = 0x00000000,
  586. }},
  587. .radio = {
  588. .type = CX88_RADIO,
  589. .vmux = 2,
  590. .gpio0 = 0x00008400,
  591. .gpio1 = 0x00000000,
  592. .gpio2 = 0x00000000,
  593. .gpio3 = 0x00000000,
  594. },
  595. .dvb = 1,
  596. },
  597. [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
  598. // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
  599. // GPIO values obtained from regspy, courtesy Sean Covel
  600. .name = "Hauppauge WinTV 28xxx (Roslyn) models",
  601. .tuner_type = UNSET,
  602. .radio_type = UNSET,
  603. .tuner_addr = ADDR_UNSET,
  604. .radio_addr = ADDR_UNSET,
  605. .input = {{
  606. .type = CX88_VMUX_TELEVISION,
  607. .vmux = 0,
  608. .gpio0 = 0xed12, /* internal decoder */
  609. .gpio2 = 0x00ff,
  610. },{
  611. .type = CX88_VMUX_DEBUG,
  612. .vmux = 0,
  613. .gpio0 = 0xff01, /* mono from tuner chip */
  614. },{
  615. .type = CX88_VMUX_COMPOSITE1,
  616. .vmux = 1,
  617. .gpio0 = 0xff02,
  618. },{
  619. .type = CX88_VMUX_SVIDEO,
  620. .vmux = 2,
  621. .gpio0 = 0xed92,
  622. .gpio2 = 0x00ff,
  623. }},
  624. .radio = {
  625. .type = CX88_RADIO,
  626. .gpio0 = 0xed96,
  627. .gpio2 = 0x00ff,
  628. },
  629. .blackbird = 1,
  630. },
  631. [CX88_BOARD_DIGITALLOGIC_MEC] = {
  632. .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
  633. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  634. .radio_type = UNSET,
  635. .tuner_addr = ADDR_UNSET,
  636. .radio_addr = ADDR_UNSET,
  637. .tda9887_conf = TDA9887_PRESENT,
  638. .input = {{
  639. .type = CX88_VMUX_TELEVISION,
  640. .vmux = 0,
  641. .gpio0 = 0x00009d80,
  642. },{
  643. .type = CX88_VMUX_COMPOSITE1,
  644. .vmux = 1,
  645. .gpio0 = 0x00009d76,
  646. },{
  647. .type = CX88_VMUX_SVIDEO,
  648. .vmux = 2,
  649. .gpio0 = 0x00009d76,
  650. }},
  651. .radio = {
  652. .type = CX88_RADIO,
  653. .gpio0 = 0x00009d00,
  654. },
  655. .blackbird = 1,
  656. },
  657. [CX88_BOARD_IODATA_GVBCTV7E] = {
  658. .name = "IODATA GV/BCTV7E",
  659. .tuner_type = TUNER_PHILIPS_FQ1286,
  660. .radio_type = UNSET,
  661. .tuner_addr = ADDR_UNSET,
  662. .radio_addr = ADDR_UNSET,
  663. .tda9887_conf = TDA9887_PRESENT,
  664. .input = {{
  665. .type = CX88_VMUX_TELEVISION,
  666. .vmux = 1,
  667. .gpio1 = 0x0000e03f,
  668. },{
  669. .type = CX88_VMUX_COMPOSITE1,
  670. .vmux = 2,
  671. .gpio1 = 0x0000e07f,
  672. },{
  673. .type = CX88_VMUX_SVIDEO,
  674. .vmux = 3,
  675. .gpio1 = 0x0000e07f,
  676. }}
  677. },
  678. [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
  679. .name = "PixelView PlayTV Ultra Pro (Stereo)",
  680. /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
  681. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  682. .radio_type = UNSET,
  683. .tuner_addr = ADDR_UNSET,
  684. .radio_addr = ADDR_UNSET,
  685. .input = {{
  686. .type = CX88_VMUX_TELEVISION,
  687. .vmux = 0,
  688. .gpio0 = 0xbf61, /* internal decoder */
  689. },{
  690. .type = CX88_VMUX_COMPOSITE1,
  691. .vmux = 1,
  692. .gpio0 = 0xbf63,
  693. },{
  694. .type = CX88_VMUX_SVIDEO,
  695. .vmux = 2,
  696. .gpio0 = 0xbf63,
  697. }},
  698. .radio = {
  699. .type = CX88_RADIO,
  700. .gpio0 = 0xbf60,
  701. },
  702. },
  703. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
  704. .name = "DViCO FusionHDTV 3 Gold-T",
  705. .tuner_type = TUNER_THOMSON_DTT7611,
  706. .radio_type = UNSET,
  707. .tuner_addr = ADDR_UNSET,
  708. .radio_addr = ADDR_UNSET,
  709. .input = {{
  710. .type = CX88_VMUX_TELEVISION,
  711. .vmux = 0,
  712. .gpio0 = 0x97ed,
  713. },{
  714. .type = CX88_VMUX_COMPOSITE1,
  715. .vmux = 1,
  716. .gpio0 = 0x97e9,
  717. },{
  718. .type = CX88_VMUX_SVIDEO,
  719. .vmux = 2,
  720. .gpio0 = 0x97e9,
  721. }},
  722. .dvb = 1,
  723. },
  724. [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
  725. .name = "ADS Tech Instant TV DVB-T PCI",
  726. .tuner_type = TUNER_ABSENT,
  727. .radio_type = UNSET,
  728. .tuner_addr = ADDR_UNSET,
  729. .radio_addr = ADDR_UNSET,
  730. .input = {{
  731. .type = CX88_VMUX_COMPOSITE1,
  732. .vmux = 1,
  733. .gpio0 = 0x0700,
  734. .gpio2 = 0x0101,
  735. },{
  736. .type = CX88_VMUX_SVIDEO,
  737. .vmux = 2,
  738. .gpio0 = 0x0700,
  739. .gpio2 = 0x0101,
  740. }},
  741. .dvb = 1,
  742. },
  743. [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
  744. .name = "TerraTec Cinergy 1400 DVB-T",
  745. .tuner_type = TUNER_ABSENT,
  746. .input = {{
  747. .type = CX88_VMUX_DVB,
  748. .vmux = 0,
  749. }},
  750. .dvb = 1,
  751. },
  752. [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
  753. .name = "DViCO FusionHDTV 5 Gold",
  754. .tuner_type = TUNER_LG_TDVS_H062F,
  755. .radio_type = UNSET,
  756. .tuner_addr = ADDR_UNSET,
  757. .radio_addr = ADDR_UNSET,
  758. .tda9887_conf = TDA9887_PRESENT,
  759. .input = {{
  760. .type = CX88_VMUX_TELEVISION,
  761. .vmux = 0,
  762. .gpio0 = 0x87fd,
  763. },{
  764. .type = CX88_VMUX_COMPOSITE1,
  765. .vmux = 1,
  766. .gpio0 = 0x87f9,
  767. },{
  768. .type = CX88_VMUX_SVIDEO,
  769. .vmux = 2,
  770. .gpio0 = 0x87f9,
  771. }},
  772. .dvb = 1,
  773. },
  774. [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
  775. .name = "AverMedia UltraTV Media Center PCI 550",
  776. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  777. .radio_type = UNSET,
  778. .tuner_addr = ADDR_UNSET,
  779. .radio_addr = ADDR_UNSET,
  780. .tda9887_conf = TDA9887_PRESENT,
  781. .blackbird = 1,
  782. .input = {{
  783. .type = CX88_VMUX_COMPOSITE1,
  784. .vmux = 0,
  785. .gpio0 = 0x0000cd73,
  786. },{
  787. .type = CX88_VMUX_SVIDEO,
  788. .vmux = 1,
  789. .gpio0 = 0x0000cd73,
  790. },{
  791. .type = CX88_VMUX_TELEVISION,
  792. .vmux = 3,
  793. .gpio0 = 0x0000cdb3,
  794. }},
  795. .radio = {
  796. .type = CX88_RADIO,
  797. .vmux = 2,
  798. .gpio0 = 0x0000cdf3,
  799. },
  800. },
  801. [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
  802. /* Alexander Wold <awold@bigfoot.com> */
  803. .name = "Kworld V-Stream Xpert DVD",
  804. .tuner_type = UNSET,
  805. .input = {{
  806. .type = CX88_VMUX_COMPOSITE1,
  807. .vmux = 1,
  808. .gpio0 = 0x03000000,
  809. .gpio1 = 0x01000000,
  810. .gpio2 = 0x02000000,
  811. .gpio3 = 0x00100000,
  812. },{
  813. .type = CX88_VMUX_SVIDEO,
  814. .vmux = 2,
  815. .gpio0 = 0x03000000,
  816. .gpio1 = 0x01000000,
  817. .gpio2 = 0x02000000,
  818. .gpio3 = 0x00100000,
  819. }},
  820. },
  821. [CX88_BOARD_ATI_HDTVWONDER] = {
  822. .name = "ATI HDTV Wonder",
  823. .tuner_type = TUNER_PHILIPS_TUV1236D,
  824. .radio_type = UNSET,
  825. .tuner_addr = ADDR_UNSET,
  826. .radio_addr = ADDR_UNSET,
  827. .input = {{
  828. .type = CX88_VMUX_TELEVISION,
  829. .vmux = 0,
  830. .gpio0 = 0x00000ff7,
  831. .gpio1 = 0x000000ff,
  832. .gpio2 = 0x00000001,
  833. .gpio3 = 0x00000000,
  834. },{
  835. .type = CX88_VMUX_COMPOSITE1,
  836. .vmux = 1,
  837. .gpio0 = 0x00000ffe,
  838. .gpio1 = 0x000000ff,
  839. .gpio2 = 0x00000001,
  840. .gpio3 = 0x00000000,
  841. },{
  842. .type = CX88_VMUX_SVIDEO,
  843. .vmux = 2,
  844. .gpio0 = 0x00000ffe,
  845. .gpio1 = 0x000000ff,
  846. .gpio2 = 0x00000001,
  847. .gpio3 = 0x00000000,
  848. }},
  849. .dvb = 1,
  850. },
  851. [CX88_BOARD_WINFAST_DTV1000] = {
  852. .name = "WinFast DTV1000-T",
  853. .tuner_type = TUNER_ABSENT,
  854. .radio_type = UNSET,
  855. .tuner_addr = ADDR_UNSET,
  856. .radio_addr = ADDR_UNSET,
  857. .input = {{
  858. .type = CX88_VMUX_DVB,
  859. .vmux = 0,
  860. }},
  861. .dvb = 1,
  862. },
  863. [CX88_BOARD_AVERTV_303] = {
  864. .name = "AVerTV 303 (M126)",
  865. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  866. .radio_type = UNSET,
  867. .tuner_addr = ADDR_UNSET,
  868. .radio_addr = ADDR_UNSET,
  869. .tda9887_conf = TDA9887_PRESENT,
  870. .input = {{
  871. .type = CX88_VMUX_TELEVISION,
  872. .vmux = 0,
  873. .gpio0 = 0x00ff,
  874. .gpio1 = 0xe09f,
  875. .gpio2 = 0x0010,
  876. .gpio3 = 0x0000,
  877. },{
  878. .type = CX88_VMUX_COMPOSITE1,
  879. .vmux = 1,
  880. .gpio0 = 0x00ff,
  881. .gpio1 = 0xe05f,
  882. .gpio2 = 0x0010,
  883. .gpio3 = 0x0000,
  884. },{
  885. .type = CX88_VMUX_SVIDEO,
  886. .vmux = 2,
  887. .gpio0 = 0x00ff,
  888. .gpio1 = 0xe05f,
  889. .gpio2 = 0x0010,
  890. .gpio3 = 0x0000,
  891. }},
  892. },
  893. };
  894. const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
  895. /* ------------------------------------------------------------------ */
  896. /* PCI subsystem IDs */
  897. struct cx88_subid cx88_subids[] = {
  898. {
  899. .subvendor = 0x0070,
  900. .subdevice = 0x3400,
  901. .card = CX88_BOARD_HAUPPAUGE,
  902. },{
  903. .subvendor = 0x0070,
  904. .subdevice = 0x3401,
  905. .card = CX88_BOARD_HAUPPAUGE,
  906. },{
  907. .subvendor = 0x14c7,
  908. .subdevice = 0x0106,
  909. .card = CX88_BOARD_GDI,
  910. },{
  911. .subvendor = 0x14c7,
  912. .subdevice = 0x0107, /* with mpeg encoder */
  913. .card = CX88_BOARD_GDI,
  914. },{
  915. .subvendor = PCI_VENDOR_ID_ATI,
  916. .subdevice = 0x00f8,
  917. .card = CX88_BOARD_ATI_WONDER_PRO,
  918. },{
  919. .subvendor = 0x107d,
  920. .subdevice = 0x6611,
  921. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  922. },{
  923. .subvendor = 0x107d,
  924. .subdevice = 0x6613, /* NTSC */
  925. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  926. },{
  927. .subvendor = 0x107d,
  928. .subdevice = 0x6620,
  929. .card = CX88_BOARD_WINFAST_DV2000,
  930. },{
  931. .subvendor = 0x107d,
  932. .subdevice = 0x663b,
  933. .card = CX88_BOARD_LEADTEK_PVR2000,
  934. },{
  935. .subvendor = 0x107d,
  936. .subdevice = 0x663C,
  937. .card = CX88_BOARD_LEADTEK_PVR2000,
  938. },{
  939. .subvendor = 0x1461,
  940. .subdevice = 0x000b,
  941. .card = CX88_BOARD_AVERTV_STUDIO_303,
  942. },{
  943. .subvendor = 0x1462,
  944. .subdevice = 0x8606,
  945. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  946. },{
  947. .subvendor = 0x10fc,
  948. .subdevice = 0xd003,
  949. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  950. },{
  951. .subvendor = 0x1043,
  952. .subdevice = 0x4823, /* with mpeg encoder */
  953. .card = CX88_BOARD_ASUS_PVR_416,
  954. },{
  955. .subvendor = 0x17de,
  956. .subdevice = 0x08a6,
  957. .card = CX88_BOARD_KWORLD_DVB_T,
  958. },{
  959. .subvendor = 0x18ac,
  960. .subdevice = 0xd810,
  961. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  962. },{
  963. .subvendor = 0x18ac,
  964. .subdevice = 0xd820,
  965. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  966. },{
  967. .subvendor = 0x18ac,
  968. .subdevice = 0xdb00,
  969. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  970. },{
  971. .subvendor = 0x0070,
  972. .subdevice = 0x9002,
  973. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  974. },{
  975. .subvendor = 0x14f1,
  976. .subdevice = 0x0187,
  977. .card = CX88_BOARD_CONEXANT_DVB_T1,
  978. },{
  979. .subvendor = 0x1540,
  980. .subdevice = 0x2580,
  981. .card = CX88_BOARD_PROVIDEO_PV259,
  982. },{
  983. .subvendor = 0x18ac,
  984. .subdevice = 0xdb10,
  985. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  986. },{
  987. .subvendor = 0x1554,
  988. .subdevice = 0x4811,
  989. .card = CX88_BOARD_PIXELVIEW,
  990. },{
  991. .subvendor = 0x7063,
  992. .subdevice = 0x3000, /* HD-3000 card */
  993. .card = CX88_BOARD_PCHDTV_HD3000,
  994. },{
  995. .subvendor = 0x17de,
  996. .subdevice = 0xa8a6,
  997. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  998. },{
  999. .subvendor = 0x0070,
  1000. .subdevice = 0x2801,
  1001. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  1002. },{
  1003. .subvendor = 0x14f1,
  1004. .subdevice = 0x0342,
  1005. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  1006. },{
  1007. .subvendor = 0x10fc,
  1008. .subdevice = 0xd035,
  1009. .card = CX88_BOARD_IODATA_GVBCTV7E,
  1010. },{
  1011. .subvendor = 0x1421,
  1012. .subdevice = 0x0334,
  1013. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  1014. },{
  1015. .subvendor = 0x153b,
  1016. .subdevice = 0x1166,
  1017. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  1018. },{
  1019. .subvendor = 0x18ac,
  1020. .subdevice = 0xd500,
  1021. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  1022. },{
  1023. .subvendor = 0x1461,
  1024. .subdevice = 0x8011,
  1025. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  1026. },{
  1027. .subvendor = PCI_VENDOR_ID_ATI,
  1028. .subdevice = 0xa101,
  1029. .card = CX88_BOARD_ATI_HDTVWONDER,
  1030. },{
  1031. .subvendor = 0x107d,
  1032. .subdevice = 0x665f,
  1033. .card = CX88_BOARD_WINFAST_DTV1000,
  1034. },{
  1035. .subvendor = 0x1461,
  1036. .subdevice = 0x000a,
  1037. .card = CX88_BOARD_AVERTV_303,
  1038. },
  1039. };
  1040. const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
  1041. /* ----------------------------------------------------------------------- */
  1042. /* some leadtek specific stuff */
  1043. static void __devinit leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1044. {
  1045. /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
  1046. * any others.
  1047. *
  1048. * Byte 0 is 1 on the NTSC board.
  1049. */
  1050. if (eeprom_data[4] != 0x7d ||
  1051. eeprom_data[5] != 0x10 ||
  1052. eeprom_data[7] != 0x66) {
  1053. printk(KERN_WARNING "%s: Leadtek eeprom invalid.\n",
  1054. core->name);
  1055. return;
  1056. }
  1057. core->has_radio = 1;
  1058. core->tuner_type = (eeprom_data[6] == 0x13) ? 43 : 38;
  1059. printk(KERN_INFO "%s: Leadtek Winfast 2000XP Expert config: "
  1060. "tuner=%d, eeprom[0]=0x%02x\n",
  1061. core->name, core->tuner_type, eeprom_data[0]);
  1062. }
  1063. /* ----------------------------------------------------------------------- */
  1064. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1065. {
  1066. struct tveeprom tv;
  1067. tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
  1068. core->tuner_type = tv.tuner_type;
  1069. core->has_radio = tv.has_radio;
  1070. /* Make sure we support the board model */
  1071. switch (tv.model)
  1072. {
  1073. case 90002: /* Nova-T-PCI (9002) */
  1074. case 92001: /* Nova-S-Plus (Video and IR) */
  1075. case 92002: /* Nova-S-Plus (Video and IR) */
  1076. case 90003: /* Nova-T-PCI (9002 No RF out) */
  1077. case 90500: /* Nova-T-PCI (oem) */
  1078. case 90501: /* Nova-T-PCI (oem/IR) */
  1079. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  1080. /* known */
  1081. break;
  1082. default:
  1083. printk("%s: warning: unknown hauppauge model #%d\n",
  1084. core->name, tv.model);
  1085. break;
  1086. }
  1087. printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
  1088. core->name, tv.model);
  1089. }
  1090. /* ----------------------------------------------------------------------- */
  1091. /* some GDI (was: Modular Technology) specific stuff */
  1092. static struct {
  1093. int id;
  1094. int fm;
  1095. char *name;
  1096. } gdi_tuner[] = {
  1097. [ 0x01 ] = { .id = TUNER_ABSENT,
  1098. .name = "NTSC_M" },
  1099. [ 0x02 ] = { .id = TUNER_ABSENT,
  1100. .name = "PAL_B" },
  1101. [ 0x03 ] = { .id = TUNER_ABSENT,
  1102. .name = "PAL_I" },
  1103. [ 0x04 ] = { .id = TUNER_ABSENT,
  1104. .name = "PAL_D" },
  1105. [ 0x05 ] = { .id = TUNER_ABSENT,
  1106. .name = "SECAM" },
  1107. [ 0x10 ] = { .id = TUNER_ABSENT,
  1108. .fm = 1,
  1109. .name = "TEMIC_4049" },
  1110. [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
  1111. .name = "TEMIC_4136" },
  1112. [ 0x12 ] = { .id = TUNER_ABSENT,
  1113. .name = "TEMIC_4146" },
  1114. [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
  1115. .fm = 1,
  1116. .name = "PHILIPS_FQ1216_MK3" },
  1117. [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
  1118. .name = "PHILIPS_FQ1236_MK3" },
  1119. [ 0x22 ] = { .id = TUNER_ABSENT,
  1120. .name = "PHILIPS_FI1236_MK3" },
  1121. [ 0x23 ] = { .id = TUNER_ABSENT,
  1122. .name = "PHILIPS_FI1216_MK3" },
  1123. };
  1124. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1125. {
  1126. char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  1127. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  1128. printk(KERN_INFO "%s: GDI: tuner=%s\n", core->name,
  1129. name ? name : "unknown");
  1130. if (NULL == name)
  1131. return;
  1132. core->tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  1133. core->has_radio = gdi_tuner[eeprom_data[0x0d]].fm;
  1134. }
  1135. /* ----------------------------------------------------------------------- */
  1136. void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  1137. {
  1138. int i;
  1139. if (0 == pci->subsystem_vendor &&
  1140. 0 == pci->subsystem_device) {
  1141. printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
  1142. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  1143. "%s: workaround that. Redirect complaints to the vendor of\n"
  1144. "%s: the TV card. Best regards,\n"
  1145. "%s: -- tux\n",
  1146. core->name,core->name,core->name,core->name,core->name);
  1147. } else {
  1148. printk("%s: Your board isn't known (yet) to the driver. You can\n"
  1149. "%s: try to pick one of the existing card configs via\n"
  1150. "%s: card=<n> insmod option. Updating to the latest\n"
  1151. "%s: version might help as well.\n",
  1152. core->name,core->name,core->name,core->name);
  1153. }
  1154. printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
  1155. core->name);
  1156. for (i = 0; i < cx88_bcount; i++)
  1157. printk("%s: card=%d -> %s\n",
  1158. core->name, i, cx88_boards[i].name);
  1159. }
  1160. void cx88_card_setup(struct cx88_core *core)
  1161. {
  1162. static u8 eeprom[256];
  1163. if (0 == core->i2c_rc) {
  1164. core->i2c_client.addr = 0xa0 >> 1;
  1165. tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom));
  1166. }
  1167. switch (core->board) {
  1168. case CX88_BOARD_HAUPPAUGE:
  1169. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  1170. if (0 == core->i2c_rc)
  1171. hauppauge_eeprom(core,eeprom+8);
  1172. break;
  1173. case CX88_BOARD_GDI:
  1174. if (0 == core->i2c_rc)
  1175. gdi_eeprom(core,eeprom);
  1176. break;
  1177. case CX88_BOARD_WINFAST2000XP_EXPERT:
  1178. if (0 == core->i2c_rc)
  1179. leadtek_eeprom(core,eeprom);
  1180. break;
  1181. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  1182. if (0 == core->i2c_rc)
  1183. hauppauge_eeprom(core,eeprom);
  1184. break;
  1185. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  1186. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  1187. /* GPIO0:0 is hooked to mt352 reset pin */
  1188. cx_set(MO_GP0_IO, 0x00000101);
  1189. cx_clear(MO_GP0_IO, 0x00000001);
  1190. msleep(1);
  1191. cx_set(MO_GP0_IO, 0x00000101);
  1192. break;
  1193. case CX88_BOARD_KWORLD_DVB_T:
  1194. case CX88_BOARD_DNTV_LIVE_DVB_T:
  1195. cx_set(MO_GP0_IO, 0x00000707);
  1196. cx_set(MO_GP2_IO, 0x00000101);
  1197. cx_clear(MO_GP2_IO, 0x00000001);
  1198. msleep(1);
  1199. cx_clear(MO_GP0_IO, 0x00000007);
  1200. cx_set(MO_GP2_IO, 0x00000101);
  1201. break;
  1202. case CX88_BOARD_ATI_HDTVWONDER:
  1203. if (0 == core->i2c_rc) {
  1204. /* enable tuner */
  1205. int i;
  1206. u8 buffer [] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 };
  1207. core->i2c_client.addr = 0x0a;
  1208. for (i = 0; i < 5; i++)
  1209. if (2 != i2c_master_send(&core->i2c_client,&buffer[i*2],2))
  1210. printk(KERN_WARNING "%s: Unable to enable tuner(%i).\n",
  1211. core->name, i);
  1212. }
  1213. break;
  1214. }
  1215. if (cx88_boards[core->board].radio.type == CX88_RADIO)
  1216. core->has_radio = 1;
  1217. }
  1218. /* ------------------------------------------------------------------ */
  1219. EXPORT_SYMBOL(cx88_boards);
  1220. EXPORT_SYMBOL(cx88_bcount);
  1221. EXPORT_SYMBOL(cx88_subids);
  1222. EXPORT_SYMBOL(cx88_idcount);
  1223. EXPORT_SYMBOL(cx88_card_list);
  1224. EXPORT_SYMBOL(cx88_card_setup);
  1225. /*
  1226. * Local variables:
  1227. * c-basic-offset: 8
  1228. * End:
  1229. * 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
  1230. */