cx23885-cards.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. /*
  2. * Driver for the Conexant CX23885 PCIe bridge
  3. *
  4. * Copyright (c) 2006 Steven Toth <stoth@hauppauge.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. *
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. #include <linux/init.h>
  22. #include <linux/module.h>
  23. #include <linux/pci.h>
  24. #include <linux/delay.h>
  25. #include <media/cx25840.h>
  26. #include "cx23885.h"
  27. /* ------------------------------------------------------------------ */
  28. /* board config info */
  29. struct cx23885_board cx23885_boards[] = {
  30. [CX23885_BOARD_UNKNOWN] = {
  31. .name = "UNKNOWN/GENERIC",
  32. /* Ensure safe default for unknown boards */
  33. .clk_freq = 0,
  34. .input = {{
  35. .type = CX23885_VMUX_COMPOSITE1,
  36. .vmux = 0,
  37. },{
  38. .type = CX23885_VMUX_COMPOSITE2,
  39. .vmux = 1,
  40. },{
  41. .type = CX23885_VMUX_COMPOSITE3,
  42. .vmux = 2,
  43. },{
  44. .type = CX23885_VMUX_COMPOSITE4,
  45. .vmux = 3,
  46. }},
  47. },
  48. [CX23885_BOARD_HAUPPAUGE_HVR1800lp] = {
  49. .name = "Hauppauge WinTV-HVR1800lp",
  50. .portc = CX23885_MPEG_DVB,
  51. .input = {{
  52. .type = CX23885_VMUX_TELEVISION,
  53. .vmux = 0,
  54. .gpio0 = 0xff00,
  55. },{
  56. .type = CX23885_VMUX_DEBUG,
  57. .vmux = 0,
  58. .gpio0 = 0xff01,
  59. },{
  60. .type = CX23885_VMUX_COMPOSITE1,
  61. .vmux = 1,
  62. .gpio0 = 0xff02,
  63. },{
  64. .type = CX23885_VMUX_SVIDEO,
  65. .vmux = 2,
  66. .gpio0 = 0xff02,
  67. }},
  68. },
  69. [CX23885_BOARD_HAUPPAUGE_HVR1800] = {
  70. .name = "Hauppauge WinTV-HVR1800",
  71. .porta = CX23885_ANALOG_VIDEO,
  72. .portb = CX23885_MPEG_ENCODER,
  73. .portc = CX23885_MPEG_DVB,
  74. .tuner_type = TUNER_PHILIPS_TDA8290,
  75. .tuner_addr = 0x42, /* 0x84 >> 1 */
  76. .input = {{
  77. .type = CX23885_VMUX_TELEVISION,
  78. .vmux = CX25840_VIN7_CH3 |
  79. CX25840_VIN5_CH2 |
  80. CX25840_VIN2_CH1,
  81. .gpio0 = 0,
  82. },{
  83. .type = CX23885_VMUX_COMPOSITE1,
  84. .vmux = CX25840_VIN7_CH3 |
  85. CX25840_VIN4_CH2 |
  86. CX25840_VIN6_CH1,
  87. .gpio0 = 0,
  88. },{
  89. .type = CX23885_VMUX_SVIDEO,
  90. .vmux = CX25840_VIN7_CH3 |
  91. CX25840_VIN4_CH2 |
  92. CX25840_VIN8_CH1 |
  93. CX25840_SVIDEO_ON,
  94. .gpio0 = 0,
  95. }},
  96. },
  97. [CX23885_BOARD_HAUPPAUGE_HVR1250] = {
  98. .name = "Hauppauge WinTV-HVR1250",
  99. .portc = CX23885_MPEG_DVB,
  100. .input = {{
  101. .type = CX23885_VMUX_TELEVISION,
  102. .vmux = 0,
  103. .gpio0 = 0xff00,
  104. },{
  105. .type = CX23885_VMUX_DEBUG,
  106. .vmux = 0,
  107. .gpio0 = 0xff01,
  108. },{
  109. .type = CX23885_VMUX_COMPOSITE1,
  110. .vmux = 1,
  111. .gpio0 = 0xff02,
  112. },{
  113. .type = CX23885_VMUX_SVIDEO,
  114. .vmux = 2,
  115. .gpio0 = 0xff02,
  116. }},
  117. },
  118. [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP] = {
  119. .name = "DViCO FusionHDTV5 Express",
  120. .portb = CX23885_MPEG_DVB,
  121. },
  122. [CX23885_BOARD_HAUPPAUGE_HVR1500Q] = {
  123. .name = "Hauppauge WinTV-HVR1500Q",
  124. .portc = CX23885_MPEG_DVB,
  125. },
  126. [CX23885_BOARD_HAUPPAUGE_HVR1500] = {
  127. .name = "Hauppauge WinTV-HVR1500",
  128. .portc = CX23885_MPEG_DVB,
  129. },
  130. [CX23885_BOARD_HAUPPAUGE_HVR1200] = {
  131. .name = "Hauppauge WinTV-HVR1200",
  132. .portc = CX23885_MPEG_DVB,
  133. },
  134. [CX23885_BOARD_HAUPPAUGE_HVR1700] = {
  135. .name = "Hauppauge WinTV-HVR1700",
  136. .portc = CX23885_MPEG_DVB,
  137. },
  138. [CX23885_BOARD_HAUPPAUGE_HVR1400] = {
  139. .name = "Hauppauge WinTV-HVR1400",
  140. .portc = CX23885_MPEG_DVB,
  141. },
  142. [CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP] = {
  143. .name = "DViCO FusionHDTV7 Dual Express",
  144. .portc = CX23885_MPEG_DVB,
  145. },
  146. };
  147. const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
  148. /* ------------------------------------------------------------------ */
  149. /* PCI subsystem IDs */
  150. struct cx23885_subid cx23885_subids[] = {
  151. {
  152. .subvendor = 0x0070,
  153. .subdevice = 0x3400,
  154. .card = CX23885_BOARD_UNKNOWN,
  155. },{
  156. .subvendor = 0x0070,
  157. .subdevice = 0x7600,
  158. .card = CX23885_BOARD_HAUPPAUGE_HVR1800lp,
  159. },{
  160. .subvendor = 0x0070,
  161. .subdevice = 0x7800,
  162. .card = CX23885_BOARD_HAUPPAUGE_HVR1800,
  163. },{
  164. .subvendor = 0x0070,
  165. .subdevice = 0x7801,
  166. .card = CX23885_BOARD_HAUPPAUGE_HVR1800,
  167. },{
  168. .subvendor = 0x0070,
  169. .subdevice = 0x7809,
  170. .card = CX23885_BOARD_HAUPPAUGE_HVR1800,
  171. },{
  172. .subvendor = 0x0070,
  173. .subdevice = 0x7911,
  174. .card = CX23885_BOARD_HAUPPAUGE_HVR1250,
  175. },{
  176. .subvendor = 0x18ac,
  177. .subdevice = 0xd500,
  178. .card = CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP,
  179. },{
  180. .subvendor = 0x0070,
  181. .subdevice = 0x7790,
  182. .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q,
  183. },{
  184. .subvendor = 0x0070,
  185. .subdevice = 0x7797,
  186. .card = CX23885_BOARD_HAUPPAUGE_HVR1500Q,
  187. },{
  188. .subvendor = 0x0070,
  189. .subdevice = 0x7710,
  190. .card = CX23885_BOARD_HAUPPAUGE_HVR1500,
  191. },{
  192. .subvendor = 0x0070,
  193. .subdevice = 0x7717,
  194. .card = CX23885_BOARD_HAUPPAUGE_HVR1500,
  195. }, {
  196. .subvendor = 0x0070,
  197. .subdevice = 0x71d1,
  198. .card = CX23885_BOARD_HAUPPAUGE_HVR1200,
  199. }, {
  200. .subvendor = 0x0070,
  201. .subdevice = 0x71d3,
  202. .card = CX23885_BOARD_HAUPPAUGE_HVR1200,
  203. }, {
  204. .subvendor = 0x0070,
  205. .subdevice = 0x8101,
  206. .card = CX23885_BOARD_HAUPPAUGE_HVR1700,
  207. }, {
  208. .subvendor = 0x0070,
  209. .subdevice = 0x8010,
  210. .card = CX23885_BOARD_HAUPPAUGE_HVR1400,
  211. },{
  212. .subvendor = 0x18ac,
  213. .subdevice = 0xd618,
  214. .card = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP,
  215. },
  216. };
  217. const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
  218. void cx23885_card_list(struct cx23885_dev *dev)
  219. {
  220. int i;
  221. if (0 == dev->pci->subsystem_vendor &&
  222. 0 == dev->pci->subsystem_device) {
  223. printk("%s: Your board has no valid PCIe Subsystem ID and thus can't\n"
  224. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  225. "%s: workaround that. Redirect complaints to the vendor of\n"
  226. "%s: the TV card. Best regards,\n"
  227. "%s: -- tux\n",
  228. dev->name, dev->name, dev->name, dev->name, dev->name);
  229. } else {
  230. printk("%s: Your board isn't known (yet) to the driver. You can\n"
  231. "%s: try to pick one of the existing card configs via\n"
  232. "%s: card=<n> insmod option. Updating to the latest\n"
  233. "%s: version might help as well.\n",
  234. dev->name, dev->name, dev->name, dev->name);
  235. }
  236. printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
  237. dev->name);
  238. for (i = 0; i < cx23885_bcount; i++)
  239. printk("%s: card=%d -> %s\n",
  240. dev->name, i, cx23885_boards[i].name);
  241. }
  242. static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)
  243. {
  244. struct tveeprom tv;
  245. tveeprom_hauppauge_analog(&dev->i2c_bus[0].i2c_client, &tv, eeprom_data);
  246. /* Make sure we support the board model */
  247. switch (tv.model)
  248. {
  249. case 71009:
  250. /* WinTV-HVR1200 (PCIe, Retail, full height)
  251. * DVB-T and basic analog */
  252. case 71359:
  253. /* WinTV-HVR1200 (PCIe, OEM, half height)
  254. * DVB-T and basic analog */
  255. case 71439:
  256. /* WinTV-HVR1200 (PCIe, OEM, half height)
  257. * DVB-T and basic analog */
  258. case 71449:
  259. /* WinTV-HVR1200 (PCIe, OEM, full height)
  260. * DVB-T and basic analog */
  261. case 71939:
  262. /* WinTV-HVR1200 (PCIe, OEM, half height)
  263. * DVB-T and basic analog */
  264. case 71949:
  265. /* WinTV-HVR1200 (PCIe, OEM, full height)
  266. * DVB-T and basic analog */
  267. case 71959:
  268. /* WinTV-HVR1200 (PCIe, OEM, full height)
  269. * DVB-T and basic analog */
  270. case 71979:
  271. /* WinTV-HVR1200 (PCIe, OEM, half height)
  272. * DVB-T and basic analog */
  273. case 71999:
  274. /* WinTV-HVR1200 (PCIe, OEM, full height)
  275. * DVB-T and basic analog */
  276. case 76601: /* WinTV-HVR1800lp (PCIe, Retail, No IR, Dual channel ATSC and MPEG2 HW Encoder */
  277. case 77001: /* WinTV-HVR1500 (Express Card, OEM, No IR, ATSC and Basic analog */
  278. case 77011: /* WinTV-HVR1500 (Express Card, Retail, No IR, ATSC and Basic analog */
  279. case 77041: /* WinTV-HVR1500Q (Express Card, OEM, No IR, ATSC/QAM and Basic analog */
  280. case 77051: /* WinTV-HVR1500Q (Express Card, Retail, No IR, ATSC/QAM and Basic analog */
  281. case 78011: /* WinTV-HVR1800 (PCIe, Retail, 3.5mm in, IR, No FM, Dual channel ATSC and MPEG2 HW Encoder */
  282. case 78501: /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, Dual channel ATSC and MPEG2 HW Encoder */
  283. case 78521: /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, Dual channel ATSC and MPEG2 HW Encoder */
  284. case 78531: /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, No FM, Dual channel ATSC and MPEG2 HW Encoder */
  285. case 78631: /* WinTV-HVR1800 (PCIe, OEM, No IR, No FM, Dual channel ATSC and MPEG2 HW Encoder */
  286. case 79001: /* WinTV-HVR1250 (PCIe, Retail, IR, full height, ATSC and Basic analog */
  287. case 79101: /* WinTV-HVR1250 (PCIe, Retail, IR, half height, ATSC and Basic analog */
  288. case 79561: /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, ATSC and Basic analog */
  289. case 79571: /* WinTV-HVR1250 (PCIe, OEM, No IR, full height, ATSC and Basic analog */
  290. case 79671: /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, ATSC and Basic analog */
  291. case 80019:
  292. /* WinTV-HVR1400 (Express Card, Retail, IR,
  293. * DVB-T and Basic analog */
  294. case 81509:
  295. /* WinTV-HVR1700 (PCIe, OEM, No IR, half height)
  296. * DVB-T and MPEG2 HW Encoder */
  297. case 81519:
  298. /* WinTV-HVR1700 (PCIe, OEM, No IR, full height)
  299. * DVB-T and MPEG2 HW Encoder */
  300. break;
  301. default:
  302. printk("%s: warning: unknown hauppauge model #%d\n", dev->name, tv.model);
  303. break;
  304. }
  305. printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
  306. dev->name, tv.model);
  307. }
  308. /* Tuner callback function for cx23885 boards. Currently only needed
  309. * for HVR1500Q, which has an xc5000 tuner.
  310. */
  311. int cx23885_tuner_callback(void *priv, int command, int arg)
  312. {
  313. struct cx23885_i2c *bus = priv;
  314. struct cx23885_dev *dev = bus->dev;
  315. switch(dev->board) {
  316. case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
  317. if(command == 0) { /* Tuner Reset Command from xc5000 */
  318. /* Drive the tuner into reset and out */
  319. cx_clear(GP0_IO, 0x00000004);
  320. mdelay(200);
  321. cx_set(GP0_IO, 0x00000004);
  322. return 0;
  323. }
  324. else {
  325. printk(KERN_ERR
  326. "%s(): Unknow command.\n", __func__);
  327. return -EINVAL;
  328. }
  329. break;
  330. }
  331. return 0; /* Should never be here */
  332. }
  333. void cx23885_gpio_setup(struct cx23885_dev *dev)
  334. {
  335. switch(dev->board) {
  336. case CX23885_BOARD_HAUPPAUGE_HVR1250:
  337. /* GPIO-0 cx24227 demodulator reset */
  338. cx_set(GP0_IO, 0x00010001); /* Bring the part out of reset */
  339. break;
  340. case CX23885_BOARD_HAUPPAUGE_HVR1500:
  341. /* GPIO-0 cx24227 demodulator */
  342. /* GPIO-2 xc3028 tuner */
  343. /* Put the parts into reset */
  344. cx_set(GP0_IO, 0x00050000);
  345. cx_clear(GP0_IO, 0x00000005);
  346. msleep(5);
  347. /* Bring the parts out of reset */
  348. cx_set(GP0_IO, 0x00050005);
  349. break;
  350. case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
  351. /* GPIO-0 cx24227 demodulator reset */
  352. /* GPIO-2 xc5000 tuner reset */
  353. cx_set(GP0_IO, 0x00050005); /* Bring the part out of reset */
  354. break;
  355. case CX23885_BOARD_HAUPPAUGE_HVR1800:
  356. /* GPIO-0 656_CLK */
  357. /* GPIO-1 656_D0 */
  358. /* GPIO-2 8295A Reset */
  359. /* GPIO-3-10 cx23417 data0-7 */
  360. /* GPIO-11-14 cx23417 addr0-3 */
  361. /* GPIO-15-18 cx23417 READY, CS, RD, WR */
  362. /* GPIO-19 IR_RX */
  363. /* CX23417 GPIO's */
  364. /* EIO15 Zilog Reset */
  365. /* EIO14 S5H1409/CX24227 Reset */
  366. /* Force the TDA8295A into reset and back */
  367. cx_set(GP0_IO, 0x00040004);
  368. mdelay(20);
  369. cx_clear(GP0_IO, 0x00000004);
  370. mdelay(20);
  371. cx_set(GP0_IO, 0x00040004);
  372. mdelay(20);
  373. break;
  374. case CX23885_BOARD_HAUPPAUGE_HVR1200:
  375. /* GPIO-0 tda10048 demodulator reset */
  376. /* GPIO-2 tda18271 tuner reset */
  377. /* Put the parts into reset and back */
  378. cx_set(GP0_IO, 0x00050000);
  379. mdelay(20);
  380. cx_clear(GP0_IO, 0x00000005);
  381. mdelay(20);
  382. cx_set(GP0_IO, 0x00050005);
  383. break;
  384. case CX23885_BOARD_HAUPPAUGE_HVR1700:
  385. /* GPIO-0 TDA10048 demodulator reset */
  386. /* GPIO-2 TDA8295A Reset */
  387. /* GPIO-3-10 cx23417 data0-7 */
  388. /* GPIO-11-14 cx23417 addr0-3 */
  389. /* GPIO-15-18 cx23417 READY, CS, RD, WR */
  390. /* The following GPIO's are on the interna AVCore (cx25840) */
  391. /* GPIO-19 IR_RX */
  392. /* GPIO-20 IR_TX 416/DVBT Select */
  393. /* GPIO-21 IIS DAT */
  394. /* GPIO-22 IIS WCLK */
  395. /* GPIO-23 IIS BCLK */
  396. /* Put the parts into reset and back */
  397. cx_set(GP0_IO, 0x00050000);
  398. mdelay(20);
  399. cx_clear(GP0_IO, 0x00000005);
  400. mdelay(20);
  401. cx_set(GP0_IO, 0x00050005);
  402. break;
  403. case CX23885_BOARD_HAUPPAUGE_HVR1400:
  404. /* GPIO-0 Dibcom7000p demodulator reset */
  405. /* GPIO-2 xc3028L tuner reset */
  406. /* GPIO-13 LED */
  407. /* Put the parts into reset and back */
  408. cx_set(GP0_IO, 0x00050000);
  409. mdelay(20);
  410. cx_clear(GP0_IO, 0x00000005);
  411. mdelay(20);
  412. cx_set(GP0_IO, 0x00050005);
  413. break;
  414. }
  415. }
  416. int cx23885_ir_init(struct cx23885_dev *dev)
  417. {
  418. switch (dev->board) {
  419. case CX23885_BOARD_HAUPPAUGE_HVR1250:
  420. case CX23885_BOARD_HAUPPAUGE_HVR1500:
  421. case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
  422. case CX23885_BOARD_HAUPPAUGE_HVR1800:
  423. case CX23885_BOARD_HAUPPAUGE_HVR1200:
  424. case CX23885_BOARD_HAUPPAUGE_HVR1400:
  425. /* FIXME: Implement me */
  426. break;
  427. }
  428. return 0;
  429. }
  430. void cx23885_card_setup(struct cx23885_dev *dev)
  431. {
  432. struct cx23885_tsport *ts1 = &dev->ts1;
  433. struct cx23885_tsport *ts2 = &dev->ts2;
  434. static u8 eeprom[256];
  435. if (dev->i2c_bus[0].i2c_rc == 0) {
  436. dev->i2c_bus[0].i2c_client.addr = 0xa0 >> 1;
  437. tveeprom_read(&dev->i2c_bus[0].i2c_client,
  438. eeprom, sizeof(eeprom));
  439. }
  440. switch (dev->board) {
  441. case CX23885_BOARD_HAUPPAUGE_HVR1250:
  442. case CX23885_BOARD_HAUPPAUGE_HVR1500:
  443. case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
  444. case CX23885_BOARD_HAUPPAUGE_HVR1400:
  445. if (dev->i2c_bus[0].i2c_rc == 0)
  446. hauppauge_eeprom(dev, eeprom+0x80);
  447. break;
  448. case CX23885_BOARD_HAUPPAUGE_HVR1800:
  449. case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
  450. case CX23885_BOARD_HAUPPAUGE_HVR1200:
  451. case CX23885_BOARD_HAUPPAUGE_HVR1700:
  452. if (dev->i2c_bus[0].i2c_rc == 0)
  453. hauppauge_eeprom(dev, eeprom+0xc0);
  454. break;
  455. }
  456. switch (dev->board) {
  457. case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:
  458. ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
  459. ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
  460. ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
  461. /* break omitted intentionally */
  462. case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
  463. ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
  464. ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
  465. ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
  466. break;
  467. case CX23885_BOARD_HAUPPAUGE_HVR1800:
  468. /* Defaults for VID B - Analog encoder */
  469. /* DREQ_POL, SMODE, PUNC_CLK, MCLK_POL Serial bus + punc clk */
  470. ts1->gen_ctrl_val = 0x10e;
  471. ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */
  472. ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
  473. /* APB_TSVALERR_POL (active low)*/
  474. ts1->vld_misc_val = 0x2000;
  475. ts1->hw_sop_ctrl_val = (0x47 << 16 | 188 << 4 | 0xc);
  476. /* Defaults for VID C */
  477. ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
  478. ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
  479. ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
  480. break;
  481. case CX23885_BOARD_HAUPPAUGE_HVR1250:
  482. case CX23885_BOARD_HAUPPAUGE_HVR1500:
  483. case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
  484. case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
  485. case CX23885_BOARD_HAUPPAUGE_HVR1200:
  486. case CX23885_BOARD_HAUPPAUGE_HVR1700:
  487. case CX23885_BOARD_HAUPPAUGE_HVR1400:
  488. default:
  489. ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */
  490. ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */
  491. ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
  492. }
  493. /* Certain boards support analog, or require the avcore to be
  494. * loaded, ensure this happens.
  495. */
  496. switch (dev->board) {
  497. case CX23885_BOARD_HAUPPAUGE_HVR1800:
  498. case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
  499. case CX23885_BOARD_HAUPPAUGE_HVR1700:
  500. request_module("cx25840");
  501. break;
  502. }
  503. }
  504. /* ------------------------------------------------------------------ */
  505. /*
  506. * Local variables:
  507. * c-basic-offset: 8
  508. * End:
  509. * kate: eol "unix"; indent-width 3; remove-trailing-space on; replace-trailing-space-save on; tab-width 8; replace-tabs off; space-indent off; mixed-indent off
  510. */