cx88-cards.c 59 KB

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