cx88-cards.c 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909
  1. /*
  2. *
  3. * device driver for Conexant 2388x based TV cards
  4. * card-specific stuff.
  5. *
  6. * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. #include <linux/init.h>
  23. #include <linux/module.h>
  24. #include <linux/pci.h>
  25. #include <linux/delay.h>
  26. #include "cx88.h"
  27. #include "tea5767.h"
  28. static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  29. static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  30. static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
  31. module_param_array(tuner, int, NULL, 0444);
  32. module_param_array(radio, int, NULL, 0444);
  33. module_param_array(card, int, NULL, 0444);
  34. MODULE_PARM_DESC(tuner,"tuner type");
  35. MODULE_PARM_DESC(radio,"radio tuner type");
  36. MODULE_PARM_DESC(card,"card type");
  37. static unsigned int latency = UNSET;
  38. module_param(latency,int,0444);
  39. MODULE_PARM_DESC(latency,"pci latency timer");
  40. #define info_printk(core, fmt, arg...) \
  41. printk(KERN_INFO "%s: " fmt, core->name , ## arg)
  42. #define warn_printk(core, fmt, arg...) \
  43. printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
  44. #define err_printk(core, fmt, arg...) \
  45. printk(KERN_ERR "%s: " fmt, core->name , ## arg)
  46. /* ------------------------------------------------------------------ */
  47. /* board config info */
  48. /* If radio_type !=UNSET, radio_addr should be specified
  49. */
  50. static const struct cx88_board cx88_boards[] = {
  51. [CX88_BOARD_UNKNOWN] = {
  52. .name = "UNKNOWN/GENERIC",
  53. .tuner_type = UNSET,
  54. .radio_type = UNSET,
  55. .tuner_addr = ADDR_UNSET,
  56. .radio_addr = ADDR_UNSET,
  57. .input = {{
  58. .type = CX88_VMUX_COMPOSITE1,
  59. .vmux = 0,
  60. },{
  61. .type = CX88_VMUX_COMPOSITE2,
  62. .vmux = 1,
  63. },{
  64. .type = CX88_VMUX_COMPOSITE3,
  65. .vmux = 2,
  66. },{
  67. .type = CX88_VMUX_COMPOSITE4,
  68. .vmux = 3,
  69. }},
  70. },
  71. [CX88_BOARD_HAUPPAUGE] = {
  72. .name = "Hauppauge WinTV 34xxx models",
  73. .tuner_type = UNSET,
  74. .radio_type = UNSET,
  75. .tuner_addr = ADDR_UNSET,
  76. .radio_addr = ADDR_UNSET,
  77. .tda9887_conf = TDA9887_PRESENT,
  78. .input = {{
  79. .type = CX88_VMUX_TELEVISION,
  80. .vmux = 0,
  81. .gpio0 = 0xff00, // internal decoder
  82. },{
  83. .type = CX88_VMUX_DEBUG,
  84. .vmux = 0,
  85. .gpio0 = 0xff01, // mono from tuner chip
  86. },{
  87. .type = CX88_VMUX_COMPOSITE1,
  88. .vmux = 1,
  89. .gpio0 = 0xff02,
  90. },{
  91. .type = CX88_VMUX_SVIDEO,
  92. .vmux = 2,
  93. .gpio0 = 0xff02,
  94. }},
  95. .radio = {
  96. .type = CX88_RADIO,
  97. .gpio0 = 0xff01,
  98. },
  99. },
  100. [CX88_BOARD_GDI] = {
  101. .name = "GDI Black Gold",
  102. .tuner_type = UNSET,
  103. .radio_type = UNSET,
  104. .tuner_addr = ADDR_UNSET,
  105. .radio_addr = ADDR_UNSET,
  106. .input = {{
  107. .type = CX88_VMUX_TELEVISION,
  108. .vmux = 0,
  109. },{
  110. .type = CX88_VMUX_SVIDEO,
  111. .vmux = 2,
  112. }},
  113. },
  114. [CX88_BOARD_PIXELVIEW] = {
  115. .name = "PixelView",
  116. .tuner_type = TUNER_PHILIPS_PAL,
  117. .radio_type = UNSET,
  118. .tuner_addr = ADDR_UNSET,
  119. .radio_addr = ADDR_UNSET,
  120. .input = {{
  121. .type = CX88_VMUX_TELEVISION,
  122. .vmux = 0,
  123. .gpio0 = 0xff00, // internal decoder
  124. },{
  125. .type = CX88_VMUX_COMPOSITE1,
  126. .vmux = 1,
  127. },{
  128. .type = CX88_VMUX_SVIDEO,
  129. .vmux = 2,
  130. }},
  131. .radio = {
  132. .type = CX88_RADIO,
  133. .gpio0 = 0xff10,
  134. },
  135. },
  136. [CX88_BOARD_ATI_WONDER_PRO] = {
  137. .name = "ATI TV Wonder Pro",
  138. .tuner_type = TUNER_PHILIPS_4IN1,
  139. .radio_type = UNSET,
  140. .tuner_addr = ADDR_UNSET,
  141. .radio_addr = ADDR_UNSET,
  142. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
  143. .input = {{
  144. .type = CX88_VMUX_TELEVISION,
  145. .vmux = 0,
  146. .gpio0 = 0x03ff,
  147. },{
  148. .type = CX88_VMUX_COMPOSITE1,
  149. .vmux = 1,
  150. .gpio0 = 0x03fe,
  151. },{
  152. .type = CX88_VMUX_SVIDEO,
  153. .vmux = 2,
  154. .gpio0 = 0x03fe,
  155. }},
  156. },
  157. [CX88_BOARD_WINFAST2000XP_EXPERT] = {
  158. .name = "Leadtek Winfast 2000XP Expert",
  159. .tuner_type = TUNER_PHILIPS_4IN1,
  160. .radio_type = UNSET,
  161. .tuner_addr = ADDR_UNSET,
  162. .radio_addr = ADDR_UNSET,
  163. .tda9887_conf = TDA9887_PRESENT,
  164. .input = {{
  165. .type = CX88_VMUX_TELEVISION,
  166. .vmux = 0,
  167. .gpio0 = 0x00F5e700,
  168. .gpio1 = 0x00003004,
  169. .gpio2 = 0x00F5e700,
  170. .gpio3 = 0x02000000,
  171. },{
  172. .type = CX88_VMUX_COMPOSITE1,
  173. .vmux = 1,
  174. .gpio0 = 0x00F5c700,
  175. .gpio1 = 0x00003004,
  176. .gpio2 = 0x00F5c700,
  177. .gpio3 = 0x02000000,
  178. },{
  179. .type = CX88_VMUX_SVIDEO,
  180. .vmux = 2,
  181. .gpio0 = 0x00F5c700,
  182. .gpio1 = 0x00003004,
  183. .gpio2 = 0x00F5c700,
  184. .gpio3 = 0x02000000,
  185. }},
  186. .radio = {
  187. .type = CX88_RADIO,
  188. .gpio0 = 0x00F5d700,
  189. .gpio1 = 0x00003004,
  190. .gpio2 = 0x00F5d700,
  191. .gpio3 = 0x02000000,
  192. },
  193. },
  194. [CX88_BOARD_AVERTV_STUDIO_303] = {
  195. .name = "AverTV Studio 303 (M126)",
  196. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  197. .radio_type = UNSET,
  198. .tuner_addr = ADDR_UNSET,
  199. .radio_addr = ADDR_UNSET,
  200. .tda9887_conf = TDA9887_PRESENT,
  201. .input = {{
  202. .type = CX88_VMUX_TELEVISION,
  203. .vmux = 0,
  204. .gpio1 = 0xe09f,
  205. },{
  206. .type = CX88_VMUX_COMPOSITE1,
  207. .vmux = 1,
  208. .gpio1 = 0xe05f,
  209. },{
  210. .type = CX88_VMUX_SVIDEO,
  211. .vmux = 2,
  212. .gpio1 = 0xe05f,
  213. }},
  214. .radio = {
  215. .gpio1 = 0xe0df,
  216. .type = CX88_RADIO,
  217. },
  218. },
  219. [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
  220. // added gpio values thanks to Michal
  221. // values for PAL from DScaler
  222. .name = "MSI TV-@nywhere Master",
  223. .tuner_type = TUNER_MT2032,
  224. .radio_type = UNSET,
  225. .tuner_addr = ADDR_UNSET,
  226. .radio_addr = ADDR_UNSET,
  227. .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
  228. .input = {{
  229. .type = CX88_VMUX_TELEVISION,
  230. .vmux = 0,
  231. .gpio0 = 0x000040bf,
  232. .gpio1 = 0x000080c0,
  233. .gpio2 = 0x0000ff40,
  234. },{
  235. .type = CX88_VMUX_COMPOSITE1,
  236. .vmux = 1,
  237. .gpio0 = 0x000040bf,
  238. .gpio1 = 0x000080c0,
  239. .gpio2 = 0x0000ff40,
  240. },{
  241. .type = CX88_VMUX_SVIDEO,
  242. .vmux = 2,
  243. .gpio0 = 0x000040bf,
  244. .gpio1 = 0x000080c0,
  245. .gpio2 = 0x0000ff40,
  246. }},
  247. .radio = {
  248. .type = CX88_RADIO,
  249. .vmux = 3,
  250. .gpio0 = 0x000040bf,
  251. .gpio1 = 0x000080c0,
  252. .gpio2 = 0x0000ff20,
  253. },
  254. },
  255. [CX88_BOARD_WINFAST_DV2000] = {
  256. .name = "Leadtek Winfast DV2000",
  257. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  258. .radio_type = UNSET,
  259. .tuner_addr = ADDR_UNSET,
  260. .radio_addr = ADDR_UNSET,
  261. .tda9887_conf = TDA9887_PRESENT,
  262. .input = {{
  263. .type = CX88_VMUX_TELEVISION,
  264. .vmux = 0,
  265. .gpio0 = 0x0035e700,
  266. .gpio1 = 0x00003004,
  267. .gpio2 = 0x0035e700,
  268. .gpio3 = 0x02000000,
  269. },{
  270. .type = CX88_VMUX_COMPOSITE1,
  271. .vmux = 1,
  272. .gpio0 = 0x0035c700,
  273. .gpio1 = 0x00003004,
  274. .gpio2 = 0x0035c700,
  275. .gpio3 = 0x02000000,
  276. },{
  277. .type = CX88_VMUX_SVIDEO,
  278. .vmux = 2,
  279. .gpio0 = 0x0035c700,
  280. .gpio1 = 0x0035c700,
  281. .gpio2 = 0x02000000,
  282. .gpio3 = 0x02000000,
  283. }},
  284. .radio = {
  285. .type = CX88_RADIO,
  286. .gpio0 = 0x0035d700,
  287. .gpio1 = 0x00007004,
  288. .gpio2 = 0x0035d700,
  289. .gpio3 = 0x02000000,
  290. },
  291. },
  292. [CX88_BOARD_LEADTEK_PVR2000] = {
  293. // gpio values for PAL version from regspy by DScaler
  294. .name = "Leadtek PVR 2000",
  295. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  296. .radio_type = UNSET,
  297. .tuner_addr = ADDR_UNSET,
  298. .radio_addr = ADDR_UNSET,
  299. .tda9887_conf = TDA9887_PRESENT,
  300. .input = {{
  301. .type = CX88_VMUX_TELEVISION,
  302. .vmux = 0,
  303. .gpio0 = 0x0000bde2,
  304. .audioroute = 1,
  305. },{
  306. .type = CX88_VMUX_COMPOSITE1,
  307. .vmux = 1,
  308. .gpio0 = 0x0000bde6,
  309. .audioroute = 1,
  310. },{
  311. .type = CX88_VMUX_SVIDEO,
  312. .vmux = 2,
  313. .gpio0 = 0x0000bde6,
  314. .audioroute = 1,
  315. }},
  316. .radio = {
  317. .type = CX88_RADIO,
  318. .gpio0 = 0x0000bd62,
  319. .audioroute = 1,
  320. },
  321. .mpeg = CX88_MPEG_BLACKBIRD,
  322. },
  323. [CX88_BOARD_IODATA_GVVCP3PCI] = {
  324. .name = "IODATA GV-VCP3/PCI",
  325. .tuner_type = TUNER_ABSENT,
  326. .radio_type = UNSET,
  327. .tuner_addr = ADDR_UNSET,
  328. .radio_addr = ADDR_UNSET,
  329. .input = {{
  330. .type = CX88_VMUX_COMPOSITE1,
  331. .vmux = 0,
  332. },{
  333. .type = CX88_VMUX_COMPOSITE2,
  334. .vmux = 1,
  335. },{
  336. .type = CX88_VMUX_SVIDEO,
  337. .vmux = 2,
  338. }},
  339. },
  340. [CX88_BOARD_PROLINK_PLAYTVPVR] = {
  341. .name = "Prolink PlayTV PVR",
  342. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  343. .radio_type = UNSET,
  344. .tuner_addr = ADDR_UNSET,
  345. .radio_addr = ADDR_UNSET,
  346. .tda9887_conf = TDA9887_PRESENT,
  347. .input = {{
  348. .type = CX88_VMUX_TELEVISION,
  349. .vmux = 0,
  350. .gpio0 = 0xbff0,
  351. },{
  352. .type = CX88_VMUX_COMPOSITE1,
  353. .vmux = 1,
  354. .gpio0 = 0xbff3,
  355. },{
  356. .type = CX88_VMUX_SVIDEO,
  357. .vmux = 2,
  358. .gpio0 = 0xbff3,
  359. }},
  360. .radio = {
  361. .type = CX88_RADIO,
  362. .gpio0 = 0xbff0,
  363. },
  364. },
  365. [CX88_BOARD_ASUS_PVR_416] = {
  366. .name = "ASUS PVR-416",
  367. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  368. .radio_type = UNSET,
  369. .tuner_addr = ADDR_UNSET,
  370. .radio_addr = ADDR_UNSET,
  371. .tda9887_conf = TDA9887_PRESENT,
  372. .input = {{
  373. .type = CX88_VMUX_TELEVISION,
  374. .vmux = 0,
  375. .gpio0 = 0x0000fde6,
  376. },{
  377. .type = CX88_VMUX_SVIDEO,
  378. .vmux = 2,
  379. .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
  380. .audioroute = 1,
  381. }},
  382. .radio = {
  383. .type = CX88_RADIO,
  384. .gpio0 = 0x0000fde2,
  385. },
  386. .mpeg = CX88_MPEG_BLACKBIRD,
  387. },
  388. [CX88_BOARD_MSI_TVANYWHERE] = {
  389. .name = "MSI TV-@nywhere",
  390. .tuner_type = TUNER_MT2032,
  391. .radio_type = UNSET,
  392. .tuner_addr = ADDR_UNSET,
  393. .radio_addr = ADDR_UNSET,
  394. .tda9887_conf = TDA9887_PRESENT,
  395. .input = {{
  396. .type = CX88_VMUX_TELEVISION,
  397. .vmux = 0,
  398. .gpio0 = 0x00000fbf,
  399. .gpio2 = 0x0000fc08,
  400. },{
  401. .type = CX88_VMUX_COMPOSITE1,
  402. .vmux = 1,
  403. .gpio0 = 0x00000fbf,
  404. .gpio2 = 0x0000fc68,
  405. },{
  406. .type = CX88_VMUX_SVIDEO,
  407. .vmux = 2,
  408. .gpio0 = 0x00000fbf,
  409. .gpio2 = 0x0000fc68,
  410. }},
  411. },
  412. [CX88_BOARD_KWORLD_DVB_T] = {
  413. .name = "KWorld/VStream XPert DVB-T",
  414. .tuner_type = TUNER_ABSENT,
  415. .radio_type = UNSET,
  416. .tuner_addr = ADDR_UNSET,
  417. .radio_addr = ADDR_UNSET,
  418. .input = {{
  419. .type = CX88_VMUX_COMPOSITE1,
  420. .vmux = 1,
  421. .gpio0 = 0x0700,
  422. .gpio2 = 0x0101,
  423. },{
  424. .type = CX88_VMUX_SVIDEO,
  425. .vmux = 2,
  426. .gpio0 = 0x0700,
  427. .gpio2 = 0x0101,
  428. }},
  429. .mpeg = CX88_MPEG_DVB,
  430. },
  431. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
  432. .name = "DViCO FusionHDTV DVB-T1",
  433. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  434. .radio_type = UNSET,
  435. .tuner_addr = ADDR_UNSET,
  436. .radio_addr = ADDR_UNSET,
  437. .input = {{
  438. .type = CX88_VMUX_COMPOSITE1,
  439. .vmux = 1,
  440. .gpio0 = 0x000027df,
  441. },{
  442. .type = CX88_VMUX_SVIDEO,
  443. .vmux = 2,
  444. .gpio0 = 0x000027df,
  445. }},
  446. .mpeg = CX88_MPEG_DVB,
  447. },
  448. [CX88_BOARD_KWORLD_LTV883] = {
  449. .name = "KWorld LTV883RF",
  450. .tuner_type = TUNER_TNF_8831BGFF,
  451. .radio_type = UNSET,
  452. .tuner_addr = ADDR_UNSET,
  453. .radio_addr = ADDR_UNSET,
  454. .input = {{
  455. .type = CX88_VMUX_TELEVISION,
  456. .vmux = 0,
  457. .gpio0 = 0x07f8,
  458. },{
  459. .type = CX88_VMUX_DEBUG,
  460. .vmux = 0,
  461. .gpio0 = 0x07f9, // mono from tuner chip
  462. },{
  463. .type = CX88_VMUX_COMPOSITE1,
  464. .vmux = 1,
  465. .gpio0 = 0x000007fa,
  466. },{
  467. .type = CX88_VMUX_SVIDEO,
  468. .vmux = 2,
  469. .gpio0 = 0x000007fa,
  470. }},
  471. .radio = {
  472. .type = CX88_RADIO,
  473. .gpio0 = 0x000007f8,
  474. },
  475. },
  476. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
  477. .name = "DViCO FusionHDTV 3 Gold-Q",
  478. .tuner_type = TUNER_MICROTUNE_4042FI5,
  479. .radio_type = UNSET,
  480. .tuner_addr = ADDR_UNSET,
  481. .radio_addr = ADDR_UNSET,
  482. /*
  483. GPIO[0] resets DT3302 DTV receiver
  484. 0 - reset asserted
  485. 1 - normal operation
  486. GPIO[1] mutes analog audio output connector
  487. 0 - enable selected source
  488. 1 - mute
  489. GPIO[2] selects source for analog audio output connector
  490. 0 - analog audio input connector on tab
  491. 1 - analog DAC output from CX23881 chip
  492. GPIO[3] selects RF input connector on tuner module
  493. 0 - RF connector labeled CABLE
  494. 1 - RF connector labeled ANT
  495. GPIO[4] selects high RF for QAM256 mode
  496. 0 - normal RF
  497. 1 - high RF
  498. */
  499. .input = {{
  500. .type = CX88_VMUX_TELEVISION,
  501. .vmux = 0,
  502. .gpio0 = 0x0f0d,
  503. },{
  504. .type = CX88_VMUX_CABLE,
  505. .vmux = 0,
  506. .gpio0 = 0x0f05,
  507. },{
  508. .type = CX88_VMUX_COMPOSITE1,
  509. .vmux = 1,
  510. .gpio0 = 0x0f00,
  511. },{
  512. .type = CX88_VMUX_SVIDEO,
  513. .vmux = 2,
  514. .gpio0 = 0x0f00,
  515. }},
  516. .mpeg = CX88_MPEG_DVB,
  517. },
  518. [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
  519. .name = "Hauppauge Nova-T DVB-T",
  520. .tuner_type = TUNER_ABSENT,
  521. .radio_type = UNSET,
  522. .tuner_addr = ADDR_UNSET,
  523. .radio_addr = ADDR_UNSET,
  524. .input = {{
  525. .type = CX88_VMUX_DVB,
  526. .vmux = 0,
  527. }},
  528. .mpeg = CX88_MPEG_DVB,
  529. },
  530. [CX88_BOARD_CONEXANT_DVB_T1] = {
  531. .name = "Conexant DVB-T reference design",
  532. .tuner_type = TUNER_ABSENT,
  533. .radio_type = UNSET,
  534. .tuner_addr = ADDR_UNSET,
  535. .radio_addr = ADDR_UNSET,
  536. .input = {{
  537. .type = CX88_VMUX_DVB,
  538. .vmux = 0,
  539. }},
  540. .mpeg = CX88_MPEG_DVB,
  541. },
  542. [CX88_BOARD_PROVIDEO_PV259] = {
  543. .name = "Provideo PV259",
  544. .tuner_type = TUNER_PHILIPS_FQ1216ME,
  545. .radio_type = UNSET,
  546. .tuner_addr = ADDR_UNSET,
  547. .radio_addr = ADDR_UNSET,
  548. .input = {{
  549. .type = CX88_VMUX_TELEVISION,
  550. .vmux = 0,
  551. .audioroute = 1,
  552. }},
  553. .mpeg = CX88_MPEG_BLACKBIRD,
  554. },
  555. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
  556. .name = "DViCO FusionHDTV DVB-T Plus",
  557. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  558. .radio_type = UNSET,
  559. .tuner_addr = ADDR_UNSET,
  560. .radio_addr = ADDR_UNSET,
  561. .input = {{
  562. .type = CX88_VMUX_COMPOSITE1,
  563. .vmux = 1,
  564. .gpio0 = 0x000027df,
  565. },{
  566. .type = CX88_VMUX_SVIDEO,
  567. .vmux = 2,
  568. .gpio0 = 0x000027df,
  569. }},
  570. .mpeg = CX88_MPEG_DVB,
  571. },
  572. [CX88_BOARD_DNTV_LIVE_DVB_T] = {
  573. .name = "digitalnow DNTV Live! DVB-T",
  574. .tuner_type = TUNER_ABSENT,
  575. .radio_type = UNSET,
  576. .tuner_addr = ADDR_UNSET,
  577. .radio_addr = ADDR_UNSET,
  578. .input = {{
  579. .type = CX88_VMUX_COMPOSITE1,
  580. .vmux = 1,
  581. .gpio0 = 0x00000700,
  582. .gpio2 = 0x00000101,
  583. },{
  584. .type = CX88_VMUX_SVIDEO,
  585. .vmux = 2,
  586. .gpio0 = 0x00000700,
  587. .gpio2 = 0x00000101,
  588. }},
  589. .mpeg = CX88_MPEG_DVB,
  590. },
  591. [CX88_BOARD_PCHDTV_HD3000] = {
  592. .name = "pcHDTV HD3000 HDTV",
  593. .tuner_type = TUNER_THOMSON_DTT761X,
  594. .radio_type = UNSET,
  595. .tuner_addr = ADDR_UNSET,
  596. .radio_addr = ADDR_UNSET,
  597. .tda9887_conf = TDA9887_PRESENT,
  598. /* GPIO[2] = audio source for analog audio out connector
  599. * 0 = analog audio input connector
  600. * 1 = CX88 audio DACs
  601. *
  602. * GPIO[7] = input to CX88's audio/chroma ADC
  603. * 0 = FM 10.7 MHz IF
  604. * 1 = Sound 4.5 MHz IF
  605. *
  606. * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
  607. *
  608. * GPIO[16] = Remote control input
  609. */
  610. .input = {{
  611. .type = CX88_VMUX_TELEVISION,
  612. .vmux = 0,
  613. .gpio0 = 0x00008484,
  614. },{
  615. .type = CX88_VMUX_COMPOSITE1,
  616. .vmux = 1,
  617. .gpio0 = 0x00008400,
  618. },{
  619. .type = CX88_VMUX_SVIDEO,
  620. .vmux = 2,
  621. .gpio0 = 0x00008400,
  622. }},
  623. .radio = {
  624. .type = CX88_RADIO,
  625. .gpio0 = 0x00008404,
  626. },
  627. .mpeg = CX88_MPEG_DVB,
  628. },
  629. [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
  630. // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
  631. // GPIO values obtained from regspy, courtesy Sean Covel
  632. .name = "Hauppauge WinTV 28xxx (Roslyn) models",
  633. .tuner_type = UNSET,
  634. .radio_type = UNSET,
  635. .tuner_addr = ADDR_UNSET,
  636. .radio_addr = ADDR_UNSET,
  637. .input = {{
  638. .type = CX88_VMUX_TELEVISION,
  639. .vmux = 0,
  640. .gpio0 = 0xed1a,
  641. .gpio2 = 0x00ff,
  642. },{
  643. .type = CX88_VMUX_DEBUG,
  644. .vmux = 0,
  645. .gpio0 = 0xff01,
  646. },{
  647. .type = CX88_VMUX_COMPOSITE1,
  648. .vmux = 1,
  649. .gpio0 = 0xff02,
  650. },{
  651. .type = CX88_VMUX_SVIDEO,
  652. .vmux = 2,
  653. .gpio0 = 0xed92,
  654. .gpio2 = 0x00ff,
  655. }},
  656. .radio = {
  657. .type = CX88_RADIO,
  658. .gpio0 = 0xed96,
  659. .gpio2 = 0x00ff,
  660. },
  661. .mpeg = CX88_MPEG_BLACKBIRD,
  662. },
  663. [CX88_BOARD_DIGITALLOGIC_MEC] = {
  664. .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
  665. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  666. .radio_type = UNSET,
  667. .tuner_addr = ADDR_UNSET,
  668. .radio_addr = ADDR_UNSET,
  669. .tda9887_conf = TDA9887_PRESENT,
  670. .input = {{
  671. .type = CX88_VMUX_TELEVISION,
  672. .vmux = 0,
  673. .gpio0 = 0x00009d80,
  674. .audioroute = 1,
  675. },{
  676. .type = CX88_VMUX_COMPOSITE1,
  677. .vmux = 1,
  678. .gpio0 = 0x00009d76,
  679. .audioroute = 1,
  680. },{
  681. .type = CX88_VMUX_SVIDEO,
  682. .vmux = 2,
  683. .gpio0 = 0x00009d76,
  684. .audioroute = 1,
  685. }},
  686. .radio = {
  687. .type = CX88_RADIO,
  688. .gpio0 = 0x00009d00,
  689. .audioroute = 1,
  690. },
  691. .mpeg = CX88_MPEG_BLACKBIRD,
  692. },
  693. [CX88_BOARD_IODATA_GVBCTV7E] = {
  694. .name = "IODATA GV/BCTV7E",
  695. .tuner_type = TUNER_PHILIPS_FQ1286,
  696. .radio_type = UNSET,
  697. .tuner_addr = ADDR_UNSET,
  698. .radio_addr = ADDR_UNSET,
  699. .tda9887_conf = TDA9887_PRESENT,
  700. .input = {{
  701. .type = CX88_VMUX_TELEVISION,
  702. .vmux = 1,
  703. .gpio1 = 0x0000e03f,
  704. },{
  705. .type = CX88_VMUX_COMPOSITE1,
  706. .vmux = 2,
  707. .gpio1 = 0x0000e07f,
  708. },{
  709. .type = CX88_VMUX_SVIDEO,
  710. .vmux = 3,
  711. .gpio1 = 0x0000e07f,
  712. }}
  713. },
  714. [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
  715. .name = "PixelView PlayTV Ultra Pro (Stereo)",
  716. /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
  717. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  718. .radio_type = UNSET,
  719. .tuner_addr = ADDR_UNSET,
  720. .radio_addr = ADDR_UNSET,
  721. .input = {{
  722. .type = CX88_VMUX_TELEVISION,
  723. .vmux = 0,
  724. .gpio0 = 0xbf61, /* internal decoder */
  725. },{
  726. .type = CX88_VMUX_COMPOSITE1,
  727. .vmux = 1,
  728. .gpio0 = 0xbf63,
  729. },{
  730. .type = CX88_VMUX_SVIDEO,
  731. .vmux = 2,
  732. .gpio0 = 0xbf63,
  733. }},
  734. .radio = {
  735. .type = CX88_RADIO,
  736. .gpio0 = 0xbf60,
  737. },
  738. },
  739. [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
  740. .name = "DViCO FusionHDTV 3 Gold-T",
  741. .tuner_type = TUNER_THOMSON_DTT761X,
  742. .radio_type = UNSET,
  743. .tuner_addr = ADDR_UNSET,
  744. .radio_addr = ADDR_UNSET,
  745. .tda9887_conf = TDA9887_PRESENT,
  746. .input = {{
  747. .type = CX88_VMUX_TELEVISION,
  748. .vmux = 0,
  749. .gpio0 = 0x97ed,
  750. },{
  751. .type = CX88_VMUX_COMPOSITE1,
  752. .vmux = 1,
  753. .gpio0 = 0x97e9,
  754. },{
  755. .type = CX88_VMUX_SVIDEO,
  756. .vmux = 2,
  757. .gpio0 = 0x97e9,
  758. }},
  759. .mpeg = CX88_MPEG_DVB,
  760. },
  761. [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
  762. .name = "ADS Tech Instant TV DVB-T PCI",
  763. .tuner_type = TUNER_ABSENT,
  764. .radio_type = UNSET,
  765. .tuner_addr = ADDR_UNSET,
  766. .radio_addr = ADDR_UNSET,
  767. .input = {{
  768. .type = CX88_VMUX_COMPOSITE1,
  769. .vmux = 1,
  770. .gpio0 = 0x0700,
  771. .gpio2 = 0x0101,
  772. },{
  773. .type = CX88_VMUX_SVIDEO,
  774. .vmux = 2,
  775. .gpio0 = 0x0700,
  776. .gpio2 = 0x0101,
  777. }},
  778. .mpeg = CX88_MPEG_DVB,
  779. },
  780. [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
  781. .name = "TerraTec Cinergy 1400 DVB-T",
  782. .tuner_type = TUNER_ABSENT,
  783. .input = {{
  784. .type = CX88_VMUX_DVB,
  785. .vmux = 0,
  786. },{
  787. .type = CX88_VMUX_COMPOSITE1,
  788. .vmux = 2,
  789. },{
  790. .type = CX88_VMUX_SVIDEO,
  791. .vmux = 2,
  792. }},
  793. .mpeg = CX88_MPEG_DVB,
  794. },
  795. [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
  796. .name = "DViCO FusionHDTV 5 Gold",
  797. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
  798. .radio_type = UNSET,
  799. .tuner_addr = ADDR_UNSET,
  800. .radio_addr = ADDR_UNSET,
  801. .tda9887_conf = TDA9887_PRESENT,
  802. .input = {{
  803. .type = CX88_VMUX_TELEVISION,
  804. .vmux = 0,
  805. .gpio0 = 0x87fd,
  806. },{
  807. .type = CX88_VMUX_COMPOSITE1,
  808. .vmux = 1,
  809. .gpio0 = 0x87f9,
  810. },{
  811. .type = CX88_VMUX_SVIDEO,
  812. .vmux = 2,
  813. .gpio0 = 0x87f9,
  814. }},
  815. .mpeg = CX88_MPEG_DVB,
  816. },
  817. [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
  818. .name = "AverMedia UltraTV Media Center PCI 550",
  819. .tuner_type = TUNER_PHILIPS_FM1236_MK3,
  820. .radio_type = UNSET,
  821. .tuner_addr = ADDR_UNSET,
  822. .radio_addr = ADDR_UNSET,
  823. .tda9887_conf = TDA9887_PRESENT,
  824. .input = {{
  825. .type = CX88_VMUX_COMPOSITE1,
  826. .vmux = 0,
  827. .gpio0 = 0x0000cd73,
  828. .audioroute = 1,
  829. },{
  830. .type = CX88_VMUX_SVIDEO,
  831. .vmux = 1,
  832. .gpio0 = 0x0000cd73,
  833. .audioroute = 1,
  834. },{
  835. .type = CX88_VMUX_TELEVISION,
  836. .vmux = 3,
  837. .gpio0 = 0x0000cdb3,
  838. .audioroute = 1,
  839. }},
  840. .radio = {
  841. .type = CX88_RADIO,
  842. .vmux = 2,
  843. .gpio0 = 0x0000cdf3,
  844. .audioroute = 1,
  845. },
  846. .mpeg = CX88_MPEG_BLACKBIRD,
  847. },
  848. [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
  849. /* Alexander Wold <awold@bigfoot.com> */
  850. .name = "Kworld V-Stream Xpert DVD",
  851. .tuner_type = UNSET,
  852. .input = {{
  853. .type = CX88_VMUX_COMPOSITE1,
  854. .vmux = 1,
  855. .gpio0 = 0x03000000,
  856. .gpio1 = 0x01000000,
  857. .gpio2 = 0x02000000,
  858. .gpio3 = 0x00100000,
  859. },{
  860. .type = CX88_VMUX_SVIDEO,
  861. .vmux = 2,
  862. .gpio0 = 0x03000000,
  863. .gpio1 = 0x01000000,
  864. .gpio2 = 0x02000000,
  865. .gpio3 = 0x00100000,
  866. }},
  867. },
  868. [CX88_BOARD_ATI_HDTVWONDER] = {
  869. .name = "ATI HDTV Wonder",
  870. .tuner_type = TUNER_PHILIPS_TUV1236D,
  871. .radio_type = UNSET,
  872. .tuner_addr = ADDR_UNSET,
  873. .radio_addr = ADDR_UNSET,
  874. .input = {{
  875. .type = CX88_VMUX_TELEVISION,
  876. .vmux = 0,
  877. .gpio0 = 0x00000ff7,
  878. .gpio1 = 0x000000ff,
  879. .gpio2 = 0x00000001,
  880. .gpio3 = 0x00000000,
  881. },{
  882. .type = CX88_VMUX_COMPOSITE1,
  883. .vmux = 1,
  884. .gpio0 = 0x00000ffe,
  885. .gpio1 = 0x000000ff,
  886. .gpio2 = 0x00000001,
  887. .gpio3 = 0x00000000,
  888. },{
  889. .type = CX88_VMUX_SVIDEO,
  890. .vmux = 2,
  891. .gpio0 = 0x00000ffe,
  892. .gpio1 = 0x000000ff,
  893. .gpio2 = 0x00000001,
  894. .gpio3 = 0x00000000,
  895. }},
  896. .mpeg = CX88_MPEG_DVB,
  897. },
  898. [CX88_BOARD_WINFAST_DTV1000] = {
  899. .name = "WinFast DTV1000-T",
  900. .tuner_type = TUNER_ABSENT,
  901. .radio_type = UNSET,
  902. .tuner_addr = ADDR_UNSET,
  903. .radio_addr = ADDR_UNSET,
  904. .input = {{
  905. .type = CX88_VMUX_DVB,
  906. .vmux = 0,
  907. },{
  908. .type = CX88_VMUX_COMPOSITE1,
  909. .vmux = 1,
  910. },{
  911. .type = CX88_VMUX_SVIDEO,
  912. .vmux = 2,
  913. }},
  914. .mpeg = CX88_MPEG_DVB,
  915. },
  916. [CX88_BOARD_AVERTV_303] = {
  917. .name = "AVerTV 303 (M126)",
  918. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  919. .radio_type = UNSET,
  920. .tuner_addr = ADDR_UNSET,
  921. .radio_addr = ADDR_UNSET,
  922. .tda9887_conf = TDA9887_PRESENT,
  923. .input = {{
  924. .type = CX88_VMUX_TELEVISION,
  925. .vmux = 0,
  926. .gpio0 = 0x00ff,
  927. .gpio1 = 0xe09f,
  928. .gpio2 = 0x0010,
  929. .gpio3 = 0x0000,
  930. },{
  931. .type = CX88_VMUX_COMPOSITE1,
  932. .vmux = 1,
  933. .gpio0 = 0x00ff,
  934. .gpio1 = 0xe05f,
  935. .gpio2 = 0x0010,
  936. .gpio3 = 0x0000,
  937. },{
  938. .type = CX88_VMUX_SVIDEO,
  939. .vmux = 2,
  940. .gpio0 = 0x00ff,
  941. .gpio1 = 0xe05f,
  942. .gpio2 = 0x0010,
  943. .gpio3 = 0x0000,
  944. }},
  945. },
  946. [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
  947. .name = "Hauppauge Nova-S-Plus DVB-S",
  948. .tuner_type = TUNER_ABSENT,
  949. .radio_type = UNSET,
  950. .tuner_addr = ADDR_UNSET,
  951. .radio_addr = ADDR_UNSET,
  952. .input = {{
  953. .type = CX88_VMUX_DVB,
  954. .vmux = 0,
  955. },{
  956. .type = CX88_VMUX_COMPOSITE1,
  957. .vmux = 1,
  958. },{
  959. .type = CX88_VMUX_SVIDEO,
  960. .vmux = 2,
  961. }},
  962. .mpeg = CX88_MPEG_DVB,
  963. },
  964. [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
  965. .name = "Hauppauge Nova-SE2 DVB-S",
  966. .tuner_type = TUNER_ABSENT,
  967. .radio_type = UNSET,
  968. .tuner_addr = ADDR_UNSET,
  969. .radio_addr = ADDR_UNSET,
  970. .input = {{
  971. .type = CX88_VMUX_DVB,
  972. .vmux = 0,
  973. }},
  974. .mpeg = CX88_MPEG_DVB,
  975. },
  976. [CX88_BOARD_KWORLD_DVBS_100] = {
  977. .name = "KWorld DVB-S 100",
  978. .tuner_type = TUNER_ABSENT,
  979. .radio_type = UNSET,
  980. .tuner_addr = ADDR_UNSET,
  981. .radio_addr = ADDR_UNSET,
  982. .input = {{
  983. .type = CX88_VMUX_DVB,
  984. .vmux = 0,
  985. },{
  986. .type = CX88_VMUX_COMPOSITE1,
  987. .vmux = 1,
  988. },{
  989. .type = CX88_VMUX_SVIDEO,
  990. .vmux = 2,
  991. }},
  992. .mpeg = CX88_MPEG_DVB,
  993. },
  994. [CX88_BOARD_HAUPPAUGE_HVR1100] = {
  995. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
  996. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  997. .radio_type = UNSET,
  998. .tuner_addr = ADDR_UNSET,
  999. .radio_addr = ADDR_UNSET,
  1000. .tda9887_conf = TDA9887_PRESENT,
  1001. .input = {{
  1002. .type = CX88_VMUX_TELEVISION,
  1003. .vmux = 0,
  1004. },{
  1005. .type = CX88_VMUX_COMPOSITE1,
  1006. .vmux = 1,
  1007. },{
  1008. .type = CX88_VMUX_SVIDEO,
  1009. .vmux = 2,
  1010. }},
  1011. /* fixme: Add radio support */
  1012. .mpeg = CX88_MPEG_DVB,
  1013. },
  1014. [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
  1015. .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
  1016. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1017. .radio_type = UNSET,
  1018. .tuner_addr = ADDR_UNSET,
  1019. .radio_addr = ADDR_UNSET,
  1020. .tda9887_conf = TDA9887_PRESENT,
  1021. .input = {{
  1022. .type = CX88_VMUX_TELEVISION,
  1023. .vmux = 0,
  1024. },{
  1025. .type = CX88_VMUX_COMPOSITE1,
  1026. .vmux = 1,
  1027. }},
  1028. /* fixme: Add radio support */
  1029. .mpeg = CX88_MPEG_DVB,
  1030. },
  1031. [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
  1032. .name = "digitalnow DNTV Live! DVB-T Pro",
  1033. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1034. .radio_type = UNSET,
  1035. .tuner_addr = ADDR_UNSET,
  1036. .radio_addr = ADDR_UNSET,
  1037. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1038. TDA9887_PORT2_ACTIVE,
  1039. .input = {{
  1040. .type = CX88_VMUX_TELEVISION,
  1041. .vmux = 0,
  1042. .gpio0 = 0xf80808,
  1043. },{
  1044. .type = CX88_VMUX_COMPOSITE1,
  1045. .vmux = 1,
  1046. .gpio0 = 0xf80808,
  1047. },{
  1048. .type = CX88_VMUX_SVIDEO,
  1049. .vmux = 2,
  1050. .gpio0 = 0xf80808,
  1051. }},
  1052. .radio = {
  1053. .type = CX88_RADIO,
  1054. .gpio0 = 0xf80808,
  1055. },
  1056. .mpeg = CX88_MPEG_DVB,
  1057. },
  1058. [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
  1059. /* Kworld V-stream Xpert DVB-T with Thomson tuner */
  1060. /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
  1061. /* Manenti Marco <marco_manenti@colman.it> */
  1062. .name = "KWorld/VStream XPert DVB-T with cx22702",
  1063. .tuner_type = TUNER_ABSENT,
  1064. .radio_type = UNSET,
  1065. .tuner_addr = ADDR_UNSET,
  1066. .radio_addr = ADDR_UNSET,
  1067. .input = {{
  1068. .type = CX88_VMUX_COMPOSITE1,
  1069. .vmux = 1,
  1070. .gpio0 = 0x0700,
  1071. .gpio2 = 0x0101,
  1072. },{
  1073. .type = CX88_VMUX_SVIDEO,
  1074. .vmux = 2,
  1075. .gpio0 = 0x0700,
  1076. .gpio2 = 0x0101,
  1077. }},
  1078. .mpeg = CX88_MPEG_DVB,
  1079. },
  1080. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
  1081. .name = "DViCO FusionHDTV DVB-T Dual Digital",
  1082. .tuner_type = TUNER_ABSENT, /* No analog tuner */
  1083. .radio_type = UNSET,
  1084. .tuner_addr = ADDR_UNSET,
  1085. .radio_addr = ADDR_UNSET,
  1086. .input = {{
  1087. .type = CX88_VMUX_COMPOSITE1,
  1088. .vmux = 1,
  1089. .gpio0 = 0x000067df,
  1090. },{
  1091. .type = CX88_VMUX_SVIDEO,
  1092. .vmux = 2,
  1093. .gpio0 = 0x000067df,
  1094. }},
  1095. .mpeg = CX88_MPEG_DVB,
  1096. },
  1097. [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
  1098. .name = "KWorld HardwareMpegTV XPert",
  1099. .tuner_type = TUNER_PHILIPS_TDA8290,
  1100. .radio_type = UNSET,
  1101. .tuner_addr = ADDR_UNSET,
  1102. .radio_addr = ADDR_UNSET,
  1103. .input = {{
  1104. .type = CX88_VMUX_TELEVISION,
  1105. .vmux = 0,
  1106. .gpio0 = 0x3de2,
  1107. .gpio2 = 0x00ff,
  1108. },{
  1109. .type = CX88_VMUX_COMPOSITE1,
  1110. .vmux = 1,
  1111. .gpio0 = 0x3de6,
  1112. .audioroute = 1,
  1113. },{
  1114. .type = CX88_VMUX_SVIDEO,
  1115. .vmux = 2,
  1116. .gpio0 = 0x3de6,
  1117. .audioroute = 1,
  1118. }},
  1119. .radio = {
  1120. .type = CX88_RADIO,
  1121. .gpio0 = 0x3de6,
  1122. .gpio2 = 0x00ff,
  1123. },
  1124. .mpeg = CX88_MPEG_BLACKBIRD,
  1125. },
  1126. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
  1127. .name = "DViCO FusionHDTV DVB-T Hybrid",
  1128. .tuner_type = TUNER_THOMSON_FE6600,
  1129. .radio_type = UNSET,
  1130. .tuner_addr = ADDR_UNSET,
  1131. .radio_addr = ADDR_UNSET,
  1132. .input = {{
  1133. .type = CX88_VMUX_TELEVISION,
  1134. .vmux = 0,
  1135. .gpio0 = 0x0000a75f,
  1136. },{
  1137. .type = CX88_VMUX_COMPOSITE1,
  1138. .vmux = 1,
  1139. .gpio0 = 0x0000a75b,
  1140. },{
  1141. .type = CX88_VMUX_SVIDEO,
  1142. .vmux = 2,
  1143. .gpio0 = 0x0000a75b,
  1144. }},
  1145. .mpeg = CX88_MPEG_DVB,
  1146. },
  1147. [CX88_BOARD_PCHDTV_HD5500] = {
  1148. .name = "pcHDTV HD5500 HDTV",
  1149. .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
  1150. .radio_type = UNSET,
  1151. .tuner_addr = ADDR_UNSET,
  1152. .radio_addr = ADDR_UNSET,
  1153. .tda9887_conf = TDA9887_PRESENT,
  1154. .input = {{
  1155. .type = CX88_VMUX_TELEVISION,
  1156. .vmux = 0,
  1157. .gpio0 = 0x87fd,
  1158. },{
  1159. .type = CX88_VMUX_COMPOSITE1,
  1160. .vmux = 1,
  1161. .gpio0 = 0x87f9,
  1162. },{
  1163. .type = CX88_VMUX_SVIDEO,
  1164. .vmux = 2,
  1165. .gpio0 = 0x87f9,
  1166. }},
  1167. .mpeg = CX88_MPEG_DVB,
  1168. },
  1169. [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
  1170. /* FIXME: tested TV input only, disabled composite,
  1171. svideo and radio until they can be tested also. */
  1172. .name = "Kworld MCE 200 Deluxe",
  1173. .tuner_type = TUNER_TENA_9533_DI,
  1174. .radio_type = UNSET,
  1175. .tda9887_conf = TDA9887_PRESENT,
  1176. .tuner_addr = ADDR_UNSET,
  1177. .radio_addr = ADDR_UNSET,
  1178. .input = {{
  1179. .type = CX88_VMUX_TELEVISION,
  1180. .vmux = 0,
  1181. .gpio0 = 0x0000BDE6
  1182. }},
  1183. .mpeg = CX88_MPEG_BLACKBIRD,
  1184. },
  1185. [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
  1186. /* FIXME: SVideo, Composite and FM inputs are untested */
  1187. .name = "PixelView PlayTV P7000",
  1188. .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  1189. .radio_type = UNSET,
  1190. .tuner_addr = ADDR_UNSET,
  1191. .radio_addr = ADDR_UNSET,
  1192. .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
  1193. TDA9887_PORT2_ACTIVE,
  1194. .input = {{
  1195. .type = CX88_VMUX_TELEVISION,
  1196. .vmux = 0,
  1197. .gpio0 = 0x5da6,
  1198. }},
  1199. .mpeg = CX88_MPEG_BLACKBIRD,
  1200. },
  1201. [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
  1202. .name = "NPG Tech Real TV FM Top 10",
  1203. .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
  1204. .radio_type = UNSET,
  1205. .tuner_addr = ADDR_UNSET,
  1206. .radio_addr = ADDR_UNSET,
  1207. .input = {{
  1208. .type = CX88_VMUX_TELEVISION,
  1209. .vmux = 0,
  1210. .gpio0 = 0x0788,
  1211. },{
  1212. .type = CX88_VMUX_COMPOSITE1,
  1213. .vmux = 1,
  1214. .gpio0 = 0x078b,
  1215. },{
  1216. .type = CX88_VMUX_SVIDEO,
  1217. .vmux = 2,
  1218. .gpio0 = 0x078b,
  1219. }},
  1220. .radio = {
  1221. .type = CX88_RADIO,
  1222. .gpio0 = 0x074a,
  1223. },
  1224. },
  1225. [CX88_BOARD_WINFAST_DTV2000H] = {
  1226. /* video inputs and radio still in testing */
  1227. .name = "WinFast DTV2000 H",
  1228. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1229. .radio_type = UNSET,
  1230. .tuner_addr = ADDR_UNSET,
  1231. .radio_addr = ADDR_UNSET,
  1232. .tda9887_conf = TDA9887_PRESENT,
  1233. .input = {{
  1234. .type = CX88_VMUX_TELEVISION,
  1235. .vmux = 0,
  1236. .gpio0 = 0x00017304,
  1237. .gpio1 = 0x00008203,
  1238. .gpio2 = 0x00017304,
  1239. .gpio3 = 0x02000000,
  1240. }},
  1241. .mpeg = CX88_MPEG_DVB,
  1242. },
  1243. [CX88_BOARD_GENIATECH_DVBS] = {
  1244. .name = "Geniatech DVB-S",
  1245. .tuner_type = TUNER_ABSENT,
  1246. .radio_type = UNSET,
  1247. .tuner_addr = ADDR_UNSET,
  1248. .radio_addr = ADDR_UNSET,
  1249. .input = {{
  1250. .type = CX88_VMUX_DVB,
  1251. .vmux = 0,
  1252. },{
  1253. .type = CX88_VMUX_COMPOSITE1,
  1254. .vmux = 1,
  1255. }},
  1256. .mpeg = CX88_MPEG_DVB,
  1257. },
  1258. [CX88_BOARD_HAUPPAUGE_HVR3000] = {
  1259. /* FIXME: Add dvb & radio support */
  1260. .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
  1261. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1262. .radio_type = UNSET,
  1263. .tuner_addr = ADDR_UNSET,
  1264. .radio_addr = ADDR_UNSET,
  1265. .tda9887_conf = TDA9887_PRESENT,
  1266. .input = {{
  1267. .type = CX88_VMUX_TELEVISION,
  1268. .vmux = 0,
  1269. .gpio0 = 0x84bf,
  1270. },{
  1271. .type = CX88_VMUX_COMPOSITE1,
  1272. .vmux = 1,
  1273. .gpio0 = 0x84bf,
  1274. },{
  1275. .type = CX88_VMUX_SVIDEO,
  1276. .vmux = 2,
  1277. .gpio0 = 0x84bf,
  1278. }},
  1279. .mpeg = CX88_MPEG_DVB,
  1280. },
  1281. [CX88_BOARD_NORWOOD_MICRO] = {
  1282. .name = "Norwood Micro TV Tuner",
  1283. .tuner_type = TUNER_TNF_5335MF,
  1284. .radio_type = UNSET,
  1285. .tuner_addr = ADDR_UNSET,
  1286. .radio_addr = ADDR_UNSET,
  1287. .input = {{
  1288. .type = CX88_VMUX_TELEVISION,
  1289. .vmux = 0,
  1290. .gpio0 = 0x0709,
  1291. },{
  1292. .type = CX88_VMUX_COMPOSITE1,
  1293. .vmux = 1,
  1294. .gpio0 = 0x070b,
  1295. },{
  1296. .type = CX88_VMUX_SVIDEO,
  1297. .vmux = 2,
  1298. .gpio0 = 0x070b,
  1299. }},
  1300. },
  1301. [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
  1302. .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
  1303. .tuner_type = TUNER_LG_PAL_NEW_TAPC,
  1304. .radio_type = UNSET,
  1305. .tuner_addr = ADDR_UNSET,
  1306. .radio_addr = ADDR_UNSET,
  1307. .input = {{
  1308. .type = CX88_VMUX_TELEVISION,
  1309. .vmux = 0,
  1310. .gpio0 = 0x003fffff,
  1311. .gpio1 = 0x00e00000,
  1312. .gpio2 = 0x003fffff,
  1313. .gpio3 = 0x02000000,
  1314. },{
  1315. .type = CX88_VMUX_COMPOSITE1,
  1316. .vmux = 1,
  1317. .gpio0 = 0x003fffff,
  1318. .gpio1 = 0x00e00000,
  1319. .gpio2 = 0x003fffff,
  1320. .gpio3 = 0x02000000,
  1321. },{
  1322. .type = CX88_VMUX_SVIDEO,
  1323. .vmux = 2,
  1324. .gpio0 = 0x003fffff,
  1325. .gpio1 = 0x00e00000,
  1326. .gpio2 = 0x003fffff,
  1327. .gpio3 = 0x02000000,
  1328. }},
  1329. },
  1330. [CX88_BOARD_HAUPPAUGE_HVR1300] = {
  1331. .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
  1332. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1333. .radio_type = UNSET,
  1334. .tuner_addr = ADDR_UNSET,
  1335. .radio_addr = ADDR_UNSET,
  1336. .tda9887_conf = TDA9887_PRESENT,
  1337. .audio_chip = V4L2_IDENT_WM8775,
  1338. .input = {{
  1339. .type = CX88_VMUX_TELEVISION,
  1340. .vmux = 0,
  1341. .gpio0 = 0xe780,
  1342. .audioroute = 1,
  1343. },{
  1344. .type = CX88_VMUX_COMPOSITE1,
  1345. .vmux = 1,
  1346. .gpio0 = 0xe780,
  1347. .audioroute = 2,
  1348. },{
  1349. .type = CX88_VMUX_SVIDEO,
  1350. .vmux = 2,
  1351. .gpio0 = 0xe780,
  1352. .audioroute = 2,
  1353. }},
  1354. /* fixme: Add radio support */
  1355. .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
  1356. .radio = {
  1357. .type = CX88_RADIO,
  1358. .gpio0 = 0xe780,
  1359. },
  1360. },
  1361. [CX88_BOARD_ADSTECH_PTV_390] = {
  1362. .name = "ADS Tech Instant Video PCI",
  1363. .tuner_type = TUNER_ABSENT,
  1364. .radio_type = UNSET,
  1365. .tuner_addr = ADDR_UNSET,
  1366. .radio_addr = ADDR_UNSET,
  1367. .input = {{
  1368. .type = CX88_VMUX_DEBUG,
  1369. .vmux = 3,
  1370. .gpio0 = 0x04ff,
  1371. },{
  1372. .type = CX88_VMUX_COMPOSITE1,
  1373. .vmux = 1,
  1374. .gpio0 = 0x07fa,
  1375. },{
  1376. .type = CX88_VMUX_SVIDEO,
  1377. .vmux = 2,
  1378. .gpio0 = 0x07fa,
  1379. }},
  1380. },
  1381. [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
  1382. .name = "Pinnacle PCTV HD 800i",
  1383. .tuner_type = TUNER_XC5000,
  1384. .radio_type = UNSET,
  1385. .tuner_addr = ADDR_UNSET,
  1386. .radio_addr = ADDR_UNSET,
  1387. .input = {{
  1388. .type = CX88_VMUX_TELEVISION,
  1389. .vmux = 0,
  1390. .gpio0 = 0x04fb,
  1391. .gpio1 = 0x10ff,
  1392. },{
  1393. .type = CX88_VMUX_COMPOSITE1,
  1394. .vmux = 1,
  1395. .gpio0 = 0x04fb,
  1396. .gpio1 = 0x10ef,
  1397. .audioroute = 1,
  1398. },{
  1399. .type = CX88_VMUX_SVIDEO,
  1400. .vmux = 2,
  1401. .gpio0 = 0x04fb,
  1402. .gpio1 = 0x10ef,
  1403. .audioroute = 1,
  1404. }},
  1405. .mpeg = CX88_MPEG_DVB,
  1406. },
  1407. [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
  1408. .name = "DViCO FusionHDTV 5 PCI nano",
  1409. /* xc3008 tuner, digital only for now */
  1410. .tuner_type = TUNER_ABSENT,
  1411. .radio_type = UNSET,
  1412. .tuner_addr = ADDR_UNSET,
  1413. .radio_addr = ADDR_UNSET,
  1414. .input = {{
  1415. .type = CX88_VMUX_TELEVISION,
  1416. .vmux = 0,
  1417. .gpio0 = 0x000027df, /* Unconfirmed */
  1418. }, {
  1419. .type = CX88_VMUX_COMPOSITE1,
  1420. .vmux = 1,
  1421. .gpio0 = 0x000027df, /* Unconfirmed */
  1422. .audioroute = 1,
  1423. }, {
  1424. .type = CX88_VMUX_SVIDEO,
  1425. .vmux = 2,
  1426. .gpio0 = 0x000027df, /* Unconfirmed */
  1427. .audioroute = 1,
  1428. } },
  1429. .mpeg = CX88_MPEG_DVB,
  1430. },
  1431. [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
  1432. .name = "Pinnacle Hybrid PCTV",
  1433. .tuner_type = TUNER_XC2028,
  1434. .tuner_addr = 0x61,
  1435. .input = { {
  1436. .type = CX88_VMUX_TELEVISION,
  1437. .vmux = 0,
  1438. }, {
  1439. .type = CX88_VMUX_COMPOSITE1,
  1440. .vmux = 1,
  1441. }, {
  1442. .type = CX88_VMUX_SVIDEO,
  1443. .vmux = 2,
  1444. } },
  1445. .radio = {
  1446. .type = CX88_RADIO,
  1447. .gpio0 = 0x004ff,
  1448. .gpio1 = 0x010ff,
  1449. .gpio2 = 0x0ff,
  1450. },
  1451. },
  1452. [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
  1453. .name = "Winfast TV2000 XP Global",
  1454. .tuner_type = TUNER_XC2028,
  1455. .tuner_addr = 0x61,
  1456. .input = { {
  1457. .type = CX88_VMUX_TELEVISION,
  1458. .vmux = 0,
  1459. .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
  1460. .gpio1 = 0x0000,
  1461. .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
  1462. }, {
  1463. .type = CX88_VMUX_COMPOSITE1,
  1464. .vmux = 1,
  1465. .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
  1466. .gpio1 = 0x0000,
  1467. .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
  1468. }, {
  1469. .type = CX88_VMUX_SVIDEO,
  1470. .vmux = 2,
  1471. } },
  1472. .radio = {
  1473. .type = CX88_RADIO,
  1474. .gpio0 = 0x004ff,
  1475. .gpio1 = 0x010ff,
  1476. .gpio2 = 0x0ff,
  1477. },
  1478. },
  1479. [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
  1480. .name = "PowerColor RA330", /* Long names may confuse LIRC. */
  1481. .tuner_type = TUNER_XC2028,
  1482. .tuner_addr = 0x61,
  1483. .input = { {
  1484. .type = CX88_VMUX_DEBUG,
  1485. .vmux = 3, /* Due to the way the cx88 driver is written, */
  1486. .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
  1487. .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
  1488. .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
  1489. }, { /* from the tuner on boot for a little while. */
  1490. .type = CX88_VMUX_TELEVISION,
  1491. .vmux = 0,
  1492. .gpio0 = 0x00ff,
  1493. .gpio1 = 0xf35d,
  1494. .gpio3 = 0x0000,
  1495. }, {
  1496. .type = CX88_VMUX_COMPOSITE1,
  1497. .vmux = 1,
  1498. .gpio0 = 0x00ff,
  1499. .gpio1 = 0xf37d,
  1500. .gpio3 = 0x0000,
  1501. }, {
  1502. .type = CX88_VMUX_SVIDEO,
  1503. .vmux = 2,
  1504. .gpio0 = 0x000ff,
  1505. .gpio1 = 0x0f37d,
  1506. .gpio3 = 0x00000,
  1507. } },
  1508. .radio = {
  1509. .type = CX88_RADIO,
  1510. .gpio0 = 0x000ff,
  1511. .gpio1 = 0x0f35d,
  1512. .gpio3 = 0x00000,
  1513. },
  1514. },
  1515. [CX88_BOARD_GENIATECH_X8000_MT] = {
  1516. /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
  1517. .name = "Geniatech X8000-MT DVBT",
  1518. .tuner_type = TUNER_XC2028,
  1519. .tuner_addr = 0x61,
  1520. .input = { {
  1521. .type = CX88_VMUX_TELEVISION,
  1522. .vmux = 0,
  1523. .gpio0 = 0x00000000,
  1524. .gpio1 = 0x00e3e341,
  1525. .gpio2 = 0x00000000,
  1526. .gpio3 = 0x00000000,
  1527. }, {
  1528. .type = CX88_VMUX_COMPOSITE1,
  1529. .vmux = 1,
  1530. .gpio0 = 0x00000000,
  1531. .gpio1 = 0x00e3e361,
  1532. .gpio2 = 0x00000000,
  1533. .gpio3 = 0x00000000,
  1534. }, {
  1535. .type = CX88_VMUX_SVIDEO,
  1536. .vmux = 2,
  1537. .gpio0 = 0x00000000,
  1538. .gpio1 = 0x00e3e361,
  1539. .gpio2 = 0x00000000,
  1540. .gpio3 = 0x00000000,
  1541. } },
  1542. .radio = {
  1543. .type = CX88_RADIO,
  1544. .gpio0 = 0x00000000,
  1545. .gpio1 = 0x00e3e341,
  1546. .gpio2 = 0x00000000,
  1547. .gpio3 = 0x00000000,
  1548. },
  1549. .mpeg = CX88_MPEG_DVB,
  1550. },
  1551. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
  1552. .name = "DViCO FusionHDTV DVB-T PRO",
  1553. .tuner_type = TUNER_ABSENT, /* XXX: Has XC3028 */
  1554. .radio_type = UNSET,
  1555. .tuner_addr = ADDR_UNSET,
  1556. .radio_addr = ADDR_UNSET,
  1557. .input = { {
  1558. .type = CX88_VMUX_COMPOSITE1,
  1559. .vmux = 1,
  1560. .gpio0 = 0x000067df,
  1561. }, {
  1562. .type = CX88_VMUX_SVIDEO,
  1563. .vmux = 2,
  1564. .gpio0 = 0x000067df,
  1565. } },
  1566. .mpeg = CX88_MPEG_DVB,
  1567. },
  1568. [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
  1569. .name = "DViCO FusionHDTV 7 Gold",
  1570. .tuner_type = TUNER_XC5000,
  1571. .radio_type = UNSET,
  1572. .tuner_addr = ADDR_UNSET,
  1573. .radio_addr = ADDR_UNSET,
  1574. .input = {{
  1575. .type = CX88_VMUX_TELEVISION,
  1576. .vmux = 0,
  1577. .gpio0 = 0x10df,
  1578. },{
  1579. .type = CX88_VMUX_COMPOSITE1,
  1580. .vmux = 1,
  1581. .gpio0 = 0x16d9,
  1582. },{
  1583. .type = CX88_VMUX_SVIDEO,
  1584. .vmux = 2,
  1585. .gpio0 = 0x16d9,
  1586. }},
  1587. .mpeg = CX88_MPEG_DVB,
  1588. },
  1589. [CX88_BOARD_PROLINK_PV_8000GT] = {
  1590. .name = "Prolink Pixelview MPEG 8000GT",
  1591. .tuner_type = TUNER_XC2028,
  1592. .tuner_addr = 0x61,
  1593. .input = { {
  1594. .type = CX88_VMUX_TELEVISION,
  1595. .vmux = 0,
  1596. .gpio0 = 0x0ff,
  1597. .gpio2 = 0x0cfb,
  1598. }, {
  1599. .type = CX88_VMUX_COMPOSITE1,
  1600. .vmux = 1,
  1601. .gpio2 = 0x0cfb,
  1602. }, {
  1603. .type = CX88_VMUX_SVIDEO,
  1604. .vmux = 2,
  1605. .gpio2 = 0x0cfb,
  1606. } },
  1607. .radio = {
  1608. .type = CX88_RADIO,
  1609. .gpio2 = 0x0cfb,
  1610. },
  1611. },
  1612. /* Both radio, analog and ATSC work with this board.
  1613. However, for analog to work, s5h1409 gate should be open,
  1614. otherwise, tuner-xc3028 won't be detected.
  1615. A proper fix require using the newer i2c methods to add
  1616. tuner-xc3028 without doing an i2c probe.
  1617. */
  1618. [CX88_BOARD_KWORLD_ATSC_120] = {
  1619. .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
  1620. .tuner_type = TUNER_XC2028,
  1621. .radio_type = UNSET,
  1622. .tuner_addr = ADDR_UNSET,
  1623. .radio_addr = ADDR_UNSET,
  1624. .input = { {
  1625. .type = CX88_VMUX_TELEVISION,
  1626. .vmux = 0,
  1627. .gpio0 = 0x000000ff,
  1628. .gpio1 = 0x0000f35d,
  1629. .gpio2 = 0x00000000,
  1630. }, {
  1631. .type = CX88_VMUX_COMPOSITE1,
  1632. .vmux = 1,
  1633. .gpio0 = 0x000000ff,
  1634. .gpio1 = 0x0000f37e,
  1635. .gpio2 = 0x00000000,
  1636. }, {
  1637. .type = CX88_VMUX_SVIDEO,
  1638. .vmux = 2,
  1639. .gpio0 = 0x000000ff,
  1640. .gpio1 = 0x0000f37e,
  1641. .gpio2 = 0x00000000,
  1642. } },
  1643. .radio = {
  1644. .type = CX88_RADIO,
  1645. .gpio0 = 0x000000ff,
  1646. .gpio1 = 0x0000f35d,
  1647. .gpio2 = 0x00000000,
  1648. },
  1649. .mpeg = CX88_MPEG_DVB,
  1650. },
  1651. [CX88_BOARD_HAUPPAUGE_HVR4000] = {
  1652. .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
  1653. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1654. .radio_type = UNSET,
  1655. .tuner_addr = ADDR_UNSET,
  1656. .radio_addr = ADDR_UNSET,
  1657. .tda9887_conf = TDA9887_PRESENT,
  1658. /*
  1659. * GPIO0 (WINTV2000)
  1660. *
  1661. * Analogue SAT DVB-T
  1662. * Antenna 0xc4bf 0xc4bb
  1663. * Composite 0xc4bf 0xc4bb
  1664. * S-Video 0xc4bf 0xc4bb
  1665. * Composite1 0xc4ff 0xc4fb
  1666. * S-Video1 0xc4ff 0xc4fb
  1667. */
  1668. .input = {{
  1669. .type = CX88_VMUX_TELEVISION,
  1670. .vmux = 0,
  1671. .gpio0 = 0xc4bf,
  1672. }, {
  1673. .type = CX88_VMUX_COMPOSITE1,
  1674. .vmux = 1,
  1675. .gpio0 = 0xc4bf,
  1676. }, {
  1677. .type = CX88_VMUX_SVIDEO,
  1678. .vmux = 2,
  1679. .gpio0 = 0xc4bf,
  1680. } },
  1681. /* fixme: Add radio support */
  1682. .mpeg = CX88_MPEG_DVB,
  1683. },
  1684. [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
  1685. .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
  1686. .tuner_type = UNSET,
  1687. .radio_type = UNSET,
  1688. .tuner_addr = ADDR_UNSET,
  1689. .radio_addr = ADDR_UNSET,
  1690. .input = {{
  1691. .type = CX88_VMUX_DVB,
  1692. .vmux = 0,
  1693. } },
  1694. .mpeg = CX88_MPEG_DVB,
  1695. },
  1696. [CX88_BOARD_TEVII_S460] = {
  1697. .name = "TeVii S460 DVB-S/S2",
  1698. .tuner_type = UNSET,
  1699. .radio_type = UNSET,
  1700. .tuner_addr = ADDR_UNSET,
  1701. .radio_addr = ADDR_UNSET,
  1702. .input = {{
  1703. .type = CX88_VMUX_DVB,
  1704. .vmux = 0,
  1705. } },
  1706. .mpeg = CX88_MPEG_DVB,
  1707. },
  1708. [CX88_BOARD_OMICOM_SS4_PCI] = {
  1709. .name = "Omicom SS4 DVB-S/S2 PCI",
  1710. .tuner_type = UNSET,
  1711. .radio_type = UNSET,
  1712. .tuner_addr = ADDR_UNSET,
  1713. .radio_addr = ADDR_UNSET,
  1714. .input = {{
  1715. .type = CX88_VMUX_DVB,
  1716. .vmux = 0,
  1717. } },
  1718. .mpeg = CX88_MPEG_DVB,
  1719. },
  1720. [CX88_BOARD_TBS_8920] = {
  1721. .name = "TBS 8920 DVB-S/S2",
  1722. .tuner_type = TUNER_ABSENT,
  1723. .radio_type = UNSET,
  1724. .tuner_addr = ADDR_UNSET,
  1725. .radio_addr = ADDR_UNSET,
  1726. .input = {{
  1727. .type = CX88_VMUX_DVB,
  1728. .vmux = 1,
  1729. } },
  1730. .mpeg = CX88_MPEG_DVB,
  1731. },
  1732. };
  1733. /* ------------------------------------------------------------------ */
  1734. /* PCI subsystem IDs */
  1735. static const struct cx88_subid cx88_subids[] = {
  1736. {
  1737. .subvendor = 0x0070,
  1738. .subdevice = 0x3400,
  1739. .card = CX88_BOARD_HAUPPAUGE,
  1740. },{
  1741. .subvendor = 0x0070,
  1742. .subdevice = 0x3401,
  1743. .card = CX88_BOARD_HAUPPAUGE,
  1744. },{
  1745. .subvendor = 0x14c7,
  1746. .subdevice = 0x0106,
  1747. .card = CX88_BOARD_GDI,
  1748. },{
  1749. .subvendor = 0x14c7,
  1750. .subdevice = 0x0107, /* with mpeg encoder */
  1751. .card = CX88_BOARD_GDI,
  1752. },{
  1753. .subvendor = PCI_VENDOR_ID_ATI,
  1754. .subdevice = 0x00f8,
  1755. .card = CX88_BOARD_ATI_WONDER_PRO,
  1756. },{
  1757. .subvendor = 0x107d,
  1758. .subdevice = 0x6611,
  1759. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1760. },{
  1761. .subvendor = 0x107d,
  1762. .subdevice = 0x6613, /* NTSC */
  1763. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1764. },{
  1765. .subvendor = 0x107d,
  1766. .subdevice = 0x6620,
  1767. .card = CX88_BOARD_WINFAST_DV2000,
  1768. },{
  1769. .subvendor = 0x107d,
  1770. .subdevice = 0x663b,
  1771. .card = CX88_BOARD_LEADTEK_PVR2000,
  1772. },{
  1773. .subvendor = 0x107d,
  1774. .subdevice = 0x663c,
  1775. .card = CX88_BOARD_LEADTEK_PVR2000,
  1776. },{
  1777. .subvendor = 0x1461,
  1778. .subdevice = 0x000b,
  1779. .card = CX88_BOARD_AVERTV_STUDIO_303,
  1780. },{
  1781. .subvendor = 0x1462,
  1782. .subdevice = 0x8606,
  1783. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  1784. },{
  1785. .subvendor = 0x10fc,
  1786. .subdevice = 0xd003,
  1787. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  1788. },{
  1789. .subvendor = 0x1043,
  1790. .subdevice = 0x4823, /* with mpeg encoder */
  1791. .card = CX88_BOARD_ASUS_PVR_416,
  1792. },{
  1793. .subvendor = 0x17de,
  1794. .subdevice = 0x08a6,
  1795. .card = CX88_BOARD_KWORLD_DVB_T,
  1796. },{
  1797. .subvendor = 0x18ac,
  1798. .subdevice = 0xd810,
  1799. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1800. },{
  1801. .subvendor = 0x18ac,
  1802. .subdevice = 0xd820,
  1803. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  1804. },{
  1805. .subvendor = 0x18ac,
  1806. .subdevice = 0xdb00,
  1807. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  1808. },{
  1809. .subvendor = 0x0070,
  1810. .subdevice = 0x9002,
  1811. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1812. },{
  1813. .subvendor = 0x14f1,
  1814. .subdevice = 0x0187,
  1815. .card = CX88_BOARD_CONEXANT_DVB_T1,
  1816. },{
  1817. .subvendor = 0x1540,
  1818. .subdevice = 0x2580,
  1819. .card = CX88_BOARD_PROVIDEO_PV259,
  1820. },{
  1821. .subvendor = 0x18ac,
  1822. .subdevice = 0xdb10,
  1823. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1824. },{
  1825. .subvendor = 0x1554,
  1826. .subdevice = 0x4811,
  1827. .card = CX88_BOARD_PIXELVIEW,
  1828. },{
  1829. .subvendor = 0x7063,
  1830. .subdevice = 0x3000, /* HD-3000 card */
  1831. .card = CX88_BOARD_PCHDTV_HD3000,
  1832. },{
  1833. .subvendor = 0x17de,
  1834. .subdevice = 0xa8a6,
  1835. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  1836. },{
  1837. .subvendor = 0x0070,
  1838. .subdevice = 0x2801,
  1839. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  1840. },{
  1841. .subvendor = 0x14f1,
  1842. .subdevice = 0x0342,
  1843. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  1844. },{
  1845. .subvendor = 0x10fc,
  1846. .subdevice = 0xd035,
  1847. .card = CX88_BOARD_IODATA_GVBCTV7E,
  1848. },{
  1849. .subvendor = 0x1421,
  1850. .subdevice = 0x0334,
  1851. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  1852. },{
  1853. .subvendor = 0x153b,
  1854. .subdevice = 0x1166,
  1855. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  1856. },{
  1857. .subvendor = 0x18ac,
  1858. .subdevice = 0xd500,
  1859. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  1860. },{
  1861. .subvendor = 0x1461,
  1862. .subdevice = 0x8011,
  1863. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  1864. },{
  1865. .subvendor = PCI_VENDOR_ID_ATI,
  1866. .subdevice = 0xa101,
  1867. .card = CX88_BOARD_ATI_HDTVWONDER,
  1868. },{
  1869. .subvendor = 0x107d,
  1870. .subdevice = 0x665f,
  1871. .card = CX88_BOARD_WINFAST_DTV1000,
  1872. },{
  1873. .subvendor = 0x1461,
  1874. .subdevice = 0x000a,
  1875. .card = CX88_BOARD_AVERTV_303,
  1876. },{
  1877. .subvendor = 0x0070,
  1878. .subdevice = 0x9200,
  1879. .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
  1880. },{
  1881. .subvendor = 0x0070,
  1882. .subdevice = 0x9201,
  1883. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1884. },{
  1885. .subvendor = 0x0070,
  1886. .subdevice = 0x9202,
  1887. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1888. },{
  1889. .subvendor = 0x17de,
  1890. .subdevice = 0x08b2,
  1891. .card = CX88_BOARD_KWORLD_DVBS_100,
  1892. },{
  1893. .subvendor = 0x0070,
  1894. .subdevice = 0x9400,
  1895. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1896. },{
  1897. .subvendor = 0x0070,
  1898. .subdevice = 0x9402,
  1899. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1900. },{
  1901. .subvendor = 0x0070,
  1902. .subdevice = 0x9800,
  1903. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1904. },{
  1905. .subvendor = 0x0070,
  1906. .subdevice = 0x9802,
  1907. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1908. },{
  1909. .subvendor = 0x0070,
  1910. .subdevice = 0x9001,
  1911. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1912. },{
  1913. .subvendor = 0x1822,
  1914. .subdevice = 0x0025,
  1915. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1916. },{
  1917. .subvendor = 0x17de,
  1918. .subdevice = 0x08a1,
  1919. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  1920. },{
  1921. .subvendor = 0x18ac,
  1922. .subdevice = 0xdb50,
  1923. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1924. },{
  1925. .subvendor = 0x18ac,
  1926. .subdevice = 0xdb54,
  1927. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  1928. /* Re-branded DViCO: DigitalNow DVB-T Dual */
  1929. },{
  1930. .subvendor = 0x18ac,
  1931. .subdevice = 0xdb11,
  1932. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1933. /* Re-branded DViCO: UltraView DVB-T Plus */
  1934. }, {
  1935. .subvendor = 0x18ac,
  1936. .subdevice = 0xdb30,
  1937. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
  1938. }, {
  1939. .subvendor = 0x17de,
  1940. .subdevice = 0x0840,
  1941. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  1942. },{
  1943. .subvendor = 0x1421,
  1944. .subdevice = 0x0305,
  1945. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  1946. },{
  1947. .subvendor = 0x18ac,
  1948. .subdevice = 0xdb40,
  1949. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1950. },{
  1951. .subvendor = 0x18ac,
  1952. .subdevice = 0xdb44,
  1953. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  1954. },{
  1955. .subvendor = 0x7063,
  1956. .subdevice = 0x5500,
  1957. .card = CX88_BOARD_PCHDTV_HD5500,
  1958. },{
  1959. .subvendor = 0x17de,
  1960. .subdevice = 0x0841,
  1961. .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
  1962. },{
  1963. .subvendor = 0x1822,
  1964. .subdevice = 0x0019,
  1965. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1966. },{
  1967. .subvendor = 0x1554,
  1968. .subdevice = 0x4813,
  1969. .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
  1970. },{
  1971. .subvendor = 0x14f1,
  1972. .subdevice = 0x0842,
  1973. .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
  1974. },{
  1975. .subvendor = 0x107d,
  1976. .subdevice = 0x665e,
  1977. .card = CX88_BOARD_WINFAST_DTV2000H,
  1978. },{
  1979. .subvendor = 0x18ac,
  1980. .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
  1981. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1982. },{
  1983. .subvendor = 0x14f1,
  1984. .subdevice = 0x0084,
  1985. .card = CX88_BOARD_GENIATECH_DVBS,
  1986. },{
  1987. .subvendor = 0x0070,
  1988. .subdevice = 0x1404,
  1989. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  1990. },{
  1991. .subvendor = 0x1461,
  1992. .subdevice = 0xc111, /* AverMedia M150-D */
  1993. /* This board is known to work with the ASUS PVR416 config */
  1994. .card = CX88_BOARD_ASUS_PVR_416,
  1995. },{
  1996. .subvendor = 0xc180,
  1997. .subdevice = 0xc980,
  1998. .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
  1999. },{
  2000. .subvendor = 0x0070,
  2001. .subdevice = 0x9600,
  2002. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2003. },{
  2004. .subvendor = 0x0070,
  2005. .subdevice = 0x9601,
  2006. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2007. },{
  2008. .subvendor = 0x0070,
  2009. .subdevice = 0x9602,
  2010. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2011. },{
  2012. .subvendor = 0x107d,
  2013. .subdevice = 0x6632,
  2014. .card = CX88_BOARD_LEADTEK_PVR2000,
  2015. },{
  2016. .subvendor = 0x12ab,
  2017. .subdevice = 0x2300, /* Club3D Zap TV2100 */
  2018. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  2019. },{
  2020. .subvendor = 0x0070,
  2021. .subdevice = 0x9000,
  2022. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2023. },{
  2024. .subvendor = 0x0070,
  2025. .subdevice = 0x1400,
  2026. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2027. },{
  2028. .subvendor = 0x0070,
  2029. .subdevice = 0x1401,
  2030. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2031. },{
  2032. .subvendor = 0x0070,
  2033. .subdevice = 0x1402,
  2034. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2035. },{
  2036. .subvendor = 0x1421,
  2037. .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
  2038. .card = CX88_BOARD_KWORLD_DVBS_100,
  2039. },{
  2040. .subvendor = 0x1421,
  2041. .subdevice = 0x0390,
  2042. .card = CX88_BOARD_ADSTECH_PTV_390,
  2043. },{
  2044. .subvendor = 0x11bd,
  2045. .subdevice = 0x0051,
  2046. .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
  2047. }, {
  2048. .subvendor = 0x18ac,
  2049. .subdevice = 0xd530,
  2050. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
  2051. }, {
  2052. .subvendor = 0x12ab,
  2053. .subdevice = 0x1788,
  2054. .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
  2055. }, {
  2056. .subvendor = 0x14f1,
  2057. .subdevice = 0xea3d,
  2058. .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
  2059. }, {
  2060. .subvendor = 0x107d,
  2061. .subdevice = 0x6f18,
  2062. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
  2063. }, {
  2064. .subvendor = 0x14f1,
  2065. .subdevice = 0x8852,
  2066. .card = CX88_BOARD_GENIATECH_X8000_MT,
  2067. }, {
  2068. .subvendor = 0x18ac,
  2069. .subdevice = 0xd610,
  2070. .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
  2071. }, {
  2072. .subvendor = 0x1554,
  2073. .subdevice = 0x4935,
  2074. .card = CX88_BOARD_PROLINK_PV_8000GT,
  2075. }, {
  2076. .subvendor = 0x17de,
  2077. .subdevice = 0x08c1,
  2078. .card = CX88_BOARD_KWORLD_ATSC_120,
  2079. }, {
  2080. .subvendor = 0x0070,
  2081. .subdevice = 0x6900,
  2082. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2083. }, {
  2084. .subvendor = 0x0070,
  2085. .subdevice = 0x6904,
  2086. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2087. }, {
  2088. .subvendor = 0x0070,
  2089. .subdevice = 0x6902,
  2090. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2091. }, {
  2092. .subvendor = 0x0070,
  2093. .subdevice = 0x6905,
  2094. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2095. }, {
  2096. .subvendor = 0x0070,
  2097. .subdevice = 0x6906,
  2098. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2099. }, {
  2100. .subvendor = 0xD460,
  2101. .subdevice = 0x9022,
  2102. .card = CX88_BOARD_TEVII_S460,
  2103. }, {
  2104. .subvendor = 0xA044,
  2105. .subdevice = 0x2011,
  2106. .card = CX88_BOARD_OMICOM_SS4_PCI,
  2107. }, {
  2108. .subvendor = 0x8920,
  2109. .subdevice = 0x8888,
  2110. .card = CX88_BOARD_TBS_8920,
  2111. },
  2112. };
  2113. /* ----------------------------------------------------------------------- */
  2114. /* some leadtek specific stuff */
  2115. static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2116. {
  2117. /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
  2118. * any others.
  2119. *
  2120. * Byte 0 is 1 on the NTSC board.
  2121. */
  2122. if (eeprom_data[4] != 0x7d ||
  2123. eeprom_data[5] != 0x10 ||
  2124. eeprom_data[7] != 0x66) {
  2125. warn_printk(core, "Leadtek eeprom invalid.\n");
  2126. return;
  2127. }
  2128. core->board.tuner_type = (eeprom_data[6] == 0x13) ?
  2129. TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
  2130. info_printk(core, "Leadtek Winfast 2000XP Expert config: "
  2131. "tuner=%d, eeprom[0]=0x%02x\n",
  2132. core->board.tuner_type, eeprom_data[0]);
  2133. }
  2134. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2135. {
  2136. struct tveeprom tv;
  2137. tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
  2138. core->board.tuner_type = tv.tuner_type;
  2139. core->tuner_formats = tv.tuner_formats;
  2140. core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
  2141. /* Make sure we support the board model */
  2142. switch (tv.model)
  2143. {
  2144. case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
  2145. case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
  2146. case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
  2147. case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
  2148. case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
  2149. case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
  2150. case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
  2151. case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
  2152. case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
  2153. case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
  2154. case 34519: /* WinTV-PCI-FM */
  2155. case 69009:
  2156. /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
  2157. case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
  2158. case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
  2159. case 69559:
  2160. /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
  2161. case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
  2162. case 90002: /* Nova-T-PCI (9002) */
  2163. case 92001: /* Nova-S-Plus (Video and IR) */
  2164. case 92002: /* Nova-S-Plus (Video and IR) */
  2165. case 90003: /* Nova-T-PCI (9002 No RF out) */
  2166. case 90500: /* Nova-T-PCI (oem) */
  2167. case 90501: /* Nova-T-PCI (oem/IR) */
  2168. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  2169. case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
  2170. case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
  2171. case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
  2172. case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
  2173. case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
  2174. case 96569: /* WinTV-HVR1300 () */
  2175. case 96659: /* WinTV-HVR1300 () */
  2176. case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
  2177. /* known */
  2178. break;
  2179. default:
  2180. warn_printk(core, "warning: unknown hauppauge model #%d\n",
  2181. tv.model);
  2182. break;
  2183. }
  2184. info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
  2185. }
  2186. /* ----------------------------------------------------------------------- */
  2187. /* some GDI (was: Modular Technology) specific stuff */
  2188. static struct {
  2189. int id;
  2190. int fm;
  2191. char *name;
  2192. } gdi_tuner[] = {
  2193. [ 0x01 ] = { .id = TUNER_ABSENT,
  2194. .name = "NTSC_M" },
  2195. [ 0x02 ] = { .id = TUNER_ABSENT,
  2196. .name = "PAL_B" },
  2197. [ 0x03 ] = { .id = TUNER_ABSENT,
  2198. .name = "PAL_I" },
  2199. [ 0x04 ] = { .id = TUNER_ABSENT,
  2200. .name = "PAL_D" },
  2201. [ 0x05 ] = { .id = TUNER_ABSENT,
  2202. .name = "SECAM" },
  2203. [ 0x10 ] = { .id = TUNER_ABSENT,
  2204. .fm = 1,
  2205. .name = "TEMIC_4049" },
  2206. [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
  2207. .name = "TEMIC_4136" },
  2208. [ 0x12 ] = { .id = TUNER_ABSENT,
  2209. .name = "TEMIC_4146" },
  2210. [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
  2211. .fm = 1,
  2212. .name = "PHILIPS_FQ1216_MK3" },
  2213. [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
  2214. .name = "PHILIPS_FQ1236_MK3" },
  2215. [ 0x22 ] = { .id = TUNER_ABSENT,
  2216. .name = "PHILIPS_FI1236_MK3" },
  2217. [ 0x23 ] = { .id = TUNER_ABSENT,
  2218. .name = "PHILIPS_FI1216_MK3" },
  2219. };
  2220. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2221. {
  2222. char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  2223. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  2224. info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
  2225. if (NULL == name)
  2226. return;
  2227. core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  2228. core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
  2229. CX88_RADIO : 0;
  2230. }
  2231. /* ------------------------------------------------------------------- */
  2232. /* some Divco specific stuff */
  2233. static int cx88_dvico_xc2028_callback(struct cx88_core *core,
  2234. int command, int arg)
  2235. {
  2236. switch (command) {
  2237. case XC2028_TUNER_RESET:
  2238. cx_write(MO_GP0_IO, 0x101000);
  2239. mdelay(5);
  2240. cx_set(MO_GP0_IO, 0x101010);
  2241. break;
  2242. default:
  2243. return -EINVAL;
  2244. }
  2245. return 0;
  2246. }
  2247. /* ----------------------------------------------------------------------- */
  2248. /* some Geniatech specific stuff */
  2249. static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
  2250. int command, int mode)
  2251. {
  2252. switch (command) {
  2253. case XC2028_TUNER_RESET:
  2254. switch (INPUT(core->input).type) {
  2255. case CX88_RADIO:
  2256. break;
  2257. case CX88_VMUX_DVB:
  2258. cx_write(MO_GP1_IO, 0x030302);
  2259. mdelay(50);
  2260. break;
  2261. default:
  2262. cx_write(MO_GP1_IO, 0x030301);
  2263. mdelay(50);
  2264. }
  2265. cx_write(MO_GP1_IO, 0x101010);
  2266. mdelay(50);
  2267. cx_write(MO_GP1_IO, 0x101000);
  2268. mdelay(50);
  2269. cx_write(MO_GP1_IO, 0x101010);
  2270. mdelay(50);
  2271. return 0;
  2272. }
  2273. return -EINVAL;
  2274. }
  2275. /* ------------------------------------------------------------------- */
  2276. /* some Divco specific stuff */
  2277. static int cx88_pv_8000gt_callback(struct cx88_core *core,
  2278. int command, int arg)
  2279. {
  2280. switch (command) {
  2281. case XC2028_TUNER_RESET:
  2282. cx_write(MO_GP2_IO, 0xcf7);
  2283. mdelay(50);
  2284. cx_write(MO_GP2_IO, 0xef5);
  2285. mdelay(50);
  2286. cx_write(MO_GP2_IO, 0xcf7);
  2287. break;
  2288. default:
  2289. return -EINVAL;
  2290. }
  2291. return 0;
  2292. }
  2293. /* ----------------------------------------------------------------------- */
  2294. /* some DViCO specific stuff */
  2295. static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
  2296. {
  2297. struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
  2298. int i, err;
  2299. static u8 init_bufs[13][5] = {
  2300. { 0x10, 0x00, 0x20, 0x01, 0x03 },
  2301. { 0x10, 0x10, 0x01, 0x00, 0x21 },
  2302. { 0x10, 0x10, 0x10, 0x00, 0xCA },
  2303. { 0x10, 0x10, 0x12, 0x00, 0x08 },
  2304. { 0x10, 0x10, 0x13, 0x00, 0x0A },
  2305. { 0x10, 0x10, 0x16, 0x01, 0xC0 },
  2306. { 0x10, 0x10, 0x22, 0x01, 0x3D },
  2307. { 0x10, 0x10, 0x73, 0x01, 0x2E },
  2308. { 0x10, 0x10, 0x72, 0x00, 0xC5 },
  2309. { 0x10, 0x10, 0x71, 0x01, 0x97 },
  2310. { 0x10, 0x10, 0x70, 0x00, 0x0F },
  2311. { 0x10, 0x10, 0xB0, 0x00, 0x01 },
  2312. { 0x03, 0x0C },
  2313. };
  2314. for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
  2315. msg.buf = init_bufs[i];
  2316. msg.len = (i != 12 ? 5 : 2);
  2317. err = i2c_transfer(&core->i2c_adap, &msg, 1);
  2318. if (err != 1) {
  2319. warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
  2320. "failed (err = %d)!\n", i, err);
  2321. return;
  2322. }
  2323. }
  2324. }
  2325. static int cx88_xc2028_tuner_callback(struct cx88_core *core,
  2326. int command, int arg)
  2327. {
  2328. /* Board-specific callbacks */
  2329. switch (core->boardnr) {
  2330. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  2331. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  2332. case CX88_BOARD_GENIATECH_X8000_MT:
  2333. case CX88_BOARD_KWORLD_ATSC_120:
  2334. return cx88_xc3028_geniatech_tuner_callback(core,
  2335. command, arg);
  2336. case CX88_BOARD_PROLINK_PV_8000GT:
  2337. return cx88_pv_8000gt_callback(core, command, arg);
  2338. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2339. return cx88_dvico_xc2028_callback(core, command, arg);
  2340. }
  2341. switch (command) {
  2342. case XC2028_TUNER_RESET:
  2343. switch (INPUT(core->input).type) {
  2344. case CX88_RADIO:
  2345. info_printk(core, "setting GPIO to radio!\n");
  2346. cx_write(MO_GP0_IO, 0x4ff);
  2347. mdelay(250);
  2348. cx_write(MO_GP2_IO, 0xff);
  2349. mdelay(250);
  2350. break;
  2351. case CX88_VMUX_DVB: /* Digital TV*/
  2352. default: /* Analog TV */
  2353. info_printk(core, "setting GPIO to TV!\n");
  2354. break;
  2355. }
  2356. cx_write(MO_GP1_IO, 0x101010);
  2357. mdelay(250);
  2358. cx_write(MO_GP1_IO, 0x101000);
  2359. mdelay(250);
  2360. cx_write(MO_GP1_IO, 0x101010);
  2361. mdelay(250);
  2362. return 0;
  2363. }
  2364. return -EINVAL;
  2365. }
  2366. /* ----------------------------------------------------------------------- */
  2367. /* Tuner callback function. Currently only needed for the Pinnacle *
  2368. * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
  2369. * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
  2370. static int cx88_xc5000_tuner_callback(struct cx88_core *core,
  2371. int command, int arg)
  2372. {
  2373. switch (core->boardnr) {
  2374. case CX88_BOARD_PINNACLE_PCTV_HD_800i:
  2375. if (command == 0) { /* This is the reset command from xc5000 */
  2376. /* Reset XC5000 tuner via SYS_RSTO_pin */
  2377. cx_write(MO_SRST_IO, 0);
  2378. msleep(10);
  2379. cx_write(MO_SRST_IO, 1);
  2380. return 0;
  2381. } else {
  2382. err_printk(core, "xc5000: unknown tuner "
  2383. "callback command.\n");
  2384. return -EINVAL;
  2385. }
  2386. break;
  2387. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  2388. if (command == 0) { /* This is the reset command from xc5000 */
  2389. cx_clear(MO_GP0_IO, 0x00000010);
  2390. msleep(10);
  2391. cx_set(MO_GP0_IO, 0x00000010);
  2392. return 0;
  2393. } else {
  2394. printk(KERN_ERR
  2395. "xc5000: unknown tuner callback command.\n");
  2396. return -EINVAL;
  2397. }
  2398. break;
  2399. }
  2400. return 0; /* Should never be here */
  2401. }
  2402. int cx88_tuner_callback(void *priv, int command, int arg)
  2403. {
  2404. struct i2c_algo_bit_data *i2c_algo = priv;
  2405. struct cx88_core *core;
  2406. if (!i2c_algo) {
  2407. printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
  2408. return -EINVAL;
  2409. }
  2410. core = i2c_algo->data;
  2411. if (!core) {
  2412. printk(KERN_ERR "cx88: Error - device struct undefined.\n");
  2413. return -EINVAL;
  2414. }
  2415. switch (core->board.tuner_type) {
  2416. case TUNER_XC2028:
  2417. info_printk(core, "Calling XC2028/3028 callback\n");
  2418. return cx88_xc2028_tuner_callback(core, command, arg);
  2419. case TUNER_XC5000:
  2420. info_printk(core, "Calling XC5000 callback\n");
  2421. return cx88_xc5000_tuner_callback(core, command, arg);
  2422. }
  2423. err_printk(core, "Error: Calling callback for tuner %d\n",
  2424. core->board.tuner_type);
  2425. return -EINVAL;
  2426. }
  2427. EXPORT_SYMBOL(cx88_tuner_callback);
  2428. /* ----------------------------------------------------------------------- */
  2429. static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  2430. {
  2431. int i;
  2432. if (0 == pci->subsystem_vendor &&
  2433. 0 == pci->subsystem_device) {
  2434. printk(KERN_ERR
  2435. "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
  2436. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  2437. "%s: workaround that. Redirect complaints to the vendor of\n"
  2438. "%s: the TV card. Best regards,\n"
  2439. "%s: -- tux\n",
  2440. core->name,core->name,core->name,core->name,core->name);
  2441. } else {
  2442. printk(KERN_ERR
  2443. "%s: Your board isn't known (yet) to the driver. You can\n"
  2444. "%s: try to pick one of the existing card configs via\n"
  2445. "%s: card=<n> insmod option. Updating to the latest\n"
  2446. "%s: version might help as well.\n",
  2447. core->name,core->name,core->name,core->name);
  2448. }
  2449. err_printk(core, "Here is a list of valid choices for the card=<n> "
  2450. "insmod option:\n");
  2451. for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
  2452. printk(KERN_ERR "%s: card=%d -> %s\n",
  2453. core->name, i, cx88_boards[i].name);
  2454. }
  2455. static void cx88_card_setup_pre_i2c(struct cx88_core *core)
  2456. {
  2457. switch (core->boardnr) {
  2458. case CX88_BOARD_HAUPPAUGE_HVR1300:
  2459. /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */
  2460. /* We leave here with the 702 on the bus */
  2461. cx_write(MO_GP0_IO, 0x0000e780);
  2462. udelay(1000);
  2463. cx_clear(MO_GP0_IO, 0x00000080);
  2464. udelay(50);
  2465. cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
  2466. udelay(1000);
  2467. break;
  2468. case CX88_BOARD_PROLINK_PV_8000GT:
  2469. cx_write(MO_GP2_IO, 0xcf7);
  2470. mdelay(50);
  2471. cx_write(MO_GP2_IO, 0xef5);
  2472. mdelay(50);
  2473. cx_write(MO_GP2_IO, 0xcf7);
  2474. msleep(10);
  2475. break;
  2476. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  2477. /* Enable the xc5000 tuner */
  2478. cx_set(MO_GP0_IO, 0x00001010);
  2479. break;
  2480. case CX88_BOARD_HAUPPAUGE_HVR4000:
  2481. case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
  2482. /* Init GPIO to allow tuner to attach */
  2483. cx_write(MO_GP0_IO, 0x0000c4bf);
  2484. udelay(1000);
  2485. }
  2486. }
  2487. /*
  2488. * Sets board-dependent xc3028 configuration
  2489. */
  2490. void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
  2491. {
  2492. memset(ctl, 0, sizeof(*ctl));
  2493. ctl->fname = XC2028_DEFAULT_FIRMWARE;
  2494. ctl->max_len = 64;
  2495. switch (core->boardnr) {
  2496. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  2497. /* Now works with firmware version 2.7 */
  2498. if (core->i2c_algo.udelay < 16)
  2499. core->i2c_algo.udelay = 16;
  2500. break;
  2501. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2502. ctl->scode_table = XC3028_FE_ZARLINK456;
  2503. break;
  2504. case CX88_BOARD_KWORLD_ATSC_120:
  2505. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2506. ctl->demod = XC3028_FE_OREN538;
  2507. break;
  2508. case CX88_BOARD_PROLINK_PV_8000GT:
  2509. /*
  2510. * This board uses non-MTS firmware
  2511. */
  2512. break;
  2513. default:
  2514. ctl->demod = XC3028_FE_OREN538;
  2515. ctl->mts = 1;
  2516. }
  2517. }
  2518. EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
  2519. static void cx88_card_setup(struct cx88_core *core)
  2520. {
  2521. static u8 eeprom[256];
  2522. struct tuner_setup tun_setup;
  2523. unsigned int mode_mask = T_RADIO |
  2524. T_ANALOG_TV |
  2525. T_DIGITAL_TV;
  2526. memset(&tun_setup, 0, sizeof(tun_setup));
  2527. if (0 == core->i2c_rc) {
  2528. core->i2c_client.addr = 0xa0 >> 1;
  2529. tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
  2530. }
  2531. switch (core->boardnr) {
  2532. case CX88_BOARD_HAUPPAUGE:
  2533. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  2534. if (0 == core->i2c_rc)
  2535. hauppauge_eeprom(core, eeprom+8);
  2536. break;
  2537. case CX88_BOARD_GDI:
  2538. if (0 == core->i2c_rc)
  2539. gdi_eeprom(core, eeprom);
  2540. break;
  2541. case CX88_BOARD_WINFAST2000XP_EXPERT:
  2542. if (0 == core->i2c_rc)
  2543. leadtek_eeprom(core, eeprom);
  2544. break;
  2545. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  2546. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  2547. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  2548. case CX88_BOARD_HAUPPAUGE_HVR1100:
  2549. case CX88_BOARD_HAUPPAUGE_HVR1100LP:
  2550. case CX88_BOARD_HAUPPAUGE_HVR3000:
  2551. case CX88_BOARD_HAUPPAUGE_HVR1300:
  2552. case CX88_BOARD_HAUPPAUGE_HVR4000:
  2553. case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
  2554. if (0 == core->i2c_rc)
  2555. hauppauge_eeprom(core, eeprom);
  2556. break;
  2557. case CX88_BOARD_KWORLD_DVBS_100:
  2558. cx_write(MO_GP0_IO, 0x000007f8);
  2559. cx_write(MO_GP1_IO, 0x00000001);
  2560. break;
  2561. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2562. /* GPIO0:0 is hooked to demod reset */
  2563. /* GPIO0:4 is hooked to xc3028 reset */
  2564. cx_write(MO_GP0_IO, 0x00111100);
  2565. msleep(1);
  2566. cx_write(MO_GP0_IO, 0x00111111);
  2567. break;
  2568. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
  2569. /* GPIO0:6 is hooked to FX2 reset pin */
  2570. cx_set(MO_GP0_IO, 0x00004040);
  2571. cx_clear(MO_GP0_IO, 0x00000040);
  2572. msleep(1000);
  2573. cx_set(MO_GP0_IO, 0x00004040);
  2574. /* FALLTHROUGH */
  2575. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  2576. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  2577. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
  2578. /* GPIO0:0 is hooked to mt352 reset pin */
  2579. cx_set(MO_GP0_IO, 0x00000101);
  2580. cx_clear(MO_GP0_IO, 0x00000001);
  2581. msleep(1);
  2582. cx_set(MO_GP0_IO, 0x00000101);
  2583. if (0 == core->i2c_rc &&
  2584. core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
  2585. dvico_fusionhdtv_hybrid_init(core);
  2586. break;
  2587. case CX88_BOARD_KWORLD_DVB_T:
  2588. case CX88_BOARD_DNTV_LIVE_DVB_T:
  2589. cx_set(MO_GP0_IO, 0x00000707);
  2590. cx_set(MO_GP2_IO, 0x00000101);
  2591. cx_clear(MO_GP2_IO, 0x00000001);
  2592. msleep(1);
  2593. cx_clear(MO_GP0_IO, 0x00000007);
  2594. cx_set(MO_GP2_IO, 0x00000101);
  2595. break;
  2596. case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
  2597. cx_write(MO_GP0_IO, 0x00080808);
  2598. break;
  2599. case CX88_BOARD_ATI_HDTVWONDER:
  2600. if (0 == core->i2c_rc) {
  2601. /* enable tuner */
  2602. int i;
  2603. static const u8 buffer [][2] = {
  2604. {0x10,0x12},
  2605. {0x13,0x04},
  2606. {0x16,0x00},
  2607. {0x14,0x04},
  2608. {0x17,0x00}
  2609. };
  2610. core->i2c_client.addr = 0x0a;
  2611. for (i = 0; i < ARRAY_SIZE(buffer); i++)
  2612. if (2 != i2c_master_send(&core->i2c_client,
  2613. buffer[i],2))
  2614. warn_printk(core, "Unable to enable "
  2615. "tuner(%i).\n", i);
  2616. }
  2617. break;
  2618. case CX88_BOARD_MSI_TVANYWHERE_MASTER:
  2619. {
  2620. struct v4l2_priv_tun_config tea5767_cfg;
  2621. struct tea5767_ctrl ctl;
  2622. memset(&ctl, 0, sizeof(ctl));
  2623. ctl.high_cut = 1;
  2624. ctl.st_noise = 1;
  2625. ctl.deemph_75 = 1;
  2626. ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
  2627. tea5767_cfg.tuner = TUNER_TEA5767;
  2628. tea5767_cfg.priv = &ctl;
  2629. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
  2630. break;
  2631. }
  2632. case CX88_BOARD_TEVII_S460:
  2633. cx_write(MO_SRST_IO, 0);
  2634. msleep(100);
  2635. cx_write(MO_SRST_IO, 1);
  2636. msleep(100);
  2637. break;
  2638. case CX88_BOARD_OMICOM_SS4_PCI:
  2639. cx_write(MO_SRST_IO, 0);
  2640. msleep(100);
  2641. cx_write(MO_SRST_IO, 1);
  2642. msleep(100);
  2643. break;
  2644. case CX88_BOARD_TBS_8920:
  2645. cx_write(MO_SRST_IO, 0);
  2646. msleep(100);
  2647. cx_write(MO_SRST_IO, 1);
  2648. msleep(100);
  2649. break;
  2650. } /*end switch() */
  2651. /* Setup tuners */
  2652. if ((core->board.radio_type != UNSET)) {
  2653. tun_setup.mode_mask = T_RADIO;
  2654. tun_setup.type = core->board.radio_type;
  2655. tun_setup.addr = core->board.radio_addr;
  2656. tun_setup.tuner_callback = cx88_tuner_callback;
  2657. cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
  2658. mode_mask &= ~T_RADIO;
  2659. }
  2660. if (core->board.tuner_type != TUNER_ABSENT) {
  2661. tun_setup.mode_mask = mode_mask;
  2662. tun_setup.type = core->board.tuner_type;
  2663. tun_setup.addr = core->board.tuner_addr;
  2664. tun_setup.tuner_callback = cx88_tuner_callback;
  2665. cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
  2666. }
  2667. if (core->board.tda9887_conf) {
  2668. struct v4l2_priv_tun_config tda9887_cfg;
  2669. tda9887_cfg.tuner = TUNER_TDA9887;
  2670. tda9887_cfg.priv = &core->board.tda9887_conf;
  2671. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tda9887_cfg);
  2672. }
  2673. if (core->board.tuner_type == TUNER_XC2028) {
  2674. struct v4l2_priv_tun_config xc2028_cfg;
  2675. struct xc2028_ctrl ctl;
  2676. /* Fills device-dependent initialization parameters */
  2677. cx88_setup_xc3028(core, &ctl);
  2678. /* Sends parameters to xc2028/3028 tuner */
  2679. memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
  2680. xc2028_cfg.tuner = TUNER_XC2028;
  2681. xc2028_cfg.priv = &ctl;
  2682. info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
  2683. ctl.fname);
  2684. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg);
  2685. }
  2686. cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
  2687. }
  2688. /* ------------------------------------------------------------------ */
  2689. static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
  2690. {
  2691. unsigned int lat = UNSET;
  2692. u8 ctrl = 0;
  2693. u8 value;
  2694. /* check pci quirks */
  2695. if (pci_pci_problems & PCIPCI_TRITON) {
  2696. printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
  2697. name);
  2698. ctrl |= CX88X_EN_TBFX;
  2699. }
  2700. if (pci_pci_problems & PCIPCI_NATOMA) {
  2701. printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
  2702. name);
  2703. ctrl |= CX88X_EN_TBFX;
  2704. }
  2705. if (pci_pci_problems & PCIPCI_VIAETBF) {
  2706. printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
  2707. name);
  2708. ctrl |= CX88X_EN_TBFX;
  2709. }
  2710. if (pci_pci_problems & PCIPCI_VSFX) {
  2711. printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
  2712. name);
  2713. ctrl |= CX88X_EN_VSFX;
  2714. }
  2715. #ifdef PCIPCI_ALIMAGIK
  2716. if (pci_pci_problems & PCIPCI_ALIMAGIK) {
  2717. printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
  2718. name);
  2719. lat = 0x0A;
  2720. }
  2721. #endif
  2722. /* check insmod options */
  2723. if (UNSET != latency)
  2724. lat = latency;
  2725. /* apply stuff */
  2726. if (ctrl) {
  2727. pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
  2728. value |= ctrl;
  2729. pci_write_config_byte(pci, CX88X_DEVCTRL, value);
  2730. }
  2731. if (UNSET != lat) {
  2732. printk(KERN_INFO "%s: setting pci latency timer to %d\n",
  2733. name, latency);
  2734. pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
  2735. }
  2736. return 0;
  2737. }
  2738. int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
  2739. {
  2740. if (request_mem_region(pci_resource_start(pci,0),
  2741. pci_resource_len(pci,0),
  2742. core->name))
  2743. return 0;
  2744. printk(KERN_ERR
  2745. "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
  2746. core->name, PCI_FUNC(pci->devfn),
  2747. (unsigned long long)pci_resource_start(pci, 0),
  2748. pci->subsystem_vendor, pci->subsystem_device);
  2749. return -EBUSY;
  2750. }
  2751. /* Allocate and initialize the cx88 core struct. One should hold the
  2752. * devlist mutex before calling this. */
  2753. struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
  2754. {
  2755. struct cx88_core *core;
  2756. int i;
  2757. core = kzalloc(sizeof(*core), GFP_KERNEL);
  2758. atomic_inc(&core->refcount);
  2759. core->pci_bus = pci->bus->number;
  2760. core->pci_slot = PCI_SLOT(pci->devfn);
  2761. core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
  2762. PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
  2763. PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
  2764. mutex_init(&core->lock);
  2765. core->nr = nr;
  2766. sprintf(core->name, "cx88[%d]", core->nr);
  2767. if (0 != cx88_get_resources(core, pci)) {
  2768. kfree(core);
  2769. return NULL;
  2770. }
  2771. /* PCI stuff */
  2772. cx88_pci_quirks(core->name, pci);
  2773. core->lmmio = ioremap(pci_resource_start(pci, 0),
  2774. pci_resource_len(pci, 0));
  2775. core->bmmio = (u8 __iomem *)core->lmmio;
  2776. /* board config */
  2777. core->boardnr = UNSET;
  2778. if (card[core->nr] < ARRAY_SIZE(cx88_boards))
  2779. core->boardnr = card[core->nr];
  2780. for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
  2781. if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
  2782. pci->subsystem_device == cx88_subids[i].subdevice)
  2783. core->boardnr = cx88_subids[i].card;
  2784. if (UNSET == core->boardnr) {
  2785. core->boardnr = CX88_BOARD_UNKNOWN;
  2786. cx88_card_list(core, pci);
  2787. }
  2788. memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
  2789. info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
  2790. pci->subsystem_vendor, pci->subsystem_device, core->board.name,
  2791. core->boardnr, card[core->nr] == core->boardnr ?
  2792. "insmod option" : "autodetected");
  2793. if (tuner[core->nr] != UNSET)
  2794. core->board.tuner_type = tuner[core->nr];
  2795. if (radio[core->nr] != UNSET)
  2796. core->board.radio_type = radio[core->nr];
  2797. info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
  2798. core->board.tuner_type, core->board.radio_type);
  2799. /* init hardware */
  2800. cx88_reset(core);
  2801. cx88_card_setup_pre_i2c(core);
  2802. cx88_i2c_init(core, pci);
  2803. /* load tuner module, if needed */
  2804. if (TUNER_ABSENT != core->board.tuner_type)
  2805. request_module("tuner");
  2806. cx88_card_setup(core);
  2807. cx88_ir_init(core, pci);
  2808. return core;
  2809. }