PageRenderTime 99ms CodeModel.GetById 36ms RepoModel.GetById 2ms app.codeStats 0ms

/drivers/media/video/cx88/cx88-cards.c

https://bitbucket.org/slukk/jb-tsm-kernel-4.2
C | 3563 lines | 3203 code | 110 blank | 250 comment | 108 complexity | a3966c00081f41d60f2128e627aec482 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
  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 <linux/slab.h>
  27. #include "cx88.h"
  28. #include "tea5767.h"
  29. static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  30. static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  31. static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  32. module_param_array(tuner, int, NULL, 0444);
  33. module_param_array(radio, int, NULL, 0444);
  34. module_param_array(card, int, NULL, 0444);
  35. MODULE_PARM_DESC(tuner,"tuner type");
  36. MODULE_PARM_DESC(radio,"radio tuner type");
  37. MODULE_PARM_DESC(card,"card type");
  38. static unsigned int latency = UNSET;
  39. module_param(latency,int,0444);
  40. MODULE_PARM_DESC(latency,"pci latency timer");
  41. static int disable_ir;
  42. module_param(disable_ir, int, 0444);
  43. MODULE_PARM_DESC(disable_ir, "Disable IR support");
  44. #define info_printk(core, fmt, arg...) \
  45. printk(KERN_INFO "%s: " fmt, core->name , ## arg)
  46. #define warn_printk(core, fmt, arg...) \
  47. printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
  48. #define err_printk(core, fmt, arg...) \
  49. printk(KERN_ERR "%s: " fmt, core->name , ## arg)
  50. /* ------------------------------------------------------------------ */
  51. /* board config info */
  52. /* If radio_type !=UNSET, radio_addr should be specified
  53. */
  54. static const struct cx88_board cx88_boards[] = {
  55. [CX88_BOARD_UNKNOWN] = {
  56. .name = "UNKNOWN/GENERIC",
  57. .tuner_type = UNSET,
  58. .radio_type = UNSET,
  59. .tuner_addr = ADDR_UNSET,
  60. .radio_addr = ADDR_UNSET,
  61. .input = {{
  62. .type = CX88_VMUX_COMPOSITE1,
  63. .vmux = 0,
  64. },{
  65. .type = CX88_VMUX_COMPOSITE2,
  66. .vmux = 1,
  67. },{
  68. .type = CX88_VMUX_COMPOSITE3,
  69. .vmux = 2,
  70. },{
  71. .type = CX88_VMUX_COMPOSITE4,
  72. .vmux = 3,
  73. }},
  74. },
  75. [CX88_BOARD_HAUPPAUGE] = {
  76. .name = "Hauppauge WinTV 34xxx models",
  77. .tuner_type = UNSET,
  78. .radio_type = UNSET,
  79. .tuner_addr = ADDR_UNSET,
  80. .radio_addr = ADDR_UNSET,
  81. .tda9887_conf = TDA9887_PRESENT,
  82. .input = {{
  83. .type = CX88_VMUX_TELEVISION,
  84. .vmux = 0,
  85. .gpio0 = 0xff00, // internal decoder
  86. },{
  87. .type = CX88_VMUX_DEBUG,
  88. .vmux = 0,
  89. .gpio0 = 0xff01, // mono from tuner chip
  90. },{
  91. .type = CX88_VMUX_COMPOSITE1,
  92. .vmux = 1,
  93. .gpio0 = 0xff02,
  94. },{
  95. .type = CX88_VMUX_SVIDEO,
  96. .vmux = 2,
  97. .gpio0 = 0xff02,
  98. }},
  99. .radio = {
  100. .type = CX88_RADIO,
  101. .gpio0 = 0xff01,
  102. },
  103. },
  104. [CX88_BOARD_GDI] = {
  105. .name = "GDI Black Gold",
  106. .tuner_type = UNSET,
  107. .radio_type = UNSET,
  108. .tuner_addr = ADDR_UNSET,
  109. .radio_addr = ADDR_UNSET,
  110. .input = {{
  111. .type = CX88_VMUX_TELEVISION,
  112. .vmux = 0,
  113. },{
  114. .type = CX88_VMUX_SVIDEO,
  115. .vmux = 2,
  116. }},
  117. },
  118. [CX88_BOARD_PIXELVIEW] = {
  119. .name = "PixelView",
  120. .tuner_type = TUNER_PHILIPS_PAL,
  121. .radio_type = UNSET,
  122. .tuner_addr = ADDR_UNSET,
  123. .radio_addr = ADDR_UNSET,
  124. .input = {{
  125. .type = CX88_VMUX_TELEVISION,
  126. .vmux = 0,
  127. .gpio0 = 0xff00, // internal decoder
  128. },{
  129. .type = CX88_VMUX_COMPOSITE1,
  130. .vmux = 1,
  131. },{
  132. .type = CX88_VMUX_SVIDEO,
  133. .vmux = 2,
  134. }},
  135. .radio = {
  136. .type = CX88_RADIO,
  137. .gpio0 = 0xff10,
  138. },
  139. },
  140. [CX88_BOARD_ATI_WONDER_PRO] = {
  141. .name = "ATI TV Wonder Pro",
  142. .tuner_type = TUNER_PHILIPS_4IN1,
  143. .radio_type = UNSET,
  144. .tuner_addr = ADDR_UNSET,
  145. .radio_addr = ADDR_UNSET,
  146. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
  147. .input = {{
  148. .type = CX88_VMUX_TELEVISION,
  149. .vmux = 0,
  150. .gpio0 = 0x03ff,
  151. },{
  152. .type = CX88_VMUX_COMPOSITE1,
  153. .vmux = 1,
  154. .gpio0 = 0x03fe,
  155. },{
  156. .type = CX88_VMUX_SVIDEO,
  157. .vmux = 2,
  158. .gpio0 = 0x03fe,
  159. }},
  160. },
  161. [CX88_BOARD_WINFAST2000XP_EXPERT] = {
  162. .name = "Leadtek Winfast 2000XP Expert",
  163. .tuner_type = TUNER_PHILIPS_4IN1,
  164. .radio_type = UNSET,
  165. .tuner_addr = ADDR_UNSET,
  166. .radio_addr = ADDR_UNSET,
  167. .tda9887_conf = TDA9887_PRESENT,
  168. .input = {{
  169. .type = CX88_VMUX_TELEVISION,
  170. .vmux = 0,
  171. .gpio0 = 0x00F5e700,
  172. .gpio1 = 0x00003004,
  173. .gpio2 = 0x00F5e700,
  174. .gpio3 = 0x02000000,
  175. },{
  176. .type = CX88_VMUX_COMPOSITE1,
  177. .vmux = 1,
  178. .gpio0 = 0x00F5c700,
  179. .gpio1 = 0x00003004,
  180. .gpio2 = 0x00F5c700,
  181. .gpio3 = 0x02000000,
  182. },{
  183. .type = CX88_VMUX_SVIDEO,
  184. .vmux = 2,
  185. .gpio0 = 0x00F5c700,
  186. .gpio1 = 0x00003004,
  187. .gpio2 = 0x00F5c700,
  188. .gpio3 = 0x02000000,
  189. }},
  190. .radio = {
  191. .type = CX88_RADIO,
  192. .gpio0 = 0x00F5d700,
  193. .gpio1 = 0x00003004,
  194. .gpio2 = 0x00F5d700,
  195. .gpio3 = 0x02000000,
  196. },
  197. },
  198. [CX88_BOARD_AVERTV_STUDIO_303] = {
  199. .name = "AverTV Studio 303 (M126)",
  200. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  201. .radio_type = UNSET,
  202. .tuner_addr = ADDR_UNSET,
  203. .radio_addr = ADDR_UNSET,
  204. .tda9887_conf = TDA9887_PRESENT,
  205. .input = {{
  206. .type = CX88_VMUX_TELEVISION,
  207. .vmux = 0,
  208. .gpio1 = 0xe09f,
  209. },{
  210. .type = CX88_VMUX_COMPOSITE1,
  211. .vmux = 1,
  212. .gpio1 = 0xe05f,
  213. },{
  214. .type = CX88_VMUX_SVIDEO,
  215. .vmux = 2,
  216. .gpio1 = 0xe05f,
  217. }},
  218. .radio = {
  219. .gpio1 = 0xe0df,
  220. .type = CX88_RADIO,
  221. },
  222. },
  223. [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
  224. // added gpio values thanks to Michal
  225. // values for PAL from DScaler
  226. .name = "MSI TV-@nywhere Master",
  227. .tuner_type = TUNER_MT2032,
  228. .radio_type = UNSET,
  229. .tuner_addr = ADDR_UNSET,
  230. .radio_addr = ADDR_UNSET,
  231. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
  232. .input = {{
  233. .type = CX88_VMUX_TELEVISION,
  234. .vmux = 0,
  235. .gpio0 = 0x000040bf,
  236. .gpio1 = 0x000080c0,
  237. .gpio2 = 0x0000ff40,
  238. },{
  239. .type = CX88_VMUX_COMPOSITE1,
  240. .vmux = 1,
  241. .gpio0 = 0x000040bf,
  242. .gpio1 = 0x000080c0,
  243. .gpio2 = 0x0000ff40,
  244. },{
  245. .type = CX88_VMUX_SVIDEO,
  246. .vmux = 2,
  247. .gpio0 = 0x000040bf,
  248. .gpio1 = 0x000080c0,
  249. .gpio2 = 0x0000ff40,
  250. }},
  251. .radio = {
  252. .type = CX88_RADIO,
  253. .vmux = 3,
  254. .gpio0 = 0x000040bf,
  255. .gpio1 = 0x000080c0,
  256. .gpio2 = 0x0000ff20,
  257. },
  258. },
  259. [CX88_BOARD_WINFAST_DV2000] = {
  260. .name = "Leadtek Winfast DV2000",
  261. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  262. .radio_type = UNSET,
  263. .tuner_addr = ADDR_UNSET,
  264. .radio_addr = ADDR_UNSET,
  265. .tda9887_conf = TDA9887_PRESENT,
  266. .input = {{
  267. .type = CX88_VMUX_TELEVISION,
  268. .vmux = 0,
  269. .gpio0 = 0x0035e700,
  270. .gpio1 = 0x00003004,
  271. .gpio2 = 0x0035e700,
  272. .gpio3 = 0x02000000,
  273. },{
  274. .type = CX88_VMUX_COMPOSITE1,
  275. .vmux = 1,
  276. .gpio0 = 0x0035c700,
  277. .gpio1 = 0x00003004,
  278. .gpio2 = 0x0035c700,
  279. .gpio3 = 0x02000000,
  280. },{
  281. .type = CX88_VMUX_SVIDEO,
  282. .vmux = 2,
  283. .gpio0 = 0x0035c700,
  284. .gpio1 = 0x0035c700,
  285. .gpio2 = 0x02000000,
  286. .gpio3 = 0x02000000,
  287. }},
  288. .radio = {
  289. .type = CX88_RADIO,
  290. .gpio0 = 0x0035d700,
  291. .gpio1 = 0x00007004,
  292. .gpio2 = 0x0035d700,
  293. .gpio3 = 0x02000000,
  294. },
  295. },
  296. [CX88_BOARD_LEADTEK_PVR2000] = {
  297. // gpio values for PAL version from regspy by DScaler
  298. .name = "Leadtek PVR 2000",
  299. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  300. .radio_type = UNSET,
  301. .tuner_addr = ADDR_UNSET,
  302. .radio_addr = ADDR_UNSET,
  303. .tda9887_conf = TDA9887_PRESENT,
  304. .input = {{
  305. .type = CX88_VMUX_TELEVISION,
  306. .vmux = 0,
  307. .gpio0 = 0x0000bde2,
  308. .audioroute = 1,
  309. },{
  310. .type = CX88_VMUX_COMPOSITE1,
  311. .vmux = 1,
  312. .gpio0 = 0x0000bde6,
  313. .audioroute = 1,
  314. },{
  315. .type = CX88_VMUX_SVIDEO,
  316. .vmux = 2,
  317. .gpio0 = 0x0000bde6,
  318. .audioroute = 1,
  319. }},
  320. .radio = {
  321. .type = CX88_RADIO,
  322. .gpio0 = 0x0000bd62,
  323. .audioroute = 1,
  324. },
  325. .mpeg = CX88_MPEG_BLACKBIRD,
  326. },
  327. [CX88_BOARD_IODATA_GVVCP3PCI] = {
  328. .name = "IODATA GV-VCP3/PCI",
  329. .tuner_type = TUNER_ABSENT,
  330. .radio_type = UNSET,
  331. .tuner_addr = ADDR_UNSET,
  332. .radio_addr = ADDR_UNSET,
  333. .input = {{
  334. .type = CX88_VMUX_COMPOSITE1,
  335. .vmux = 0,
  336. },{
  337. .type = CX88_VMUX_COMPOSITE2,
  338. .vmux = 1,
  339. },{
  340. .type = CX88_VMUX_SVIDEO,
  341. .vmux = 2,
  342. }},
  343. },
  344. [CX88_BOARD_PROLINK_PLAYTVPVR] = {
  345. .name = "Prolink PlayTV PVR",
  346. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  347. .radio_type = UNSET,
  348. .tuner_addr = ADDR_UNSET,
  349. .radio_addr = ADDR_UNSET,
  350. .tda9887_conf = TDA9887_PRESENT,
  351. .input = {{
  352. .type = CX88_VMUX_TELEVISION,
  353. .vmux = 0,
  354. .gpio0 = 0xbff0,
  355. },{
  356. .type = CX88_VMUX_COMPOSITE1,
  357. .vmux = 1,
  358. .gpio0 = 0xbff3,
  359. },{
  360. .type = CX88_VMUX_SVIDEO,
  361. .vmux = 2,
  362. .gpio0 = 0xbff3,
  363. }},
  364. .radio = {
  365. .type = CX88_RADIO,
  366. .gpio0 = 0xbff0,
  367. },
  368. },
  369. [CX88_BOARD_ASUS_PVR_416] = {
  370. .name = "ASUS PVR-416",
  371. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  372. .radio_type = UNSET,
  373. .tuner_addr = ADDR_UNSET,
  374. .radio_addr = ADDR_UNSET,
  375. .tda9887_conf = TDA9887_PRESENT,
  376. .input = {{
  377. .type = CX88_VMUX_TELEVISION,
  378. .vmux = 0,
  379. .gpio0 = 0x0000fde6,
  380. },{
  381. .type = CX88_VMUX_SVIDEO,
  382. .vmux = 2,
  383. .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
  384. .audioroute = 1,
  385. }},
  386. .radio = {
  387. .type = CX88_RADIO,
  388. .gpio0 = 0x0000fde2,
  389. },
  390. .mpeg = CX88_MPEG_BLACKBIRD,
  391. },
  392. [CX88_BOARD_MSI_TVANYWHERE] = {
  393. .name = "MSI TV-@nywhere",
  394. .tuner_type = TUNER_MT2032,
  395. .radio_type = UNSET,
  396. .tuner_addr = ADDR_UNSET,
  397. .radio_addr = ADDR_UNSET,
  398. .tda9887_conf = TDA9887_PRESENT,
  399. .input = {{
  400. .type = CX88_VMUX_TELEVISION,
  401. .vmux = 0,
  402. .gpio0 = 0x00000fbf,
  403. .gpio2 = 0x0000fc08,
  404. },{
  405. .type = CX88_VMUX_COMPOSITE1,
  406. .vmux = 1,
  407. .gpio0 = 0x00000fbf,
  408. .gpio2 = 0x0000fc68,
  409. },{
  410. .type = CX88_VMUX_SVIDEO,
  411. .vmux = 2,
  412. .gpio0 = 0x00000fbf,
  413. .gpio2 = 0x0000fc68,
  414. }},
  415. },
  416. [CX88_BOARD_KWORLD_DVB_T] = {
  417. .name = "KWorld/VStream XPert DVB-T",
  418. .tuner_type = TUNER_ABSENT,
  419. .radio_type = UNSET,
  420. .tuner_addr = ADDR_UNSET,
  421. .radio_addr = ADDR_UNSET,
  422. .input = {{
  423. .type = CX88_VMUX_COMPOSITE1,
  424. .vmux = 1,
  425. .gpio0 = 0x0700,
  426. .gpio2 = 0x0101,
  427. },{
  428. .type = CX88_VMUX_SVIDEO,
  429. .vmux = 2,
  430. .gpio0 = 0x0700,
  431. .gpio2 = 0x0101,
  432. }},
  433. .mpeg = CX88_MPEG_DVB,
  434. },
  435. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
  436. .name = "DViCO FusionHDTV DVB-T1",
  437. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  438. .radio_type = UNSET,
  439. .tuner_addr = ADDR_UNSET,
  440. .radio_addr = ADDR_UNSET,
  441. .input = {{
  442. .type = CX88_VMUX_COMPOSITE1,
  443. .vmux = 1,
  444. .gpio0 = 0x000027df,
  445. },{
  446. .type = CX88_VMUX_SVIDEO,
  447. .vmux = 2,
  448. .gpio0 = 0x000027df,
  449. }},
  450. .mpeg = CX88_MPEG_DVB,
  451. },
  452. [CX88_BOARD_KWORLD_LTV883] = {
  453. .name = "KWorld LTV883RF",
  454. .tuner_type = TUNER_TNF_8831BGFF,
  455. .radio_type = UNSET,
  456. .tuner_addr = ADDR_UNSET,
  457. .radio_addr = ADDR_UNSET,
  458. .input = {{
  459. .type = CX88_VMUX_TELEVISION,
  460. .vmux = 0,
  461. .gpio0 = 0x07f8,
  462. },{
  463. .type = CX88_VMUX_DEBUG,
  464. .vmux = 0,
  465. .gpio0 = 0x07f9, // mono from tuner chip
  466. },{
  467. .type = CX88_VMUX_COMPOSITE1,
  468. .vmux = 1,
  469. .gpio0 = 0x000007fa,
  470. },{
  471. .type = CX88_VMUX_SVIDEO,
  472. .vmux = 2,
  473. .gpio0 = 0x000007fa,
  474. }},
  475. .radio = {
  476. .type = CX88_RADIO,
  477. .gpio0 = 0x000007f8,
  478. },
  479. },
  480. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
  481. .name = "DViCO FusionHDTV 3 Gold-Q",
  482. .tuner_type = TUNER_MICROTUNE_4042FI5,
  483. .radio_type = UNSET,
  484. .tuner_addr = ADDR_UNSET,
  485. .radio_addr = ADDR_UNSET,
  486. /*
  487. GPIO[0] resets DT3302 DTV receiver
  488. 0 - reset asserted
  489. 1 - normal operation
  490. GPIO[1] mutes analog audio output connector
  491. 0 - enable selected source
  492. 1 - mute
  493. GPIO[2] selects source for analog audio output connector
  494. 0 - analog audio input connector on tab
  495. 1 - analog DAC output from CX23881 chip
  496. GPIO[3] selects RF input connector on tuner module
  497. 0 - RF connector labeled CABLE
  498. 1 - RF connector labeled ANT
  499. GPIO[4] selects high RF for QAM256 mode
  500. 0 - normal RF
  501. 1 - high RF
  502. */
  503. .input = {{
  504. .type = CX88_VMUX_TELEVISION,
  505. .vmux = 0,
  506. .gpio0 = 0x0f0d,
  507. },{
  508. .type = CX88_VMUX_CABLE,
  509. .vmux = 0,
  510. .gpio0 = 0x0f05,
  511. },{
  512. .type = CX88_VMUX_COMPOSITE1,
  513. .vmux = 1,
  514. .gpio0 = 0x0f00,
  515. },{
  516. .type = CX88_VMUX_SVIDEO,
  517. .vmux = 2,
  518. .gpio0 = 0x0f00,
  519. }},
  520. .mpeg = CX88_MPEG_DVB,
  521. },
  522. [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
  523. .name = "Hauppauge Nova-T DVB-T",
  524. .tuner_type = TUNER_ABSENT,
  525. .radio_type = UNSET,
  526. .tuner_addr = ADDR_UNSET,
  527. .radio_addr = ADDR_UNSET,
  528. .input = {{
  529. .type = CX88_VMUX_DVB,
  530. .vmux = 0,
  531. }},
  532. .mpeg = CX88_MPEG_DVB,
  533. },
  534. [CX88_BOARD_CONEXANT_DVB_T1] = {
  535. .name = "Conexant DVB-T reference design",
  536. .tuner_type = TUNER_ABSENT,
  537. .radio_type = UNSET,
  538. .tuner_addr = ADDR_UNSET,
  539. .radio_addr = ADDR_UNSET,
  540. .input = {{
  541. .type = CX88_VMUX_DVB,
  542. .vmux = 0,
  543. }},
  544. .mpeg = CX88_MPEG_DVB,
  545. },
  546. [CX88_BOARD_PROVIDEO_PV259] = {
  547. .name = "Provideo PV259",
  548. .tuner_type = TUNER_PHILIPS_FQ1216ME,
  549. .radio_type = UNSET,
  550. .tuner_addr = ADDR_UNSET,
  551. .radio_addr = ADDR_UNSET,
  552. .input = {{
  553. .type = CX88_VMUX_TELEVISION,
  554. .vmux = 0,
  555. .audioroute = 1,
  556. }},
  557. .mpeg = CX88_MPEG_BLACKBIRD,
  558. },
  559. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
  560. .name = "DViCO FusionHDTV DVB-T Plus",
  561. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  562. .radio_type = UNSET,
  563. .tuner_addr = ADDR_UNSET,
  564. .radio_addr = ADDR_UNSET,
  565. .input = {{
  566. .type = CX88_VMUX_COMPOSITE1,
  567. .vmux = 1,
  568. .gpio0 = 0x000027df,
  569. },{
  570. .type = CX88_VMUX_SVIDEO,
  571. .vmux = 2,
  572. .gpio0 = 0x000027df,
  573. }},
  574. .mpeg = CX88_MPEG_DVB,
  575. },
  576. [CX88_BOARD_DNTV_LIVE_DVB_T] = {
  577. .name = "digitalnow DNTV Live! DVB-T",
  578. .tuner_type = TUNER_ABSENT,
  579. .radio_type = UNSET,
  580. .tuner_addr = ADDR_UNSET,
  581. .radio_addr = ADDR_UNSET,
  582. .input = {{
  583. .type = CX88_VMUX_COMPOSITE1,
  584. .vmux = 1,
  585. .gpio0 = 0x00000700,
  586. .gpio2 = 0x00000101,
  587. },{
  588. .type = CX88_VMUX_SVIDEO,
  589. .vmux = 2,
  590. .gpio0 = 0x00000700,
  591. .gpio2 = 0x00000101,
  592. }},
  593. .mpeg = CX88_MPEG_DVB,
  594. },
  595. [CX88_BOARD_PCHDTV_HD3000] = {
  596. .name = "pcHDTV HD3000 HDTV",
  597. .tuner_type = TUNER_THOMSON_DTT761X,
  598. .radio_type = UNSET,
  599. .tuner_addr = ADDR_UNSET,
  600. .radio_addr = ADDR_UNSET,
  601. .tda9887_conf = TDA9887_PRESENT,
  602. /* GPIO[2] = audio source for analog audio out connector
  603. * 0 = analog audio input connector
  604. * 1 = CX88 audio DACs
  605. *
  606. * GPIO[7] = input to CX88's audio/chroma ADC
  607. * 0 = FM 10.7 MHz IF
  608. * 1 = Sound 4.5 MHz IF
  609. *
  610. * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
  611. *
  612. * GPIO[16] = Remote control input
  613. */
  614. .input = {{
  615. .type = CX88_VMUX_TELEVISION,
  616. .vmux = 0,
  617. .gpio0 = 0x00008484,
  618. },{
  619. .type = CX88_VMUX_COMPOSITE1,
  620. .vmux = 1,
  621. .gpio0 = 0x00008400,
  622. },{
  623. .type = CX88_VMUX_SVIDEO,
  624. .vmux = 2,
  625. .gpio0 = 0x00008400,
  626. }},
  627. .radio = {
  628. .type = CX88_RADIO,
  629. .gpio0 = 0x00008404,
  630. },
  631. .mpeg = CX88_MPEG_DVB,
  632. },
  633. [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
  634. // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
  635. // GPIO values obtained from regspy, courtesy Sean Covel
  636. .name = "Hauppauge WinTV 28xxx (Roslyn) models",
  637. .tuner_type = UNSET,
  638. .radio_type = UNSET,
  639. .tuner_addr = ADDR_UNSET,
  640. .radio_addr = ADDR_UNSET,
  641. .input = {{
  642. .type = CX88_VMUX_TELEVISION,
  643. .vmux = 0,
  644. .gpio0 = 0xed1a,
  645. .gpio2 = 0x00ff,
  646. },{
  647. .type = CX88_VMUX_DEBUG,
  648. .vmux = 0,
  649. .gpio0 = 0xff01,
  650. },{
  651. .type = CX88_VMUX_COMPOSITE1,
  652. .vmux = 1,
  653. .gpio0 = 0xff02,
  654. },{
  655. .type = CX88_VMUX_SVIDEO,
  656. .vmux = 2,
  657. .gpio0 = 0xed92,
  658. .gpio2 = 0x00ff,
  659. }},
  660. .radio = {
  661. .type = CX88_RADIO,
  662. .gpio0 = 0xed96,
  663. .gpio2 = 0x00ff,
  664. },
  665. .mpeg = CX88_MPEG_BLACKBIRD,
  666. },
  667. [CX88_BOARD_DIGITALLOGIC_MEC] = {
  668. .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
  669. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  670. .radio_type = UNSET,
  671. .tuner_addr = ADDR_UNSET,
  672. .radio_addr = ADDR_UNSET,
  673. .tda9887_conf = TDA9887_PRESENT,
  674. .input = {{
  675. .type = CX88_VMUX_TELEVISION,
  676. .vmux = 0,
  677. .gpio0 = 0x00009d80,
  678. .audioroute = 1,
  679. },{
  680. .type = CX88_VMUX_COMPOSITE1,
  681. .vmux = 1,
  682. .gpio0 = 0x00009d76,
  683. .audioroute = 1,
  684. },{
  685. .type = CX88_VMUX_SVIDEO,
  686. .vmux = 2,
  687. .gpio0 = 0x00009d76,
  688. .audioroute = 1,
  689. }},
  690. .radio = {
  691. .type = CX88_RADIO,
  692. .gpio0 = 0x00009d00,
  693. .audioroute = 1,
  694. },
  695. .mpeg = CX88_MPEG_BLACKBIRD,
  696. },
  697. [CX88_BOARD_IODATA_GVBCTV7E] = {
  698. .name = "IODATA GV/BCTV7E",
  699. .tuner_type = TUNER_PHILIPS_FQ1286,
  700. .radio_type = UNSET,
  701. .tuner_addr = ADDR_UNSET,
  702. .radio_addr = ADDR_UNSET,
  703. .tda9887_conf = TDA9887_PRESENT,
  704. .input = {{
  705. .type = CX88_VMUX_TELEVISION,
  706. .vmux = 1,
  707. .gpio1 = 0x0000e03f,
  708. },{
  709. .type = CX88_VMUX_COMPOSITE1,
  710. .vmux = 2,
  711. .gpio1 = 0x0000e07f,
  712. },{
  713. .type = CX88_VMUX_SVIDEO,
  714. .vmux = 3,
  715. .gpio1 = 0x0000e07f,
  716. }}
  717. },
  718. [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
  719. .name = "PixelView PlayTV Ultra Pro (Stereo)",
  720. /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
  721. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  722. .radio_type = UNSET,
  723. .tuner_addr = ADDR_UNSET,
  724. .radio_addr = ADDR_UNSET,
  725. /* Some variants use a tda9874 and so need the tvaudio module. */
  726. .audio_chip = V4L2_IDENT_TVAUDIO,
  727. .input = {{
  728. .type = CX88_VMUX_TELEVISION,
  729. .vmux = 0,
  730. .gpio0 = 0xbf61, /* internal decoder */
  731. },{
  732. .type = CX88_VMUX_COMPOSITE1,
  733. .vmux = 1,
  734. .gpio0 = 0xbf63,
  735. },{
  736. .type = CX88_VMUX_SVIDEO,
  737. .vmux = 2,
  738. .gpio0 = 0xbf63,
  739. }},
  740. .radio = {
  741. .type = CX88_RADIO,
  742. .gpio0 = 0xbf60,
  743. },
  744. },
  745. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
  746. .name = "DViCO FusionHDTV 3 Gold-T",
  747. .tuner_type = TUNER_THOMSON_DTT761X,
  748. .radio_type = UNSET,
  749. .tuner_addr = ADDR_UNSET,
  750. .radio_addr = ADDR_UNSET,
  751. .tda9887_conf = TDA9887_PRESENT,
  752. .input = {{
  753. .type = CX88_VMUX_TELEVISION,
  754. .vmux = 0,
  755. .gpio0 = 0x97ed,
  756. },{
  757. .type = CX88_VMUX_COMPOSITE1,
  758. .vmux = 1,
  759. .gpio0 = 0x97e9,
  760. },{
  761. .type = CX88_VMUX_SVIDEO,
  762. .vmux = 2,
  763. .gpio0 = 0x97e9,
  764. }},
  765. .mpeg = CX88_MPEG_DVB,
  766. },
  767. [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
  768. .name = "ADS Tech Instant TV DVB-T PCI",
  769. .tuner_type = TUNER_ABSENT,
  770. .radio_type = UNSET,
  771. .tuner_addr = ADDR_UNSET,
  772. .radio_addr = ADDR_UNSET,
  773. .input = {{
  774. .type = CX88_VMUX_COMPOSITE1,
  775. .vmux = 1,
  776. .gpio0 = 0x0700,
  777. .gpio2 = 0x0101,
  778. },{
  779. .type = CX88_VMUX_SVIDEO,
  780. .vmux = 2,
  781. .gpio0 = 0x0700,
  782. .gpio2 = 0x0101,
  783. }},
  784. .mpeg = CX88_MPEG_DVB,
  785. },
  786. [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
  787. .name = "TerraTec Cinergy 1400 DVB-T",
  788. .tuner_type = TUNER_ABSENT,
  789. .input = {{
  790. .type = CX88_VMUX_DVB,
  791. .vmux = 0,
  792. },{
  793. .type = CX88_VMUX_COMPOSITE1,
  794. .vmux = 2,
  795. },{
  796. .type = CX88_VMUX_SVIDEO,
  797. .vmux = 2,
  798. }},
  799. .mpeg = CX88_MPEG_DVB,
  800. },
  801. [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
  802. .name = "DViCO FusionHDTV 5 Gold",
  803. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
  804. .radio_type = UNSET,
  805. .tuner_addr = ADDR_UNSET,
  806. .radio_addr = ADDR_UNSET,
  807. .tda9887_conf = TDA9887_PRESENT,
  808. .input = {{
  809. .type = CX88_VMUX_TELEVISION,
  810. .vmux = 0,
  811. .gpio0 = 0x87fd,
  812. },{
  813. .type = CX88_VMUX_COMPOSITE1,
  814. .vmux = 1,
  815. .gpio0 = 0x87f9,
  816. },{
  817. .type = CX88_VMUX_SVIDEO,
  818. .vmux = 2,
  819. .gpio0 = 0x87f9,
  820. }},
  821. .mpeg = CX88_MPEG_DVB,
  822. },
  823. [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
  824. .name = "AverMedia UltraTV Media Center PCI 550",
  825. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  826. .radio_type = UNSET,
  827. .tuner_addr = ADDR_UNSET,
  828. .radio_addr = ADDR_UNSET,
  829. .tda9887_conf = TDA9887_PRESENT,
  830. .input = {{
  831. .type = CX88_VMUX_COMPOSITE1,
  832. .vmux = 0,
  833. .gpio0 = 0x0000cd73,
  834. .audioroute = 1,
  835. },{
  836. .type = CX88_VMUX_SVIDEO,
  837. .vmux = 1,
  838. .gpio0 = 0x0000cd73,
  839. .audioroute = 1,
  840. },{
  841. .type = CX88_VMUX_TELEVISION,
  842. .vmux = 3,
  843. .gpio0 = 0x0000cdb3,
  844. .audioroute = 1,
  845. }},
  846. .radio = {
  847. .type = CX88_RADIO,
  848. .vmux = 2,
  849. .gpio0 = 0x0000cdf3,
  850. .audioroute = 1,
  851. },
  852. .mpeg = CX88_MPEG_BLACKBIRD,
  853. },
  854. [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
  855. /* Alexander Wold <awold@bigfoot.com> */
  856. .name = "Kworld V-Stream Xpert DVD",
  857. .tuner_type = UNSET,
  858. .input = {{
  859. .type = CX88_VMUX_COMPOSITE1,
  860. .vmux = 1,
  861. .gpio0 = 0x03000000,
  862. .gpio1 = 0x01000000,
  863. .gpio2 = 0x02000000,
  864. .gpio3 = 0x00100000,
  865. },{
  866. .type = CX88_VMUX_SVIDEO,
  867. .vmux = 2,
  868. .gpio0 = 0x03000000,
  869. .gpio1 = 0x01000000,
  870. .gpio2 = 0x02000000,
  871. .gpio3 = 0x00100000,
  872. }},
  873. },
  874. [CX88_BOARD_ATI_HDTVWONDER] = {
  875. .name = "ATI HDTV Wonder",
  876. .tuner_type = TUNER_PHILIPS_TUV1236D,
  877. .radio_type = UNSET,
  878. .tuner_addr = ADDR_UNSET,
  879. .radio_addr = ADDR_UNSET,
  880. .input = {{
  881. .type = CX88_VMUX_TELEVISION,
  882. .vmux = 0,
  883. .gpio0 = 0x00000ff7,
  884. .gpio1 = 0x000000ff,
  885. .gpio2 = 0x00000001,
  886. .gpio3 = 0x00000000,
  887. },{
  888. .type = CX88_VMUX_COMPOSITE1,
  889. .vmux = 1,
  890. .gpio0 = 0x00000ffe,
  891. .gpio1 = 0x000000ff,
  892. .gpio2 = 0x00000001,
  893. .gpio3 = 0x00000000,
  894. },{
  895. .type = CX88_VMUX_SVIDEO,
  896. .vmux = 2,
  897. .gpio0 = 0x00000ffe,
  898. .gpio1 = 0x000000ff,
  899. .gpio2 = 0x00000001,
  900. .gpio3 = 0x00000000,
  901. }},
  902. .mpeg = CX88_MPEG_DVB,
  903. },
  904. [CX88_BOARD_WINFAST_DTV1000] = {
  905. .name = "WinFast DTV1000-T",
  906. .tuner_type = TUNER_ABSENT,
  907. .radio_type = UNSET,
  908. .tuner_addr = ADDR_UNSET,
  909. .radio_addr = ADDR_UNSET,
  910. .input = {{
  911. .type = CX88_VMUX_DVB,
  912. .vmux = 0,
  913. },{
  914. .type = CX88_VMUX_COMPOSITE1,
  915. .vmux = 1,
  916. },{
  917. .type = CX88_VMUX_SVIDEO,
  918. .vmux = 2,
  919. }},
  920. .mpeg = CX88_MPEG_DVB,
  921. },
  922. [CX88_BOARD_AVERTV_303] = {
  923. .name = "AVerTV 303 (M126)",
  924. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  925. .radio_type = UNSET,
  926. .tuner_addr = ADDR_UNSET,
  927. .radio_addr = ADDR_UNSET,
  928. .tda9887_conf = TDA9887_PRESENT,
  929. .input = {{
  930. .type = CX88_VMUX_TELEVISION,
  931. .vmux = 0,
  932. .gpio0 = 0x00ff,
  933. .gpio1 = 0xe09f,
  934. .gpio2 = 0x0010,
  935. .gpio3 = 0x0000,
  936. },{
  937. .type = CX88_VMUX_COMPOSITE1,
  938. .vmux = 1,
  939. .gpio0 = 0x00ff,
  940. .gpio1 = 0xe05f,
  941. .gpio2 = 0x0010,
  942. .gpio3 = 0x0000,
  943. },{
  944. .type = CX88_VMUX_SVIDEO,
  945. .vmux = 2,
  946. .gpio0 = 0x00ff,
  947. .gpio1 = 0xe05f,
  948. .gpio2 = 0x0010,
  949. .gpio3 = 0x0000,
  950. }},
  951. },
  952. [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
  953. .name = "Hauppauge Nova-S-Plus DVB-S",
  954. .tuner_type = TUNER_ABSENT,
  955. .radio_type = UNSET,
  956. .tuner_addr = ADDR_UNSET,
  957. .radio_addr = ADDR_UNSET,
  958. .audio_chip = V4L2_IDENT_WM8775,
  959. .i2sinputcntl = 2,
  960. .input = {{
  961. .type = CX88_VMUX_DVB,
  962. .vmux = 0,
  963. /* 2: Line-In */
  964. .audioroute = 2,
  965. },{
  966. .type = CX88_VMUX_COMPOSITE1,
  967. .vmux = 1,
  968. /* 2: Line-In */
  969. .audioroute = 2,
  970. },{
  971. .type = CX88_VMUX_SVIDEO,
  972. .vmux = 2,
  973. /* 2: Line-In */
  974. .audioroute = 2,
  975. }},
  976. .mpeg = CX88_MPEG_DVB,
  977. },
  978. [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
  979. .name = "Hauppauge Nova-SE2 DVB-S",
  980. .tuner_type = TUNER_ABSENT,
  981. .radio_type = UNSET,
  982. .tuner_addr = ADDR_UNSET,
  983. .radio_addr = ADDR_UNSET,
  984. .input = {{
  985. .type = CX88_VMUX_DVB,
  986. .vmux = 0,
  987. }},
  988. .mpeg = CX88_MPEG_DVB,
  989. },
  990. [CX88_BOARD_KWORLD_DVBS_100] = {
  991. .name = "KWorld DVB-S 100",
  992. .tuner_type = TUNER_ABSENT,
  993. .radio_type = UNSET,
  994. .tuner_addr = ADDR_UNSET,
  995. .radio_addr = ADDR_UNSET,
  996. .audio_chip = V4L2_IDENT_WM8775,
  997. .input = {{
  998. .type = CX88_VMUX_DVB,
  999. .vmux = 0,
  1000. /* 2: Line-In */
  1001. .audioroute = 2,
  1002. },{
  1003. .type = CX88_VMUX_COMPOSITE1,
  1004. .vmux = 1,
  1005. /* 2: Line-In */
  1006. .audioroute = 2,
  1007. },{
  1008. .type = CX88_VMUX_SVIDEO,
  1009. .vmux = 2,
  1010. /* 2: Line-In */
  1011. .audioroute = 2,
  1012. }},
  1013. .mpeg = CX88_MPEG_DVB,
  1014. },
  1015. [CX88_BOARD_HAUPPAUGE_HVR1100] = {
  1016. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
  1017. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1018. .radio_type = UNSET,
  1019. .tuner_addr = ADDR_UNSET,
  1020. .radio_addr = ADDR_UNSET,
  1021. .tda9887_conf = TDA9887_PRESENT,
  1022. .input = {{
  1023. .type = CX88_VMUX_TELEVISION,
  1024. .vmux = 0,
  1025. },{
  1026. .type = CX88_VMUX_COMPOSITE1,
  1027. .vmux = 1,
  1028. },{
  1029. .type = CX88_VMUX_SVIDEO,
  1030. .vmux = 2,
  1031. }},
  1032. /* fixme: Add radio support */
  1033. .mpeg = CX88_MPEG_DVB,
  1034. },
  1035. [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
  1036. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
  1037. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1038. .radio_type = UNSET,
  1039. .tuner_addr = ADDR_UNSET,
  1040. .radio_addr = ADDR_UNSET,
  1041. .tda9887_conf = TDA9887_PRESENT,
  1042. .input = {{
  1043. .type = CX88_VMUX_TELEVISION,
  1044. .vmux = 0,
  1045. },{
  1046. .type = CX88_VMUX_COMPOSITE1,
  1047. .vmux = 1,
  1048. }},
  1049. /* fixme: Add radio support */
  1050. .mpeg = CX88_MPEG_DVB,
  1051. },
  1052. [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
  1053. .name = "digitalnow DNTV Live! DVB-T Pro",
  1054. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1055. .radio_type = UNSET,
  1056. .tuner_addr = ADDR_UNSET,
  1057. .radio_addr = ADDR_UNSET,
  1058. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1059. TDA9887_PORT2_ACTIVE,
  1060. .input = {{
  1061. .type = CX88_VMUX_TELEVISION,
  1062. .vmux = 0,
  1063. .gpio0 = 0xf80808,
  1064. },{
  1065. .type = CX88_VMUX_COMPOSITE1,
  1066. .vmux = 1,
  1067. .gpio0 = 0xf80808,
  1068. },{
  1069. .type = CX88_VMUX_SVIDEO,
  1070. .vmux = 2,
  1071. .gpio0 = 0xf80808,
  1072. }},
  1073. .radio = {
  1074. .type = CX88_RADIO,
  1075. .gpio0 = 0xf80808,
  1076. },
  1077. .mpeg = CX88_MPEG_DVB,
  1078. },
  1079. [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
  1080. /* Kworld V-stream Xpert DVB-T with Thomson tuner */
  1081. /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
  1082. /* Manenti Marco <marco_manenti@colman.it> */
  1083. .name = "KWorld/VStream XPert DVB-T with cx22702",
  1084. .tuner_type = TUNER_ABSENT,
  1085. .radio_type = UNSET,
  1086. .tuner_addr = ADDR_UNSET,
  1087. .radio_addr = ADDR_UNSET,
  1088. .input = {{
  1089. .type = CX88_VMUX_COMPOSITE1,
  1090. .vmux = 1,
  1091. .gpio0 = 0x0700,
  1092. .gpio2 = 0x0101,
  1093. },{
  1094. .type = CX88_VMUX_SVIDEO,
  1095. .vmux = 2,
  1096. .gpio0 = 0x0700,
  1097. .gpio2 = 0x0101,
  1098. }},
  1099. .mpeg = CX88_MPEG_DVB,
  1100. },
  1101. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
  1102. .name = "DViCO FusionHDTV DVB-T Dual Digital",
  1103. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  1104. .radio_type = UNSET,
  1105. .tuner_addr = ADDR_UNSET,
  1106. .radio_addr = ADDR_UNSET,
  1107. .input = {{
  1108. .type = CX88_VMUX_COMPOSITE1,
  1109. .vmux = 1,
  1110. .gpio0 = 0x000067df,
  1111. },{
  1112. .type = CX88_VMUX_SVIDEO,
  1113. .vmux = 2,
  1114. .gpio0 = 0x000067df,
  1115. }},
  1116. .mpeg = CX88_MPEG_DVB,
  1117. },
  1118. [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
  1119. .name = "KWorld HardwareMpegTV XPert",
  1120. .tuner_type = TUNER_PHILIPS_TDA8290,
  1121. .radio_type = UNSET,
  1122. .tuner_addr = ADDR_UNSET,
  1123. .radio_addr = ADDR_UNSET,
  1124. .input = {{
  1125. .type = CX88_VMUX_TELEVISION,
  1126. .vmux = 0,
  1127. .gpio0 = 0x3de2,
  1128. .gpio2 = 0x00ff,
  1129. },{
  1130. .type = CX88_VMUX_COMPOSITE1,
  1131. .vmux = 1,
  1132. .gpio0 = 0x3de6,
  1133. .audioroute = 1,
  1134. },{
  1135. .type = CX88_VMUX_SVIDEO,
  1136. .vmux = 2,
  1137. .gpio0 = 0x3de6,
  1138. .audioroute = 1,
  1139. }},
  1140. .radio = {
  1141. .type = CX88_RADIO,
  1142. .gpio0 = 0x3de6,
  1143. .gpio2 = 0x00ff,
  1144. },
  1145. .mpeg = CX88_MPEG_BLACKBIRD,
  1146. },
  1147. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
  1148. .name = "DViCO FusionHDTV DVB-T Hybrid",
  1149. .tuner_type = TUNER_THOMSON_FE6600,
  1150. .radio_type = UNSET,
  1151. .tuner_addr = ADDR_UNSET,
  1152. .radio_addr = ADDR_UNSET,
  1153. .input = {{
  1154. .type = CX88_VMUX_TELEVISION,
  1155. .vmux = 0,
  1156. .gpio0 = 0x0000a75f,
  1157. },{
  1158. .type = CX88_VMUX_COMPOSITE1,
  1159. .vmux = 1,
  1160. .gpio0 = 0x0000a75b,
  1161. },{
  1162. .type = CX88_VMUX_SVIDEO,
  1163. .vmux = 2,
  1164. .gpio0 = 0x0000a75b,
  1165. }},
  1166. .mpeg = CX88_MPEG_DVB,
  1167. },
  1168. [CX88_BOARD_PCHDTV_HD5500] = {
  1169. .name = "pcHDTV HD5500 HDTV",
  1170. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
  1171. .radio_type = UNSET,
  1172. .tuner_addr = ADDR_UNSET,
  1173. .radio_addr = ADDR_UNSET,
  1174. .tda9887_conf = TDA9887_PRESENT,
  1175. .input = {{
  1176. .type = CX88_VMUX_TELEVISION,
  1177. .vmux = 0,
  1178. .gpio0 = 0x87fd,
  1179. },{
  1180. .type = CX88_VMUX_COMPOSITE1,
  1181. .vmux = 1,
  1182. .gpio0 = 0x87f9,
  1183. },{
  1184. .type = CX88_VMUX_SVIDEO,
  1185. .vmux = 2,
  1186. .gpio0 = 0x87f9,
  1187. }},
  1188. .mpeg = CX88_MPEG_DVB,
  1189. },
  1190. [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
  1191. /* FIXME: tested TV input only, disabled composite,
  1192. svideo and radio until they can be tested also. */
  1193. .name = "Kworld MCE 200 Deluxe",
  1194. .tuner_type = TUNER_TENA_9533_DI,
  1195. .radio_type = UNSET,
  1196. .tda9887_conf = TDA9887_PRESENT,
  1197. .tuner_addr = ADDR_UNSET,
  1198. .radio_addr = ADDR_UNSET,
  1199. .input = {{
  1200. .type = CX88_VMUX_TELEVISION,
  1201. .vmux = 0,
  1202. .gpio0 = 0x0000BDE6
  1203. }},
  1204. .mpeg = CX88_MPEG_BLACKBIRD,
  1205. },
  1206. [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
  1207. /* FIXME: SVideo, Composite and FM inputs are untested */
  1208. .name = "PixelView PlayTV P7000",
  1209. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  1210. .radio_type = UNSET,
  1211. .tuner_addr = ADDR_UNSET,
  1212. .radio_addr = ADDR_UNSET,
  1213. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1214. TDA9887_PORT2_ACTIVE,
  1215. .input = {{
  1216. .type = CX88_VMUX_TELEVISION,
  1217. .vmux = 0,
  1218. .gpio0 = 0x5da6,
  1219. }},
  1220. .mpeg = CX88_MPEG_BLACKBIRD,
  1221. },
  1222. [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
  1223. .name = "NPG Tech Real TV FM Top 10",
  1224. .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
  1225. .radio_type = UNSET,
  1226. .tuner_addr = ADDR_UNSET,
  1227. .radio_addr = ADDR_UNSET,
  1228. .input = {{
  1229. .type = CX88_VMUX_TELEVISION,
  1230. .vmux = 0,
  1231. .gpio0 = 0x0788,
  1232. },{
  1233. .type = CX88_VMUX_COMPOSITE1,
  1234. .vmux = 1,
  1235. .gpio0 = 0x078b,
  1236. },{
  1237. .type = CX88_VMUX_SVIDEO,
  1238. .vmux = 2,
  1239. .gpio0 = 0x078b,
  1240. }},
  1241. .radio = {
  1242. .type = CX88_RADIO,
  1243. .gpio0 = 0x074a,
  1244. },
  1245. },
  1246. [CX88_BOARD_WINFAST_DTV2000H] = {
  1247. .name = "WinFast DTV2000 H",
  1248. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1249. .radio_type = UNSET,
  1250. .tuner_addr = ADDR_UNSET,
  1251. .radio_addr = ADDR_UNSET,
  1252. .tda9887_conf = TDA9887_PRESENT,
  1253. .input = {{
  1254. .type = CX88_VMUX_TELEVISION,
  1255. .vmux = 0,
  1256. .gpio0 = 0x00017304,
  1257. .gpio1 = 0x00008203,
  1258. .gpio2 = 0x00017304,
  1259. .gpio3 = 0x02000000,
  1260. }, {
  1261. .type = CX88_VMUX_COMPOSITE1,
  1262. .vmux = 1,
  1263. .gpio0 = 0x0001d701,
  1264. .gpio1 = 0x0000b207,
  1265. .gpio2 = 0x0001d701,
  1266. .gpio3 = 0x02000000,
  1267. }, {
  1268. .type = CX88_VMUX_COMPOSITE2,
  1269. .vmux = 2,
  1270. .gpio0 = 0x0001d503,
  1271. .gpio1 = 0x0000b207,
  1272. .gpio2 = 0x0001d503,
  1273. .gpio3 = 0x02000000,
  1274. }, {
  1275. .type = CX88_VMUX_SVIDEO,
  1276. .vmux = 3,
  1277. .gpio0 = 0x0001d701,
  1278. .gpio1 = 0x0000b207,
  1279. .gpio2 = 0x0001d701,
  1280. .gpio3 = 0x02000000,
  1281. }},
  1282. .radio = {
  1283. .type = CX88_RADIO,
  1284. .gpio0 = 0x00015702,
  1285. .gpio1 = 0x0000f207,
  1286. .gpio2 = 0x00015702,
  1287. .gpio3 = 0x02000000,
  1288. },
  1289. .mpeg = CX88_MPEG_DVB,
  1290. },
  1291. [CX88_BOARD_WINFAST_DTV2000H_J] = {
  1292. .name = "WinFast DTV2000 H rev. J",
  1293. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1294. .radio_type = UNSET,
  1295. .tuner_addr = ADDR_UNSET,
  1296. .radio_addr = ADDR_UNSET,
  1297. .tda9887_conf = TDA9887_PRESENT,
  1298. .input = {{
  1299. .type = CX88_VMUX_TELEVISION,
  1300. .vmux = 0,
  1301. .gpio0 = 0x00017300,
  1302. .gpio1 = 0x00008207,
  1303. .gpio2 = 0x00000000,
  1304. .gpio3 = 0x02000000,
  1305. },{
  1306. .type = CX88_VMUX_TELEVISION,
  1307. .vmux = 0,
  1308. .gpio0 = 0x00018300,
  1309. .gpio1 = 0x0000f207,
  1310. .gpio2 = 0x00017304,
  1311. .gpio3 = 0x02000000,
  1312. },{
  1313. .type = CX88_VMUX_COMPOSITE1,
  1314. .vmux = 1,
  1315. .gpio0 = 0x00018301,
  1316. .gpio1 = 0x0000f207,
  1317. .gpio2 = 0x00017304,
  1318. .gpio3 = 0x02000000,
  1319. },{
  1320. .type = CX88_VMUX_SVIDEO,
  1321. .vmux = 2,
  1322. .gpio0 = 0x00018301,
  1323. .gpio1 = 0x0000f207,
  1324. .gpio2 = 0x00017304,
  1325. .gpio3 = 0x02000000,
  1326. }},
  1327. .radio = {
  1328. .type = CX88_RADIO,
  1329. .gpio0 = 0x00015702,
  1330. .gpio1 = 0x0000f207,
  1331. .gpio2 = 0x00015702,
  1332. .gpio3 = 0x02000000,
  1333. },
  1334. .mpeg = CX88_MPEG_DVB,
  1335. },
  1336. [CX88_BOARD_GENIATECH_DVBS] = {
  1337. .name = "Geniatech DVB-S",
  1338. .tuner_type = TUNER_ABSENT,
  1339. .radio_type = UNSET,
  1340. .tuner_addr = ADDR_UNSET,
  1341. .radio_addr = ADDR_UNSET,
  1342. .input = {{
  1343. .type = CX88_VMUX_DVB,
  1344. .vmux = 0,
  1345. },{
  1346. .type = CX88_VMUX_COMPOSITE1,
  1347. .vmux = 1,
  1348. }},
  1349. .mpeg = CX88_MPEG_DVB,
  1350. },
  1351. [CX88_BOARD_HAUPPAUGE_HVR3000] = {
  1352. .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
  1353. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1354. .radio_type = UNSET,
  1355. .tuner_addr = ADDR_UNSET,
  1356. .radio_addr = ADDR_UNSET,
  1357. .tda9887_conf = TDA9887_PRESENT,
  1358. .audio_chip = V4L2_IDENT_WM8775,
  1359. .input = {{
  1360. .type = CX88_VMUX_TELEVISION,
  1361. .vmux = 0,
  1362. .gpio0 = 0x84bf,
  1363. /* 1: TV Audio / FM Mono */
  1364. .audioroute = 1,
  1365. },{
  1366. .type = CX88_VMUX_COMPOSITE1,
  1367. .vmux = 1,
  1368. .gpio0 = 0x84bf,
  1369. /* 2: Line-In */
  1370. .audioroute = 2,
  1371. },{
  1372. .type = CX88_VMUX_SVIDEO,
  1373. .vmux = 2,
  1374. .gpio0 = 0x84bf,
  1375. /* 2: Line-In */
  1376. .audioroute = 2,
  1377. }},
  1378. .radio = {
  1379. .type = CX88_RADIO,
  1380. .gpio0 = 0x84bf,
  1381. /* 4: FM Stereo (untested) */
  1382. .audioroute = 8,
  1383. },
  1384. .mpeg = CX88_MPEG_DVB,
  1385. .num_frontends = 2,
  1386. },
  1387. [CX88_BOARD_NORWOOD_MICRO] = {
  1388. .name = "Norwood Micro TV Tuner",
  1389. .tuner_type = TUNER_TNF_5335MF,
  1390. .radio_type = UNSET,
  1391. .tuner_addr = ADDR_UNSET,
  1392. .radio_addr = ADDR_UNSET,
  1393. .input = {{
  1394. .type = CX88_VMUX_TELEVISION,
  1395. .vmux = 0,
  1396. .gpio0 = 0x0709,
  1397. },{
  1398. .type = CX88_VMUX_COMPOSITE1,
  1399. .vmux = 1,
  1400. .gpio0 = 0x070b,
  1401. },{
  1402. .type = CX88_VMUX_SVIDEO,
  1403. .vmux = 2,
  1404. .gpio0 = 0x070b,
  1405. }},
  1406. },
  1407. [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
  1408. .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
  1409. .tuner_type = TUNER_LG_PAL_NEW_TAPC,
  1410. .radio_type = UNSET,
  1411. .tuner_addr = ADDR_UNSET,
  1412. .radio_addr = ADDR_UNSET,
  1413. .input = {{
  1414. .type = CX88_VMUX_TELEVISION,
  1415. .vmux = 0,
  1416. .gpio0 = 0x003fffff,
  1417. .gpio1 = 0x00e00000,
  1418. .gpio2 = 0x003fffff,
  1419. .gpio3 = 0x02000000,
  1420. },{
  1421. .type = CX88_VMUX_COMPOSITE1,
  1422. .vmux = 1,
  1423. .gpio0 = 0x003fffff,
  1424. .gpio1 = 0x00e00000,
  1425. .gpio2 = 0x003fffff,
  1426. .gpio3 = 0x02000000,
  1427. },{
  1428. .type = CX88_VMUX_SVIDEO,
  1429. .vmux = 2,
  1430. .gpio0 = 0x003fffff,
  1431. .gpio1 = 0x00e00000,
  1432. .gpio2 = 0x003fffff,
  1433. .gpio3 = 0x02000000,
  1434. }},
  1435. },
  1436. [CX88_BOARD_HAUPPAUGE_HVR1300] = {
  1437. .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
  1438. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1439. .radio_type = UNSET,
  1440. .tuner_addr = ADDR_UNSET,
  1441. .radio_addr = ADDR_UNSET,
  1442. .tda9887_conf = TDA9887_PRESENT,
  1443. .audio_chip = V4L2_IDENT_WM8775,
  1444. /*
  1445. * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
  1446. */
  1447. .input = {{
  1448. .type = CX88_VMUX_TELEVISION,
  1449. .vmux = 0,
  1450. .gpio0 = 0xef88,
  1451. /* 1: TV Audio / FM Mono */
  1452. .audioroute = 1,
  1453. },{
  1454. .type = CX88_VMUX_COMPOSITE1,
  1455. .vmux = 1,
  1456. .gpio0 = 0xef88,
  1457. /* 2: Line-In */
  1458. .audioroute = 2,
  1459. },{
  1460. .type = CX88_VMUX_SVIDEO,
  1461. .vmux = 2,
  1462. .gpio0 = 0xef88,
  1463. /* 2: Line-In */
  1464. .audioroute = 2,
  1465. }},
  1466. .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
  1467. .radio = {
  1468. .type = CX88_RADIO,
  1469. .gpio0 = 0xef88,
  1470. /* 4: FM Stereo (untested) */
  1471. .audioroute = 8,
  1472. },
  1473. },
  1474. [CX88_BOARD_SAMSUNG_SMT_7020] = {
  1475. .name = "Samsung SMT 7020 DVB-S",
  1476. .tuner_type = TUNER_ABSENT,
  1477. .radio_type = UNSET,
  1478. .tuner_addr = ADDR_UNSET,
  1479. .radio_addr = ADDR_UNSET,
  1480. .input = { {
  1481. .type = CX88_VMUX_DVB,
  1482. .vmux = 0,
  1483. } },
  1484. .mpeg = CX88_MPEG_DVB,
  1485. },
  1486. [CX88_BOARD_ADSTECH_PTV_390] = {
  1487. .name = "ADS Tech Instant Video PCI",
  1488. .tuner_type = TUNER_ABSENT,
  1489. .radio_type = UNSET,
  1490. .tuner_addr = ADDR_UNSET,
  1491. .radio_addr = ADDR_UNSET,
  1492. .input = {{
  1493. .type = CX88_VMUX_DEBUG,
  1494. .vmux = 3,
  1495. .gpio0 = 0x04ff,
  1496. },{
  1497. .type = CX88_VMUX_COMPOSITE1,
  1498. .vmux = 1,
  1499. .gpio0 = 0x07fa,
  1500. },{
  1501. .type = CX88_VMUX_SVIDEO,
  1502. .vmux = 2,
  1503. .gpio0 = 0x07fa,
  1504. }},
  1505. },
  1506. [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
  1507. .name = "Pinnacle PCTV HD 800i",
  1508. .tuner_type = TUNER_XC5000,
  1509. .radio_type = UNSET,
  1510. .tuner_addr = ADDR_UNSET,
  1511. .radio_addr = ADDR_UNSET,
  1512. .input = {{
  1513. .type = CX88_VMUX_TELEVISION,
  1514. .vmux = 0,
  1515. .gpio0 = 0x04fb,
  1516. .gpio1 = 0x10ff,
  1517. },{
  1518. .type = CX88_VMUX_COMPOSITE1,
  1519. .vmux = 1,
  1520. .gpio0 = 0x04fb,
  1521. .gpio1 = 0x10ef,
  1522. .audioroute = 1,
  1523. },{
  1524. .type = CX88_VMUX_SVIDEO,
  1525. .vmux = 2,
  1526. .gpio0 = 0x04fb,
  1527. .gpio1 = 0x10ef,
  1528. .audioroute = 1,
  1529. }},
  1530. .mpeg = CX88_MPEG_DVB,
  1531. },
  1532. [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
  1533. .name = "DViCO FusionHDTV 5 PCI nano",
  1534. /* xc3008 tuner, digital only for now */
  1535. .tuner_type = TUNER_ABSENT,
  1536. .radio_type = UNSET,
  1537. .tuner_addr = ADDR_UNSET,
  1538. .radio_addr = ADDR_UNSET,
  1539. .input = {{
  1540. .type = CX88_VMUX_TELEVISION,
  1541. .vmux = 0,
  1542. .gpio0 = 0x000027df, /* Unconfirmed */
  1543. }, {
  1544. .type = CX88_VMUX_COMPOSITE1,
  1545. .vmux = 1,
  1546. .gpio0 = 0x000027df, /* Unconfirmed */
  1547. .audioroute = 1,
  1548. }, {
  1549. .type = CX88_VMUX_SVIDEO,
  1550. .vmux = 2,
  1551. .gpio0 = 0x000027df, /* Unconfirmed */
  1552. .audioroute = 1,
  1553. } },
  1554. .mpeg = CX88_MPEG_DVB,
  1555. },
  1556. [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
  1557. .name = "Pinnacle Hybrid PCTV",
  1558. .tuner_type = TUNER_XC2028,
  1559. .tuner_addr = 0x61,
  1560. .radio_type = TUNER_XC2028,
  1561. .radio_addr = 0x61,
  1562. .input = { {
  1563. .type = CX88_VMUX_TELEVISION,
  1564. .vmux = 0,
  1565. .gpio0 = 0x004ff,
  1566. .gpio1 = 0x010ff,
  1567. .gpio2 = 0x00001,
  1568. }, {
  1569. .type = CX88_VMUX_COMPOSITE1,
  1570. .vmux = 1,
  1571. .gpio0 = 0x004fb,
  1572. .gpio1 = 0x010ef,
  1573. .audioroute = 1,
  1574. }, {
  1575. .type = CX88_VMUX_SVIDEO,
  1576. .vmux = 2,
  1577. .gpio0 = 0x004fb,
  1578. .gpio1 = 0x010ef,
  1579. .audioroute = 1,
  1580. } },
  1581. .radio = {
  1582. .type = CX88_RADIO,
  1583. .gpio0 = 0x004ff,
  1584. .gpio1 = 0x010ff,
  1585. .gpio2 = 0x0ff,
  1586. },
  1587. .mpeg = CX88_MPEG_DVB,
  1588. },
  1589. /* Terry Wu <terrywu2009@gmail.com> */
  1590. /* TV Audio : set GPIO 2, 18, 19 value to 0, 1, 0 */
  1591. /* FM Audio : set GPIO 2, 18, 19 value to 0, 0, 0 */
  1592. /* Line-in Audio : set GPIO 2, 18, 19 value to 0, 1, 1 */
  1593. /* Mute Audio : set GPIO 2 value to 1 */
  1594. [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
  1595. .name = "Leadtek TV2000 XP Global",
  1596. .tuner_type = TUNER_XC2028,
  1597. .tuner_addr = 0x61,
  1598. .radio_type = TUNER_XC2028,
  1599. .radio_addr = 0x61,
  1600. .input = { {
  1601. .type = CX88_VMUX_TELEVISION,
  1602. .vmux = 0,
  1603. .gpio0 = 0x0400, /* pin 2 = 0 */
  1604. .gpio1 = 0x0000,
  1605. .gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */
  1606. .gpio3 = 0x0000,
  1607. }, {
  1608. .type = CX88_VMUX_COMPOSITE1,
  1609. .vmux = 1,
  1610. .gpio0 = 0x0400, /* pin 2 = 0 */
  1611. .gpio1 = 0x0000,
  1612. .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
  1613. .gpio3 = 0x0000,
  1614. }, {
  1615. .type = CX88_VMUX_SVIDEO,
  1616. .vmux = 2,
  1617. .gpio0 = 0x0400, /* pin 2 = 0 */
  1618. .gpio1 = 0x0000,
  1619. .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
  1620. .gpio3 = 0x0000,
  1621. } },
  1622. .radio = {
  1623. .type = CX88_RADIO,
  1624. .gpio0 = 0x0400, /* pin 2 = 0 */
  1625. .gpio1 = 0x0000,
  1626. .gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */
  1627. .gpio3 = 0x0000,
  1628. },
  1629. },
  1630. [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
  1631. .name = "PowerColor RA330", /* Long names may confuse LIRC. */
  1632. .tuner_type = TUNER_XC2028,
  1633. .tuner_addr = 0x61,
  1634. .input = { {
  1635. .type = CX88_VMUX_DEBUG,
  1636. .vmux = 3, /* Due to the way the cx88 driver is written, */
  1637. .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
  1638. .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
  1639. .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
  1640. }, { /* from the tuner on boot for a little while. */
  1641. .type = CX88_VMUX_TELEVISION,
  1642. .vmux = 0,
  1643. .gpio0 = 0x00ff,
  1644. .gpio1 = 0xf35d,
  1645. .gpio3 = 0x0000,
  1646. }, {
  1647. .type = CX88_VMUX_COMPOSITE1,
  1648. .vmux = 1,
  1649. .gpio0 = 0x00ff,
  1650. .gpio1 = 0xf37d,
  1651. .gpio3 = 0x0000,
  1652. }, {
  1653. .type = CX88_VMUX_SVIDEO,
  1654. .vmux = 2,
  1655. .gpio0 = 0x000ff,
  1656. .gpio1 = 0x0f37d,
  1657. .gpio3 = 0x00000,
  1658. } },
  1659. .radio = {
  1660. .type = CX88_RADIO,
  1661. .gpio0 = 0x000ff,
  1662. .gpio1 = 0x0f35d,
  1663. .gpio3 = 0x00000,
  1664. },
  1665. },
  1666. [CX88_BOARD_GENIATECH_X8000_MT] = {
  1667. /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
  1668. .name = "Geniatech X8000-MT DVBT",
  1669. .tuner_type = TUNER_XC2028,
  1670. .tuner_addr = 0x61,
  1671. .input = { {
  1672. .type = CX88_VMUX_TELEVISION,
  1673. .vmux = 0,
  1674. .gpio0 = 0x00000000,
  1675. .gpio1 = 0x00e3e341,
  1676. .gpio2 = 0x00000000,
  1677. .gpio3 = 0x00000000,
  1678. }, {
  1679. .type = CX88_VMUX_COMPOSITE1,
  1680. .vmux = 1,
  1681. .gpio0 = 0x00000000,
  1682. .gpio1 = 0x00e3e361,
  1683. .gpio2 = 0x00000000,
  1684. .gpio3 = 0x00000000,
  1685. }, {
  1686. .type = CX88_VMUX_SVIDEO,
  1687. .vmux = 2,
  1688. .gpio0 = 0x00000000,
  1689. .gpio1 = 0x00e3e361,
  1690. .gpio2 = 0x00000000,
  1691. .gpio3 = 0x00000000,
  1692. } },
  1693. .radio = {
  1694. .type = CX88_RADIO,
  1695. .gpio0 = 0x00000000,
  1696. .gpio1 = 0x00e3e341,
  1697. .gpio2 = 0x00000000,
  1698. .gpio3 = 0x00000000,
  1699. },
  1700. .mpeg = CX88_MPEG_DVB,
  1701. },
  1702. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
  1703. .name = "DViCO FusionHDTV DVB-T PRO",
  1704. .tuner_type = TUNER_XC2028,
  1705. .tuner_addr = 0x61,
  1706. .radio_type = UNSET,
  1707. .radio_addr = ADDR_UNSET,
  1708. .input = { {
  1709. .type = CX88_VMUX_COMPOSITE1,
  1710. .vmux = 1,
  1711. .gpio0 = 0x000067df,
  1712. }, {
  1713. .type = CX88_VMUX_SVIDEO,
  1714. .vmux = 2,
  1715. .gpio0 = 0x000067df,
  1716. } },
  1717. .mpeg = CX88_MPEG_DVB,
  1718. },
  1719. [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
  1720. .name = "DViCO FusionHDTV 7 Gold",
  1721. .tuner_type = TUNER_XC5000,
  1722. .radio_type = UNSET,
  1723. .tuner_addr = ADDR_UNSET,
  1724. .radio_addr = ADDR_UNSET,
  1725. .input = {{
  1726. .type = CX88_VMUX_TELEVISION,
  1727. .vmux = 0,
  1728. .gpio0 = 0x10df,
  1729. },{
  1730. .type = CX88_VMUX_COMPOSITE1,
  1731. .vmux = 1,
  1732. .gpio0 = 0x16d9,
  1733. },{
  1734. .type = CX88_VMUX_SVIDEO,
  1735. .vmux = 2,
  1736. .gpio0 = 0x16d9,
  1737. }},
  1738. .mpeg = CX88_MPEG_DVB,
  1739. },
  1740. [CX88_BOARD_PROLINK_PV_8000GT] = {
  1741. .name = "Prolink Pixelview MPEG 8000GT",
  1742. .tuner_type = TUNER_XC2028,
  1743. .tuner_addr = 0x61,
  1744. .input = { {
  1745. .type = CX88_VMUX_TELEVISION,
  1746. .vmux = 0,
  1747. .gpio0 = 0x0ff,
  1748. .gpio2 = 0x0cfb,
  1749. }, {
  1750. .type = CX88_VMUX_COMPOSITE1,
  1751. .vmux = 1,
  1752. .gpio2 = 0x0cfb,
  1753. }, {
  1754. .type = CX88_VMUX_SVIDEO,
  1755. .vmux = 2,
  1756. .gpio2 = 0x0cfb,
  1757. } },
  1758. .radio = {
  1759. .type = CX88_RADIO,
  1760. .gpio2 = 0x0cfb,
  1761. },
  1762. },
  1763. [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
  1764. .name = "Prolink Pixelview Global Extreme",
  1765. .tuner_type = TUNER_XC2028,
  1766. .tuner_addr = 0x61,
  1767. .input = { {
  1768. .type = CX88_VMUX_TELEVISION,
  1769. .vmux = 0,
  1770. .gpio0 = 0x04fb,
  1771. .gpio1 = 0x04080,
  1772. .gpio2 = 0x0cf7,
  1773. }, {
  1774. .type = CX88_VMUX_COMPOSITE1,
  1775. .vmux = 1,
  1776. .gpio0 = 0x04fb,
  1777. .gpio1 = 0x04080,
  1778. .gpio2 = 0x0cfb,
  1779. }, {
  1780. .type = CX88_VMUX_SVIDEO,
  1781. .vmux = 2,
  1782. .gpio0 = 0x04fb,
  1783. .gpio1 = 0x04080,
  1784. .gpio2 = 0x0cfb,
  1785. } },
  1786. .radio = {
  1787. .type = CX88_RADIO,
  1788. .gpio0 = 0x04ff,
  1789. .gpio1 = 0x04080,
  1790. .gpio2 = 0x0cf7,
  1791. },
  1792. },
  1793. /* Both radio, analog and ATSC work with this board.
  1794. However, for analog to work, s5h1409 gate should be open,
  1795. otherwise, tuner-xc3028 won't be detected.
  1796. A proper fix require using the newer i2c methods to add
  1797. tuner-xc3028 without doing an i2c probe.
  1798. */
  1799. [CX88_BOARD_KWORLD_ATSC_120] = {
  1800. .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
  1801. .tuner_type = TUNER_XC2028,
  1802. .radio_type = UNSET,
  1803. .tuner_addr = ADDR_UNSET,
  1804. .radio_addr = ADDR_UNSET,
  1805. .input = { {
  1806. .type = CX88_VMUX_TELEVISION,
  1807. .vmux = 0,
  1808. .gpio0 = 0x000000ff,
  1809. .gpio1 = 0x0000f35d,
  1810. .gpio2 = 0x00000000,
  1811. }, {
  1812. .type = CX88_VMUX_COMPOSITE1,
  1813. .vmux = 1,
  1814. .gpio0 = 0x000000ff,
  1815. .gpio1 = 0x0000f37e,
  1816. .gpio2 = 0x00000000,
  1817. }, {
  1818. .type = CX88_VMUX_SVIDEO,
  1819. .vmux = 2,
  1820. .gpio0 = 0x000000ff,
  1821. .gpio1 = 0x0000f37e,
  1822. .gpio2 = 0x00000000,
  1823. } },
  1824. .radio = {
  1825. .type = CX88_RADIO,
  1826. .gpio0 = 0x000000ff,
  1827. .gpio1 = 0x0000f35d,
  1828. .gpio2 = 0x00000000,
  1829. },
  1830. .mpeg = CX88_MPEG_DVB,
  1831. },
  1832. [CX88_BOARD_HAUPPAUGE_HVR4000] = {
  1833. .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
  1834. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1835. .radio_type = UNSET,
  1836. .tuner_addr = ADDR_UNSET,
  1837. .radio_addr = ADDR_UNSET,
  1838. .tda9887_conf = TDA9887_PRESENT,
  1839. .audio_chip = V4L2_IDENT_WM8775,
  1840. /*
  1841. * GPIO0 (WINTV2000)
  1842. *
  1843. * Analogue SAT DVB-T
  1844. * Antenna 0xc4bf 0xc4bb
  1845. * Composite 0xc4bf 0xc4bb
  1846. * S-Video 0xc4bf 0xc4bb
  1847. * Composite1 0xc4ff 0xc4fb
  1848. * S-Video1 0xc4ff 0xc4fb
  1849. *
  1850. * BIT VALUE FUNCTION GP{x}_IO
  1851. * 0 1 I:?
  1852. * 1 1 I:?
  1853. * 2 1 O:MPEG PORT 0=DVB-T 1=DVB-S
  1854. * 3 1 I:?
  1855. * 4 1 I:?
  1856. * 5 1 I:?
  1857. * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
  1858. * 7 1 O:DVB-T DEMOD RESET LOW
  1859. *
  1860. * BIT VALUE FUNCTION GP{x}_OE
  1861. * 8 0 I
  1862. * 9 0 I
  1863. * a 1 O
  1864. * b 0 I
  1865. * c 0 I
  1866. * d 0 I
  1867. * e 1 O
  1868. * f 1 O
  1869. *
  1870. * WM8775 ADC
  1871. *
  1872. * 1: TV Audio / FM Mono
  1873. * 2: Line-In
  1874. * 3: Line-In Expansion
  1875. * 4: FM Stereo
  1876. */
  1877. .input = {{
  1878. .type = CX88_VMUX_TELEVISION,
  1879. .vmux = 0,
  1880. .gpio0 = 0xc4bf,
  1881. /* 1: TV Audio / FM Mono */
  1882. .audioroute = 1,
  1883. }, {
  1884. .type = CX88_VMUX_COMPOSITE1,
  1885. .vmux = 1,
  1886. .gpio0 = 0xc4bf,
  1887. /* 2: Line-In */
  1888. .audioroute = 2,
  1889. }, {
  1890. .type = CX88_VMUX_SVIDEO,
  1891. .vmux = 2,
  1892. .gpio0 = 0xc4bf,
  1893. /* 2: Line-In */
  1894. .audioroute = 2,
  1895. } },
  1896. .radio = {
  1897. .type = CX88_RADIO,
  1898. .gpio0 = 0xc4bf,
  1899. /* 4: FM Stereo */
  1900. .audioroute = 8,
  1901. },
  1902. .mpeg = CX88_MPEG_DVB,
  1903. .num_frontends = 2,
  1904. },
  1905. [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
  1906. .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
  1907. .tuner_type = UNSET,
  1908. .radio_type = UNSET,
  1909. .tuner_addr = ADDR_UNSET,
  1910. .radio_addr = ADDR_UNSET,
  1911. .input = {{
  1912. .type = CX88_VMUX_DVB,
  1913. .vmux = 0,
  1914. } },
  1915. .mpeg = CX88_MPEG_DVB,
  1916. },
  1917. [CX88_BOARD_TEVII_S420] = {
  1918. .name = "TeVii S420 DVB-S",
  1919. .tuner_type = UNSET,
  1920. .radio_type = UNSET,
  1921. .tuner_addr = ADDR_UNSET,
  1922. .radio_addr = ADDR_UNSET,
  1923. .input = {{
  1924. .type = CX88_VMUX_DVB,
  1925. .vmux = 0,
  1926. } },
  1927. .mpeg = CX88_MPEG_DVB,
  1928. },
  1929. [CX88_BOARD_TEVII_S460] = {
  1930. .name = "TeVii S460 DVB-S/S2",
  1931. .tuner_type = UNSET,
  1932. .radio_type = UNSET,
  1933. .tuner_addr = ADDR_UNSET,
  1934. .radio_addr = ADDR_UNSET,
  1935. .input = {{
  1936. .type = CX88_VMUX_DVB,
  1937. .vmux = 0,
  1938. } },
  1939. .mpeg = CX88_MPEG_DVB,
  1940. },
  1941. [CX88_BOARD_TEVII_S464] = {
  1942. .name = "TeVii S464 DVB-S/S2",
  1943. .tuner_type = UNSET,
  1944. .radio_type = UNSET,
  1945. .tuner_addr = ADDR_UNSET,
  1946. .radio_addr = ADDR_UNSET,
  1947. .input = {{
  1948. .type = CX88_VMUX_DVB,
  1949. .vmux = 0,
  1950. } },
  1951. .mpeg = CX88_MPEG_DVB,
  1952. },
  1953. [CX88_BOARD_OMICOM_SS4_PCI] = {
  1954. .name = "Omicom SS4 DVB-S/S2 PCI",
  1955. .tuner_type = UNSET,
  1956. .radio_type = UNSET,
  1957. .tuner_addr = ADDR_UNSET,
  1958. .radio_addr = ADDR_UNSET,
  1959. .input = {{
  1960. .type = CX88_VMUX_DVB,
  1961. .vmux = 0,
  1962. } },
  1963. .mpeg = CX88_MPEG_DVB,
  1964. },
  1965. [CX88_BOARD_TBS_8910] = {
  1966. .name = "TBS 8910 DVB-S",
  1967. .tuner_type = UNSET,
  1968. .radio_type = UNSET,
  1969. .tuner_addr = ADDR_UNSET,
  1970. .radio_addr = ADDR_UNSET,
  1971. .input = {{
  1972. .type = CX88_VMUX_DVB,
  1973. .vmux = 0,
  1974. } },
  1975. .mpeg = CX88_MPEG_DVB,
  1976. },
  1977. [CX88_BOARD_TBS_8920] = {
  1978. .name = "TBS 8920 DVB-S/S2",
  1979. .tuner_type = TUNER_ABSENT,
  1980. .radio_type = UNSET,
  1981. .tuner_addr = ADDR_UNSET,
  1982. .radio_addr = ADDR_UNSET,
  1983. .input = {{
  1984. .type = CX88_VMUX_DVB,
  1985. .vmux = 0,
  1986. .gpio0 = 0x8080,
  1987. } },
  1988. .mpeg = CX88_MPEG_DVB,
  1989. },
  1990. [CX88_BOARD_PROF_6200] = {
  1991. .name = "Prof 6200 DVB-S",
  1992. .tuner_type = UNSET,
  1993. .radio_type = UNSET,
  1994. .tuner_addr = ADDR_UNSET,
  1995. .radio_addr = ADDR_UNSET,
  1996. .input = {{
  1997. .type = CX88_VMUX_DVB,
  1998. .vmux = 0,
  1999. } },
  2000. .mpeg = CX88_MPEG_DVB,
  2001. },
  2002. [CX88_BOARD_PROF_7300] = {
  2003. .name = "PROF 7300 DVB-S/S2",
  2004. .tuner_type = UNSET,
  2005. .radio_type = UNSET,
  2006. .tuner_addr = ADDR_UNSET,
  2007. .radio_addr = ADDR_UNSET,
  2008. .input = {{
  2009. .type = CX88_VMUX_DVB,
  2010. .vmux = 0,
  2011. } },
  2012. .mpeg = CX88_MPEG_DVB,
  2013. },
  2014. [CX88_BOARD_SATTRADE_ST4200] = {
  2015. .name = "SATTRADE ST4200 DVB-S/S2",
  2016. .tuner_type = UNSET,
  2017. .radio_type = UNSET,
  2018. .tuner_addr = ADDR_UNSET,
  2019. .radio_addr = ADDR_UNSET,
  2020. .input = {{
  2021. .type = CX88_VMUX_DVB,
  2022. .vmux = 0,
  2023. } },
  2024. .mpeg = CX88_MPEG_DVB,
  2025. },
  2026. [CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII] = {
  2027. .name = "Terratec Cinergy HT PCI MKII",
  2028. .tuner_type = TUNER_XC2028,
  2029. .tuner_addr = 0x61,
  2030. .radio_type = TUNER_XC2028,
  2031. .radio_addr = 0x61,
  2032. .input = { {
  2033. .type = CX88_VMUX_TELEVISION,
  2034. .vmux = 0,
  2035. .gpio0 = 0x004ff,
  2036. .gpio1 = 0x010ff,
  2037. .gpio2 = 0x00001,
  2038. }, {
  2039. .type = CX88_VMUX_COMPOSITE1,
  2040. .vmux = 1,
  2041. .gpio0 = 0x004fb,
  2042. .gpio1 = 0x010ef,
  2043. .audioroute = 1,
  2044. }, {
  2045. .type = CX88_VMUX_SVIDEO,
  2046. .vmux = 2,
  2047. .gpio0 = 0x004fb,
  2048. .gpio1 = 0x010ef,
  2049. .audioroute = 1,
  2050. } },
  2051. .radio = {
  2052. .type = CX88_RADIO,
  2053. .gpio0 = 0x004ff,
  2054. .gpio1 = 0x010ff,
  2055. .gpio2 = 0x0ff,
  2056. },
  2057. .mpeg = CX88_MPEG_DVB,
  2058. },
  2059. [CX88_BOARD_HAUPPAUGE_IRONLY] = {
  2060. .name = "Hauppauge WinTV-IR Only",
  2061. .tuner_type = UNSET,
  2062. .radio_type = UNSET,
  2063. .tuner_addr = ADDR_UNSET,
  2064. .radio_addr = ADDR_UNSET,
  2065. },
  2066. [CX88_BOARD_WINFAST_DTV1800H] = {
  2067. .name = "Leadtek WinFast DTV1800 Hybrid",
  2068. .tuner_type = TUNER_XC2028,
  2069. .radio_type = TUNER_XC2028,
  2070. .tuner_addr = 0x61,
  2071. .radio_addr = 0x61,
  2072. /*
  2073. * GPIO setting
  2074. *
  2075. * 2: mute (0=off,1=on)
  2076. * 12: tuner reset pin
  2077. * 13: audio source (0=tuner audio,1=line in)
  2078. * 14: FM (0=on,1=off ???)
  2079. */
  2080. .input = {{
  2081. .type = CX88_VMUX_TELEVISION,
  2082. .vmux = 0,
  2083. .gpio0 = 0x0400, /* pin 2 = 0 */
  2084. .gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */
  2085. .gpio2 = 0x0000,
  2086. }, {
  2087. .type = CX88_VMUX_COMPOSITE1,
  2088. .vmux = 1,
  2089. .gpio0 = 0x0400, /* pin 2 = 0 */
  2090. .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
  2091. .gpio2 = 0x0000,
  2092. }, {
  2093. .type = CX88_VMUX_SVIDEO,
  2094. .vmux = 2,
  2095. .gpio0 = 0x0400, /* pin 2 = 0 */
  2096. .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
  2097. .gpio2 = 0x0000,
  2098. } },
  2099. .radio = {
  2100. .type = CX88_RADIO,
  2101. .gpio0 = 0x0400, /* pin 2 = 0 */
  2102. .gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */
  2103. .gpio2 = 0x0000,
  2104. },
  2105. .mpeg = CX88_MPEG_DVB,
  2106. },
  2107. [CX88_BOARD_PROF_7301] = {
  2108. .name = "Prof 7301 DVB-S/S2",
  2109. .tuner_type = UNSET,
  2110. .radio_type = UNSET,
  2111. .tuner_addr = ADDR_UNSET,
  2112. .radio_addr = ADDR_UNSET,
  2113. .input = { {
  2114. .type = CX88_VMUX_DVB,
  2115. .vmux = 0,
  2116. } },
  2117. .mpeg = CX88_MPEG_DVB,
  2118. },
  2119. [CX88_BOARD_TWINHAN_VP1027_DVBS] = {
  2120. .name = "Twinhan VP-1027 DVB-S",
  2121. .tuner_type = TUNER_ABSENT,
  2122. .radio_type = UNSET,
  2123. .tuner_addr = ADDR_UNSET,
  2124. .radio_addr = ADDR_UNSET,
  2125. .input = {{
  2126. .type = CX88_VMUX_DVB,
  2127. .vmux = 0,
  2128. } },
  2129. .mpeg = CX88_MPEG_DVB,
  2130. },
  2131. };
  2132. /* ------------------------------------------------------------------ */
  2133. /* PCI subsystem IDs */
  2134. static const struct cx88_subid cx88_subids[] = {
  2135. {
  2136. .subvendor = 0x0070,
  2137. .subdevice = 0x3400,
  2138. .card = CX88_BOARD_HAUPPAUGE,
  2139. },{
  2140. .subvendor = 0x0070,
  2141. .subdevice = 0x3401,
  2142. .card = CX88_BOARD_HAUPPAUGE,
  2143. },{
  2144. .subvendor = 0x14c7,
  2145. .subdevice = 0x0106,
  2146. .card = CX88_BOARD_GDI,
  2147. },{
  2148. .subvendor = 0x14c7,
  2149. .subdevice = 0x0107, /* with mpeg encoder */
  2150. .card = CX88_BOARD_GDI,
  2151. },{
  2152. .subvendor = PCI_VENDOR_ID_ATI,
  2153. .subdevice = 0x00f8,
  2154. .card = CX88_BOARD_ATI_WONDER_PRO,
  2155. }, {
  2156. .subvendor = PCI_VENDOR_ID_ATI,
  2157. .subdevice = 0x00f9,
  2158. .card = CX88_BOARD_ATI_WONDER_PRO,
  2159. }, {
  2160. .subvendor = 0x107d,
  2161. .subdevice = 0x6611,
  2162. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  2163. },{
  2164. .subvendor = 0x107d,
  2165. .subdevice = 0x6613, /* NTSC */
  2166. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  2167. },{
  2168. .subvendor = 0x107d,
  2169. .subdevice = 0x6620,
  2170. .card = CX88_BOARD_WINFAST_DV2000,
  2171. },{
  2172. .subvendor = 0x107d,
  2173. .subdevice = 0x663b,
  2174. .card = CX88_BOARD_LEADTEK_PVR2000,
  2175. },{
  2176. .subvendor = 0x107d,
  2177. .subdevice = 0x663c,
  2178. .card = CX88_BOARD_LEADTEK_PVR2000,
  2179. },{
  2180. .subvendor = 0x1461,
  2181. .subdevice = 0x000b,
  2182. .card = CX88_BOARD_AVERTV_STUDIO_303,
  2183. },{
  2184. .subvendor = 0x1462,
  2185. .subdevice = 0x8606,
  2186. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  2187. },{
  2188. .subvendor = 0x10fc,
  2189. .subdevice = 0xd003,
  2190. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  2191. },{
  2192. .subvendor = 0x1043,
  2193. .subdevice = 0x4823, /* with mpeg encoder */
  2194. .card = CX88_BOARD_ASUS_PVR_416,
  2195. },{
  2196. .subvendor = 0x17de,
  2197. .subdevice = 0x08a6,
  2198. .card = CX88_BOARD_KWORLD_DVB_T,
  2199. },{
  2200. .subvendor = 0x18ac,
  2201. .subdevice = 0xd810,
  2202. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  2203. },{
  2204. .subvendor = 0x18ac,
  2205. .subdevice = 0xd820,
  2206. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  2207. },{
  2208. .subvendor = 0x18ac,
  2209. .subdevice = 0xdb00,
  2210. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  2211. },{
  2212. .subvendor = 0x0070,
  2213. .subdevice = 0x9002,
  2214. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2215. },{
  2216. .subvendor = 0x14f1,
  2217. .subdevice = 0x0187,
  2218. .card = CX88_BOARD_CONEXANT_DVB_T1,
  2219. },{
  2220. .subvendor = 0x1540,
  2221. .subdevice = 0x2580,
  2222. .card = CX88_BOARD_PROVIDEO_PV259,
  2223. },{
  2224. .subvendor = 0x18ac,
  2225. .subdevice = 0xdb10,
  2226. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  2227. },{
  2228. .subvendor = 0x1554,
  2229. .subdevice = 0x4811,
  2230. .card = CX88_BOARD_PIXELVIEW,
  2231. },{
  2232. .subvendor = 0x7063,
  2233. .subdevice = 0x3000, /* HD-3000 card */
  2234. .card = CX88_BOARD_PCHDTV_HD3000,
  2235. },{
  2236. .subvendor = 0x17de,
  2237. .subdevice = 0xa8a6,
  2238. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  2239. },{
  2240. .subvendor = 0x0070,
  2241. .subdevice = 0x2801,
  2242. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  2243. },{
  2244. .subvendor = 0x14f1,
  2245. .subdevice = 0x0342,
  2246. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  2247. },{
  2248. .subvendor = 0x10fc,
  2249. .subdevice = 0xd035,
  2250. .card = CX88_BOARD_IODATA_GVBCTV7E,
  2251. },{
  2252. .subvendor = 0x1421,
  2253. .subdevice = 0x0334,
  2254. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  2255. },{
  2256. .subvendor = 0x153b,
  2257. .subdevice = 0x1166,
  2258. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  2259. },{
  2260. .subvendor = 0x18ac,
  2261. .subdevice = 0xd500,
  2262. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  2263. },{
  2264. .subvendor = 0x1461,
  2265. .subdevice = 0x8011,
  2266. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  2267. },{
  2268. .subvendor = PCI_VENDOR_ID_ATI,
  2269. .subdevice = 0xa101,
  2270. .card = CX88_BOARD_ATI_HDTVWONDER,
  2271. },{
  2272. .subvendor = 0x107d,
  2273. .subdevice = 0x665f,
  2274. .card = CX88_BOARD_WINFAST_DTV1000,
  2275. },{
  2276. .subvendor = 0x1461,
  2277. .subdevice = 0x000a,
  2278. .card = CX88_BOARD_AVERTV_303,
  2279. },{
  2280. .subvendor = 0x0070,
  2281. .subdevice = 0x9200,
  2282. .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
  2283. },{
  2284. .subvendor = 0x0070,
  2285. .subdevice = 0x9201,
  2286. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  2287. },{
  2288. .subvendor = 0x0070,
  2289. .subdevice = 0x9202,
  2290. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  2291. },{
  2292. .subvendor = 0x17de,
  2293. .subdevice = 0x08b2,
  2294. .card = CX88_BOARD_KWORLD_DVBS_100,
  2295. },{
  2296. .subvendor = 0x0070,
  2297. .subdevice = 0x9400,
  2298. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  2299. },{
  2300. .subvendor = 0x0070,
  2301. .subdevice = 0x9402,
  2302. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  2303. },{
  2304. .subvendor = 0x0070,
  2305. .subdevice = 0x9800,
  2306. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  2307. },{
  2308. .subvendor = 0x0070,
  2309. .subdevice = 0x9802,
  2310. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  2311. },{
  2312. .subvendor = 0x0070,
  2313. .subdevice = 0x9001,
  2314. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2315. },{
  2316. .subvendor = 0x1822,
  2317. .subdevice = 0x0025,
  2318. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  2319. },{
  2320. .subvendor = 0x17de,
  2321. .subdevice = 0x08a1,
  2322. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  2323. },{
  2324. .subvendor = 0x18ac,
  2325. .subdevice = 0xdb50,
  2326. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  2327. },{
  2328. .subvendor = 0x18ac,
  2329. .subdevice = 0xdb54,
  2330. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  2331. /* Re-branded DViCO: DigitalNow DVB-T Dual */
  2332. },{
  2333. .subvendor = 0x18ac,
  2334. .subdevice = 0xdb11,
  2335. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  2336. /* Re-branded DViCO: UltraView DVB-T Plus */
  2337. }, {
  2338. .subvendor = 0x18ac,
  2339. .subdevice = 0xdb30,
  2340. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
  2341. }, {
  2342. .subvendor = 0x17de,
  2343. .subdevice = 0x0840,
  2344. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  2345. },{
  2346. .subvendor = 0x1421,
  2347. .subdevice = 0x0305,
  2348. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  2349. },{
  2350. .subvendor = 0x18ac,
  2351. .subdevice = 0xdb40,
  2352. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  2353. },{
  2354. .subvendor = 0x18ac,
  2355. .subdevice = 0xdb44,
  2356. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  2357. },{
  2358. .subvendor = 0x7063,
  2359. .subdevice = 0x5500,
  2360. .card = CX88_BOARD_PCHDTV_HD5500,
  2361. },{
  2362. .subvendor = 0x17de,
  2363. .subdevice = 0x0841,
  2364. .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
  2365. },{
  2366. .subvendor = 0x1822,
  2367. .subdevice = 0x0019,
  2368. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  2369. },{
  2370. .subvendor = 0x1554,
  2371. .subdevice = 0x4813,
  2372. .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
  2373. },{
  2374. .subvendor = 0x14f1,
  2375. .subdevice = 0x0842,
  2376. .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
  2377. },{
  2378. .subvendor = 0x107d,
  2379. .subdevice = 0x665e,
  2380. .card = CX88_BOARD_WINFAST_DTV2000H,
  2381. },{
  2382. .subvendor = 0x107d,
  2383. .subdevice = 0x6f2b,
  2384. .card = CX88_BOARD_WINFAST_DTV2000H_J,
  2385. },{
  2386. .subvendor = 0x18ac,
  2387. .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
  2388. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  2389. },{
  2390. .subvendor = 0x14f1,
  2391. .subdevice = 0x0084,
  2392. .card = CX88_BOARD_GENIATECH_DVBS,
  2393. },{
  2394. .subvendor = 0x0070,
  2395. .subdevice = 0x1404,
  2396. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2397. }, {
  2398. .subvendor = 0x18ac,
  2399. .subdevice = 0xdc00,
  2400. .card = CX88_BOARD_SAMSUNG_SMT_7020,
  2401. }, {
  2402. .subvendor = 0x18ac,
  2403. .subdevice = 0xdccd,
  2404. .card = CX88_BOARD_SAMSUNG_SMT_7020,
  2405. },{
  2406. .subvendor = 0x1461,
  2407. .subdevice = 0xc111, /* AverMedia M150-D */
  2408. /* This board is known to work with the ASUS PVR416 config */
  2409. .card = CX88_BOARD_ASUS_PVR_416,
  2410. },{
  2411. .subvendor = 0xc180,
  2412. .subdevice = 0xc980,
  2413. .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
  2414. },{
  2415. .subvendor = 0x0070,
  2416. .subdevice = 0x9600,
  2417. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2418. },{
  2419. .subvendor = 0x0070,
  2420. .subdevice = 0x9601,
  2421. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2422. },{
  2423. .subvendor = 0x0070,
  2424. .subdevice = 0x9602,
  2425. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2426. },{
  2427. .subvendor = 0x107d,
  2428. .subdevice = 0x6632,
  2429. .card = CX88_BOARD_LEADTEK_PVR2000,
  2430. },{
  2431. .subvendor = 0x12ab,
  2432. .subdevice = 0x2300, /* Club3D Zap TV2100 */
  2433. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  2434. },{
  2435. .subvendor = 0x0070,
  2436. .subdevice = 0x9000,
  2437. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2438. },{
  2439. .subvendor = 0x0070,
  2440. .subdevice = 0x1400,
  2441. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2442. },{
  2443. .subvendor = 0x0070,
  2444. .subdevice = 0x1401,
  2445. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2446. },{
  2447. .subvendor = 0x0070,
  2448. .subdevice = 0x1402,
  2449. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2450. },{
  2451. .subvendor = 0x1421,
  2452. .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
  2453. .card = CX88_BOARD_KWORLD_DVBS_100,
  2454. },{
  2455. .subvendor = 0x1421,
  2456. .subdevice = 0x0390,
  2457. .card = CX88_BOARD_ADSTECH_PTV_390,
  2458. },{
  2459. .subvendor = 0x11bd,
  2460. .subdevice = 0x0051,
  2461. .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
  2462. }, {
  2463. .subvendor = 0x18ac,
  2464. .subdevice = 0xd530,
  2465. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
  2466. }, {
  2467. .subvendor = 0x12ab,
  2468. .subdevice = 0x1788,
  2469. .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
  2470. }, {
  2471. .subvendor = 0x14f1,
  2472. .subdevice = 0xea3d,
  2473. .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
  2474. }, {
  2475. .subvendor = 0x107d,
  2476. .subdevice = 0x6f18,
  2477. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
  2478. }, {
  2479. .subvendor = 0x14f1,
  2480. .subdevice = 0x8852,
  2481. .card = CX88_BOARD_GENIATECH_X8000_MT,
  2482. }, {
  2483. .subvendor = 0x18ac,
  2484. .subdevice = 0xd610,
  2485. .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
  2486. }, {
  2487. .subvendor = 0x1554,
  2488. .subdevice = 0x4935,
  2489. .card = CX88_BOARD_PROLINK_PV_8000GT,
  2490. }, {
  2491. .subvendor = 0x1554,
  2492. .subdevice = 0x4976,
  2493. .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
  2494. }, {
  2495. .subvendor = 0x17de,
  2496. .subdevice = 0x08c1,
  2497. .card = CX88_BOARD_KWORLD_ATSC_120,
  2498. }, {
  2499. .subvendor = 0x0070,
  2500. .subdevice = 0x6900,
  2501. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2502. }, {
  2503. .subvendor = 0x0070,
  2504. .subdevice = 0x6904,
  2505. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2506. }, {
  2507. .subvendor = 0x0070,
  2508. .subdevice = 0x6902,
  2509. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2510. }, {
  2511. .subvendor = 0x0070,
  2512. .subdevice = 0x6905,
  2513. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2514. }, {
  2515. .subvendor = 0x0070,
  2516. .subdevice = 0x6906,
  2517. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2518. }, {
  2519. .subvendor = 0xd420,
  2520. .subdevice = 0x9022,
  2521. .card = CX88_BOARD_TEVII_S420,
  2522. }, {
  2523. .subvendor = 0xd460,
  2524. .subdevice = 0x9022,
  2525. .card = CX88_BOARD_TEVII_S460,
  2526. }, {
  2527. .subvendor = 0xd464,
  2528. .subdevice = 0x9022,
  2529. .card = CX88_BOARD_TEVII_S464,
  2530. }, {
  2531. .subvendor = 0xA044,
  2532. .subdevice = 0x2011,
  2533. .card = CX88_BOARD_OMICOM_SS4_PCI,
  2534. }, {
  2535. .subvendor = 0x8910,
  2536. .subdevice = 0x8888,
  2537. .card = CX88_BOARD_TBS_8910,
  2538. }, {
  2539. .subvendor = 0x8920,
  2540. .subdevice = 0x8888,
  2541. .card = CX88_BOARD_TBS_8920,
  2542. }, {
  2543. .subvendor = 0xb022,
  2544. .subdevice = 0x3022,
  2545. .card = CX88_BOARD_PROF_6200,
  2546. }, {
  2547. .subvendor = 0xB033,
  2548. .subdevice = 0x3033,
  2549. .card = CX88_BOARD_PROF_7300,
  2550. }, {
  2551. .subvendor = 0xb200,
  2552. .subdevice = 0x4200,
  2553. .card = CX88_BOARD_SATTRADE_ST4200,
  2554. }, {
  2555. .subvendor = 0x153b,
  2556. .subdevice = 0x1177,
  2557. .card = CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII,
  2558. }, {
  2559. .subvendor = 0x0070,
  2560. .subdevice = 0x9290,
  2561. .card = CX88_BOARD_HAUPPAUGE_IRONLY,
  2562. }, {
  2563. .subvendor = 0x107d,
  2564. .subdevice = 0x6654,
  2565. .card = CX88_BOARD_WINFAST_DTV1800H,
  2566. }, {
  2567. /* PVR2000 PAL Model [107d:6630] */
  2568. .subvendor = 0x107d,
  2569. .subdevice = 0x6630,
  2570. .card = CX88_BOARD_LEADTEK_PVR2000,
  2571. }, {
  2572. /* PVR2000 PAL Model [107d:6638] */
  2573. .subvendor = 0x107d,
  2574. .subdevice = 0x6638,
  2575. .card = CX88_BOARD_LEADTEK_PVR2000,
  2576. }, {
  2577. /* PVR2000 NTSC Model [107d:6631] */
  2578. .subvendor = 0x107d,
  2579. .subdevice = 0x6631,
  2580. .card = CX88_BOARD_LEADTEK_PVR2000,
  2581. }, {
  2582. /* PVR2000 NTSC Model [107d:6637] */
  2583. .subvendor = 0x107d,
  2584. .subdevice = 0x6637,
  2585. .card = CX88_BOARD_LEADTEK_PVR2000,
  2586. }, {
  2587. /* PVR2000 NTSC Model [107d:663d] */
  2588. .subvendor = 0x107d,
  2589. .subdevice = 0x663d,
  2590. .card = CX88_BOARD_LEADTEK_PVR2000,
  2591. }, {
  2592. /* DV2000 NTSC Model [107d:6621] */
  2593. .subvendor = 0x107d,
  2594. .subdevice = 0x6621,
  2595. .card = CX88_BOARD_WINFAST_DV2000,
  2596. }, {
  2597. /* TV2000 XP Global [107d:6618] */
  2598. .subvendor = 0x107d,
  2599. .subdevice = 0x6618,
  2600. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
  2601. }, {
  2602. .subvendor = 0xb034,
  2603. .subdevice = 0x3034,
  2604. .card = CX88_BOARD_PROF_7301,
  2605. }, {
  2606. .subvendor = 0x1822,
  2607. .subdevice = 0x0023,
  2608. .card = CX88_BOARD_TWINHAN_VP1027_DVBS,
  2609. },
  2610. };
  2611. /* ----------------------------------------------------------------------- */
  2612. /* some leadtek specific stuff */
  2613. static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2614. {
  2615. if (eeprom_data[4] != 0x7d ||
  2616. eeprom_data[5] != 0x10 ||
  2617. eeprom_data[7] != 0x66) {
  2618. warn_printk(core, "Leadtek eeprom invalid.\n");
  2619. return;
  2620. }
  2621. /* Terry Wu <terrywu2009@gmail.com> */
  2622. switch (eeprom_data[6]) {
  2623. case 0x13: /* SSID 6613 for TV2000 XP Expert NTSC Model */
  2624. case 0x21: /* SSID 6621 for DV2000 NTSC Model */
  2625. case 0x31: /* SSID 6631 for PVR2000 NTSC Model */
  2626. case 0x37: /* SSID 6637 for PVR2000 NTSC Model */
  2627. case 0x3d: /* SSID 6637 for PVR2000 NTSC Model */
  2628. core->board.tuner_type = TUNER_PHILIPS_FM1236_MK3;
  2629. break;
  2630. default:
  2631. core->board.tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
  2632. break;
  2633. }
  2634. info_printk(core, "Leadtek Winfast 2000XP Expert config: "
  2635. "tuner=%d, eeprom[0]=0x%02x\n",
  2636. core->board.tuner_type, eeprom_data[0]);
  2637. }
  2638. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2639. {
  2640. struct tveeprom tv;
  2641. tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
  2642. core->board.tuner_type = tv.tuner_type;
  2643. core->tuner_formats = tv.tuner_formats;
  2644. core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
  2645. /* Make sure we support the board model */
  2646. switch (tv.model)
  2647. {
  2648. case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
  2649. case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
  2650. case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
  2651. case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
  2652. case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
  2653. case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
  2654. case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
  2655. case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
  2656. case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
  2657. case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
  2658. case 34519: /* WinTV-PCI-FM */
  2659. case 69009:
  2660. /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
  2661. case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
  2662. case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
  2663. case 69559:
  2664. /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
  2665. case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
  2666. case 90002: /* Nova-T-PCI (9002) */
  2667. case 92001: /* Nova-S-Plus (Video and IR) */
  2668. case 92002: /* Nova-S-Plus (Video and IR) */
  2669. case 90003: /* Nova-T-PCI (9002 No RF out) */
  2670. case 90500: /* Nova-T-PCI (oem) */
  2671. case 90501: /* Nova-T-PCI (oem/IR) */
  2672. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  2673. case 92900: /* WinTV-IROnly (No analog or digital Video inputs) */
  2674. case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
  2675. case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
  2676. case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
  2677. case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
  2678. case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
  2679. case 96569: /* WinTV-HVR1300 () */
  2680. case 96659: /* WinTV-HVR1300 () */
  2681. case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
  2682. /* known */
  2683. break;
  2684. case CX88_BOARD_SAMSUNG_SMT_7020:
  2685. cx_set(MO_GP0_IO, 0x008989FF);
  2686. break;
  2687. default:
  2688. warn_printk(core, "warning: unknown hauppauge model #%d\n",
  2689. tv.model);
  2690. break;
  2691. }
  2692. info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
  2693. }
  2694. /* ----------------------------------------------------------------------- */
  2695. /* some GDI (was: Modular Technology) specific stuff */
  2696. static const struct {
  2697. int id;
  2698. int fm;
  2699. const char *name;
  2700. } gdi_tuner[] = {
  2701. [ 0x01 ] = { .id = TUNER_ABSENT,
  2702. .name = "NTSC_M" },
  2703. [ 0x02 ] = { .id = TUNER_ABSENT,
  2704. .name = "PAL_B" },
  2705. [ 0x03 ] = { .id = TUNER_ABSENT,
  2706. .name = "PAL_I" },
  2707. [ 0x04 ] = { .id = TUNER_ABSENT,
  2708. .name = "PAL_D" },
  2709. [ 0x05 ] = { .id = TUNER_ABSENT,
  2710. .name = "SECAM" },
  2711. [ 0x10 ] = { .id = TUNER_ABSENT,
  2712. .fm = 1,
  2713. .name = "TEMIC_4049" },
  2714. [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
  2715. .name = "TEMIC_4136" },
  2716. [ 0x12 ] = { .id = TUNER_ABSENT,
  2717. .name = "TEMIC_4146" },
  2718. [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
  2719. .fm = 1,
  2720. .name = "PHILIPS_FQ1216_MK3" },
  2721. [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
  2722. .name = "PHILIPS_FQ1236_MK3" },
  2723. [ 0x22 ] = { .id = TUNER_ABSENT,
  2724. .name = "PHILIPS_FI1236_MK3" },
  2725. [ 0x23 ] = { .id = TUNER_ABSENT,
  2726. .name = "PHILIPS_FI1216_MK3" },
  2727. };
  2728. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2729. {
  2730. const char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  2731. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  2732. info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
  2733. if (NULL == name)
  2734. return;
  2735. core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  2736. core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
  2737. CX88_RADIO : 0;
  2738. }
  2739. /* ------------------------------------------------------------------- */
  2740. /* some Divco specific stuff */
  2741. static int cx88_dvico_xc2028_callback(struct cx88_core *core,
  2742. int command, int arg)
  2743. {
  2744. switch (command) {
  2745. case XC2028_TUNER_RESET:
  2746. switch (core->boardnr) {
  2747. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2748. /* GPIO-4 xc3028 tuner */
  2749. cx_set(MO_GP0_IO, 0x00001000);
  2750. cx_clear(MO_GP0_IO, 0x00000010);
  2751. msleep(100);
  2752. cx_set(MO_GP0_IO, 0x00000010);
  2753. msleep(100);
  2754. break;
  2755. default:
  2756. cx_write(MO_GP0_IO, 0x101000);
  2757. mdelay(5);
  2758. cx_set(MO_GP0_IO, 0x101010);
  2759. }
  2760. break;
  2761. default:
  2762. return -EINVAL;
  2763. }
  2764. return 0;
  2765. }
  2766. /* ----------------------------------------------------------------------- */
  2767. /* some Geniatech specific stuff */
  2768. static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
  2769. int command, int mode)
  2770. {
  2771. switch (command) {
  2772. case XC2028_TUNER_RESET:
  2773. switch (INPUT(core->input).type) {
  2774. case CX88_RADIO:
  2775. break;
  2776. case CX88_VMUX_DVB:
  2777. cx_write(MO_GP1_IO, 0x030302);
  2778. mdelay(50);
  2779. break;
  2780. default:
  2781. cx_write(MO_GP1_IO, 0x030301);
  2782. mdelay(50);
  2783. }
  2784. cx_write(MO_GP1_IO, 0x101010);
  2785. mdelay(50);
  2786. cx_write(MO_GP1_IO, 0x101000);
  2787. mdelay(50);
  2788. cx_write(MO_GP1_IO, 0x101010);
  2789. mdelay(50);
  2790. return 0;
  2791. }
  2792. return -EINVAL;
  2793. }
  2794. static int cx88_xc3028_winfast1800h_callback(struct cx88_core *core,
  2795. int command, int arg)
  2796. {
  2797. switch (command) {
  2798. case XC2028_TUNER_RESET:
  2799. /* GPIO 12 (xc3028 tuner reset) */
  2800. cx_set(MO_GP1_IO, 0x1010);
  2801. mdelay(50);
  2802. cx_clear(MO_GP1_IO, 0x10);
  2803. mdelay(50);
  2804. cx_set(MO_GP1_IO, 0x10);
  2805. mdelay(50);
  2806. return 0;
  2807. }
  2808. return -EINVAL;
  2809. }
  2810. /* ------------------------------------------------------------------- */
  2811. /* some Divco specific stuff */
  2812. static int cx88_pv_8000gt_callback(struct cx88_core *core,
  2813. int command, int arg)
  2814. {
  2815. switch (command) {
  2816. case XC2028_TUNER_RESET:
  2817. cx_write(MO_GP2_IO, 0xcf7);
  2818. mdelay(50);
  2819. cx_write(MO_GP2_IO, 0xef5);
  2820. mdelay(50);
  2821. cx_write(MO_GP2_IO, 0xcf7);
  2822. break;
  2823. default:
  2824. return -EINVAL;
  2825. }
  2826. return 0;
  2827. }
  2828. /* ----------------------------------------------------------------------- */
  2829. /* some DViCO specific stuff */
  2830. static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
  2831. {
  2832. struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
  2833. int i, err;
  2834. static u8 init_bufs[13][5] = {
  2835. { 0x10, 0x00, 0x20, 0x01, 0x03 },
  2836. { 0x10, 0x10, 0x01, 0x00, 0x21 },
  2837. { 0x10, 0x10, 0x10, 0x00, 0xCA },
  2838. { 0x10, 0x10, 0x12, 0x00, 0x08 },
  2839. { 0x10, 0x10, 0x13, 0x00, 0x0A },
  2840. { 0x10, 0x10, 0x16, 0x01, 0xC0 },
  2841. { 0x10, 0x10, 0x22, 0x01, 0x3D },
  2842. { 0x10, 0x10, 0x73, 0x01, 0x2E },
  2843. { 0x10, 0x10, 0x72, 0x00, 0xC5 },
  2844. { 0x10, 0x10, 0x71, 0x01, 0x97 },
  2845. { 0x10, 0x10, 0x70, 0x00, 0x0F },
  2846. { 0x10, 0x10, 0xB0, 0x00, 0x01 },
  2847. { 0x03, 0x0C },
  2848. };
  2849. for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
  2850. msg.buf = init_bufs[i];
  2851. msg.len = (i != 12 ? 5 : 2);
  2852. err = i2c_transfer(&core->i2c_adap, &msg, 1);
  2853. if (err != 1) {
  2854. warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
  2855. "failed (err = %d)!\n", i, err);
  2856. return;
  2857. }
  2858. }
  2859. }
  2860. static int cx88_xc2028_tuner_callback(struct cx88_core *core,
  2861. int command, int arg)
  2862. {
  2863. /* Board-specific callbacks */
  2864. switch (core->boardnr) {
  2865. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  2866. case CX88_BOARD_GENIATECH_X8000_MT:
  2867. case CX88_BOARD_KWORLD_ATSC_120:
  2868. return cx88_xc3028_geniatech_tuner_callback(core,
  2869. command, arg);
  2870. case CX88_BOARD_PROLINK_PV_8000GT:
  2871. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  2872. return cx88_pv_8000gt_callback(core, command, arg);
  2873. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2874. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2875. return cx88_dvico_xc2028_callback(core, command, arg);
  2876. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  2877. case CX88_BOARD_WINFAST_DTV1800H:
  2878. return cx88_xc3028_winfast1800h_callback(core, command, arg);
  2879. }
  2880. switch (command) {
  2881. case XC2028_TUNER_RESET:
  2882. switch (INPUT(core->input).type) {
  2883. case CX88_RADIO:
  2884. info_printk(core, "setting GPIO to radio!\n");
  2885. cx_write(MO_GP0_IO, 0x4ff);
  2886. mdelay(250);
  2887. cx_write(MO_GP2_IO, 0xff);
  2888. mdelay(250);
  2889. break;
  2890. case CX88_VMUX_DVB: /* Digital TV*/
  2891. default: /* Analog TV */
  2892. info_printk(core, "setting GPIO to TV!\n");
  2893. break;
  2894. }
  2895. cx_write(MO_GP1_IO, 0x101010);
  2896. mdelay(250);
  2897. cx_write(MO_GP1_IO, 0x101000);
  2898. mdelay(250);
  2899. cx_write(MO_GP1_IO, 0x101010);
  2900. mdelay(250);
  2901. return 0;
  2902. }
  2903. return -EINVAL;
  2904. }
  2905. /* ----------------------------------------------------------------------- */
  2906. /* Tuner callback function. Currently only needed for the Pinnacle *
  2907. * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
  2908. * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
  2909. static int cx88_xc5000_tuner_callback(struct cx88_core *core,
  2910. int command, int arg)
  2911. {
  2912. switch (core->boardnr) {
  2913. case CX88_BOARD_PINNACLE_PCTV_HD_800i:
  2914. if (command == 0) { /* This is the reset command from xc5000 */
  2915. /* djh - According to the engineer at PCTV Systems,
  2916. the xc5000 reset pin is supposed to be on GPIO12.
  2917. However, despite three nights of effort, pulling
  2918. that GPIO low didn't reset the xc5000. While
  2919. pulling MO_SRST_IO low does reset the xc5000, this
  2920. also resets in the s5h1409 being reset as well.
  2921. This causes tuning to always fail since the internal
  2922. state of the s5h1409 does not match the driver's
  2923. state. Given that the only two conditions in which
  2924. the driver performs a reset is during firmware load
  2925. and powering down the chip, I am taking out the
  2926. reset. We know that the chip is being reset
  2927. when the cx88 comes online, and not being able to
  2928. do power management for this board is worse than
  2929. not having any tuning at all. */
  2930. return 0;
  2931. } else {
  2932. err_printk(core, "xc5000: unknown tuner "
  2933. "callback command.\n");
  2934. return -EINVAL;
  2935. }
  2936. break;
  2937. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  2938. if (command == 0) { /* This is the reset command from xc5000 */
  2939. cx_clear(MO_GP0_IO, 0x00000010);
  2940. msleep(10);
  2941. cx_set(MO_GP0_IO, 0x00000010);
  2942. return 0;
  2943. } else {
  2944. printk(KERN_ERR
  2945. "xc5000: unknown tuner callback command.\n");
  2946. return -EINVAL;
  2947. }
  2948. break;
  2949. }
  2950. return 0; /* Should never be here */
  2951. }
  2952. int cx88_tuner_callback(void *priv, int component, int command, int arg)
  2953. {
  2954. struct i2c_algo_bit_data *i2c_algo = priv;
  2955. struct cx88_core *core;
  2956. if (!i2c_algo) {
  2957. printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
  2958. return -EINVAL;
  2959. }
  2960. core = i2c_algo->data;
  2961. if (!core) {
  2962. printk(KERN_ERR "cx88: Error - device struct undefined.\n");
  2963. return -EINVAL;
  2964. }
  2965. if (component != DVB_FRONTEND_COMPONENT_TUNER)
  2966. return -EINVAL;
  2967. switch (core->board.tuner_type) {
  2968. case TUNER_XC2028:
  2969. info_printk(core, "Calling XC2028/3028 callback\n");
  2970. return cx88_xc2028_tuner_callback(core, command, arg);
  2971. case TUNER_XC5000:
  2972. info_printk(core, "Calling XC5000 callback\n");
  2973. return cx88_xc5000_tuner_callback(core, command, arg);
  2974. }
  2975. err_printk(core, "Error: Calling callback for tuner %d\n",
  2976. core->board.tuner_type);
  2977. return -EINVAL;
  2978. }
  2979. EXPORT_SYMBOL(cx88_tuner_callback);
  2980. /* ----------------------------------------------------------------------- */
  2981. static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  2982. {
  2983. int i;
  2984. if (0 == pci->subsystem_vendor &&
  2985. 0 == pci->subsystem_device) {
  2986. printk(KERN_ERR
  2987. "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
  2988. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  2989. "%s: workaround that. Redirect complaints to the vendor of\n"
  2990. "%s: the TV card. Best regards,\n"
  2991. "%s: -- tux\n",
  2992. core->name,core->name,core->name,core->name,core->name);
  2993. } else {
  2994. printk(KERN_ERR
  2995. "%s: Your board isn't known (yet) to the driver. You can\n"
  2996. "%s: try to pick one of the existing card configs via\n"
  2997. "%s: card=<n> insmod option. Updating to the latest\n"
  2998. "%s: version might help as well.\n",
  2999. core->name,core->name,core->name,core->name);
  3000. }
  3001. err_printk(core, "Here is a list of valid choices for the card=<n> "
  3002. "insmod option:\n");
  3003. for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
  3004. printk(KERN_ERR "%s: card=%d -> %s\n",
  3005. core->name, i, cx88_boards[i].name);
  3006. }
  3007. static void cx88_card_setup_pre_i2c(struct cx88_core *core)
  3008. {
  3009. switch (core->boardnr) {
  3010. case CX88_BOARD_HAUPPAUGE_HVR1300:
  3011. /*
  3012. * Bring the 702 demod up before i2c scanning/attach or devices are hidden
  3013. * We leave here with the 702 on the bus
  3014. *
  3015. * "reset the IR receiver on GPIO[3]"
  3016. * Reported by Mike Crash <mike AT mikecrash.com>
  3017. */
  3018. cx_write(MO_GP0_IO, 0x0000ef88);
  3019. udelay(1000);
  3020. cx_clear(MO_GP0_IO, 0x00000088);
  3021. udelay(50);
  3022. cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
  3023. udelay(1000);
  3024. break;
  3025. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  3026. case CX88_BOARD_PROLINK_PV_8000GT:
  3027. cx_write(MO_GP2_IO, 0xcf7);
  3028. mdelay(50);
  3029. cx_write(MO_GP2_IO, 0xef5);
  3030. mdelay(50);
  3031. cx_write(MO_GP2_IO, 0xcf7);
  3032. msleep(10);
  3033. break;
  3034. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  3035. /* Enable the xc5000 tuner */
  3036. cx_set(MO_GP0_IO, 0x00001010);
  3037. break;
  3038. case CX88_BOARD_HAUPPAUGE_HVR3000:
  3039. case CX88_BOARD_HAUPPAUGE_HVR4000:
  3040. /* Init GPIO */
  3041. cx_write(MO_GP0_IO, core->board.input[0].gpio0);
  3042. udelay(1000);
  3043. cx_clear(MO_GP0_IO, 0x00000080);
  3044. udelay(50);
  3045. cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
  3046. udelay(1000);
  3047. break;
  3048. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  3049. case CX88_BOARD_WINFAST_DTV1800H:
  3050. /* GPIO 12 (xc3028 tuner reset) */
  3051. cx_set(MO_GP1_IO, 0x1010);
  3052. mdelay(50);
  3053. cx_clear(MO_GP1_IO, 0x10);
  3054. mdelay(50);
  3055. cx_set(MO_GP1_IO, 0x10);
  3056. mdelay(50);
  3057. break;
  3058. case CX88_BOARD_TWINHAN_VP1027_DVBS:
  3059. cx_write(MO_GP0_IO, 0x00003230);
  3060. cx_write(MO_GP0_IO, 0x00003210);
  3061. msleep(1);
  3062. cx_write(MO_GP0_IO, 0x00001230);
  3063. break;
  3064. }
  3065. }
  3066. /*
  3067. * Sets board-dependent xc3028 configuration
  3068. */
  3069. void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
  3070. {
  3071. memset(ctl, 0, sizeof(*ctl));
  3072. ctl->fname = XC2028_DEFAULT_FIRMWARE;
  3073. ctl->max_len = 64;
  3074. switch (core->boardnr) {
  3075. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  3076. /* Now works with firmware version 2.7 */
  3077. if (core->i2c_algo.udelay < 16)
  3078. core->i2c_algo.udelay = 16;
  3079. break;
  3080. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  3081. case CX88_BOARD_WINFAST_DTV1800H:
  3082. ctl->demod = XC3028_FE_ZARLINK456;
  3083. break;
  3084. case CX88_BOARD_KWORLD_ATSC_120:
  3085. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  3086. ctl->demod = XC3028_FE_OREN538;
  3087. break;
  3088. case CX88_BOARD_GENIATECH_X8000_MT:
  3089. /* FIXME: For this board, the xc3028 never recovers after being
  3090. powered down (the reset GPIO probably is not set properly).
  3091. We don't have access to the hardware so we cannot determine
  3092. which GPIO is used for xc3028, so just disable power xc3028
  3093. power management for now */
  3094. ctl->disable_power_mgmt = 1;
  3095. break;
  3096. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  3097. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  3098. case CX88_BOARD_PROLINK_PV_8000GT:
  3099. /*
  3100. * Those boards uses non-MTS firmware
  3101. */
  3102. break;
  3103. case CX88_BOARD_PINNACLE_HYBRID_PCTV:
  3104. case CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII:
  3105. ctl->demod = XC3028_FE_ZARLINK456;
  3106. ctl->mts = 1;
  3107. break;
  3108. default:
  3109. ctl->demod = XC3028_FE_OREN538;
  3110. ctl->mts = 1;
  3111. }
  3112. }
  3113. EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
  3114. static void cx88_card_setup(struct cx88_core *core)
  3115. {
  3116. static u8 eeprom[256];
  3117. struct tuner_setup tun_setup;
  3118. unsigned int mode_mask = T_RADIO | T_ANALOG_TV;
  3119. memset(&tun_setup, 0, sizeof(tun_setup));
  3120. if (0 == core->i2c_rc) {
  3121. core->i2c_client.addr = 0xa0 >> 1;
  3122. tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
  3123. }
  3124. switch (core->boardnr) {
  3125. case CX88_BOARD_HAUPPAUGE:
  3126. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  3127. if (0 == core->i2c_rc)
  3128. hauppauge_eeprom(core, eeprom+8);
  3129. break;
  3130. case CX88_BOARD_GDI:
  3131. if (0 == core->i2c_rc)
  3132. gdi_eeprom(core, eeprom);
  3133. break;
  3134. case CX88_BOARD_LEADTEK_PVR2000:
  3135. case CX88_BOARD_WINFAST_DV2000:
  3136. case CX88_BOARD_WINFAST2000XP_EXPERT:
  3137. if (0 == core->i2c_rc)
  3138. leadtek_eeprom(core, eeprom);
  3139. break;
  3140. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  3141. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  3142. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  3143. case CX88_BOARD_HAUPPAUGE_HVR1100:
  3144. case CX88_BOARD_HAUPPAUGE_HVR1100LP:
  3145. case CX88_BOARD_HAUPPAUGE_HVR3000:
  3146. case CX88_BOARD_HAUPPAUGE_HVR1300:
  3147. case CX88_BOARD_HAUPPAUGE_HVR4000:
  3148. case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
  3149. case CX88_BOARD_HAUPPAUGE_IRONLY:
  3150. if (0 == core->i2c_rc)
  3151. hauppauge_eeprom(core, eeprom);
  3152. break;
  3153. case CX88_BOARD_KWORLD_DVBS_100:
  3154. cx_write(MO_GP0_IO, 0x000007f8);
  3155. cx_write(MO_GP1_IO, 0x00000001);
  3156. break;
  3157. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  3158. /* GPIO0:0 is hooked to demod reset */
  3159. /* GPIO0:4 is hooked to xc3028 reset */
  3160. cx_write(MO_GP0_IO, 0x00111100);
  3161. msleep(1);
  3162. cx_write(MO_GP0_IO, 0x00111111);
  3163. break;
  3164. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
  3165. /* GPIO0:6 is hooked to FX2 reset pin */
  3166. cx_set(MO_GP0_IO, 0x00004040);
  3167. cx_clear(MO_GP0_IO, 0x00000040);
  3168. msleep(1000);
  3169. cx_set(MO_GP0_IO, 0x00004040);
  3170. /* FALLTHROUGH */
  3171. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  3172. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  3173. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
  3174. /* GPIO0:0 is hooked to mt352 reset pin */
  3175. cx_set(MO_GP0_IO, 0x00000101);
  3176. cx_clear(MO_GP0_IO, 0x00000001);
  3177. msleep(1);
  3178. cx_set(MO_GP0_IO, 0x00000101);
  3179. if (0 == core->i2c_rc &&
  3180. core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
  3181. dvico_fusionhdtv_hybrid_init(core);
  3182. break;
  3183. case CX88_BOARD_KWORLD_DVB_T:
  3184. case CX88_BOARD_DNTV_LIVE_DVB_T:
  3185. cx_set(MO_GP0_IO, 0x00000707);
  3186. cx_set(MO_GP2_IO, 0x00000101);
  3187. cx_clear(MO_GP2_IO, 0x00000001);
  3188. msleep(1);
  3189. cx_clear(MO_GP0_IO, 0x00000007);
  3190. cx_set(MO_GP2_IO, 0x00000101);
  3191. break;
  3192. case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
  3193. cx_write(MO_GP0_IO, 0x00080808);
  3194. break;
  3195. case CX88_BOARD_ATI_HDTVWONDER:
  3196. if (0 == core->i2c_rc) {
  3197. /* enable tuner */
  3198. int i;
  3199. static const u8 buffer [][2] = {
  3200. {0x10,0x12},
  3201. {0x13,0x04},
  3202. {0x16,0x00},
  3203. {0x14,0x04},
  3204. {0x17,0x00}
  3205. };
  3206. core->i2c_client.addr = 0x0a;
  3207. for (i = 0; i < ARRAY_SIZE(buffer); i++)
  3208. if (2 != i2c_master_send(&core->i2c_client,
  3209. buffer[i],2))
  3210. warn_printk(core, "Unable to enable "
  3211. "tuner(%i).\n", i);
  3212. }
  3213. break;
  3214. case CX88_BOARD_MSI_TVANYWHERE_MASTER:
  3215. {
  3216. struct v4l2_priv_tun_config tea5767_cfg;
  3217. struct tea5767_ctrl ctl;
  3218. memset(&ctl, 0, sizeof(ctl));
  3219. ctl.high_cut = 1;
  3220. ctl.st_noise = 1;
  3221. ctl.deemph_75 = 1;
  3222. ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
  3223. tea5767_cfg.tuner = TUNER_TEA5767;
  3224. tea5767_cfg.priv = &ctl;
  3225. call_all(core, tuner, s_config, &tea5767_cfg);
  3226. break;
  3227. }
  3228. case CX88_BOARD_TEVII_S420:
  3229. case CX88_BOARD_TEVII_S460:
  3230. case CX88_BOARD_TEVII_S464:
  3231. case CX88_BOARD_OMICOM_SS4_PCI:
  3232. case CX88_BOARD_TBS_8910:
  3233. case CX88_BOARD_TBS_8920:
  3234. case CX88_BOARD_PROF_6200:
  3235. case CX88_BOARD_PROF_7300:
  3236. case CX88_BOARD_PROF_7301:
  3237. case CX88_BOARD_SATTRADE_ST4200:
  3238. cx_write(MO_GP0_IO, 0x8000);
  3239. msleep(100);
  3240. cx_write(MO_SRST_IO, 0);
  3241. msleep(10);
  3242. cx_write(MO_GP0_IO, 0x8080);
  3243. msleep(100);
  3244. cx_write(MO_SRST_IO, 1);
  3245. msleep(100);
  3246. break;
  3247. } /*end switch() */
  3248. /* Setup tuners */
  3249. if ((core->board.radio_type != UNSET)) {
  3250. tun_setup.mode_mask = T_RADIO;
  3251. tun_setup.type = core->board.radio_type;
  3252. tun_setup.addr = core->board.radio_addr;
  3253. tun_setup.tuner_callback = cx88_tuner_callback;
  3254. call_all(core, tuner, s_type_addr, &tun_setup);
  3255. mode_mask &= ~T_RADIO;
  3256. }
  3257. if (core->board.tuner_type != TUNER_ABSENT) {
  3258. tun_setup.mode_mask = mode_mask;
  3259. tun_setup.type = core->board.tuner_type;
  3260. tun_setup.addr = core->board.tuner_addr;
  3261. tun_setup.tuner_callback = cx88_tuner_callback;
  3262. call_all(core, tuner, s_type_addr, &tun_setup);
  3263. }
  3264. if (core->board.tda9887_conf) {
  3265. struct v4l2_priv_tun_config tda9887_cfg;
  3266. tda9887_cfg.tuner = TUNER_TDA9887;
  3267. tda9887_cfg.priv = &core->board.tda9887_conf;
  3268. call_all(core, tuner, s_config, &tda9887_cfg);
  3269. }
  3270. if (core->board.tuner_type == TUNER_XC2028) {
  3271. struct v4l2_priv_tun_config xc2028_cfg;
  3272. struct xc2028_ctrl ctl;
  3273. /* Fills device-dependent initialization parameters */
  3274. cx88_setup_xc3028(core, &ctl);
  3275. /* Sends parameters to xc2028/3028 tuner */
  3276. memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
  3277. xc2028_cfg.tuner = TUNER_XC2028;
  3278. xc2028_cfg.priv = &ctl;
  3279. info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
  3280. ctl.fname);
  3281. call_all(core, tuner, s_config, &xc2028_cfg);
  3282. }
  3283. call_all(core, core, s_power, 0);
  3284. }
  3285. /* ------------------------------------------------------------------ */
  3286. static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
  3287. {
  3288. unsigned int lat = UNSET;
  3289. u8 ctrl = 0;
  3290. u8 value;
  3291. /* check pci quirks */
  3292. if (pci_pci_problems & PCIPCI_TRITON) {
  3293. printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
  3294. name);
  3295. ctrl |= CX88X_EN_TBFX;
  3296. }
  3297. if (pci_pci_problems & PCIPCI_NATOMA) {
  3298. printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
  3299. name);
  3300. ctrl |= CX88X_EN_TBFX;
  3301. }
  3302. if (pci_pci_problems & PCIPCI_VIAETBF) {
  3303. printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
  3304. name);
  3305. ctrl |= CX88X_EN_TBFX;
  3306. }
  3307. if (pci_pci_problems & PCIPCI_VSFX) {
  3308. printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
  3309. name);
  3310. ctrl |= CX88X_EN_VSFX;
  3311. }
  3312. #ifdef PCIPCI_ALIMAGIK
  3313. if (pci_pci_problems & PCIPCI_ALIMAGIK) {
  3314. printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
  3315. name);
  3316. lat = 0x0A;
  3317. }
  3318. #endif
  3319. /* check insmod options */
  3320. if (UNSET != latency)
  3321. lat = latency;
  3322. /* apply stuff */
  3323. if (ctrl) {
  3324. pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
  3325. value |= ctrl;
  3326. pci_write_config_byte(pci, CX88X_DEVCTRL, value);
  3327. }
  3328. if (UNSET != lat) {
  3329. printk(KERN_INFO "%s: setting pci latency timer to %d\n",
  3330. name, latency);
  3331. pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
  3332. }
  3333. return 0;
  3334. }
  3335. int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
  3336. {
  3337. if (request_mem_region(pci_resource_start(pci,0),
  3338. pci_resource_len(pci,0),
  3339. core->name))
  3340. return 0;
  3341. printk(KERN_ERR
  3342. "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
  3343. core->name, PCI_FUNC(pci->devfn),
  3344. (unsigned long long)pci_resource_start(pci, 0),
  3345. pci->subsystem_vendor, pci->subsystem_device);
  3346. return -EBUSY;
  3347. }
  3348. /* Allocate and initialize the cx88 core struct. One should hold the
  3349. * devlist mutex before calling this. */
  3350. struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
  3351. {
  3352. struct cx88_core *core;
  3353. int i;
  3354. core = kzalloc(sizeof(*core), GFP_KERNEL);
  3355. if (core == NULL)
  3356. return NULL;
  3357. atomic_inc(&core->refcount);
  3358. core->pci_bus = pci->bus->number;
  3359. core->pci_slot = PCI_SLOT(pci->devfn);
  3360. core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
  3361. PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
  3362. PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
  3363. mutex_init(&core->lock);
  3364. core->nr = nr;
  3365. sprintf(core->name, "cx88[%d]", core->nr);
  3366. strcpy(core->v4l2_dev.name, core->name);
  3367. if (v4l2_device_register(NULL, &core->v4l2_dev)) {
  3368. kfree(core);
  3369. return NULL;
  3370. }
  3371. if (0 != cx88_get_resources(core, pci)) {
  3372. v4l2_device_unregister(&core->v4l2_dev);
  3373. kfree(core);
  3374. return NULL;
  3375. }
  3376. /* PCI stuff */
  3377. cx88_pci_quirks(core->name, pci);
  3378. core->lmmio = ioremap(pci_resource_start(pci, 0),
  3379. pci_resource_len(pci, 0));
  3380. core->bmmio = (u8 __iomem *)core->lmmio;
  3381. if (core->lmmio == NULL) {
  3382. kfree(core);
  3383. return NULL;
  3384. }
  3385. /* board config */
  3386. core->boardnr = UNSET;
  3387. if (card[core->nr] < ARRAY_SIZE(cx88_boards))
  3388. core->boardnr = card[core->nr];
  3389. for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
  3390. if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
  3391. pci->subsystem_device == cx88_subids[i].subdevice)
  3392. core->boardnr = cx88_subids[i].card;
  3393. if (UNSET == core->boardnr) {
  3394. core->boardnr = CX88_BOARD_UNKNOWN;
  3395. cx88_card_list(core, pci);
  3396. }
  3397. memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
  3398. if (!core->board.num_frontends && (core->board.mpeg & CX88_MPEG_DVB))
  3399. core->board.num_frontends = 1;
  3400. info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s], frontend(s): %d\n",
  3401. pci->subsystem_vendor, pci->subsystem_device, core->board.name,
  3402. core->boardnr, card[core->nr] == core->boardnr ?
  3403. "insmod option" : "autodetected",
  3404. core->board.num_frontends);
  3405. if (tuner[core->nr] != UNSET)
  3406. core->board.tuner_type = tuner[core->nr];
  3407. if (radio[core->nr] != UNSET)
  3408. core->board.radio_type = radio[core->nr];
  3409. info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
  3410. core->board.tuner_type, core->board.radio_type);
  3411. /* init hardware */
  3412. cx88_reset(core);
  3413. cx88_card_setup_pre_i2c(core);
  3414. cx88_i2c_init(core, pci);
  3415. /* load tuner module, if needed */
  3416. if (TUNER_ABSENT != core->board.tuner_type) {
  3417. /* Ignore 0x6b and 0x6f on cx88 boards.
  3418. * FusionHDTV5 RT Gold has an ir receiver at 0x6b
  3419. * and an RTC at 0x6f which can get corrupted if probed. */
  3420. static const unsigned short tv_addrs[] = {
  3421. 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */
  3422. 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
  3423. 0x68, 0x69, 0x6a, 0x6c, 0x6d, 0x6e,
  3424. I2C_CLIENT_END
  3425. };
  3426. int has_demod = (core->board.tda9887_conf & TDA9887_PRESENT);
  3427. /* I don't trust the radio_type as is stored in the card
  3428. definitions, so we just probe for it.
  3429. The radio_type is sometimes missing, or set to UNSET but
  3430. later code configures a tea5767.
  3431. */
  3432. v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
  3433. "tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
  3434. if (has_demod)
  3435. v4l2_i2c_new_subdev(&core->v4l2_dev,
  3436. &core->i2c_adap, "tuner",
  3437. 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
  3438. if (core->board.tuner_addr == ADDR_UNSET) {
  3439. v4l2_i2c_new_subdev(&core->v4l2_dev,
  3440. &core->i2c_adap, "tuner",
  3441. 0, has_demod ? tv_addrs + 4 : tv_addrs);
  3442. } else {
  3443. v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
  3444. "tuner", core->board.tuner_addr, NULL);
  3445. }
  3446. }
  3447. cx88_card_setup(core);
  3448. if (!disable_ir) {
  3449. cx88_i2c_init_ir(core);
  3450. cx88_ir_init(core, pci);
  3451. }
  3452. return core;
  3453. }