cx88-cards.c 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216
  1. /*
  2. *
  3. * device driver for Conexant 2388x based TV cards
  4. * card-specific stuff.
  5. *
  6. * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. #include <linux/init.h>
  23. #include <linux/module.h>
  24. #include <linux/pci.h>
  25. #include <linux/delay.h>
  26. #include "cx88.h"
  27. #include "tea5767.h"
  28. static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  29. static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  30. static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  31. module_param_array(tuner, int, NULL, 0444);
  32. module_param_array(radio, int, NULL, 0444);
  33. module_param_array(card, int, NULL, 0444);
  34. MODULE_PARM_DESC(tuner,"tuner type");
  35. MODULE_PARM_DESC(radio,"radio tuner type");
  36. MODULE_PARM_DESC(card,"card type");
  37. static unsigned int latency = UNSET;
  38. module_param(latency,int,0444);
  39. MODULE_PARM_DESC(latency,"pci latency timer");
  40. /* ------------------------------------------------------------------ */
  41. /* board config info */
  42. static const struct cx88_board cx88_boards[] = {
  43. [CX88_BOARD_UNKNOWN] = {
  44. .name = "UNKNOWN/GENERIC",
  45. .tuner_type = UNSET,
  46. .radio_type = UNSET,
  47. .tuner_addr = ADDR_UNSET,
  48. .radio_addr = ADDR_UNSET,
  49. .input = {{
  50. .type = CX88_VMUX_COMPOSITE1,
  51. .vmux = 0,
  52. },{
  53. .type = CX88_VMUX_COMPOSITE2,
  54. .vmux = 1,
  55. },{
  56. .type = CX88_VMUX_COMPOSITE3,
  57. .vmux = 2,
  58. },{
  59. .type = CX88_VMUX_COMPOSITE4,
  60. .vmux = 3,
  61. }},
  62. },
  63. [CX88_BOARD_HAUPPAUGE] = {
  64. .name = "Hauppauge WinTV 34xxx models",
  65. .tuner_type = UNSET,
  66. .radio_type = UNSET,
  67. .tuner_addr = ADDR_UNSET,
  68. .radio_addr = ADDR_UNSET,
  69. .tda9887_conf = TDA9887_PRESENT,
  70. .input = {{
  71. .type = CX88_VMUX_TELEVISION,
  72. .vmux = 0,
  73. .gpio0 = 0xff00, // internal decoder
  74. },{
  75. .type = CX88_VMUX_DEBUG,
  76. .vmux = 0,
  77. .gpio0 = 0xff01, // mono from tuner chip
  78. },{
  79. .type = CX88_VMUX_COMPOSITE1,
  80. .vmux = 1,
  81. .gpio0 = 0xff02,
  82. },{
  83. .type = CX88_VMUX_SVIDEO,
  84. .vmux = 2,
  85. .gpio0 = 0xff02,
  86. }},
  87. .radio = {
  88. .type = CX88_RADIO,
  89. .gpio0 = 0xff01,
  90. },
  91. },
  92. [CX88_BOARD_GDI] = {
  93. .name = "GDI Black Gold",
  94. .tuner_type = UNSET,
  95. .radio_type = UNSET,
  96. .tuner_addr = ADDR_UNSET,
  97. .radio_addr = ADDR_UNSET,
  98. .input = {{
  99. .type = CX88_VMUX_TELEVISION,
  100. .vmux = 0,
  101. },{
  102. .type = CX88_VMUX_SVIDEO,
  103. .vmux = 2,
  104. }},
  105. },
  106. [CX88_BOARD_PIXELVIEW] = {
  107. .name = "PixelView",
  108. .tuner_type = TUNER_PHILIPS_PAL,
  109. .radio_type = UNSET,
  110. .tuner_addr = ADDR_UNSET,
  111. .radio_addr = ADDR_UNSET,
  112. .input = {{
  113. .type = CX88_VMUX_TELEVISION,
  114. .vmux = 0,
  115. .gpio0 = 0xff00, // internal decoder
  116. },{
  117. .type = CX88_VMUX_COMPOSITE1,
  118. .vmux = 1,
  119. },{
  120. .type = CX88_VMUX_SVIDEO,
  121. .vmux = 2,
  122. }},
  123. .radio = {
  124. .type = CX88_RADIO,
  125. .gpio0 = 0xff10,
  126. },
  127. },
  128. [CX88_BOARD_ATI_WONDER_PRO] = {
  129. .name = "ATI TV Wonder Pro",
  130. .tuner_type = TUNER_PHILIPS_4IN1,
  131. .radio_type = UNSET,
  132. .tuner_addr = ADDR_UNSET,
  133. .radio_addr = ADDR_UNSET,
  134. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
  135. .input = {{
  136. .type = CX88_VMUX_TELEVISION,
  137. .vmux = 0,
  138. .gpio0 = 0x03ff,
  139. },{
  140. .type = CX88_VMUX_COMPOSITE1,
  141. .vmux = 1,
  142. .gpio0 = 0x03fe,
  143. },{
  144. .type = CX88_VMUX_SVIDEO,
  145. .vmux = 2,
  146. .gpio0 = 0x03fe,
  147. }},
  148. },
  149. [CX88_BOARD_WINFAST2000XP_EXPERT] = {
  150. .name = "Leadtek Winfast 2000XP Expert",
  151. .tuner_type = TUNER_PHILIPS_4IN1,
  152. .radio_type = UNSET,
  153. .tuner_addr = ADDR_UNSET,
  154. .radio_addr = ADDR_UNSET,
  155. .tda9887_conf = TDA9887_PRESENT,
  156. .input = {{
  157. .type = CX88_VMUX_TELEVISION,
  158. .vmux = 0,
  159. .gpio0 = 0x00F5e700,
  160. .gpio1 = 0x00003004,
  161. .gpio2 = 0x00F5e700,
  162. .gpio3 = 0x02000000,
  163. },{
  164. .type = CX88_VMUX_COMPOSITE1,
  165. .vmux = 1,
  166. .gpio0 = 0x00F5c700,
  167. .gpio1 = 0x00003004,
  168. .gpio2 = 0x00F5c700,
  169. .gpio3 = 0x02000000,
  170. },{
  171. .type = CX88_VMUX_SVIDEO,
  172. .vmux = 2,
  173. .gpio0 = 0x00F5c700,
  174. .gpio1 = 0x00003004,
  175. .gpio2 = 0x00F5c700,
  176. .gpio3 = 0x02000000,
  177. }},
  178. .radio = {
  179. .type = CX88_RADIO,
  180. .gpio0 = 0x00F5d700,
  181. .gpio1 = 0x00003004,
  182. .gpio2 = 0x00F5d700,
  183. .gpio3 = 0x02000000,
  184. },
  185. },
  186. [CX88_BOARD_AVERTV_STUDIO_303] = {
  187. .name = "AverTV Studio 303 (M126)",
  188. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  189. .radio_type = UNSET,
  190. .tuner_addr = ADDR_UNSET,
  191. .radio_addr = ADDR_UNSET,
  192. .tda9887_conf = TDA9887_PRESENT,
  193. .input = {{
  194. .type = CX88_VMUX_TELEVISION,
  195. .vmux = 0,
  196. .gpio1 = 0xe09f,
  197. },{
  198. .type = CX88_VMUX_COMPOSITE1,
  199. .vmux = 1,
  200. .gpio1 = 0xe05f,
  201. },{
  202. .type = CX88_VMUX_SVIDEO,
  203. .vmux = 2,
  204. .gpio1 = 0xe05f,
  205. }},
  206. .radio = {
  207. .gpio1 = 0xe0df,
  208. .type = CX88_RADIO,
  209. },
  210. },
  211. [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
  212. // added gpio values thanks to Michal
  213. // values for PAL from DScaler
  214. .name = "MSI TV-@nywhere Master",
  215. .tuner_type = TUNER_MT2032,
  216. .radio_type = UNSET,
  217. .tuner_addr = ADDR_UNSET,
  218. .radio_addr = ADDR_UNSET,
  219. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
  220. .input = {{
  221. .type = CX88_VMUX_TELEVISION,
  222. .vmux = 0,
  223. .gpio0 = 0x000040bf,
  224. .gpio1 = 0x000080c0,
  225. .gpio2 = 0x0000ff40,
  226. },{
  227. .type = CX88_VMUX_COMPOSITE1,
  228. .vmux = 1,
  229. .gpio0 = 0x000040bf,
  230. .gpio1 = 0x000080c0,
  231. .gpio2 = 0x0000ff40,
  232. },{
  233. .type = CX88_VMUX_SVIDEO,
  234. .vmux = 2,
  235. .gpio0 = 0x000040bf,
  236. .gpio1 = 0x000080c0,
  237. .gpio2 = 0x0000ff40,
  238. }},
  239. .radio = {
  240. .type = CX88_RADIO,
  241. .vmux = 3,
  242. .gpio0 = 0x000040bf,
  243. .gpio1 = 0x000080c0,
  244. .gpio2 = 0x0000ff20,
  245. },
  246. },
  247. [CX88_BOARD_WINFAST_DV2000] = {
  248. .name = "Leadtek Winfast DV2000",
  249. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  250. .radio_type = UNSET,
  251. .tuner_addr = ADDR_UNSET,
  252. .radio_addr = ADDR_UNSET,
  253. .tda9887_conf = TDA9887_PRESENT,
  254. .input = {{
  255. .type = CX88_VMUX_TELEVISION,
  256. .vmux = 0,
  257. .gpio0 = 0x0035e700,
  258. .gpio1 = 0x00003004,
  259. .gpio2 = 0x0035e700,
  260. .gpio3 = 0x02000000,
  261. },{
  262. .type = CX88_VMUX_COMPOSITE1,
  263. .vmux = 1,
  264. .gpio0 = 0x0035c700,
  265. .gpio1 = 0x00003004,
  266. .gpio2 = 0x0035c700,
  267. .gpio3 = 0x02000000,
  268. },{
  269. .type = CX88_VMUX_SVIDEO,
  270. .vmux = 2,
  271. .gpio0 = 0x0035c700,
  272. .gpio1 = 0x0035c700,
  273. .gpio2 = 0x02000000,
  274. .gpio3 = 0x02000000,
  275. }},
  276. .radio = {
  277. .type = CX88_RADIO,
  278. .gpio0 = 0x0035d700,
  279. .gpio1 = 0x00007004,
  280. .gpio2 = 0x0035d700,
  281. .gpio3 = 0x02000000,
  282. },
  283. },
  284. [CX88_BOARD_LEADTEK_PVR2000] = {
  285. // gpio values for PAL version from regspy by DScaler
  286. .name = "Leadtek PVR 2000",
  287. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  288. .radio_type = UNSET,
  289. .tuner_addr = ADDR_UNSET,
  290. .radio_addr = ADDR_UNSET,
  291. .tda9887_conf = TDA9887_PRESENT,
  292. .input = {{
  293. .type = CX88_VMUX_TELEVISION,
  294. .vmux = 0,
  295. .gpio0 = 0x0000bde2,
  296. .audioroute = 1,
  297. },{
  298. .type = CX88_VMUX_COMPOSITE1,
  299. .vmux = 1,
  300. .gpio0 = 0x0000bde6,
  301. .audioroute = 1,
  302. },{
  303. .type = CX88_VMUX_SVIDEO,
  304. .vmux = 2,
  305. .gpio0 = 0x0000bde6,
  306. .audioroute = 1,
  307. }},
  308. .radio = {
  309. .type = CX88_RADIO,
  310. .gpio0 = 0x0000bd62,
  311. .audioroute = 1,
  312. },
  313. .mpeg = CX88_MPEG_BLACKBIRD,
  314. },
  315. [CX88_BOARD_IODATA_GVVCP3PCI] = {
  316. .name = "IODATA GV-VCP3/PCI",
  317. .tuner_type = TUNER_ABSENT,
  318. .radio_type = UNSET,
  319. .tuner_addr = ADDR_UNSET,
  320. .radio_addr = ADDR_UNSET,
  321. .input = {{
  322. .type = CX88_VMUX_COMPOSITE1,
  323. .vmux = 0,
  324. },{
  325. .type = CX88_VMUX_COMPOSITE2,
  326. .vmux = 1,
  327. },{
  328. .type = CX88_VMUX_SVIDEO,
  329. .vmux = 2,
  330. }},
  331. },
  332. [CX88_BOARD_PROLINK_PLAYTVPVR] = {
  333. .name = "Prolink PlayTV PVR",
  334. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  335. .radio_type = UNSET,
  336. .tuner_addr = ADDR_UNSET,
  337. .radio_addr = ADDR_UNSET,
  338. .tda9887_conf = TDA9887_PRESENT,
  339. .input = {{
  340. .type = CX88_VMUX_TELEVISION,
  341. .vmux = 0,
  342. .gpio0 = 0xbff0,
  343. },{
  344. .type = CX88_VMUX_COMPOSITE1,
  345. .vmux = 1,
  346. .gpio0 = 0xbff3,
  347. },{
  348. .type = CX88_VMUX_SVIDEO,
  349. .vmux = 2,
  350. .gpio0 = 0xbff3,
  351. }},
  352. .radio = {
  353. .type = CX88_RADIO,
  354. .gpio0 = 0xbff0,
  355. },
  356. },
  357. [CX88_BOARD_ASUS_PVR_416] = {
  358. .name = "ASUS PVR-416",
  359. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  360. .radio_type = UNSET,
  361. .tuner_addr = ADDR_UNSET,
  362. .radio_addr = ADDR_UNSET,
  363. .tda9887_conf = TDA9887_PRESENT,
  364. .input = {{
  365. .type = CX88_VMUX_TELEVISION,
  366. .vmux = 0,
  367. .gpio0 = 0x0000fde6,
  368. },{
  369. .type = CX88_VMUX_SVIDEO,
  370. .vmux = 2,
  371. .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
  372. .audioroute = 1,
  373. }},
  374. .radio = {
  375. .type = CX88_RADIO,
  376. .gpio0 = 0x0000fde2,
  377. },
  378. .mpeg = CX88_MPEG_BLACKBIRD,
  379. },
  380. [CX88_BOARD_MSI_TVANYWHERE] = {
  381. .name = "MSI TV-@nywhere",
  382. .tuner_type = TUNER_MT2032,
  383. .radio_type = UNSET,
  384. .tuner_addr = ADDR_UNSET,
  385. .radio_addr = ADDR_UNSET,
  386. .tda9887_conf = TDA9887_PRESENT,
  387. .input = {{
  388. .type = CX88_VMUX_TELEVISION,
  389. .vmux = 0,
  390. .gpio0 = 0x00000fbf,
  391. .gpio2 = 0x0000fc08,
  392. },{
  393. .type = CX88_VMUX_COMPOSITE1,
  394. .vmux = 1,
  395. .gpio0 = 0x00000fbf,
  396. .gpio2 = 0x0000fc68,
  397. },{
  398. .type = CX88_VMUX_SVIDEO,
  399. .vmux = 2,
  400. .gpio0 = 0x00000fbf,
  401. .gpio2 = 0x0000fc68,
  402. }},
  403. },
  404. [CX88_BOARD_KWORLD_DVB_T] = {
  405. .name = "KWorld/VStream XPert DVB-T",
  406. .tuner_type = TUNER_ABSENT,
  407. .radio_type = UNSET,
  408. .tuner_addr = ADDR_UNSET,
  409. .radio_addr = ADDR_UNSET,
  410. .input = {{
  411. .type = CX88_VMUX_COMPOSITE1,
  412. .vmux = 1,
  413. .gpio0 = 0x0700,
  414. .gpio2 = 0x0101,
  415. },{
  416. .type = CX88_VMUX_SVIDEO,
  417. .vmux = 2,
  418. .gpio0 = 0x0700,
  419. .gpio2 = 0x0101,
  420. }},
  421. .mpeg = CX88_MPEG_DVB,
  422. },
  423. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
  424. .name = "DViCO FusionHDTV DVB-T1",
  425. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  426. .radio_type = UNSET,
  427. .tuner_addr = ADDR_UNSET,
  428. .radio_addr = ADDR_UNSET,
  429. .input = {{
  430. .type = CX88_VMUX_COMPOSITE1,
  431. .vmux = 1,
  432. .gpio0 = 0x000027df,
  433. },{
  434. .type = CX88_VMUX_SVIDEO,
  435. .vmux = 2,
  436. .gpio0 = 0x000027df,
  437. }},
  438. .mpeg = CX88_MPEG_DVB,
  439. },
  440. [CX88_BOARD_KWORLD_LTV883] = {
  441. .name = "KWorld LTV883RF",
  442. .tuner_type = TUNER_TNF_8831BGFF,
  443. .radio_type = UNSET,
  444. .tuner_addr = ADDR_UNSET,
  445. .radio_addr = ADDR_UNSET,
  446. .input = {{
  447. .type = CX88_VMUX_TELEVISION,
  448. .vmux = 0,
  449. .gpio0 = 0x07f8,
  450. },{
  451. .type = CX88_VMUX_DEBUG,
  452. .vmux = 0,
  453. .gpio0 = 0x07f9, // mono from tuner chip
  454. },{
  455. .type = CX88_VMUX_COMPOSITE1,
  456. .vmux = 1,
  457. .gpio0 = 0x000007fa,
  458. },{
  459. .type = CX88_VMUX_SVIDEO,
  460. .vmux = 2,
  461. .gpio0 = 0x000007fa,
  462. }},
  463. .radio = {
  464. .type = CX88_RADIO,
  465. .gpio0 = 0x000007f8,
  466. },
  467. },
  468. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
  469. .name = "DViCO FusionHDTV 3 Gold-Q",
  470. .tuner_type = TUNER_MICROTUNE_4042FI5,
  471. .radio_type = UNSET,
  472. .tuner_addr = ADDR_UNSET,
  473. .radio_addr = ADDR_UNSET,
  474. /*
  475. GPIO[0] resets DT3302 DTV receiver
  476. 0 - reset asserted
  477. 1 - normal operation
  478. GPIO[1] mutes analog audio output connector
  479. 0 - enable selected source
  480. 1 - mute
  481. GPIO[2] selects source for analog audio output connector
  482. 0 - analog audio input connector on tab
  483. 1 - analog DAC output from CX23881 chip
  484. GPIO[3] selects RF input connector on tuner module
  485. 0 - RF connector labeled CABLE
  486. 1 - RF connector labeled ANT
  487. GPIO[4] selects high RF for QAM256 mode
  488. 0 - normal RF
  489. 1 - high RF
  490. */
  491. .input = {{
  492. .type = CX88_VMUX_TELEVISION,
  493. .vmux = 0,
  494. .gpio0 = 0x0f0d,
  495. },{
  496. .type = CX88_VMUX_CABLE,
  497. .vmux = 0,
  498. .gpio0 = 0x0f05,
  499. },{
  500. .type = CX88_VMUX_COMPOSITE1,
  501. .vmux = 1,
  502. .gpio0 = 0x0f00,
  503. },{
  504. .type = CX88_VMUX_SVIDEO,
  505. .vmux = 2,
  506. .gpio0 = 0x0f00,
  507. }},
  508. .mpeg = CX88_MPEG_DVB,
  509. },
  510. [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
  511. .name = "Hauppauge Nova-T DVB-T",
  512. .tuner_type = TUNER_ABSENT,
  513. .radio_type = UNSET,
  514. .tuner_addr = ADDR_UNSET,
  515. .radio_addr = ADDR_UNSET,
  516. .input = {{
  517. .type = CX88_VMUX_DVB,
  518. .vmux = 0,
  519. }},
  520. .mpeg = CX88_MPEG_DVB,
  521. },
  522. [CX88_BOARD_CONEXANT_DVB_T1] = {
  523. .name = "Conexant DVB-T reference design",
  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_PROVIDEO_PV259] = {
  535. .name = "Provideo PV259",
  536. .tuner_type = TUNER_PHILIPS_FQ1216ME,
  537. .radio_type = UNSET,
  538. .tuner_addr = ADDR_UNSET,
  539. .radio_addr = ADDR_UNSET,
  540. .input = {{
  541. .type = CX88_VMUX_TELEVISION,
  542. .vmux = 0,
  543. .audioroute = 1,
  544. }},
  545. .mpeg = CX88_MPEG_BLACKBIRD,
  546. },
  547. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
  548. .name = "DViCO FusionHDTV DVB-T Plus",
  549. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  550. .radio_type = UNSET,
  551. .tuner_addr = ADDR_UNSET,
  552. .radio_addr = ADDR_UNSET,
  553. .input = {{
  554. .type = CX88_VMUX_COMPOSITE1,
  555. .vmux = 1,
  556. .gpio0 = 0x000027df,
  557. },{
  558. .type = CX88_VMUX_SVIDEO,
  559. .vmux = 2,
  560. .gpio0 = 0x000027df,
  561. }},
  562. .mpeg = CX88_MPEG_DVB,
  563. },
  564. [CX88_BOARD_DNTV_LIVE_DVB_T] = {
  565. .name = "digitalnow DNTV Live! DVB-T",
  566. .tuner_type = TUNER_ABSENT,
  567. .radio_type = UNSET,
  568. .tuner_addr = ADDR_UNSET,
  569. .radio_addr = ADDR_UNSET,
  570. .input = {{
  571. .type = CX88_VMUX_COMPOSITE1,
  572. .vmux = 1,
  573. .gpio0 = 0x00000700,
  574. .gpio2 = 0x00000101,
  575. },{
  576. .type = CX88_VMUX_SVIDEO,
  577. .vmux = 2,
  578. .gpio0 = 0x00000700,
  579. .gpio2 = 0x00000101,
  580. }},
  581. .mpeg = CX88_MPEG_DVB,
  582. },
  583. [CX88_BOARD_PCHDTV_HD3000] = {
  584. .name = "pcHDTV HD3000 HDTV",
  585. .tuner_type = TUNER_THOMSON_DTT761X,
  586. .radio_type = UNSET,
  587. .tuner_addr = ADDR_UNSET,
  588. .radio_addr = ADDR_UNSET,
  589. .tda9887_conf = TDA9887_PRESENT,
  590. /* GPIO[2] = audio source for analog audio out connector
  591. * 0 = analog audio input connector
  592. * 1 = CX88 audio DACs
  593. *
  594. * GPIO[7] = input to CX88's audio/chroma ADC
  595. * 0 = FM 10.7 MHz IF
  596. * 1 = Sound 4.5 MHz IF
  597. *
  598. * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
  599. *
  600. * GPIO[16] = Remote control input
  601. */
  602. .input = {{
  603. .type = CX88_VMUX_TELEVISION,
  604. .vmux = 0,
  605. .gpio0 = 0x00008484,
  606. },{
  607. .type = CX88_VMUX_COMPOSITE1,
  608. .vmux = 1,
  609. .gpio0 = 0x00008400,
  610. },{
  611. .type = CX88_VMUX_SVIDEO,
  612. .vmux = 2,
  613. .gpio0 = 0x00008400,
  614. }},
  615. .radio = {
  616. .type = CX88_RADIO,
  617. .gpio0 = 0x00008404,
  618. },
  619. .mpeg = CX88_MPEG_DVB,
  620. },
  621. [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
  622. // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
  623. // GPIO values obtained from regspy, courtesy Sean Covel
  624. .name = "Hauppauge WinTV 28xxx (Roslyn) models",
  625. .tuner_type = UNSET,
  626. .radio_type = UNSET,
  627. .tuner_addr = ADDR_UNSET,
  628. .radio_addr = ADDR_UNSET,
  629. .input = {{
  630. .type = CX88_VMUX_TELEVISION,
  631. .vmux = 0,
  632. .gpio0 = 0xed1a,
  633. .gpio2 = 0x00ff,
  634. },{
  635. .type = CX88_VMUX_DEBUG,
  636. .vmux = 0,
  637. .gpio0 = 0xff01,
  638. },{
  639. .type = CX88_VMUX_COMPOSITE1,
  640. .vmux = 1,
  641. .gpio0 = 0xff02,
  642. },{
  643. .type = CX88_VMUX_SVIDEO,
  644. .vmux = 2,
  645. .gpio0 = 0xed92,
  646. .gpio2 = 0x00ff,
  647. }},
  648. .radio = {
  649. .type = CX88_RADIO,
  650. .gpio0 = 0xed96,
  651. .gpio2 = 0x00ff,
  652. },
  653. .mpeg = CX88_MPEG_BLACKBIRD,
  654. },
  655. [CX88_BOARD_DIGITALLOGIC_MEC] = {
  656. .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
  657. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  658. .radio_type = UNSET,
  659. .tuner_addr = ADDR_UNSET,
  660. .radio_addr = ADDR_UNSET,
  661. .tda9887_conf = TDA9887_PRESENT,
  662. .input = {{
  663. .type = CX88_VMUX_TELEVISION,
  664. .vmux = 0,
  665. .gpio0 = 0x00009d80,
  666. .audioroute = 1,
  667. },{
  668. .type = CX88_VMUX_COMPOSITE1,
  669. .vmux = 1,
  670. .gpio0 = 0x00009d76,
  671. .audioroute = 1,
  672. },{
  673. .type = CX88_VMUX_SVIDEO,
  674. .vmux = 2,
  675. .gpio0 = 0x00009d76,
  676. .audioroute = 1,
  677. }},
  678. .radio = {
  679. .type = CX88_RADIO,
  680. .gpio0 = 0x00009d00,
  681. .audioroute = 1,
  682. },
  683. .mpeg = CX88_MPEG_BLACKBIRD,
  684. },
  685. [CX88_BOARD_IODATA_GVBCTV7E] = {
  686. .name = "IODATA GV/BCTV7E",
  687. .tuner_type = TUNER_PHILIPS_FQ1286,
  688. .radio_type = UNSET,
  689. .tuner_addr = ADDR_UNSET,
  690. .radio_addr = ADDR_UNSET,
  691. .tda9887_conf = TDA9887_PRESENT,
  692. .input = {{
  693. .type = CX88_VMUX_TELEVISION,
  694. .vmux = 1,
  695. .gpio1 = 0x0000e03f,
  696. },{
  697. .type = CX88_VMUX_COMPOSITE1,
  698. .vmux = 2,
  699. .gpio1 = 0x0000e07f,
  700. },{
  701. .type = CX88_VMUX_SVIDEO,
  702. .vmux = 3,
  703. .gpio1 = 0x0000e07f,
  704. }}
  705. },
  706. [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
  707. .name = "PixelView PlayTV Ultra Pro (Stereo)",
  708. /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
  709. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  710. .radio_type = UNSET,
  711. .tuner_addr = ADDR_UNSET,
  712. .radio_addr = ADDR_UNSET,
  713. .input = {{
  714. .type = CX88_VMUX_TELEVISION,
  715. .vmux = 0,
  716. .gpio0 = 0xbf61, /* internal decoder */
  717. },{
  718. .type = CX88_VMUX_COMPOSITE1,
  719. .vmux = 1,
  720. .gpio0 = 0xbf63,
  721. },{
  722. .type = CX88_VMUX_SVIDEO,
  723. .vmux = 2,
  724. .gpio0 = 0xbf63,
  725. }},
  726. .radio = {
  727. .type = CX88_RADIO,
  728. .gpio0 = 0xbf60,
  729. },
  730. },
  731. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
  732. .name = "DViCO FusionHDTV 3 Gold-T",
  733. .tuner_type = TUNER_THOMSON_DTT761X,
  734. .radio_type = UNSET,
  735. .tuner_addr = ADDR_UNSET,
  736. .radio_addr = ADDR_UNSET,
  737. .tda9887_conf = TDA9887_PRESENT,
  738. .input = {{
  739. .type = CX88_VMUX_TELEVISION,
  740. .vmux = 0,
  741. .gpio0 = 0x97ed,
  742. },{
  743. .type = CX88_VMUX_COMPOSITE1,
  744. .vmux = 1,
  745. .gpio0 = 0x97e9,
  746. },{
  747. .type = CX88_VMUX_SVIDEO,
  748. .vmux = 2,
  749. .gpio0 = 0x97e9,
  750. }},
  751. .mpeg = CX88_MPEG_DVB,
  752. },
  753. [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
  754. .name = "ADS Tech Instant TV DVB-T PCI",
  755. .tuner_type = TUNER_ABSENT,
  756. .radio_type = UNSET,
  757. .tuner_addr = ADDR_UNSET,
  758. .radio_addr = ADDR_UNSET,
  759. .input = {{
  760. .type = CX88_VMUX_COMPOSITE1,
  761. .vmux = 1,
  762. .gpio0 = 0x0700,
  763. .gpio2 = 0x0101,
  764. },{
  765. .type = CX88_VMUX_SVIDEO,
  766. .vmux = 2,
  767. .gpio0 = 0x0700,
  768. .gpio2 = 0x0101,
  769. }},
  770. .mpeg = CX88_MPEG_DVB,
  771. },
  772. [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
  773. .name = "TerraTec Cinergy 1400 DVB-T",
  774. .tuner_type = TUNER_ABSENT,
  775. .input = {{
  776. .type = CX88_VMUX_DVB,
  777. .vmux = 0,
  778. },{
  779. .type = CX88_VMUX_COMPOSITE1,
  780. .vmux = 2,
  781. },{
  782. .type = CX88_VMUX_SVIDEO,
  783. .vmux = 2,
  784. }},
  785. .mpeg = CX88_MPEG_DVB,
  786. },
  787. [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
  788. .name = "DViCO FusionHDTV 5 Gold",
  789. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
  790. .radio_type = UNSET,
  791. .tuner_addr = ADDR_UNSET,
  792. .radio_addr = ADDR_UNSET,
  793. .tda9887_conf = TDA9887_PRESENT,
  794. .input = {{
  795. .type = CX88_VMUX_TELEVISION,
  796. .vmux = 0,
  797. .gpio0 = 0x87fd,
  798. },{
  799. .type = CX88_VMUX_COMPOSITE1,
  800. .vmux = 1,
  801. .gpio0 = 0x87f9,
  802. },{
  803. .type = CX88_VMUX_SVIDEO,
  804. .vmux = 2,
  805. .gpio0 = 0x87f9,
  806. }},
  807. .mpeg = CX88_MPEG_DVB,
  808. },
  809. [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
  810. .name = "AverMedia UltraTV Media Center PCI 550",
  811. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  812. .radio_type = UNSET,
  813. .tuner_addr = ADDR_UNSET,
  814. .radio_addr = ADDR_UNSET,
  815. .tda9887_conf = TDA9887_PRESENT,
  816. .input = {{
  817. .type = CX88_VMUX_COMPOSITE1,
  818. .vmux = 0,
  819. .gpio0 = 0x0000cd73,
  820. .audioroute = 1,
  821. },{
  822. .type = CX88_VMUX_SVIDEO,
  823. .vmux = 1,
  824. .gpio0 = 0x0000cd73,
  825. .audioroute = 1,
  826. },{
  827. .type = CX88_VMUX_TELEVISION,
  828. .vmux = 3,
  829. .gpio0 = 0x0000cdb3,
  830. .audioroute = 1,
  831. }},
  832. .radio = {
  833. .type = CX88_RADIO,
  834. .vmux = 2,
  835. .gpio0 = 0x0000cdf3,
  836. .audioroute = 1,
  837. },
  838. .mpeg = CX88_MPEG_BLACKBIRD,
  839. },
  840. [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
  841. /* Alexander Wold <awold@bigfoot.com> */
  842. .name = "Kworld V-Stream Xpert DVD",
  843. .tuner_type = UNSET,
  844. .input = {{
  845. .type = CX88_VMUX_COMPOSITE1,
  846. .vmux = 1,
  847. .gpio0 = 0x03000000,
  848. .gpio1 = 0x01000000,
  849. .gpio2 = 0x02000000,
  850. .gpio3 = 0x00100000,
  851. },{
  852. .type = CX88_VMUX_SVIDEO,
  853. .vmux = 2,
  854. .gpio0 = 0x03000000,
  855. .gpio1 = 0x01000000,
  856. .gpio2 = 0x02000000,
  857. .gpio3 = 0x00100000,
  858. }},
  859. },
  860. [CX88_BOARD_ATI_HDTVWONDER] = {
  861. .name = "ATI HDTV Wonder",
  862. .tuner_type = TUNER_PHILIPS_TUV1236D,
  863. .radio_type = UNSET,
  864. .tuner_addr = ADDR_UNSET,
  865. .radio_addr = ADDR_UNSET,
  866. .input = {{
  867. .type = CX88_VMUX_TELEVISION,
  868. .vmux = 0,
  869. .gpio0 = 0x00000ff7,
  870. .gpio1 = 0x000000ff,
  871. .gpio2 = 0x00000001,
  872. .gpio3 = 0x00000000,
  873. },{
  874. .type = CX88_VMUX_COMPOSITE1,
  875. .vmux = 1,
  876. .gpio0 = 0x00000ffe,
  877. .gpio1 = 0x000000ff,
  878. .gpio2 = 0x00000001,
  879. .gpio3 = 0x00000000,
  880. },{
  881. .type = CX88_VMUX_SVIDEO,
  882. .vmux = 2,
  883. .gpio0 = 0x00000ffe,
  884. .gpio1 = 0x000000ff,
  885. .gpio2 = 0x00000001,
  886. .gpio3 = 0x00000000,
  887. }},
  888. .mpeg = CX88_MPEG_DVB,
  889. },
  890. [CX88_BOARD_WINFAST_DTV1000] = {
  891. .name = "WinFast DTV1000-T",
  892. .tuner_type = TUNER_ABSENT,
  893. .radio_type = UNSET,
  894. .tuner_addr = ADDR_UNSET,
  895. .radio_addr = ADDR_UNSET,
  896. .input = {{
  897. .type = CX88_VMUX_DVB,
  898. .vmux = 0,
  899. },{
  900. .type = CX88_VMUX_COMPOSITE1,
  901. .vmux = 1,
  902. },{
  903. .type = CX88_VMUX_SVIDEO,
  904. .vmux = 2,
  905. }},
  906. .mpeg = CX88_MPEG_DVB,
  907. },
  908. [CX88_BOARD_AVERTV_303] = {
  909. .name = "AVerTV 303 (M126)",
  910. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  911. .radio_type = UNSET,
  912. .tuner_addr = ADDR_UNSET,
  913. .radio_addr = ADDR_UNSET,
  914. .tda9887_conf = TDA9887_PRESENT,
  915. .input = {{
  916. .type = CX88_VMUX_TELEVISION,
  917. .vmux = 0,
  918. .gpio0 = 0x00ff,
  919. .gpio1 = 0xe09f,
  920. .gpio2 = 0x0010,
  921. .gpio3 = 0x0000,
  922. },{
  923. .type = CX88_VMUX_COMPOSITE1,
  924. .vmux = 1,
  925. .gpio0 = 0x00ff,
  926. .gpio1 = 0xe05f,
  927. .gpio2 = 0x0010,
  928. .gpio3 = 0x0000,
  929. },{
  930. .type = CX88_VMUX_SVIDEO,
  931. .vmux = 2,
  932. .gpio0 = 0x00ff,
  933. .gpio1 = 0xe05f,
  934. .gpio2 = 0x0010,
  935. .gpio3 = 0x0000,
  936. }},
  937. },
  938. [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
  939. .name = "Hauppauge Nova-S-Plus DVB-S",
  940. .tuner_type = TUNER_ABSENT,
  941. .radio_type = UNSET,
  942. .tuner_addr = ADDR_UNSET,
  943. .radio_addr = ADDR_UNSET,
  944. .input = {{
  945. .type = CX88_VMUX_DVB,
  946. .vmux = 0,
  947. },{
  948. .type = CX88_VMUX_COMPOSITE1,
  949. .vmux = 1,
  950. },{
  951. .type = CX88_VMUX_SVIDEO,
  952. .vmux = 2,
  953. }},
  954. .mpeg = CX88_MPEG_DVB,
  955. },
  956. [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
  957. .name = "Hauppauge Nova-SE2 DVB-S",
  958. .tuner_type = TUNER_ABSENT,
  959. .radio_type = UNSET,
  960. .tuner_addr = ADDR_UNSET,
  961. .radio_addr = ADDR_UNSET,
  962. .input = {{
  963. .type = CX88_VMUX_DVB,
  964. .vmux = 0,
  965. }},
  966. .mpeg = CX88_MPEG_DVB,
  967. },
  968. [CX88_BOARD_KWORLD_DVBS_100] = {
  969. .name = "KWorld DVB-S 100",
  970. .tuner_type = TUNER_ABSENT,
  971. .radio_type = UNSET,
  972. .tuner_addr = ADDR_UNSET,
  973. .radio_addr = ADDR_UNSET,
  974. .input = {{
  975. .type = CX88_VMUX_DVB,
  976. .vmux = 0,
  977. },{
  978. .type = CX88_VMUX_COMPOSITE1,
  979. .vmux = 1,
  980. },{
  981. .type = CX88_VMUX_SVIDEO,
  982. .vmux = 2,
  983. }},
  984. .mpeg = CX88_MPEG_DVB,
  985. },
  986. [CX88_BOARD_HAUPPAUGE_HVR1100] = {
  987. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
  988. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  989. .radio_type = UNSET,
  990. .tuner_addr = ADDR_UNSET,
  991. .radio_addr = ADDR_UNSET,
  992. .tda9887_conf = TDA9887_PRESENT,
  993. .input = {{
  994. .type = CX88_VMUX_TELEVISION,
  995. .vmux = 0,
  996. },{
  997. .type = CX88_VMUX_COMPOSITE1,
  998. .vmux = 1,
  999. },{
  1000. .type = CX88_VMUX_SVIDEO,
  1001. .vmux = 2,
  1002. }},
  1003. /* fixme: Add radio support */
  1004. .mpeg = CX88_MPEG_DVB,
  1005. },
  1006. [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
  1007. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
  1008. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1009. .radio_type = UNSET,
  1010. .tuner_addr = ADDR_UNSET,
  1011. .radio_addr = ADDR_UNSET,
  1012. .tda9887_conf = TDA9887_PRESENT,
  1013. .input = {{
  1014. .type = CX88_VMUX_TELEVISION,
  1015. .vmux = 0,
  1016. },{
  1017. .type = CX88_VMUX_COMPOSITE1,
  1018. .vmux = 1,
  1019. }},
  1020. /* fixme: Add radio support */
  1021. .mpeg = CX88_MPEG_DVB,
  1022. },
  1023. [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
  1024. .name = "digitalnow DNTV Live! DVB-T Pro",
  1025. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1026. .radio_type = UNSET,
  1027. .tuner_addr = ADDR_UNSET,
  1028. .radio_addr = ADDR_UNSET,
  1029. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1030. TDA9887_PORT2_ACTIVE,
  1031. .input = {{
  1032. .type = CX88_VMUX_TELEVISION,
  1033. .vmux = 0,
  1034. .gpio0 = 0xf80808,
  1035. },{
  1036. .type = CX88_VMUX_COMPOSITE1,
  1037. .vmux = 1,
  1038. .gpio0 = 0xf80808,
  1039. },{
  1040. .type = CX88_VMUX_SVIDEO,
  1041. .vmux = 2,
  1042. .gpio0 = 0xf80808,
  1043. }},
  1044. .radio = {
  1045. .type = CX88_RADIO,
  1046. .gpio0 = 0xf80808,
  1047. },
  1048. .mpeg = CX88_MPEG_DVB,
  1049. },
  1050. [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
  1051. /* Kworld V-stream Xpert DVB-T with Thomson tuner */
  1052. /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
  1053. /* Manenti Marco <marco_manenti@colman.it> */
  1054. .name = "KWorld/VStream XPert DVB-T with cx22702",
  1055. .tuner_type = TUNER_ABSENT,
  1056. .radio_type = UNSET,
  1057. .tuner_addr = ADDR_UNSET,
  1058. .radio_addr = ADDR_UNSET,
  1059. .input = {{
  1060. .type = CX88_VMUX_COMPOSITE1,
  1061. .vmux = 1,
  1062. .gpio0 = 0x0700,
  1063. .gpio2 = 0x0101,
  1064. },{
  1065. .type = CX88_VMUX_SVIDEO,
  1066. .vmux = 2,
  1067. .gpio0 = 0x0700,
  1068. .gpio2 = 0x0101,
  1069. }},
  1070. .mpeg = CX88_MPEG_DVB,
  1071. },
  1072. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
  1073. .name = "DViCO FusionHDTV DVB-T Dual Digital",
  1074. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  1075. .radio_type = UNSET,
  1076. .tuner_addr = ADDR_UNSET,
  1077. .radio_addr = ADDR_UNSET,
  1078. .input = {{
  1079. .type = CX88_VMUX_COMPOSITE1,
  1080. .vmux = 1,
  1081. .gpio0 = 0x000067df,
  1082. },{
  1083. .type = CX88_VMUX_SVIDEO,
  1084. .vmux = 2,
  1085. .gpio0 = 0x000067df,
  1086. }},
  1087. .mpeg = CX88_MPEG_DVB,
  1088. },
  1089. [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
  1090. .name = "KWorld HardwareMpegTV XPert",
  1091. .tuner_type = TUNER_PHILIPS_TDA8290,
  1092. .radio_type = UNSET,
  1093. .tuner_addr = ADDR_UNSET,
  1094. .radio_addr = ADDR_UNSET,
  1095. .input = {{
  1096. .type = CX88_VMUX_TELEVISION,
  1097. .vmux = 0,
  1098. .gpio0 = 0x3de2,
  1099. .gpio2 = 0x00ff,
  1100. },{
  1101. .type = CX88_VMUX_COMPOSITE1,
  1102. .vmux = 1,
  1103. .gpio0 = 0x3de6,
  1104. .audioroute = 1,
  1105. },{
  1106. .type = CX88_VMUX_SVIDEO,
  1107. .vmux = 2,
  1108. .gpio0 = 0x3de6,
  1109. .audioroute = 1,
  1110. }},
  1111. .radio = {
  1112. .type = CX88_RADIO,
  1113. .gpio0 = 0x3de6,
  1114. .gpio2 = 0x00ff,
  1115. },
  1116. .mpeg = CX88_MPEG_BLACKBIRD,
  1117. },
  1118. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
  1119. .name = "DViCO FusionHDTV DVB-T Hybrid",
  1120. .tuner_type = TUNER_THOMSON_FE6600,
  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 = 0x0000a75f,
  1128. },{
  1129. .type = CX88_VMUX_COMPOSITE1,
  1130. .vmux = 1,
  1131. .gpio0 = 0x0000a75b,
  1132. },{
  1133. .type = CX88_VMUX_SVIDEO,
  1134. .vmux = 2,
  1135. .gpio0 = 0x0000a75b,
  1136. }},
  1137. .mpeg = CX88_MPEG_DVB,
  1138. },
  1139. [CX88_BOARD_PCHDTV_HD5500] = {
  1140. .name = "pcHDTV HD5500 HDTV",
  1141. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
  1142. .radio_type = UNSET,
  1143. .tuner_addr = ADDR_UNSET,
  1144. .radio_addr = ADDR_UNSET,
  1145. .tda9887_conf = TDA9887_PRESENT,
  1146. .input = {{
  1147. .type = CX88_VMUX_TELEVISION,
  1148. .vmux = 0,
  1149. .gpio0 = 0x87fd,
  1150. },{
  1151. .type = CX88_VMUX_COMPOSITE1,
  1152. .vmux = 1,
  1153. .gpio0 = 0x87f9,
  1154. },{
  1155. .type = CX88_VMUX_SVIDEO,
  1156. .vmux = 2,
  1157. .gpio0 = 0x87f9,
  1158. }},
  1159. .mpeg = CX88_MPEG_DVB,
  1160. },
  1161. [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
  1162. /* FIXME: tested TV input only, disabled composite,
  1163. svideo and radio until they can be tested also. */
  1164. .name = "Kworld MCE 200 Deluxe",
  1165. .tuner_type = TUNER_TENA_9533_DI,
  1166. .radio_type = UNSET,
  1167. .tda9887_conf = TDA9887_PRESENT,
  1168. .tuner_addr = ADDR_UNSET,
  1169. .radio_addr = ADDR_UNSET,
  1170. .input = {{
  1171. .type = CX88_VMUX_TELEVISION,
  1172. .vmux = 0,
  1173. .gpio0 = 0x0000BDE6
  1174. }},
  1175. .mpeg = CX88_MPEG_BLACKBIRD,
  1176. },
  1177. [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
  1178. /* FIXME: SVideo, Composite and FM inputs are untested */
  1179. .name = "PixelView PlayTV P7000",
  1180. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  1181. .radio_type = UNSET,
  1182. .tuner_addr = ADDR_UNSET,
  1183. .radio_addr = ADDR_UNSET,
  1184. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1185. TDA9887_PORT2_ACTIVE,
  1186. .input = {{
  1187. .type = CX88_VMUX_TELEVISION,
  1188. .vmux = 0,
  1189. .gpio0 = 0x5da6,
  1190. }},
  1191. .mpeg = CX88_MPEG_BLACKBIRD,
  1192. },
  1193. [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
  1194. .name = "NPG Tech Real TV FM Top 10",
  1195. .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
  1196. .radio_type = UNSET,
  1197. .tuner_addr = ADDR_UNSET,
  1198. .radio_addr = ADDR_UNSET,
  1199. .input = {{
  1200. .type = CX88_VMUX_TELEVISION,
  1201. .vmux = 0,
  1202. .gpio0 = 0x0788,
  1203. },{
  1204. .type = CX88_VMUX_COMPOSITE1,
  1205. .vmux = 1,
  1206. .gpio0 = 0x078b,
  1207. },{
  1208. .type = CX88_VMUX_SVIDEO,
  1209. .vmux = 2,
  1210. .gpio0 = 0x078b,
  1211. }},
  1212. .radio = {
  1213. .type = CX88_RADIO,
  1214. .gpio0 = 0x074a,
  1215. },
  1216. },
  1217. [CX88_BOARD_WINFAST_DTV2000H] = {
  1218. /* video inputs and radio still in testing */
  1219. .name = "WinFast DTV2000 H",
  1220. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1221. .radio_type = UNSET,
  1222. .tuner_addr = ADDR_UNSET,
  1223. .radio_addr = ADDR_UNSET,
  1224. .tda9887_conf = TDA9887_PRESENT,
  1225. .input = {{
  1226. .type = CX88_VMUX_TELEVISION,
  1227. .vmux = 0,
  1228. .gpio0 = 0x00017304,
  1229. .gpio1 = 0x00008203,
  1230. .gpio2 = 0x00017304,
  1231. .gpio3 = 0x02000000,
  1232. }},
  1233. .mpeg = CX88_MPEG_DVB,
  1234. },
  1235. [CX88_BOARD_GENIATECH_DVBS] = {
  1236. .name = "Geniatech DVB-S",
  1237. .tuner_type = TUNER_ABSENT,
  1238. .radio_type = UNSET,
  1239. .tuner_addr = ADDR_UNSET,
  1240. .radio_addr = ADDR_UNSET,
  1241. .input = {{
  1242. .type = CX88_VMUX_DVB,
  1243. .vmux = 0,
  1244. },{
  1245. .type = CX88_VMUX_COMPOSITE1,
  1246. .vmux = 1,
  1247. }},
  1248. .mpeg = CX88_MPEG_DVB,
  1249. },
  1250. [CX88_BOARD_HAUPPAUGE_HVR3000] = {
  1251. /* FIXME: Add dvb & radio support */
  1252. .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
  1253. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1254. .radio_type = UNSET,
  1255. .tuner_addr = ADDR_UNSET,
  1256. .radio_addr = ADDR_UNSET,
  1257. .tda9887_conf = TDA9887_PRESENT,
  1258. .input = {{
  1259. .type = CX88_VMUX_TELEVISION,
  1260. .vmux = 0,
  1261. .gpio0 = 0x84bf,
  1262. },{
  1263. .type = CX88_VMUX_COMPOSITE1,
  1264. .vmux = 1,
  1265. .gpio0 = 0x84bf,
  1266. },{
  1267. .type = CX88_VMUX_SVIDEO,
  1268. .vmux = 2,
  1269. .gpio0 = 0x84bf,
  1270. }},
  1271. .mpeg = CX88_MPEG_DVB,
  1272. },
  1273. [CX88_BOARD_NORWOOD_MICRO] = {
  1274. .name = "Norwood Micro TV Tuner",
  1275. .tuner_type = TUNER_TNF_5335MF,
  1276. .radio_type = UNSET,
  1277. .tuner_addr = ADDR_UNSET,
  1278. .radio_addr = ADDR_UNSET,
  1279. .input = {{
  1280. .type = CX88_VMUX_TELEVISION,
  1281. .vmux = 0,
  1282. .gpio0 = 0x0709,
  1283. },{
  1284. .type = CX88_VMUX_COMPOSITE1,
  1285. .vmux = 1,
  1286. .gpio0 = 0x070b,
  1287. },{
  1288. .type = CX88_VMUX_SVIDEO,
  1289. .vmux = 2,
  1290. .gpio0 = 0x070b,
  1291. }},
  1292. },
  1293. [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
  1294. .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
  1295. .tuner_type = TUNER_LG_PAL_NEW_TAPC,
  1296. .radio_type = UNSET,
  1297. .tuner_addr = ADDR_UNSET,
  1298. .radio_addr = ADDR_UNSET,
  1299. .input = {{
  1300. .type = CX88_VMUX_TELEVISION,
  1301. .vmux = 0,
  1302. .gpio0 = 0x003fffff,
  1303. .gpio1 = 0x00e00000,
  1304. .gpio2 = 0x003fffff,
  1305. .gpio3 = 0x02000000,
  1306. },{
  1307. .type = CX88_VMUX_COMPOSITE1,
  1308. .vmux = 1,
  1309. .gpio0 = 0x003fffff,
  1310. .gpio1 = 0x00e00000,
  1311. .gpio2 = 0x003fffff,
  1312. .gpio3 = 0x02000000,
  1313. },{
  1314. .type = CX88_VMUX_SVIDEO,
  1315. .vmux = 2,
  1316. .gpio0 = 0x003fffff,
  1317. .gpio1 = 0x00e00000,
  1318. .gpio2 = 0x003fffff,
  1319. .gpio3 = 0x02000000,
  1320. }},
  1321. },
  1322. [CX88_BOARD_HAUPPAUGE_HVR1300] = {
  1323. .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
  1324. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1325. .radio_type = UNSET,
  1326. .tuner_addr = ADDR_UNSET,
  1327. .radio_addr = ADDR_UNSET,
  1328. .tda9887_conf = TDA9887_PRESENT,
  1329. .audio_chip = AUDIO_CHIP_WM8775,
  1330. .input = {{
  1331. .type = CX88_VMUX_TELEVISION,
  1332. .vmux = 0,
  1333. .gpio0 = 0xe780,
  1334. .audioroute = 1,
  1335. },{
  1336. .type = CX88_VMUX_COMPOSITE1,
  1337. .vmux = 1,
  1338. .gpio0 = 0xe780,
  1339. .audioroute = 2,
  1340. },{
  1341. .type = CX88_VMUX_SVIDEO,
  1342. .vmux = 2,
  1343. .gpio0 = 0xe780,
  1344. .audioroute = 2,
  1345. }},
  1346. /* fixme: Add radio support */
  1347. .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
  1348. },
  1349. [CX88_BOARD_ADSTECH_PTV_390] = {
  1350. .name = "ADS Tech Instant Video PCI",
  1351. .tuner_type = TUNER_ABSENT,
  1352. .radio_type = UNSET,
  1353. .tuner_addr = ADDR_UNSET,
  1354. .radio_addr = ADDR_UNSET,
  1355. .input = {{
  1356. .type = CX88_VMUX_DEBUG,
  1357. .vmux = 3,
  1358. .gpio0 = 0x04ff,
  1359. },{
  1360. .type = CX88_VMUX_COMPOSITE1,
  1361. .vmux = 1,
  1362. .gpio0 = 0x07fa,
  1363. },{
  1364. .type = CX88_VMUX_SVIDEO,
  1365. .vmux = 2,
  1366. .gpio0 = 0x07fa,
  1367. }},
  1368. },
  1369. [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
  1370. .name = "Pinnacle PCTV HD 800i",
  1371. .tuner_type = TUNER_XC5000,
  1372. .radio_type = UNSET,
  1373. .tuner_addr = ADDR_UNSET,
  1374. .radio_addr = ADDR_UNSET,
  1375. .input = {{
  1376. .type = CX88_VMUX_TELEVISION,
  1377. .vmux = 0,
  1378. .gpio0 = 0x04fb,
  1379. .gpio1 = 0x10ff,
  1380. },{
  1381. .type = CX88_VMUX_COMPOSITE1,
  1382. .vmux = 1,
  1383. .gpio0 = 0x04fb,
  1384. .gpio1 = 0x10ef,
  1385. .audioroute = 1,
  1386. },{
  1387. .type = CX88_VMUX_SVIDEO,
  1388. .vmux = 2,
  1389. .gpio0 = 0x04fb,
  1390. .gpio1 = 0x10ef,
  1391. .audioroute = 1,
  1392. }},
  1393. .mpeg = CX88_MPEG_DVB,
  1394. },
  1395. };
  1396. /* ------------------------------------------------------------------ */
  1397. /* PCI subsystem IDs */
  1398. static const struct cx88_subid cx88_subids[] = {
  1399. {
  1400. .subvendor = 0x0070,
  1401. .subdevice = 0x3400,
  1402. .card = CX88_BOARD_HAUPPAUGE,
  1403. },{
  1404. .subvendor = 0x0070,
  1405. .subdevice = 0x3401,
  1406. .card = CX88_BOARD_HAUPPAUGE,
  1407. },{
  1408. .subvendor = 0x14c7,
  1409. .subdevice = 0x0106,
  1410. .card = CX88_BOARD_GDI,
  1411. },{
  1412. .subvendor = 0x14c7,
  1413. .subdevice = 0x0107, /* with mpeg encoder */
  1414. .card = CX88_BOARD_GDI,
  1415. },{
  1416. .subvendor = PCI_VENDOR_ID_ATI,
  1417. .subdevice = 0x00f8,
  1418. .card = CX88_BOARD_ATI_WONDER_PRO,
  1419. },{
  1420. .subvendor = 0x107d,
  1421. .subdevice = 0x6611,
  1422. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1423. },{
  1424. .subvendor = 0x107d,
  1425. .subdevice = 0x6613, /* NTSC */
  1426. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1427. },{
  1428. .subvendor = 0x107d,
  1429. .subdevice = 0x6620,
  1430. .card = CX88_BOARD_WINFAST_DV2000,
  1431. },{
  1432. .subvendor = 0x107d,
  1433. .subdevice = 0x663b,
  1434. .card = CX88_BOARD_LEADTEK_PVR2000,
  1435. },{
  1436. .subvendor = 0x107d,
  1437. .subdevice = 0x663c,
  1438. .card = CX88_BOARD_LEADTEK_PVR2000,
  1439. },{
  1440. .subvendor = 0x1461,
  1441. .subdevice = 0x000b,
  1442. .card = CX88_BOARD_AVERTV_STUDIO_303,
  1443. },{
  1444. .subvendor = 0x1462,
  1445. .subdevice = 0x8606,
  1446. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  1447. },{
  1448. .subvendor = 0x10fc,
  1449. .subdevice = 0xd003,
  1450. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  1451. },{
  1452. .subvendor = 0x1043,
  1453. .subdevice = 0x4823, /* with mpeg encoder */
  1454. .card = CX88_BOARD_ASUS_PVR_416,
  1455. },{
  1456. .subvendor = 0x17de,
  1457. .subdevice = 0x08a6,
  1458. .card = CX88_BOARD_KWORLD_DVB_T,
  1459. },{
  1460. .subvendor = 0x18ac,
  1461. .subdevice = 0xd810,
  1462. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1463. },{
  1464. .subvendor = 0x18ac,
  1465. .subdevice = 0xd820,
  1466. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  1467. },{
  1468. .subvendor = 0x18ac,
  1469. .subdevice = 0xdb00,
  1470. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  1471. },{
  1472. .subvendor = 0x0070,
  1473. .subdevice = 0x9002,
  1474. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1475. },{
  1476. .subvendor = 0x14f1,
  1477. .subdevice = 0x0187,
  1478. .card = CX88_BOARD_CONEXANT_DVB_T1,
  1479. },{
  1480. .subvendor = 0x1540,
  1481. .subdevice = 0x2580,
  1482. .card = CX88_BOARD_PROVIDEO_PV259,
  1483. },{
  1484. .subvendor = 0x18ac,
  1485. .subdevice = 0xdb10,
  1486. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1487. },{
  1488. .subvendor = 0x1554,
  1489. .subdevice = 0x4811,
  1490. .card = CX88_BOARD_PIXELVIEW,
  1491. },{
  1492. .subvendor = 0x7063,
  1493. .subdevice = 0x3000, /* HD-3000 card */
  1494. .card = CX88_BOARD_PCHDTV_HD3000,
  1495. },{
  1496. .subvendor = 0x17de,
  1497. .subdevice = 0xa8a6,
  1498. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  1499. },{
  1500. .subvendor = 0x0070,
  1501. .subdevice = 0x2801,
  1502. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  1503. },{
  1504. .subvendor = 0x14f1,
  1505. .subdevice = 0x0342,
  1506. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  1507. },{
  1508. .subvendor = 0x10fc,
  1509. .subdevice = 0xd035,
  1510. .card = CX88_BOARD_IODATA_GVBCTV7E,
  1511. },{
  1512. .subvendor = 0x1421,
  1513. .subdevice = 0x0334,
  1514. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  1515. },{
  1516. .subvendor = 0x153b,
  1517. .subdevice = 0x1166,
  1518. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  1519. },{
  1520. .subvendor = 0x18ac,
  1521. .subdevice = 0xd500,
  1522. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  1523. },{
  1524. .subvendor = 0x1461,
  1525. .subdevice = 0x8011,
  1526. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  1527. },{
  1528. .subvendor = PCI_VENDOR_ID_ATI,
  1529. .subdevice = 0xa101,
  1530. .card = CX88_BOARD_ATI_HDTVWONDER,
  1531. },{
  1532. .subvendor = 0x107d,
  1533. .subdevice = 0x665f,
  1534. .card = CX88_BOARD_WINFAST_DTV1000,
  1535. },{
  1536. .subvendor = 0x1461,
  1537. .subdevice = 0x000a,
  1538. .card = CX88_BOARD_AVERTV_303,
  1539. },{
  1540. .subvendor = 0x0070,
  1541. .subdevice = 0x9200,
  1542. .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
  1543. },{
  1544. .subvendor = 0x0070,
  1545. .subdevice = 0x9201,
  1546. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1547. },{
  1548. .subvendor = 0x0070,
  1549. .subdevice = 0x9202,
  1550. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1551. },{
  1552. .subvendor = 0x17de,
  1553. .subdevice = 0x08b2,
  1554. .card = CX88_BOARD_KWORLD_DVBS_100,
  1555. },{
  1556. .subvendor = 0x0070,
  1557. .subdevice = 0x9400,
  1558. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1559. },{
  1560. .subvendor = 0x0070,
  1561. .subdevice = 0x9402,
  1562. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1563. },{
  1564. .subvendor = 0x0070,
  1565. .subdevice = 0x9800,
  1566. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1567. },{
  1568. .subvendor = 0x0070,
  1569. .subdevice = 0x9802,
  1570. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1571. },{
  1572. .subvendor = 0x0070,
  1573. .subdevice = 0x9001,
  1574. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1575. },{
  1576. .subvendor = 0x1822,
  1577. .subdevice = 0x0025,
  1578. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1579. },{
  1580. .subvendor = 0x17de,
  1581. .subdevice = 0x08a1,
  1582. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  1583. },{
  1584. .subvendor = 0x18ac,
  1585. .subdevice = 0xdb50,
  1586. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1587. },{
  1588. .subvendor = 0x18ac,
  1589. .subdevice = 0xdb54,
  1590. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1591. /* Re-branded DViCO: DigitalNow DVB-T Dual */
  1592. },{
  1593. .subvendor = 0x18ac,
  1594. .subdevice = 0xdb11,
  1595. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1596. /* Re-branded DViCO: UltraView DVB-T Plus */
  1597. },{
  1598. .subvendor = 0x17de,
  1599. .subdevice = 0x0840,
  1600. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  1601. },{
  1602. .subvendor = 0x1421,
  1603. .subdevice = 0x0305,
  1604. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  1605. },{
  1606. .subvendor = 0x18ac,
  1607. .subdevice = 0xdb40,
  1608. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1609. },{
  1610. .subvendor = 0x18ac,
  1611. .subdevice = 0xdb44,
  1612. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1613. },{
  1614. .subvendor = 0x7063,
  1615. .subdevice = 0x5500,
  1616. .card = CX88_BOARD_PCHDTV_HD5500,
  1617. },{
  1618. .subvendor = 0x17de,
  1619. .subdevice = 0x0841,
  1620. .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
  1621. },{
  1622. .subvendor = 0x1822,
  1623. .subdevice = 0x0019,
  1624. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1625. },{
  1626. .subvendor = 0x1554,
  1627. .subdevice = 0x4813,
  1628. .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
  1629. },{
  1630. .subvendor = 0x14f1,
  1631. .subdevice = 0x0842,
  1632. .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
  1633. },{
  1634. .subvendor = 0x107d,
  1635. .subdevice = 0x665e,
  1636. .card = CX88_BOARD_WINFAST_DTV2000H,
  1637. },{
  1638. .subvendor = 0x18ac,
  1639. .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
  1640. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1641. },{
  1642. .subvendor = 0x14f1,
  1643. .subdevice = 0x0084,
  1644. .card = CX88_BOARD_GENIATECH_DVBS,
  1645. },{
  1646. .subvendor = 0x0070,
  1647. .subdevice = 0x1404,
  1648. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  1649. },{
  1650. .subvendor = 0x1461,
  1651. .subdevice = 0xc111, /* AverMedia M150-D */
  1652. /* This board is known to work with the ASUS PVR416 config */
  1653. .card = CX88_BOARD_ASUS_PVR_416,
  1654. },{
  1655. .subvendor = 0xc180,
  1656. .subdevice = 0xc980,
  1657. .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
  1658. },{
  1659. .subvendor = 0x0070,
  1660. .subdevice = 0x9600,
  1661. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  1662. },{
  1663. .subvendor = 0x0070,
  1664. .subdevice = 0x9601,
  1665. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  1666. },{
  1667. .subvendor = 0x0070,
  1668. .subdevice = 0x9602,
  1669. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  1670. },{
  1671. .subvendor = 0x107d,
  1672. .subdevice = 0x6632,
  1673. .card = CX88_BOARD_LEADTEK_PVR2000,
  1674. },{
  1675. .subvendor = 0x12ab,
  1676. .subdevice = 0x2300, /* Club3D Zap TV2100 */
  1677. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  1678. },{
  1679. .subvendor = 0x0070,
  1680. .subdevice = 0x9000,
  1681. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1682. },{
  1683. .subvendor = 0x0070,
  1684. .subdevice = 0x1400,
  1685. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  1686. },{
  1687. .subvendor = 0x0070,
  1688. .subdevice = 0x1401,
  1689. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  1690. },{
  1691. .subvendor = 0x0070,
  1692. .subdevice = 0x1402,
  1693. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  1694. },{
  1695. .subvendor = 0x1421,
  1696. .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
  1697. .card = CX88_BOARD_KWORLD_DVBS_100,
  1698. },{
  1699. .subvendor = 0x1421,
  1700. .subdevice = 0x0390,
  1701. .card = CX88_BOARD_ADSTECH_PTV_390,
  1702. },{
  1703. .subvendor = 0x11bd,
  1704. .subdevice = 0x0051,
  1705. .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
  1706. },
  1707. };
  1708. /* ----------------------------------------------------------------------- */
  1709. /* some leadtek specific stuff */
  1710. static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1711. {
  1712. /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
  1713. * any others.
  1714. *
  1715. * Byte 0 is 1 on the NTSC board.
  1716. */
  1717. if (eeprom_data[4] != 0x7d ||
  1718. eeprom_data[5] != 0x10 ||
  1719. eeprom_data[7] != 0x66) {
  1720. printk(KERN_WARNING "%s: Leadtek eeprom invalid.\n",
  1721. core->name);
  1722. return;
  1723. }
  1724. core->board.tuner_type = (eeprom_data[6] == 0x13) ?
  1725. TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
  1726. printk(KERN_INFO "%s: Leadtek Winfast 2000XP Expert config: "
  1727. "tuner=%d, eeprom[0]=0x%02x\n",
  1728. core->name, core->board.tuner_type, eeprom_data[0]);
  1729. }
  1730. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1731. {
  1732. struct tveeprom tv;
  1733. tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
  1734. core->board.tuner_type = tv.tuner_type;
  1735. core->tuner_formats = tv.tuner_formats;
  1736. core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
  1737. /* Make sure we support the board model */
  1738. switch (tv.model)
  1739. {
  1740. case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
  1741. case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
  1742. case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
  1743. case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
  1744. case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
  1745. case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
  1746. case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
  1747. case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
  1748. case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
  1749. case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
  1750. case 34519: /* WinTV-PCI-FM */
  1751. case 90002: /* Nova-T-PCI (9002) */
  1752. case 92001: /* Nova-S-Plus (Video and IR) */
  1753. case 92002: /* Nova-S-Plus (Video and IR) */
  1754. case 90003: /* Nova-T-PCI (9002 No RF out) */
  1755. case 90500: /* Nova-T-PCI (oem) */
  1756. case 90501: /* Nova-T-PCI (oem/IR) */
  1757. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  1758. case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
  1759. case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
  1760. case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
  1761. case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
  1762. case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
  1763. case 96569: /* WinTV-HVR1300 () */
  1764. case 96659: /* WinTV-HVR1300 () */
  1765. case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
  1766. /* known */
  1767. break;
  1768. default:
  1769. printk("%s: warning: unknown hauppauge model #%d\n",
  1770. core->name, tv.model);
  1771. break;
  1772. }
  1773. printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
  1774. core->name, tv.model);
  1775. }
  1776. /* ----------------------------------------------------------------------- */
  1777. /* some GDI (was: Modular Technology) specific stuff */
  1778. static struct {
  1779. int id;
  1780. int fm;
  1781. char *name;
  1782. } gdi_tuner[] = {
  1783. [ 0x01 ] = { .id = TUNER_ABSENT,
  1784. .name = "NTSC_M" },
  1785. [ 0x02 ] = { .id = TUNER_ABSENT,
  1786. .name = "PAL_B" },
  1787. [ 0x03 ] = { .id = TUNER_ABSENT,
  1788. .name = "PAL_I" },
  1789. [ 0x04 ] = { .id = TUNER_ABSENT,
  1790. .name = "PAL_D" },
  1791. [ 0x05 ] = { .id = TUNER_ABSENT,
  1792. .name = "SECAM" },
  1793. [ 0x10 ] = { .id = TUNER_ABSENT,
  1794. .fm = 1,
  1795. .name = "TEMIC_4049" },
  1796. [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
  1797. .name = "TEMIC_4136" },
  1798. [ 0x12 ] = { .id = TUNER_ABSENT,
  1799. .name = "TEMIC_4146" },
  1800. [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
  1801. .fm = 1,
  1802. .name = "PHILIPS_FQ1216_MK3" },
  1803. [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
  1804. .name = "PHILIPS_FQ1236_MK3" },
  1805. [ 0x22 ] = { .id = TUNER_ABSENT,
  1806. .name = "PHILIPS_FI1236_MK3" },
  1807. [ 0x23 ] = { .id = TUNER_ABSENT,
  1808. .name = "PHILIPS_FI1216_MK3" },
  1809. };
  1810. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1811. {
  1812. char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  1813. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  1814. printk(KERN_INFO "%s: GDI: tuner=%s\n", core->name,
  1815. name ? name : "unknown");
  1816. if (NULL == name)
  1817. return;
  1818. core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  1819. core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
  1820. CX88_RADIO : 0;
  1821. }
  1822. /* ----------------------------------------------------------------------- */
  1823. /* some DViCO specific stuff */
  1824. static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
  1825. {
  1826. struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
  1827. int i, err;
  1828. static u8 init_bufs[13][5] = {
  1829. { 0x10, 0x00, 0x20, 0x01, 0x03 },
  1830. { 0x10, 0x10, 0x01, 0x00, 0x21 },
  1831. { 0x10, 0x10, 0x10, 0x00, 0xCA },
  1832. { 0x10, 0x10, 0x12, 0x00, 0x08 },
  1833. { 0x10, 0x10, 0x13, 0x00, 0x0A },
  1834. { 0x10, 0x10, 0x16, 0x01, 0xC0 },
  1835. { 0x10, 0x10, 0x22, 0x01, 0x3D },
  1836. { 0x10, 0x10, 0x73, 0x01, 0x2E },
  1837. { 0x10, 0x10, 0x72, 0x00, 0xC5 },
  1838. { 0x10, 0x10, 0x71, 0x01, 0x97 },
  1839. { 0x10, 0x10, 0x70, 0x00, 0x0F },
  1840. { 0x10, 0x10, 0xB0, 0x00, 0x01 },
  1841. { 0x03, 0x0C },
  1842. };
  1843. for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
  1844. msg.buf = init_bufs[i];
  1845. msg.len = (i != 12 ? 5 : 2);
  1846. err = i2c_transfer(&core->i2c_adap, &msg, 1);
  1847. if (err != 1) {
  1848. printk("dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n", i, err);
  1849. return;
  1850. }
  1851. }
  1852. }
  1853. /* ----------------------------------------------------------------------- */
  1854. /* Tuner callback function. Currently only needed for the Pinnacle *
  1855. * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
  1856. * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
  1857. int cx88_tuner_callback(void *i2c_algo, int command, int arg)
  1858. {
  1859. struct i2c_algo_bit_data *algo = i2c_algo;
  1860. struct cx88_core *core = algo->data;
  1861. switch(core->boardnr) {
  1862. case CX88_BOARD_PINNACLE_PCTV_HD_800i:
  1863. if(command == 0) { /* This is the reset command from xc5000 */
  1864. /* Reset XC5000 tuner via GPIO pin #2 */
  1865. cx_set(MO_GP0_IO, 0x00000400);
  1866. cx_clear(MO_GP0_IO, 0x00000004);
  1867. mdelay(200);
  1868. cx_set(MO_GP0_IO, 0x00000004);
  1869. printk(KERN_ERR "xc5000: in reset for xc5000\n");
  1870. mdelay(200);
  1871. return 0;
  1872. }
  1873. else {
  1874. printk(KERN_ERR
  1875. "xc5000: unknown tuner callback command.\n");
  1876. return -EINVAL;
  1877. }
  1878. break;
  1879. }
  1880. return 0; /* Should never be here */
  1881. }
  1882. EXPORT_SYMBOL(cx88_tuner_callback);
  1883. /* ----------------------------------------------------------------------- */
  1884. static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  1885. {
  1886. int i;
  1887. if (0 == pci->subsystem_vendor &&
  1888. 0 == pci->subsystem_device) {
  1889. printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
  1890. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  1891. "%s: workaround that. Redirect complaints to the vendor of\n"
  1892. "%s: the TV card. Best regards,\n"
  1893. "%s: -- tux\n",
  1894. core->name,core->name,core->name,core->name,core->name);
  1895. } else {
  1896. printk("%s: Your board isn't known (yet) to the driver. You can\n"
  1897. "%s: try to pick one of the existing card configs via\n"
  1898. "%s: card=<n> insmod option. Updating to the latest\n"
  1899. "%s: version might help as well.\n",
  1900. core->name,core->name,core->name,core->name);
  1901. }
  1902. printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
  1903. core->name);
  1904. for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
  1905. printk("%s: card=%d -> %s\n",
  1906. core->name, i, cx88_boards[i].name);
  1907. }
  1908. static void cx88_card_setup_pre_i2c(struct cx88_core *core)
  1909. {
  1910. switch (core->boardnr) {
  1911. case CX88_BOARD_HAUPPAUGE_HVR1300:
  1912. /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */
  1913. /* We leave here with the 702 on the bus */
  1914. cx_write(MO_GP0_IO, 0x0000e780);
  1915. udelay(1000);
  1916. cx_clear(MO_GP0_IO, 0x00000080);
  1917. udelay(50);
  1918. cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
  1919. udelay(1000);
  1920. break;
  1921. }
  1922. }
  1923. static void cx88_card_setup(struct cx88_core *core)
  1924. {
  1925. static u8 eeprom[256];
  1926. if (0 == core->i2c_rc) {
  1927. core->i2c_client.addr = 0xa0 >> 1;
  1928. tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom));
  1929. }
  1930. switch (core->boardnr) {
  1931. case CX88_BOARD_HAUPPAUGE:
  1932. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  1933. if (0 == core->i2c_rc)
  1934. hauppauge_eeprom(core,eeprom+8);
  1935. break;
  1936. case CX88_BOARD_GDI:
  1937. if (0 == core->i2c_rc)
  1938. gdi_eeprom(core,eeprom);
  1939. break;
  1940. case CX88_BOARD_WINFAST2000XP_EXPERT:
  1941. if (0 == core->i2c_rc)
  1942. leadtek_eeprom(core,eeprom);
  1943. break;
  1944. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  1945. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  1946. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  1947. case CX88_BOARD_HAUPPAUGE_HVR1100:
  1948. case CX88_BOARD_HAUPPAUGE_HVR1100LP:
  1949. case CX88_BOARD_HAUPPAUGE_HVR3000:
  1950. case CX88_BOARD_HAUPPAUGE_HVR1300:
  1951. if (0 == core->i2c_rc)
  1952. hauppauge_eeprom(core,eeprom);
  1953. break;
  1954. case CX88_BOARD_KWORLD_DVBS_100:
  1955. cx_write(MO_GP0_IO, 0x000007f8);
  1956. cx_write(MO_GP1_IO, 0x00000001);
  1957. break;
  1958. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
  1959. /* GPIO0:6 is hooked to FX2 reset pin */
  1960. cx_set(MO_GP0_IO, 0x00004040);
  1961. cx_clear(MO_GP0_IO, 0x00000040);
  1962. msleep(1000);
  1963. cx_set(MO_GP0_IO, 0x00004040);
  1964. /* FALLTHROUGH */
  1965. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  1966. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  1967. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
  1968. /* GPIO0:0 is hooked to mt352 reset pin */
  1969. cx_set(MO_GP0_IO, 0x00000101);
  1970. cx_clear(MO_GP0_IO, 0x00000001);
  1971. msleep(1);
  1972. cx_set(MO_GP0_IO, 0x00000101);
  1973. if (0 == core->i2c_rc &&
  1974. core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
  1975. dvico_fusionhdtv_hybrid_init(core);
  1976. break;
  1977. case CX88_BOARD_KWORLD_DVB_T:
  1978. case CX88_BOARD_DNTV_LIVE_DVB_T:
  1979. cx_set(MO_GP0_IO, 0x00000707);
  1980. cx_set(MO_GP2_IO, 0x00000101);
  1981. cx_clear(MO_GP2_IO, 0x00000001);
  1982. msleep(1);
  1983. cx_clear(MO_GP0_IO, 0x00000007);
  1984. cx_set(MO_GP2_IO, 0x00000101);
  1985. break;
  1986. case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
  1987. cx_write(MO_GP0_IO, 0x00080808);
  1988. break;
  1989. case CX88_BOARD_ATI_HDTVWONDER:
  1990. if (0 == core->i2c_rc) {
  1991. /* enable tuner */
  1992. int i;
  1993. static const u8 buffer [][2] = {
  1994. {0x10,0x12},
  1995. {0x13,0x04},
  1996. {0x16,0x00},
  1997. {0x14,0x04},
  1998. {0x17,0x00}
  1999. };
  2000. core->i2c_client.addr = 0x0a;
  2001. for (i = 0; i < ARRAY_SIZE(buffer); i++)
  2002. if (2 != i2c_master_send(&core->i2c_client,
  2003. buffer[i],2))
  2004. printk(KERN_WARNING
  2005. "%s: Unable to enable "
  2006. "tuner(%i).\n",
  2007. core->name, i);
  2008. }
  2009. break;
  2010. case CX88_BOARD_MSI_TVANYWHERE_MASTER:
  2011. {
  2012. struct v4l2_priv_tun_config tea5767_cfg;
  2013. struct tea5767_ctrl ctl;
  2014. memset(&ctl, 0, sizeof(ctl));
  2015. ctl.high_cut = 1;
  2016. ctl.st_noise = 1;
  2017. ctl.deemph_75 = 1;
  2018. ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
  2019. tea5767_cfg.tuner = TUNER_TEA5767;
  2020. tea5767_cfg.priv = &ctl;
  2021. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
  2022. }
  2023. }
  2024. }
  2025. /* ------------------------------------------------------------------ */
  2026. static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
  2027. {
  2028. unsigned int lat = UNSET;
  2029. u8 ctrl = 0;
  2030. u8 value;
  2031. /* check pci quirks */
  2032. if (pci_pci_problems & PCIPCI_TRITON) {
  2033. printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
  2034. name);
  2035. ctrl |= CX88X_EN_TBFX;
  2036. }
  2037. if (pci_pci_problems & PCIPCI_NATOMA) {
  2038. printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
  2039. name);
  2040. ctrl |= CX88X_EN_TBFX;
  2041. }
  2042. if (pci_pci_problems & PCIPCI_VIAETBF) {
  2043. printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
  2044. name);
  2045. ctrl |= CX88X_EN_TBFX;
  2046. }
  2047. if (pci_pci_problems & PCIPCI_VSFX) {
  2048. printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
  2049. name);
  2050. ctrl |= CX88X_EN_VSFX;
  2051. }
  2052. #ifdef PCIPCI_ALIMAGIK
  2053. if (pci_pci_problems & PCIPCI_ALIMAGIK) {
  2054. printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
  2055. name);
  2056. lat = 0x0A;
  2057. }
  2058. #endif
  2059. /* check insmod options */
  2060. if (UNSET != latency)
  2061. lat = latency;
  2062. /* apply stuff */
  2063. if (ctrl) {
  2064. pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
  2065. value |= ctrl;
  2066. pci_write_config_byte(pci, CX88X_DEVCTRL, value);
  2067. }
  2068. if (UNSET != lat) {
  2069. printk(KERN_INFO "%s: setting pci latency timer to %d\n",
  2070. name, latency);
  2071. pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
  2072. }
  2073. return 0;
  2074. }
  2075. int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
  2076. {
  2077. if (request_mem_region(pci_resource_start(pci,0),
  2078. pci_resource_len(pci,0),
  2079. core->name))
  2080. return 0;
  2081. printk(KERN_ERR
  2082. "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
  2083. core->name, PCI_FUNC(pci->devfn),
  2084. (unsigned long long)pci_resource_start(pci, 0),
  2085. pci->subsystem_vendor, pci->subsystem_device);
  2086. return -EBUSY;
  2087. }
  2088. /* Allocate and initialize the cx88 core struct. One should hold the
  2089. * devlist mutex before calling this. */
  2090. struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
  2091. {
  2092. struct cx88_core *core;
  2093. int i;
  2094. core = kzalloc(sizeof(*core), GFP_KERNEL);
  2095. atomic_inc(&core->refcount);
  2096. core->pci_bus = pci->bus->number;
  2097. core->pci_slot = PCI_SLOT(pci->devfn);
  2098. core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
  2099. PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
  2100. PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
  2101. mutex_init(&core->lock);
  2102. core->nr = nr;
  2103. sprintf(core->name, "cx88[%d]", core->nr);
  2104. if (0 != cx88_get_resources(core, pci)) {
  2105. kfree(core);
  2106. return NULL;
  2107. }
  2108. /* PCI stuff */
  2109. cx88_pci_quirks(core->name, pci);
  2110. core->lmmio = ioremap(pci_resource_start(pci, 0),
  2111. pci_resource_len(pci, 0));
  2112. core->bmmio = (u8 __iomem *)core->lmmio;
  2113. /* board config */
  2114. core->boardnr = UNSET;
  2115. if (card[core->nr] < ARRAY_SIZE(cx88_boards))
  2116. core->boardnr = card[core->nr];
  2117. for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
  2118. if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
  2119. pci->subsystem_device == cx88_subids[i].subdevice)
  2120. core->boardnr = cx88_subids[i].card;
  2121. if (UNSET == core->boardnr) {
  2122. core->boardnr = CX88_BOARD_UNKNOWN;
  2123. cx88_card_list(core, pci);
  2124. }
  2125. memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
  2126. printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
  2127. core->name,pci->subsystem_vendor,
  2128. pci->subsystem_device, core->board.name,
  2129. core->boardnr, card[core->nr] == core->boardnr ?
  2130. "insmod option" : "autodetected");
  2131. if (tuner[core->nr] != UNSET)
  2132. core->board.tuner_type = tuner[core->nr];
  2133. if (radio[core->nr] != UNSET)
  2134. core->board.radio_type = radio[core->nr];
  2135. printk(KERN_INFO "%s: TV tuner type %d, Radio tuner type %d\n",
  2136. core->name, core->board.tuner_type, core->board.radio_type);
  2137. /* init hardware */
  2138. cx88_reset(core);
  2139. cx88_card_setup_pre_i2c(core);
  2140. cx88_i2c_init(core, pci);
  2141. cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
  2142. cx88_card_setup(core);
  2143. cx88_ir_init(core, pci);
  2144. return core;
  2145. }
  2146. /* ------------------------------------------------------------------ */
  2147. /*
  2148. * Local variables:
  2149. * c-basic-offset: 8
  2150. * End:
  2151. * 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
  2152. */