cx88-cards.c 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495
  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. [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
  1421. .name = "Pinnacle Hybrid PCTV",
  1422. .tuner_type = TUNER_XC2028,
  1423. .tuner_addr = 0x61,
  1424. .input = { {
  1425. .type = CX88_VMUX_TELEVISION,
  1426. .vmux = 0,
  1427. }, {
  1428. .type = CX88_VMUX_COMPOSITE1,
  1429. .vmux = 1,
  1430. }, {
  1431. .type = CX88_VMUX_SVIDEO,
  1432. .vmux = 2,
  1433. } },
  1434. .radio = {
  1435. .type = CX88_RADIO,
  1436. .gpio0 = 0x004ff,
  1437. .gpio1 = 0x010ff,
  1438. .gpio2 = 0x0ff,
  1439. },
  1440. },
  1441. [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
  1442. .name = "Winfast TV2000 XP Global",
  1443. .tuner_type = TUNER_XC2028,
  1444. .tuner_addr = 0x61,
  1445. .input = { {
  1446. .type = CX88_VMUX_TELEVISION,
  1447. .vmux = 0,
  1448. .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
  1449. .gpio1 = 0x0000,
  1450. .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
  1451. }, {
  1452. .type = CX88_VMUX_COMPOSITE1,
  1453. .vmux = 1,
  1454. .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
  1455. .gpio1 = 0x0000,
  1456. .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
  1457. }, {
  1458. .type = CX88_VMUX_SVIDEO,
  1459. .vmux = 2,
  1460. } },
  1461. .radio = {
  1462. .type = CX88_RADIO,
  1463. .gpio0 = 0x004ff,
  1464. .gpio1 = 0x010ff,
  1465. .gpio2 = 0x0ff,
  1466. },
  1467. },
  1468. [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
  1469. .name = "PowerColor Real Angel 330",
  1470. .tuner_type = TUNER_XC2028,
  1471. .tuner_addr = 0x61,
  1472. .input = { {
  1473. .type = CX88_VMUX_TELEVISION,
  1474. .vmux = 0,
  1475. .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
  1476. .gpio1 = 0x0000,
  1477. .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
  1478. }, {
  1479. .type = CX88_VMUX_COMPOSITE1,
  1480. .vmux = 1,
  1481. .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
  1482. .gpio1 = 0x0000,
  1483. .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
  1484. }, {
  1485. .type = CX88_VMUX_SVIDEO,
  1486. .vmux = 2,
  1487. .gpio0 = 0x000ff,
  1488. .gpio1 = 0x0f37d,
  1489. .gpio2 = 0x00019,
  1490. .gpio3 = 0x00000,
  1491. } },
  1492. .radio = {
  1493. .type = CX88_RADIO,
  1494. .gpio0 = 0x000ff,
  1495. .gpio1 = 0x0f35d,
  1496. .gpio2 = 0x00019,
  1497. .gpio3 = 0x00000,
  1498. },
  1499. },
  1500. [CX88_BOARD_GENIATECH_X8000_MT] = {
  1501. /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
  1502. .name = "Geniatech X8000-MT DVBT",
  1503. .tuner_type = TUNER_XC2028,
  1504. .tuner_addr = 0x61,
  1505. .input = { {
  1506. .type = CX88_VMUX_TELEVISION,
  1507. .vmux = 0,
  1508. .gpio0 = 0x00000000,
  1509. .gpio1 = 0x00e3e341,
  1510. .gpio2 = 0x00000000,
  1511. .gpio3 = 0x00000000,
  1512. }, {
  1513. .type = CX88_VMUX_COMPOSITE1,
  1514. .vmux = 1,
  1515. .gpio0 = 0x00000000,
  1516. .gpio1 = 0x00e3e361,
  1517. .gpio2 = 0x00000000,
  1518. .gpio3 = 0x00000000,
  1519. }, {
  1520. .type = CX88_VMUX_SVIDEO,
  1521. .vmux = 2,
  1522. .gpio0 = 0x00000000,
  1523. .gpio1 = 0x00e3e361,
  1524. .gpio2 = 0x00000000,
  1525. .gpio3 = 0x00000000,
  1526. } },
  1527. .radio = {
  1528. .type = CX88_RADIO,
  1529. .gpio0 = 0x00000000,
  1530. .gpio1 = 0x00e3e341,
  1531. .gpio2 = 0x00000000,
  1532. .gpio3 = 0x00000000,
  1533. },
  1534. .mpeg = CX88_MPEG_DVB,
  1535. }
  1536. };
  1537. /* ------------------------------------------------------------------ */
  1538. /* PCI subsystem IDs */
  1539. static const struct cx88_subid cx88_subids[] = {
  1540. {
  1541. .subvendor = 0x0070,
  1542. .subdevice = 0x3400,
  1543. .card = CX88_BOARD_HAUPPAUGE,
  1544. },{
  1545. .subvendor = 0x0070,
  1546. .subdevice = 0x3401,
  1547. .card = CX88_BOARD_HAUPPAUGE,
  1548. },{
  1549. .subvendor = 0x14c7,
  1550. .subdevice = 0x0106,
  1551. .card = CX88_BOARD_GDI,
  1552. },{
  1553. .subvendor = 0x14c7,
  1554. .subdevice = 0x0107, /* with mpeg encoder */
  1555. .card = CX88_BOARD_GDI,
  1556. },{
  1557. .subvendor = PCI_VENDOR_ID_ATI,
  1558. .subdevice = 0x00f8,
  1559. .card = CX88_BOARD_ATI_WONDER_PRO,
  1560. },{
  1561. .subvendor = 0x107d,
  1562. .subdevice = 0x6611,
  1563. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1564. },{
  1565. .subvendor = 0x107d,
  1566. .subdevice = 0x6613, /* NTSC */
  1567. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1568. },{
  1569. .subvendor = 0x107d,
  1570. .subdevice = 0x6620,
  1571. .card = CX88_BOARD_WINFAST_DV2000,
  1572. },{
  1573. .subvendor = 0x107d,
  1574. .subdevice = 0x663b,
  1575. .card = CX88_BOARD_LEADTEK_PVR2000,
  1576. },{
  1577. .subvendor = 0x107d,
  1578. .subdevice = 0x663c,
  1579. .card = CX88_BOARD_LEADTEK_PVR2000,
  1580. },{
  1581. .subvendor = 0x1461,
  1582. .subdevice = 0x000b,
  1583. .card = CX88_BOARD_AVERTV_STUDIO_303,
  1584. },{
  1585. .subvendor = 0x1462,
  1586. .subdevice = 0x8606,
  1587. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  1588. },{
  1589. .subvendor = 0x10fc,
  1590. .subdevice = 0xd003,
  1591. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  1592. },{
  1593. .subvendor = 0x1043,
  1594. .subdevice = 0x4823, /* with mpeg encoder */
  1595. .card = CX88_BOARD_ASUS_PVR_416,
  1596. },{
  1597. .subvendor = 0x17de,
  1598. .subdevice = 0x08a6,
  1599. .card = CX88_BOARD_KWORLD_DVB_T,
  1600. },{
  1601. .subvendor = 0x18ac,
  1602. .subdevice = 0xd810,
  1603. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1604. },{
  1605. .subvendor = 0x18ac,
  1606. .subdevice = 0xd820,
  1607. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  1608. },{
  1609. .subvendor = 0x18ac,
  1610. .subdevice = 0xdb00,
  1611. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  1612. },{
  1613. .subvendor = 0x0070,
  1614. .subdevice = 0x9002,
  1615. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1616. },{
  1617. .subvendor = 0x14f1,
  1618. .subdevice = 0x0187,
  1619. .card = CX88_BOARD_CONEXANT_DVB_T1,
  1620. },{
  1621. .subvendor = 0x1540,
  1622. .subdevice = 0x2580,
  1623. .card = CX88_BOARD_PROVIDEO_PV259,
  1624. },{
  1625. .subvendor = 0x18ac,
  1626. .subdevice = 0xdb10,
  1627. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1628. },{
  1629. .subvendor = 0x1554,
  1630. .subdevice = 0x4811,
  1631. .card = CX88_BOARD_PIXELVIEW,
  1632. },{
  1633. .subvendor = 0x7063,
  1634. .subdevice = 0x3000, /* HD-3000 card */
  1635. .card = CX88_BOARD_PCHDTV_HD3000,
  1636. },{
  1637. .subvendor = 0x17de,
  1638. .subdevice = 0xa8a6,
  1639. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  1640. },{
  1641. .subvendor = 0x0070,
  1642. .subdevice = 0x2801,
  1643. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  1644. },{
  1645. .subvendor = 0x14f1,
  1646. .subdevice = 0x0342,
  1647. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  1648. },{
  1649. .subvendor = 0x10fc,
  1650. .subdevice = 0xd035,
  1651. .card = CX88_BOARD_IODATA_GVBCTV7E,
  1652. },{
  1653. .subvendor = 0x1421,
  1654. .subdevice = 0x0334,
  1655. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  1656. },{
  1657. .subvendor = 0x153b,
  1658. .subdevice = 0x1166,
  1659. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  1660. },{
  1661. .subvendor = 0x18ac,
  1662. .subdevice = 0xd500,
  1663. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  1664. },{
  1665. .subvendor = 0x1461,
  1666. .subdevice = 0x8011,
  1667. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  1668. },{
  1669. .subvendor = PCI_VENDOR_ID_ATI,
  1670. .subdevice = 0xa101,
  1671. .card = CX88_BOARD_ATI_HDTVWONDER,
  1672. },{
  1673. .subvendor = 0x107d,
  1674. .subdevice = 0x665f,
  1675. .card = CX88_BOARD_WINFAST_DTV1000,
  1676. },{
  1677. .subvendor = 0x1461,
  1678. .subdevice = 0x000a,
  1679. .card = CX88_BOARD_AVERTV_303,
  1680. },{
  1681. .subvendor = 0x0070,
  1682. .subdevice = 0x9200,
  1683. .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
  1684. },{
  1685. .subvendor = 0x0070,
  1686. .subdevice = 0x9201,
  1687. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1688. },{
  1689. .subvendor = 0x0070,
  1690. .subdevice = 0x9202,
  1691. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1692. },{
  1693. .subvendor = 0x17de,
  1694. .subdevice = 0x08b2,
  1695. .card = CX88_BOARD_KWORLD_DVBS_100,
  1696. },{
  1697. .subvendor = 0x0070,
  1698. .subdevice = 0x9400,
  1699. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1700. },{
  1701. .subvendor = 0x0070,
  1702. .subdevice = 0x9402,
  1703. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1704. },{
  1705. .subvendor = 0x0070,
  1706. .subdevice = 0x9800,
  1707. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1708. },{
  1709. .subvendor = 0x0070,
  1710. .subdevice = 0x9802,
  1711. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1712. },{
  1713. .subvendor = 0x0070,
  1714. .subdevice = 0x9001,
  1715. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1716. },{
  1717. .subvendor = 0x1822,
  1718. .subdevice = 0x0025,
  1719. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1720. },{
  1721. .subvendor = 0x17de,
  1722. .subdevice = 0x08a1,
  1723. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  1724. },{
  1725. .subvendor = 0x18ac,
  1726. .subdevice = 0xdb50,
  1727. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1728. },{
  1729. .subvendor = 0x18ac,
  1730. .subdevice = 0xdb54,
  1731. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1732. /* Re-branded DViCO: DigitalNow DVB-T Dual */
  1733. },{
  1734. .subvendor = 0x18ac,
  1735. .subdevice = 0xdb11,
  1736. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1737. /* Re-branded DViCO: UltraView DVB-T Plus */
  1738. },{
  1739. .subvendor = 0x17de,
  1740. .subdevice = 0x0840,
  1741. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  1742. },{
  1743. .subvendor = 0x1421,
  1744. .subdevice = 0x0305,
  1745. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  1746. },{
  1747. .subvendor = 0x18ac,
  1748. .subdevice = 0xdb40,
  1749. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1750. },{
  1751. .subvendor = 0x18ac,
  1752. .subdevice = 0xdb44,
  1753. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1754. },{
  1755. .subvendor = 0x7063,
  1756. .subdevice = 0x5500,
  1757. .card = CX88_BOARD_PCHDTV_HD5500,
  1758. },{
  1759. .subvendor = 0x17de,
  1760. .subdevice = 0x0841,
  1761. .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
  1762. },{
  1763. .subvendor = 0x1822,
  1764. .subdevice = 0x0019,
  1765. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1766. },{
  1767. .subvendor = 0x1554,
  1768. .subdevice = 0x4813,
  1769. .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
  1770. },{
  1771. .subvendor = 0x14f1,
  1772. .subdevice = 0x0842,
  1773. .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
  1774. },{
  1775. .subvendor = 0x107d,
  1776. .subdevice = 0x665e,
  1777. .card = CX88_BOARD_WINFAST_DTV2000H,
  1778. },{
  1779. .subvendor = 0x18ac,
  1780. .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
  1781. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1782. },{
  1783. .subvendor = 0x14f1,
  1784. .subdevice = 0x0084,
  1785. .card = CX88_BOARD_GENIATECH_DVBS,
  1786. },{
  1787. .subvendor = 0x0070,
  1788. .subdevice = 0x1404,
  1789. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  1790. },{
  1791. .subvendor = 0x1461,
  1792. .subdevice = 0xc111, /* AverMedia M150-D */
  1793. /* This board is known to work with the ASUS PVR416 config */
  1794. .card = CX88_BOARD_ASUS_PVR_416,
  1795. },{
  1796. .subvendor = 0xc180,
  1797. .subdevice = 0xc980,
  1798. .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
  1799. },{
  1800. .subvendor = 0x0070,
  1801. .subdevice = 0x9600,
  1802. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  1803. },{
  1804. .subvendor = 0x0070,
  1805. .subdevice = 0x9601,
  1806. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  1807. },{
  1808. .subvendor = 0x0070,
  1809. .subdevice = 0x9602,
  1810. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  1811. },{
  1812. .subvendor = 0x107d,
  1813. .subdevice = 0x6632,
  1814. .card = CX88_BOARD_LEADTEK_PVR2000,
  1815. },{
  1816. .subvendor = 0x12ab,
  1817. .subdevice = 0x2300, /* Club3D Zap TV2100 */
  1818. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  1819. },{
  1820. .subvendor = 0x0070,
  1821. .subdevice = 0x9000,
  1822. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1823. },{
  1824. .subvendor = 0x0070,
  1825. .subdevice = 0x1400,
  1826. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  1827. },{
  1828. .subvendor = 0x0070,
  1829. .subdevice = 0x1401,
  1830. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  1831. },{
  1832. .subvendor = 0x0070,
  1833. .subdevice = 0x1402,
  1834. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  1835. },{
  1836. .subvendor = 0x1421,
  1837. .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
  1838. .card = CX88_BOARD_KWORLD_DVBS_100,
  1839. },{
  1840. .subvendor = 0x1421,
  1841. .subdevice = 0x0390,
  1842. .card = CX88_BOARD_ADSTECH_PTV_390,
  1843. },{
  1844. .subvendor = 0x11bd,
  1845. .subdevice = 0x0051,
  1846. .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
  1847. }, {
  1848. .subvendor = 0x18ac,
  1849. .subdevice = 0xd530,
  1850. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
  1851. }, {
  1852. .subvendor = 0x12ab,
  1853. .subdevice = 0x1788,
  1854. .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
  1855. }, {
  1856. .subvendor = 0x14f1,
  1857. .subdevice = 0xea3d,
  1858. .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
  1859. }, {
  1860. .subvendor = 0x107d,
  1861. .subdevice = 0x6f18,
  1862. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
  1863. }, {
  1864. .subvendor = 0x14f1,
  1865. .subdevice = 0x8852,
  1866. .card = CX88_BOARD_GENIATECH_X8000_MT,
  1867. }
  1868. };
  1869. /* ----------------------------------------------------------------------- */
  1870. /* some leadtek specific stuff */
  1871. static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1872. {
  1873. /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
  1874. * any others.
  1875. *
  1876. * Byte 0 is 1 on the NTSC board.
  1877. */
  1878. if (eeprom_data[4] != 0x7d ||
  1879. eeprom_data[5] != 0x10 ||
  1880. eeprom_data[7] != 0x66) {
  1881. printk(KERN_WARNING "%s: Leadtek eeprom invalid.\n",
  1882. core->name);
  1883. return;
  1884. }
  1885. core->board.tuner_type = (eeprom_data[6] == 0x13) ?
  1886. TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
  1887. printk(KERN_INFO "%s: Leadtek Winfast 2000XP Expert config: "
  1888. "tuner=%d, eeprom[0]=0x%02x\n",
  1889. core->name, core->board.tuner_type, eeprom_data[0]);
  1890. }
  1891. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1892. {
  1893. struct tveeprom tv;
  1894. tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
  1895. core->board.tuner_type = tv.tuner_type;
  1896. core->tuner_formats = tv.tuner_formats;
  1897. core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
  1898. /* Make sure we support the board model */
  1899. switch (tv.model)
  1900. {
  1901. case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
  1902. case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
  1903. case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
  1904. case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
  1905. case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
  1906. case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
  1907. case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
  1908. case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
  1909. case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
  1910. case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
  1911. case 34519: /* WinTV-PCI-FM */
  1912. case 90002: /* Nova-T-PCI (9002) */
  1913. case 92001: /* Nova-S-Plus (Video and IR) */
  1914. case 92002: /* Nova-S-Plus (Video and IR) */
  1915. case 90003: /* Nova-T-PCI (9002 No RF out) */
  1916. case 90500: /* Nova-T-PCI (oem) */
  1917. case 90501: /* Nova-T-PCI (oem/IR) */
  1918. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  1919. case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
  1920. case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
  1921. case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
  1922. case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
  1923. case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
  1924. case 96569: /* WinTV-HVR1300 () */
  1925. case 96659: /* WinTV-HVR1300 () */
  1926. case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
  1927. /* known */
  1928. break;
  1929. default:
  1930. printk("%s: warning: unknown hauppauge model #%d\n",
  1931. core->name, tv.model);
  1932. break;
  1933. }
  1934. printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
  1935. core->name, tv.model);
  1936. }
  1937. /* ----------------------------------------------------------------------- */
  1938. /* some GDI (was: Modular Technology) specific stuff */
  1939. static struct {
  1940. int id;
  1941. int fm;
  1942. char *name;
  1943. } gdi_tuner[] = {
  1944. [ 0x01 ] = { .id = TUNER_ABSENT,
  1945. .name = "NTSC_M" },
  1946. [ 0x02 ] = { .id = TUNER_ABSENT,
  1947. .name = "PAL_B" },
  1948. [ 0x03 ] = { .id = TUNER_ABSENT,
  1949. .name = "PAL_I" },
  1950. [ 0x04 ] = { .id = TUNER_ABSENT,
  1951. .name = "PAL_D" },
  1952. [ 0x05 ] = { .id = TUNER_ABSENT,
  1953. .name = "SECAM" },
  1954. [ 0x10 ] = { .id = TUNER_ABSENT,
  1955. .fm = 1,
  1956. .name = "TEMIC_4049" },
  1957. [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
  1958. .name = "TEMIC_4136" },
  1959. [ 0x12 ] = { .id = TUNER_ABSENT,
  1960. .name = "TEMIC_4146" },
  1961. [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
  1962. .fm = 1,
  1963. .name = "PHILIPS_FQ1216_MK3" },
  1964. [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
  1965. .name = "PHILIPS_FQ1236_MK3" },
  1966. [ 0x22 ] = { .id = TUNER_ABSENT,
  1967. .name = "PHILIPS_FI1236_MK3" },
  1968. [ 0x23 ] = { .id = TUNER_ABSENT,
  1969. .name = "PHILIPS_FI1216_MK3" },
  1970. };
  1971. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  1972. {
  1973. char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  1974. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  1975. printk(KERN_INFO "%s: GDI: tuner=%s\n", core->name,
  1976. name ? name : "unknown");
  1977. if (NULL == name)
  1978. return;
  1979. core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  1980. core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
  1981. CX88_RADIO : 0;
  1982. }
  1983. /* ----------------------------------------------------------------------- */
  1984. /* some Geniatech specific stuff */
  1985. static int cx88_xc3028_geniatech_tuner_callback(void *priv, int command, int mode)
  1986. {
  1987. struct i2c_algo_bit_data *i2c_algo = priv;
  1988. struct cx88_core *core = i2c_algo->data;
  1989. switch (command) {
  1990. case XC2028_TUNER_RESET:
  1991. switch (INPUT(core->input).type) {
  1992. case CX88_RADIO:
  1993. cx_write(MO_GP1_IO, 0x101010);
  1994. mdelay(50);
  1995. cx_write(MO_GP1_IO, 0x101000);
  1996. mdelay(50);
  1997. cx_write(MO_GP1_IO, 0x101010);
  1998. mdelay(50);
  1999. return 0;
  2000. case CX88_VMUX_DVB:
  2001. cx_write(MO_GP1_IO, 0x030302);
  2002. mdelay(50);
  2003. cx_write(MO_GP1_IO, 0x101010);
  2004. mdelay(50);
  2005. cx_write(MO_GP1_IO, 0x101000);
  2006. mdelay(50);
  2007. cx_write(MO_GP1_IO, 0x101010);
  2008. mdelay(50);
  2009. return 0;
  2010. default:
  2011. cx_write(MO_GP1_IO, 0x030301);
  2012. mdelay(50);
  2013. cx_write(MO_GP1_IO, 0x101010);
  2014. mdelay(50);
  2015. cx_write(MO_GP1_IO, 0x101000);
  2016. mdelay(50);
  2017. cx_write(MO_GP1_IO, 0x101010);
  2018. mdelay(50);
  2019. return 0;
  2020. }
  2021. }
  2022. return -EINVAL;
  2023. }
  2024. /* ----------------------------------------------------------------------- */
  2025. /* some DViCO specific stuff */
  2026. static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
  2027. {
  2028. struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
  2029. int i, err;
  2030. static u8 init_bufs[13][5] = {
  2031. { 0x10, 0x00, 0x20, 0x01, 0x03 },
  2032. { 0x10, 0x10, 0x01, 0x00, 0x21 },
  2033. { 0x10, 0x10, 0x10, 0x00, 0xCA },
  2034. { 0x10, 0x10, 0x12, 0x00, 0x08 },
  2035. { 0x10, 0x10, 0x13, 0x00, 0x0A },
  2036. { 0x10, 0x10, 0x16, 0x01, 0xC0 },
  2037. { 0x10, 0x10, 0x22, 0x01, 0x3D },
  2038. { 0x10, 0x10, 0x73, 0x01, 0x2E },
  2039. { 0x10, 0x10, 0x72, 0x00, 0xC5 },
  2040. { 0x10, 0x10, 0x71, 0x01, 0x97 },
  2041. { 0x10, 0x10, 0x70, 0x00, 0x0F },
  2042. { 0x10, 0x10, 0xB0, 0x00, 0x01 },
  2043. { 0x03, 0x0C },
  2044. };
  2045. for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
  2046. msg.buf = init_bufs[i];
  2047. msg.len = (i != 12 ? 5 : 2);
  2048. err = i2c_transfer(&core->i2c_adap, &msg, 1);
  2049. if (err != 1) {
  2050. printk("dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n", i, err);
  2051. return;
  2052. }
  2053. }
  2054. }
  2055. static int cx88_xc2028_tuner_callback(void *priv, int command, int arg)
  2056. {
  2057. struct i2c_algo_bit_data *i2c_algo = priv;
  2058. struct cx88_core *core = i2c_algo->data;
  2059. /* Board-specific callbacks */
  2060. switch (core->boardnr) {
  2061. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  2062. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  2063. case CX88_BOARD_GENIATECH_X8000_MT:
  2064. return cx88_xc3028_geniatech_tuner_callback(priv, command, arg);
  2065. }
  2066. switch (command) {
  2067. case XC2028_TUNER_RESET:
  2068. {
  2069. switch (INPUT(core->input).type) {
  2070. case CX88_RADIO:
  2071. printk(KERN_INFO "setting GPIO to radio!\n");
  2072. cx_write(MO_GP0_IO, 0x4ff);
  2073. mdelay(250);
  2074. cx_write(MO_GP2_IO, 0xff);
  2075. mdelay(250);
  2076. cx_write(MO_GP1_IO, 0x101010);
  2077. mdelay(250);
  2078. cx_write(MO_GP1_IO, 0x101000);
  2079. mdelay(250);
  2080. cx_write(MO_GP1_IO, 0x101010);
  2081. mdelay(250);
  2082. return 0;
  2083. case CX88_VMUX_DVB: /* Digital TV*/
  2084. default: /* Analog TV */
  2085. printk(KERN_INFO "setting GPIO to TV!\n");
  2086. cx_write(MO_GP1_IO, 0x101010);
  2087. mdelay(250);
  2088. cx_write(MO_GP1_IO, 0x101000);
  2089. mdelay(250);
  2090. cx_write(MO_GP1_IO, 0x101010);
  2091. mdelay(250);
  2092. return 0;
  2093. }
  2094. }
  2095. }
  2096. return -EINVAL;
  2097. }
  2098. /* ----------------------------------------------------------------------- */
  2099. /* Tuner callback function. Currently only needed for the Pinnacle *
  2100. * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
  2101. * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
  2102. static int cx88_xc5000_tuner_callback(void *priv, int command, int arg)
  2103. {
  2104. struct i2c_algo_bit_data *i2c_algo = priv;
  2105. struct cx88_core *core = i2c_algo->data;
  2106. switch (core->boardnr) {
  2107. case CX88_BOARD_PINNACLE_PCTV_HD_800i:
  2108. if (command == 0) { /* This is the reset command from xc5000 */
  2109. /* Reset XC5000 tuner via SYS_RSTO_pin */
  2110. cx_write(MO_SRST_IO, 0);
  2111. msleep(10);
  2112. cx_write(MO_SRST_IO, 1);
  2113. return 0;
  2114. } else {
  2115. printk(KERN_ERR
  2116. "xc5000: unknown tuner callback command.\n");
  2117. return -EINVAL;
  2118. }
  2119. break;
  2120. }
  2121. return 0; /* Should never be here */
  2122. }
  2123. int cx88_tuner_callback(void *priv, int command, int arg)
  2124. {
  2125. struct i2c_algo_bit_data *i2c_algo = priv;
  2126. struct cx88_core *core = i2c_algo->data;
  2127. switch (core->board.tuner_type) {
  2128. case TUNER_XC2028:
  2129. return cx88_xc2028_tuner_callback(priv, command, arg);
  2130. case TUNER_XC5000:
  2131. return cx88_xc5000_tuner_callback(priv, command, arg);
  2132. }
  2133. return -EINVAL;
  2134. }
  2135. EXPORT_SYMBOL(cx88_tuner_callback);
  2136. /* ----------------------------------------------------------------------- */
  2137. static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  2138. {
  2139. int i;
  2140. if (0 == pci->subsystem_vendor &&
  2141. 0 == pci->subsystem_device) {
  2142. printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
  2143. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  2144. "%s: workaround that. Redirect complaints to the vendor of\n"
  2145. "%s: the TV card. Best regards,\n"
  2146. "%s: -- tux\n",
  2147. core->name,core->name,core->name,core->name,core->name);
  2148. } else {
  2149. printk("%s: Your board isn't known (yet) to the driver. You can\n"
  2150. "%s: try to pick one of the existing card configs via\n"
  2151. "%s: card=<n> insmod option. Updating to the latest\n"
  2152. "%s: version might help as well.\n",
  2153. core->name,core->name,core->name,core->name);
  2154. }
  2155. printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
  2156. core->name);
  2157. for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
  2158. printk("%s: card=%d -> %s\n",
  2159. core->name, i, cx88_boards[i].name);
  2160. }
  2161. static void cx88_card_setup_pre_i2c(struct cx88_core *core)
  2162. {
  2163. switch (core->boardnr) {
  2164. case CX88_BOARD_HAUPPAUGE_HVR1300:
  2165. /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */
  2166. /* We leave here with the 702 on the bus */
  2167. cx_write(MO_GP0_IO, 0x0000e780);
  2168. udelay(1000);
  2169. cx_clear(MO_GP0_IO, 0x00000080);
  2170. udelay(50);
  2171. cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
  2172. udelay(1000);
  2173. break;
  2174. }
  2175. }
  2176. static void cx88_card_setup(struct cx88_core *core)
  2177. {
  2178. static u8 eeprom[256];
  2179. if (0 == core->i2c_rc) {
  2180. core->i2c_client.addr = 0xa0 >> 1;
  2181. tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom));
  2182. }
  2183. switch (core->boardnr) {
  2184. case CX88_BOARD_HAUPPAUGE:
  2185. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  2186. if (0 == core->i2c_rc)
  2187. hauppauge_eeprom(core,eeprom+8);
  2188. break;
  2189. case CX88_BOARD_GDI:
  2190. if (0 == core->i2c_rc)
  2191. gdi_eeprom(core,eeprom);
  2192. break;
  2193. case CX88_BOARD_WINFAST2000XP_EXPERT:
  2194. if (0 == core->i2c_rc)
  2195. leadtek_eeprom(core,eeprom);
  2196. break;
  2197. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  2198. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  2199. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  2200. case CX88_BOARD_HAUPPAUGE_HVR1100:
  2201. case CX88_BOARD_HAUPPAUGE_HVR1100LP:
  2202. case CX88_BOARD_HAUPPAUGE_HVR3000:
  2203. case CX88_BOARD_HAUPPAUGE_HVR1300:
  2204. if (0 == core->i2c_rc)
  2205. hauppauge_eeprom(core,eeprom);
  2206. break;
  2207. case CX88_BOARD_KWORLD_DVBS_100:
  2208. cx_write(MO_GP0_IO, 0x000007f8);
  2209. cx_write(MO_GP1_IO, 0x00000001);
  2210. break;
  2211. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
  2212. /* GPIO0:6 is hooked to FX2 reset pin */
  2213. cx_set(MO_GP0_IO, 0x00004040);
  2214. cx_clear(MO_GP0_IO, 0x00000040);
  2215. msleep(1000);
  2216. cx_set(MO_GP0_IO, 0x00004040);
  2217. /* FALLTHROUGH */
  2218. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  2219. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  2220. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
  2221. /* GPIO0:0 is hooked to mt352 reset pin */
  2222. cx_set(MO_GP0_IO, 0x00000101);
  2223. cx_clear(MO_GP0_IO, 0x00000001);
  2224. msleep(1);
  2225. cx_set(MO_GP0_IO, 0x00000101);
  2226. if (0 == core->i2c_rc &&
  2227. core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
  2228. dvico_fusionhdtv_hybrid_init(core);
  2229. break;
  2230. case CX88_BOARD_KWORLD_DVB_T:
  2231. case CX88_BOARD_DNTV_LIVE_DVB_T:
  2232. cx_set(MO_GP0_IO, 0x00000707);
  2233. cx_set(MO_GP2_IO, 0x00000101);
  2234. cx_clear(MO_GP2_IO, 0x00000001);
  2235. msleep(1);
  2236. cx_clear(MO_GP0_IO, 0x00000007);
  2237. cx_set(MO_GP2_IO, 0x00000101);
  2238. break;
  2239. case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
  2240. cx_write(MO_GP0_IO, 0x00080808);
  2241. break;
  2242. case CX88_BOARD_ATI_HDTVWONDER:
  2243. if (0 == core->i2c_rc) {
  2244. /* enable tuner */
  2245. int i;
  2246. static const u8 buffer [][2] = {
  2247. {0x10,0x12},
  2248. {0x13,0x04},
  2249. {0x16,0x00},
  2250. {0x14,0x04},
  2251. {0x17,0x00}
  2252. };
  2253. core->i2c_client.addr = 0x0a;
  2254. for (i = 0; i < ARRAY_SIZE(buffer); i++)
  2255. if (2 != i2c_master_send(&core->i2c_client,
  2256. buffer[i],2))
  2257. printk(KERN_WARNING
  2258. "%s: Unable to enable "
  2259. "tuner(%i).\n",
  2260. core->name, i);
  2261. }
  2262. break;
  2263. case CX88_BOARD_MSI_TVANYWHERE_MASTER:
  2264. {
  2265. struct v4l2_priv_tun_config tea5767_cfg;
  2266. struct tea5767_ctrl ctl;
  2267. memset(&ctl, 0, sizeof(ctl));
  2268. ctl.high_cut = 1;
  2269. ctl.st_noise = 1;
  2270. ctl.deemph_75 = 1;
  2271. ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
  2272. tea5767_cfg.tuner = TUNER_TEA5767;
  2273. tea5767_cfg.priv = &ctl;
  2274. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
  2275. }
  2276. }
  2277. if (core->board.tuner_type == TUNER_XC2028) {
  2278. struct v4l2_priv_tun_config xc2028_cfg;
  2279. struct xc2028_ctrl ctl;
  2280. memset(&xc2028_cfg, 0, sizeof(ctl));
  2281. memset(&ctl, 0, sizeof(ctl));
  2282. ctl.fname = XC2028_DEFAULT_FIRMWARE;
  2283. ctl.max_len = 64;
  2284. /* FIXME: Those should be device-dependent */
  2285. ctl.demod = XC3028_FE_OREN538;
  2286. ctl.mts = 1;
  2287. xc2028_cfg.tuner = TUNER_XC2028;
  2288. xc2028_cfg.priv = &ctl;
  2289. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg);
  2290. }
  2291. }
  2292. /* ------------------------------------------------------------------ */
  2293. static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
  2294. {
  2295. unsigned int lat = UNSET;
  2296. u8 ctrl = 0;
  2297. u8 value;
  2298. /* check pci quirks */
  2299. if (pci_pci_problems & PCIPCI_TRITON) {
  2300. printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
  2301. name);
  2302. ctrl |= CX88X_EN_TBFX;
  2303. }
  2304. if (pci_pci_problems & PCIPCI_NATOMA) {
  2305. printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
  2306. name);
  2307. ctrl |= CX88X_EN_TBFX;
  2308. }
  2309. if (pci_pci_problems & PCIPCI_VIAETBF) {
  2310. printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
  2311. name);
  2312. ctrl |= CX88X_EN_TBFX;
  2313. }
  2314. if (pci_pci_problems & PCIPCI_VSFX) {
  2315. printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
  2316. name);
  2317. ctrl |= CX88X_EN_VSFX;
  2318. }
  2319. #ifdef PCIPCI_ALIMAGIK
  2320. if (pci_pci_problems & PCIPCI_ALIMAGIK) {
  2321. printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
  2322. name);
  2323. lat = 0x0A;
  2324. }
  2325. #endif
  2326. /* check insmod options */
  2327. if (UNSET != latency)
  2328. lat = latency;
  2329. /* apply stuff */
  2330. if (ctrl) {
  2331. pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
  2332. value |= ctrl;
  2333. pci_write_config_byte(pci, CX88X_DEVCTRL, value);
  2334. }
  2335. if (UNSET != lat) {
  2336. printk(KERN_INFO "%s: setting pci latency timer to %d\n",
  2337. name, latency);
  2338. pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
  2339. }
  2340. return 0;
  2341. }
  2342. int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
  2343. {
  2344. if (request_mem_region(pci_resource_start(pci,0),
  2345. pci_resource_len(pci,0),
  2346. core->name))
  2347. return 0;
  2348. printk(KERN_ERR
  2349. "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
  2350. core->name, PCI_FUNC(pci->devfn),
  2351. (unsigned long long)pci_resource_start(pci, 0),
  2352. pci->subsystem_vendor, pci->subsystem_device);
  2353. return -EBUSY;
  2354. }
  2355. /* Allocate and initialize the cx88 core struct. One should hold the
  2356. * devlist mutex before calling this. */
  2357. struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
  2358. {
  2359. struct cx88_core *core;
  2360. int i;
  2361. core = kzalloc(sizeof(*core), GFP_KERNEL);
  2362. atomic_inc(&core->refcount);
  2363. core->pci_bus = pci->bus->number;
  2364. core->pci_slot = PCI_SLOT(pci->devfn);
  2365. core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
  2366. PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
  2367. PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
  2368. mutex_init(&core->lock);
  2369. core->nr = nr;
  2370. sprintf(core->name, "cx88[%d]", core->nr);
  2371. if (0 != cx88_get_resources(core, pci)) {
  2372. kfree(core);
  2373. return NULL;
  2374. }
  2375. /* PCI stuff */
  2376. cx88_pci_quirks(core->name, pci);
  2377. core->lmmio = ioremap(pci_resource_start(pci, 0),
  2378. pci_resource_len(pci, 0));
  2379. core->bmmio = (u8 __iomem *)core->lmmio;
  2380. /* board config */
  2381. core->boardnr = UNSET;
  2382. if (card[core->nr] < ARRAY_SIZE(cx88_boards))
  2383. core->boardnr = card[core->nr];
  2384. for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
  2385. if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
  2386. pci->subsystem_device == cx88_subids[i].subdevice)
  2387. core->boardnr = cx88_subids[i].card;
  2388. if (UNSET == core->boardnr) {
  2389. core->boardnr = CX88_BOARD_UNKNOWN;
  2390. cx88_card_list(core, pci);
  2391. }
  2392. memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
  2393. printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
  2394. core->name,pci->subsystem_vendor,
  2395. pci->subsystem_device, core->board.name,
  2396. core->boardnr, card[core->nr] == core->boardnr ?
  2397. "insmod option" : "autodetected");
  2398. if (tuner[core->nr] != UNSET)
  2399. core->board.tuner_type = tuner[core->nr];
  2400. if (radio[core->nr] != UNSET)
  2401. core->board.radio_type = radio[core->nr];
  2402. printk(KERN_INFO "%s: TV tuner type %d, Radio tuner type %d\n",
  2403. core->name, core->board.tuner_type, core->board.radio_type);
  2404. /* init hardware */
  2405. cx88_reset(core);
  2406. cx88_card_setup_pre_i2c(core);
  2407. cx88_i2c_init(core, pci);
  2408. /* load tuner module, if needed */
  2409. if (TUNER_ABSENT != core->board.tuner_type)
  2410. request_module("tuner");
  2411. cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
  2412. cx88_card_setup(core);
  2413. cx88_ir_init(core, pci);
  2414. return core;
  2415. }