cx88-cards.c 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026
  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. /*
  1339. * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
  1340. */
  1341. .input = {{
  1342. .type = CX88_VMUX_TELEVISION,
  1343. .vmux = 0,
  1344. .gpio0 = 0xef88,
  1345. .audioroute = 1,
  1346. },{
  1347. .type = CX88_VMUX_COMPOSITE1,
  1348. .vmux = 1,
  1349. .gpio0 = 0xef88,
  1350. .audioroute = 2,
  1351. },{
  1352. .type = CX88_VMUX_SVIDEO,
  1353. .vmux = 2,
  1354. .gpio0 = 0xef88,
  1355. .audioroute = 2,
  1356. }},
  1357. /* fixme: Add radio support */
  1358. .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
  1359. .radio = {
  1360. .type = CX88_RADIO,
  1361. .gpio0 = 0xef88,
  1362. },
  1363. },
  1364. [CX88_BOARD_ADSTECH_PTV_390] = {
  1365. .name = "ADS Tech Instant Video PCI",
  1366. .tuner_type = TUNER_ABSENT,
  1367. .radio_type = UNSET,
  1368. .tuner_addr = ADDR_UNSET,
  1369. .radio_addr = ADDR_UNSET,
  1370. .input = {{
  1371. .type = CX88_VMUX_DEBUG,
  1372. .vmux = 3,
  1373. .gpio0 = 0x04ff,
  1374. },{
  1375. .type = CX88_VMUX_COMPOSITE1,
  1376. .vmux = 1,
  1377. .gpio0 = 0x07fa,
  1378. },{
  1379. .type = CX88_VMUX_SVIDEO,
  1380. .vmux = 2,
  1381. .gpio0 = 0x07fa,
  1382. }},
  1383. },
  1384. [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
  1385. .name = "Pinnacle PCTV HD 800i",
  1386. .tuner_type = TUNER_XC5000,
  1387. .radio_type = UNSET,
  1388. .tuner_addr = ADDR_UNSET,
  1389. .radio_addr = ADDR_UNSET,
  1390. .input = {{
  1391. .type = CX88_VMUX_TELEVISION,
  1392. .vmux = 0,
  1393. .gpio0 = 0x04fb,
  1394. .gpio1 = 0x10ff,
  1395. },{
  1396. .type = CX88_VMUX_COMPOSITE1,
  1397. .vmux = 1,
  1398. .gpio0 = 0x04fb,
  1399. .gpio1 = 0x10ef,
  1400. .audioroute = 1,
  1401. },{
  1402. .type = CX88_VMUX_SVIDEO,
  1403. .vmux = 2,
  1404. .gpio0 = 0x04fb,
  1405. .gpio1 = 0x10ef,
  1406. .audioroute = 1,
  1407. }},
  1408. .mpeg = CX88_MPEG_DVB,
  1409. },
  1410. [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
  1411. .name = "DViCO FusionHDTV 5 PCI nano",
  1412. /* xc3008 tuner, digital only for now */
  1413. .tuner_type = TUNER_ABSENT,
  1414. .radio_type = UNSET,
  1415. .tuner_addr = ADDR_UNSET,
  1416. .radio_addr = ADDR_UNSET,
  1417. .input = {{
  1418. .type = CX88_VMUX_TELEVISION,
  1419. .vmux = 0,
  1420. .gpio0 = 0x000027df, /* Unconfirmed */
  1421. }, {
  1422. .type = CX88_VMUX_COMPOSITE1,
  1423. .vmux = 1,
  1424. .gpio0 = 0x000027df, /* Unconfirmed */
  1425. .audioroute = 1,
  1426. }, {
  1427. .type = CX88_VMUX_SVIDEO,
  1428. .vmux = 2,
  1429. .gpio0 = 0x000027df, /* Unconfirmed */
  1430. .audioroute = 1,
  1431. } },
  1432. .mpeg = CX88_MPEG_DVB,
  1433. },
  1434. [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
  1435. .name = "Pinnacle Hybrid PCTV",
  1436. .tuner_type = TUNER_XC2028,
  1437. .tuner_addr = 0x61,
  1438. .radio_type = TUNER_XC2028,
  1439. .radio_addr = 0x61,
  1440. .input = { {
  1441. .type = CX88_VMUX_TELEVISION,
  1442. .vmux = 0,
  1443. .gpio0 = 0x004ff,
  1444. .gpio1 = 0x010ff,
  1445. .gpio2 = 0x00001,
  1446. }, {
  1447. .type = CX88_VMUX_COMPOSITE1,
  1448. .vmux = 1,
  1449. .gpio0 = 0x004fb,
  1450. .gpio1 = 0x010ef,
  1451. .audioroute = 1,
  1452. }, {
  1453. .type = CX88_VMUX_SVIDEO,
  1454. .vmux = 2,
  1455. .gpio0 = 0x004fb,
  1456. .gpio1 = 0x010ef,
  1457. .audioroute = 1,
  1458. } },
  1459. .radio = {
  1460. .type = CX88_RADIO,
  1461. .gpio0 = 0x004ff,
  1462. .gpio1 = 0x010ff,
  1463. .gpio2 = 0x0ff,
  1464. },
  1465. .mpeg = CX88_MPEG_DVB,
  1466. },
  1467. [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
  1468. .name = "Winfast TV2000 XP Global",
  1469. .tuner_type = TUNER_XC2028,
  1470. .tuner_addr = 0x61,
  1471. .input = { {
  1472. .type = CX88_VMUX_TELEVISION,
  1473. .vmux = 0,
  1474. .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
  1475. .gpio1 = 0x0000,
  1476. .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
  1477. }, {
  1478. .type = CX88_VMUX_COMPOSITE1,
  1479. .vmux = 1,
  1480. .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
  1481. .gpio1 = 0x0000,
  1482. .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
  1483. }, {
  1484. .type = CX88_VMUX_SVIDEO,
  1485. .vmux = 2,
  1486. } },
  1487. .radio = {
  1488. .type = CX88_RADIO,
  1489. .gpio0 = 0x004ff,
  1490. .gpio1 = 0x010ff,
  1491. .gpio2 = 0x0ff,
  1492. },
  1493. },
  1494. [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
  1495. .name = "PowerColor RA330", /* Long names may confuse LIRC. */
  1496. .tuner_type = TUNER_XC2028,
  1497. .tuner_addr = 0x61,
  1498. .input = { {
  1499. .type = CX88_VMUX_DEBUG,
  1500. .vmux = 3, /* Due to the way the cx88 driver is written, */
  1501. .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
  1502. .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
  1503. .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
  1504. }, { /* from the tuner on boot for a little while. */
  1505. .type = CX88_VMUX_TELEVISION,
  1506. .vmux = 0,
  1507. .gpio0 = 0x00ff,
  1508. .gpio1 = 0xf35d,
  1509. .gpio3 = 0x0000,
  1510. }, {
  1511. .type = CX88_VMUX_COMPOSITE1,
  1512. .vmux = 1,
  1513. .gpio0 = 0x00ff,
  1514. .gpio1 = 0xf37d,
  1515. .gpio3 = 0x0000,
  1516. }, {
  1517. .type = CX88_VMUX_SVIDEO,
  1518. .vmux = 2,
  1519. .gpio0 = 0x000ff,
  1520. .gpio1 = 0x0f37d,
  1521. .gpio3 = 0x00000,
  1522. } },
  1523. .radio = {
  1524. .type = CX88_RADIO,
  1525. .gpio0 = 0x000ff,
  1526. .gpio1 = 0x0f35d,
  1527. .gpio3 = 0x00000,
  1528. },
  1529. },
  1530. [CX88_BOARD_GENIATECH_X8000_MT] = {
  1531. /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
  1532. .name = "Geniatech X8000-MT DVBT",
  1533. .tuner_type = TUNER_XC2028,
  1534. .tuner_addr = 0x61,
  1535. .input = { {
  1536. .type = CX88_VMUX_TELEVISION,
  1537. .vmux = 0,
  1538. .gpio0 = 0x00000000,
  1539. .gpio1 = 0x00e3e341,
  1540. .gpio2 = 0x00000000,
  1541. .gpio3 = 0x00000000,
  1542. }, {
  1543. .type = CX88_VMUX_COMPOSITE1,
  1544. .vmux = 1,
  1545. .gpio0 = 0x00000000,
  1546. .gpio1 = 0x00e3e361,
  1547. .gpio2 = 0x00000000,
  1548. .gpio3 = 0x00000000,
  1549. }, {
  1550. .type = CX88_VMUX_SVIDEO,
  1551. .vmux = 2,
  1552. .gpio0 = 0x00000000,
  1553. .gpio1 = 0x00e3e361,
  1554. .gpio2 = 0x00000000,
  1555. .gpio3 = 0x00000000,
  1556. } },
  1557. .radio = {
  1558. .type = CX88_RADIO,
  1559. .gpio0 = 0x00000000,
  1560. .gpio1 = 0x00e3e341,
  1561. .gpio2 = 0x00000000,
  1562. .gpio3 = 0x00000000,
  1563. },
  1564. .mpeg = CX88_MPEG_DVB,
  1565. },
  1566. [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
  1567. .name = "DViCO FusionHDTV DVB-T PRO",
  1568. .tuner_type = TUNER_ABSENT, /* XXX: Has XC3028 */
  1569. .radio_type = UNSET,
  1570. .tuner_addr = ADDR_UNSET,
  1571. .radio_addr = ADDR_UNSET,
  1572. .input = { {
  1573. .type = CX88_VMUX_COMPOSITE1,
  1574. .vmux = 1,
  1575. .gpio0 = 0x000067df,
  1576. }, {
  1577. .type = CX88_VMUX_SVIDEO,
  1578. .vmux = 2,
  1579. .gpio0 = 0x000067df,
  1580. } },
  1581. .mpeg = CX88_MPEG_DVB,
  1582. },
  1583. [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
  1584. .name = "DViCO FusionHDTV 7 Gold",
  1585. .tuner_type = TUNER_XC5000,
  1586. .radio_type = UNSET,
  1587. .tuner_addr = ADDR_UNSET,
  1588. .radio_addr = ADDR_UNSET,
  1589. .input = {{
  1590. .type = CX88_VMUX_TELEVISION,
  1591. .vmux = 0,
  1592. .gpio0 = 0x10df,
  1593. },{
  1594. .type = CX88_VMUX_COMPOSITE1,
  1595. .vmux = 1,
  1596. .gpio0 = 0x16d9,
  1597. },{
  1598. .type = CX88_VMUX_SVIDEO,
  1599. .vmux = 2,
  1600. .gpio0 = 0x16d9,
  1601. }},
  1602. .mpeg = CX88_MPEG_DVB,
  1603. },
  1604. [CX88_BOARD_PROLINK_PV_8000GT] = {
  1605. .name = "Prolink Pixelview MPEG 8000GT",
  1606. .tuner_type = TUNER_XC2028,
  1607. .tuner_addr = 0x61,
  1608. .input = { {
  1609. .type = CX88_VMUX_TELEVISION,
  1610. .vmux = 0,
  1611. .gpio0 = 0x0ff,
  1612. .gpio2 = 0x0cfb,
  1613. }, {
  1614. .type = CX88_VMUX_COMPOSITE1,
  1615. .vmux = 1,
  1616. .gpio2 = 0x0cfb,
  1617. }, {
  1618. .type = CX88_VMUX_SVIDEO,
  1619. .vmux = 2,
  1620. .gpio2 = 0x0cfb,
  1621. } },
  1622. .radio = {
  1623. .type = CX88_RADIO,
  1624. .gpio2 = 0x0cfb,
  1625. },
  1626. },
  1627. [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
  1628. .name = "Prolink Pixelview Global Extreme",
  1629. .tuner_type = TUNER_XC2028,
  1630. .tuner_addr = 0x61,
  1631. .input = { {
  1632. .type = CX88_VMUX_TELEVISION,
  1633. .vmux = 0,
  1634. .gpio0 = 0x04fb,
  1635. .gpio1 = 0x04080,
  1636. .gpio2 = 0x0cf7,
  1637. }, {
  1638. .type = CX88_VMUX_COMPOSITE1,
  1639. .vmux = 1,
  1640. .gpio0 = 0x04fb,
  1641. .gpio1 = 0x04080,
  1642. .gpio2 = 0x0cfb,
  1643. }, {
  1644. .type = CX88_VMUX_SVIDEO,
  1645. .vmux = 2,
  1646. .gpio0 = 0x04fb,
  1647. .gpio1 = 0x04080,
  1648. .gpio2 = 0x0cfb,
  1649. } },
  1650. .radio = {
  1651. .type = CX88_RADIO,
  1652. .gpio0 = 0x04ff,
  1653. .gpio1 = 0x04080,
  1654. .gpio2 = 0x0cf7,
  1655. },
  1656. },
  1657. /* Both radio, analog and ATSC work with this board.
  1658. However, for analog to work, s5h1409 gate should be open,
  1659. otherwise, tuner-xc3028 won't be detected.
  1660. A proper fix require using the newer i2c methods to add
  1661. tuner-xc3028 without doing an i2c probe.
  1662. */
  1663. [CX88_BOARD_KWORLD_ATSC_120] = {
  1664. .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
  1665. .tuner_type = TUNER_XC2028,
  1666. .radio_type = UNSET,
  1667. .tuner_addr = ADDR_UNSET,
  1668. .radio_addr = ADDR_UNSET,
  1669. .input = { {
  1670. .type = CX88_VMUX_TELEVISION,
  1671. .vmux = 0,
  1672. .gpio0 = 0x000000ff,
  1673. .gpio1 = 0x0000f35d,
  1674. .gpio2 = 0x00000000,
  1675. }, {
  1676. .type = CX88_VMUX_COMPOSITE1,
  1677. .vmux = 1,
  1678. .gpio0 = 0x000000ff,
  1679. .gpio1 = 0x0000f37e,
  1680. .gpio2 = 0x00000000,
  1681. }, {
  1682. .type = CX88_VMUX_SVIDEO,
  1683. .vmux = 2,
  1684. .gpio0 = 0x000000ff,
  1685. .gpio1 = 0x0000f37e,
  1686. .gpio2 = 0x00000000,
  1687. } },
  1688. .radio = {
  1689. .type = CX88_RADIO,
  1690. .gpio0 = 0x000000ff,
  1691. .gpio1 = 0x0000f35d,
  1692. .gpio2 = 0x00000000,
  1693. },
  1694. .mpeg = CX88_MPEG_DVB,
  1695. },
  1696. [CX88_BOARD_HAUPPAUGE_HVR4000] = {
  1697. .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
  1698. .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
  1699. .radio_type = UNSET,
  1700. .tuner_addr = ADDR_UNSET,
  1701. .radio_addr = ADDR_UNSET,
  1702. .tda9887_conf = TDA9887_PRESENT,
  1703. /*
  1704. * GPIO0 (WINTV2000)
  1705. *
  1706. * Analogue SAT DVB-T
  1707. * Antenna 0xc4bf 0xc4bb
  1708. * Composite 0xc4bf 0xc4bb
  1709. * S-Video 0xc4bf 0xc4bb
  1710. * Composite1 0xc4ff 0xc4fb
  1711. * S-Video1 0xc4ff 0xc4fb
  1712. *
  1713. * BIT VALUE FUNCTION GP{x}_IO
  1714. * 0 1 I:?
  1715. * 1 1 I:?
  1716. * 2 1 O:DVB-T DEMOD ENABLE LOW/ANALOG DEMOD ENABLE HIGH
  1717. * 3 1 I:?
  1718. * 4 1 I:?
  1719. * 5 1 I:?
  1720. * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
  1721. * 7 1 O:DVB-T DEMOD RESET LOW
  1722. *
  1723. * BIT VALUE FUNCTION GP{x}_OE
  1724. * 8 0 I
  1725. * 9 0 I
  1726. * a 1 O
  1727. * b 0 I
  1728. * c 0 I
  1729. * d 0 I
  1730. * e 1 O
  1731. * f 1 O
  1732. */
  1733. .input = {{
  1734. .type = CX88_VMUX_TELEVISION,
  1735. .vmux = 0,
  1736. .gpio0 = 0xc4bf,
  1737. }, {
  1738. .type = CX88_VMUX_COMPOSITE1,
  1739. .vmux = 1,
  1740. .gpio0 = 0xc4bf,
  1741. }, {
  1742. .type = CX88_VMUX_SVIDEO,
  1743. .vmux = 2,
  1744. .gpio0 = 0xc4bf,
  1745. } },
  1746. /* fixme: Add radio support */
  1747. .mpeg = CX88_MPEG_DVB,
  1748. },
  1749. [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
  1750. .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
  1751. .tuner_type = UNSET,
  1752. .radio_type = UNSET,
  1753. .tuner_addr = ADDR_UNSET,
  1754. .radio_addr = ADDR_UNSET,
  1755. .input = {{
  1756. .type = CX88_VMUX_DVB,
  1757. .vmux = 0,
  1758. } },
  1759. .mpeg = CX88_MPEG_DVB,
  1760. },
  1761. [CX88_BOARD_TEVII_S420] = {
  1762. .name = "TeVii S420 DVB-S",
  1763. .tuner_type = UNSET,
  1764. .radio_type = UNSET,
  1765. .tuner_addr = ADDR_UNSET,
  1766. .radio_addr = ADDR_UNSET,
  1767. .input = {{
  1768. .type = CX88_VMUX_DVB,
  1769. .vmux = 0,
  1770. } },
  1771. .mpeg = CX88_MPEG_DVB,
  1772. },
  1773. [CX88_BOARD_TEVII_S460] = {
  1774. .name = "TeVii S460 DVB-S/S2",
  1775. .tuner_type = UNSET,
  1776. .radio_type = UNSET,
  1777. .tuner_addr = ADDR_UNSET,
  1778. .radio_addr = ADDR_UNSET,
  1779. .input = {{
  1780. .type = CX88_VMUX_DVB,
  1781. .vmux = 0,
  1782. } },
  1783. .mpeg = CX88_MPEG_DVB,
  1784. },
  1785. [CX88_BOARD_OMICOM_SS4_PCI] = {
  1786. .name = "Omicom SS4 DVB-S/S2 PCI",
  1787. .tuner_type = UNSET,
  1788. .radio_type = UNSET,
  1789. .tuner_addr = ADDR_UNSET,
  1790. .radio_addr = ADDR_UNSET,
  1791. .input = {{
  1792. .type = CX88_VMUX_DVB,
  1793. .vmux = 0,
  1794. } },
  1795. .mpeg = CX88_MPEG_DVB,
  1796. },
  1797. [CX88_BOARD_TBS_8920] = {
  1798. .name = "TBS 8920 DVB-S/S2",
  1799. .tuner_type = TUNER_ABSENT,
  1800. .radio_type = UNSET,
  1801. .tuner_addr = ADDR_UNSET,
  1802. .radio_addr = ADDR_UNSET,
  1803. .input = {{
  1804. .type = CX88_VMUX_DVB,
  1805. .vmux = 1,
  1806. } },
  1807. .mpeg = CX88_MPEG_DVB,
  1808. },
  1809. };
  1810. /* ------------------------------------------------------------------ */
  1811. /* PCI subsystem IDs */
  1812. static const struct cx88_subid cx88_subids[] = {
  1813. {
  1814. .subvendor = 0x0070,
  1815. .subdevice = 0x3400,
  1816. .card = CX88_BOARD_HAUPPAUGE,
  1817. },{
  1818. .subvendor = 0x0070,
  1819. .subdevice = 0x3401,
  1820. .card = CX88_BOARD_HAUPPAUGE,
  1821. },{
  1822. .subvendor = 0x14c7,
  1823. .subdevice = 0x0106,
  1824. .card = CX88_BOARD_GDI,
  1825. },{
  1826. .subvendor = 0x14c7,
  1827. .subdevice = 0x0107, /* with mpeg encoder */
  1828. .card = CX88_BOARD_GDI,
  1829. },{
  1830. .subvendor = PCI_VENDOR_ID_ATI,
  1831. .subdevice = 0x00f8,
  1832. .card = CX88_BOARD_ATI_WONDER_PRO,
  1833. },{
  1834. .subvendor = 0x107d,
  1835. .subdevice = 0x6611,
  1836. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1837. },{
  1838. .subvendor = 0x107d,
  1839. .subdevice = 0x6613, /* NTSC */
  1840. .card = CX88_BOARD_WINFAST2000XP_EXPERT,
  1841. },{
  1842. .subvendor = 0x107d,
  1843. .subdevice = 0x6620,
  1844. .card = CX88_BOARD_WINFAST_DV2000,
  1845. },{
  1846. .subvendor = 0x107d,
  1847. .subdevice = 0x663b,
  1848. .card = CX88_BOARD_LEADTEK_PVR2000,
  1849. },{
  1850. .subvendor = 0x107d,
  1851. .subdevice = 0x663c,
  1852. .card = CX88_BOARD_LEADTEK_PVR2000,
  1853. },{
  1854. .subvendor = 0x1461,
  1855. .subdevice = 0x000b,
  1856. .card = CX88_BOARD_AVERTV_STUDIO_303,
  1857. },{
  1858. .subvendor = 0x1462,
  1859. .subdevice = 0x8606,
  1860. .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
  1861. },{
  1862. .subvendor = 0x10fc,
  1863. .subdevice = 0xd003,
  1864. .card = CX88_BOARD_IODATA_GVVCP3PCI,
  1865. },{
  1866. .subvendor = 0x1043,
  1867. .subdevice = 0x4823, /* with mpeg encoder */
  1868. .card = CX88_BOARD_ASUS_PVR_416,
  1869. },{
  1870. .subvendor = 0x17de,
  1871. .subdevice = 0x08a6,
  1872. .card = CX88_BOARD_KWORLD_DVB_T,
  1873. },{
  1874. .subvendor = 0x18ac,
  1875. .subdevice = 0xd810,
  1876. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  1877. },{
  1878. .subvendor = 0x18ac,
  1879. .subdevice = 0xd820,
  1880. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
  1881. },{
  1882. .subvendor = 0x18ac,
  1883. .subdevice = 0xdb00,
  1884. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
  1885. },{
  1886. .subvendor = 0x0070,
  1887. .subdevice = 0x9002,
  1888. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1889. },{
  1890. .subvendor = 0x14f1,
  1891. .subdevice = 0x0187,
  1892. .card = CX88_BOARD_CONEXANT_DVB_T1,
  1893. },{
  1894. .subvendor = 0x1540,
  1895. .subdevice = 0x2580,
  1896. .card = CX88_BOARD_PROVIDEO_PV259,
  1897. },{
  1898. .subvendor = 0x18ac,
  1899. .subdevice = 0xdb10,
  1900. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  1901. },{
  1902. .subvendor = 0x1554,
  1903. .subdevice = 0x4811,
  1904. .card = CX88_BOARD_PIXELVIEW,
  1905. },{
  1906. .subvendor = 0x7063,
  1907. .subdevice = 0x3000, /* HD-3000 card */
  1908. .card = CX88_BOARD_PCHDTV_HD3000,
  1909. },{
  1910. .subvendor = 0x17de,
  1911. .subdevice = 0xa8a6,
  1912. .card = CX88_BOARD_DNTV_LIVE_DVB_T,
  1913. },{
  1914. .subvendor = 0x0070,
  1915. .subdevice = 0x2801,
  1916. .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
  1917. },{
  1918. .subvendor = 0x14f1,
  1919. .subdevice = 0x0342,
  1920. .card = CX88_BOARD_DIGITALLOGIC_MEC,
  1921. },{
  1922. .subvendor = 0x10fc,
  1923. .subdevice = 0xd035,
  1924. .card = CX88_BOARD_IODATA_GVBCTV7E,
  1925. },{
  1926. .subvendor = 0x1421,
  1927. .subdevice = 0x0334,
  1928. .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
  1929. },{
  1930. .subvendor = 0x153b,
  1931. .subdevice = 0x1166,
  1932. .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
  1933. },{
  1934. .subvendor = 0x18ac,
  1935. .subdevice = 0xd500,
  1936. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
  1937. },{
  1938. .subvendor = 0x1461,
  1939. .subdevice = 0x8011,
  1940. .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
  1941. },{
  1942. .subvendor = PCI_VENDOR_ID_ATI,
  1943. .subdevice = 0xa101,
  1944. .card = CX88_BOARD_ATI_HDTVWONDER,
  1945. },{
  1946. .subvendor = 0x107d,
  1947. .subdevice = 0x665f,
  1948. .card = CX88_BOARD_WINFAST_DTV1000,
  1949. },{
  1950. .subvendor = 0x1461,
  1951. .subdevice = 0x000a,
  1952. .card = CX88_BOARD_AVERTV_303,
  1953. },{
  1954. .subvendor = 0x0070,
  1955. .subdevice = 0x9200,
  1956. .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
  1957. },{
  1958. .subvendor = 0x0070,
  1959. .subdevice = 0x9201,
  1960. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1961. },{
  1962. .subvendor = 0x0070,
  1963. .subdevice = 0x9202,
  1964. .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
  1965. },{
  1966. .subvendor = 0x17de,
  1967. .subdevice = 0x08b2,
  1968. .card = CX88_BOARD_KWORLD_DVBS_100,
  1969. },{
  1970. .subvendor = 0x0070,
  1971. .subdevice = 0x9400,
  1972. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1973. },{
  1974. .subvendor = 0x0070,
  1975. .subdevice = 0x9402,
  1976. .card = CX88_BOARD_HAUPPAUGE_HVR1100,
  1977. },{
  1978. .subvendor = 0x0070,
  1979. .subdevice = 0x9800,
  1980. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1981. },{
  1982. .subvendor = 0x0070,
  1983. .subdevice = 0x9802,
  1984. .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
  1985. },{
  1986. .subvendor = 0x0070,
  1987. .subdevice = 0x9001,
  1988. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  1989. },{
  1990. .subvendor = 0x1822,
  1991. .subdevice = 0x0025,
  1992. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  1993. },{
  1994. .subvendor = 0x17de,
  1995. .subdevice = 0x08a1,
  1996. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  1997. },{
  1998. .subvendor = 0x18ac,
  1999. .subdevice = 0xdb50,
  2000. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  2001. },{
  2002. .subvendor = 0x18ac,
  2003. .subdevice = 0xdb54,
  2004. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
  2005. /* Re-branded DViCO: DigitalNow DVB-T Dual */
  2006. },{
  2007. .subvendor = 0x18ac,
  2008. .subdevice = 0xdb11,
  2009. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
  2010. /* Re-branded DViCO: UltraView DVB-T Plus */
  2011. }, {
  2012. .subvendor = 0x18ac,
  2013. .subdevice = 0xdb30,
  2014. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
  2015. }, {
  2016. .subvendor = 0x17de,
  2017. .subdevice = 0x0840,
  2018. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  2019. },{
  2020. .subvendor = 0x1421,
  2021. .subdevice = 0x0305,
  2022. .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
  2023. },{
  2024. .subvendor = 0x18ac,
  2025. .subdevice = 0xdb40,
  2026. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  2027. },{
  2028. .subvendor = 0x18ac,
  2029. .subdevice = 0xdb44,
  2030. .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
  2031. },{
  2032. .subvendor = 0x7063,
  2033. .subdevice = 0x5500,
  2034. .card = CX88_BOARD_PCHDTV_HD5500,
  2035. },{
  2036. .subvendor = 0x17de,
  2037. .subdevice = 0x0841,
  2038. .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
  2039. },{
  2040. .subvendor = 0x1822,
  2041. .subdevice = 0x0019,
  2042. .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
  2043. },{
  2044. .subvendor = 0x1554,
  2045. .subdevice = 0x4813,
  2046. .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
  2047. },{
  2048. .subvendor = 0x14f1,
  2049. .subdevice = 0x0842,
  2050. .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
  2051. },{
  2052. .subvendor = 0x107d,
  2053. .subdevice = 0x665e,
  2054. .card = CX88_BOARD_WINFAST_DTV2000H,
  2055. },{
  2056. .subvendor = 0x18ac,
  2057. .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
  2058. .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
  2059. },{
  2060. .subvendor = 0x14f1,
  2061. .subdevice = 0x0084,
  2062. .card = CX88_BOARD_GENIATECH_DVBS,
  2063. },{
  2064. .subvendor = 0x0070,
  2065. .subdevice = 0x1404,
  2066. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2067. },{
  2068. .subvendor = 0x1461,
  2069. .subdevice = 0xc111, /* AverMedia M150-D */
  2070. /* This board is known to work with the ASUS PVR416 config */
  2071. .card = CX88_BOARD_ASUS_PVR_416,
  2072. },{
  2073. .subvendor = 0xc180,
  2074. .subdevice = 0xc980,
  2075. .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
  2076. },{
  2077. .subvendor = 0x0070,
  2078. .subdevice = 0x9600,
  2079. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2080. },{
  2081. .subvendor = 0x0070,
  2082. .subdevice = 0x9601,
  2083. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2084. },{
  2085. .subvendor = 0x0070,
  2086. .subdevice = 0x9602,
  2087. .card = CX88_BOARD_HAUPPAUGE_HVR1300,
  2088. },{
  2089. .subvendor = 0x107d,
  2090. .subdevice = 0x6632,
  2091. .card = CX88_BOARD_LEADTEK_PVR2000,
  2092. },{
  2093. .subvendor = 0x12ab,
  2094. .subdevice = 0x2300, /* Club3D Zap TV2100 */
  2095. .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
  2096. },{
  2097. .subvendor = 0x0070,
  2098. .subdevice = 0x9000,
  2099. .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
  2100. },{
  2101. .subvendor = 0x0070,
  2102. .subdevice = 0x1400,
  2103. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2104. },{
  2105. .subvendor = 0x0070,
  2106. .subdevice = 0x1401,
  2107. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2108. },{
  2109. .subvendor = 0x0070,
  2110. .subdevice = 0x1402,
  2111. .card = CX88_BOARD_HAUPPAUGE_HVR3000,
  2112. },{
  2113. .subvendor = 0x1421,
  2114. .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
  2115. .card = CX88_BOARD_KWORLD_DVBS_100,
  2116. },{
  2117. .subvendor = 0x1421,
  2118. .subdevice = 0x0390,
  2119. .card = CX88_BOARD_ADSTECH_PTV_390,
  2120. },{
  2121. .subvendor = 0x11bd,
  2122. .subdevice = 0x0051,
  2123. .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
  2124. }, {
  2125. .subvendor = 0x18ac,
  2126. .subdevice = 0xd530,
  2127. .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
  2128. }, {
  2129. .subvendor = 0x12ab,
  2130. .subdevice = 0x1788,
  2131. .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
  2132. }, {
  2133. .subvendor = 0x14f1,
  2134. .subdevice = 0xea3d,
  2135. .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
  2136. }, {
  2137. .subvendor = 0x107d,
  2138. .subdevice = 0x6f18,
  2139. .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
  2140. }, {
  2141. .subvendor = 0x14f1,
  2142. .subdevice = 0x8852,
  2143. .card = CX88_BOARD_GENIATECH_X8000_MT,
  2144. }, {
  2145. .subvendor = 0x18ac,
  2146. .subdevice = 0xd610,
  2147. .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
  2148. }, {
  2149. .subvendor = 0x1554,
  2150. .subdevice = 0x4935,
  2151. .card = CX88_BOARD_PROLINK_PV_8000GT,
  2152. }, {
  2153. .subvendor = 0x1554,
  2154. .subdevice = 0x4976,
  2155. .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
  2156. }, {
  2157. .subvendor = 0x17de,
  2158. .subdevice = 0x08c1,
  2159. .card = CX88_BOARD_KWORLD_ATSC_120,
  2160. }, {
  2161. .subvendor = 0x0070,
  2162. .subdevice = 0x6900,
  2163. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2164. }, {
  2165. .subvendor = 0x0070,
  2166. .subdevice = 0x6904,
  2167. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2168. }, {
  2169. .subvendor = 0x0070,
  2170. .subdevice = 0x6902,
  2171. .card = CX88_BOARD_HAUPPAUGE_HVR4000,
  2172. }, {
  2173. .subvendor = 0x0070,
  2174. .subdevice = 0x6905,
  2175. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2176. }, {
  2177. .subvendor = 0x0070,
  2178. .subdevice = 0x6906,
  2179. .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
  2180. }, {
  2181. .subvendor = 0xd420,
  2182. .subdevice = 0x9022,
  2183. .card = CX88_BOARD_TEVII_S420,
  2184. }, {
  2185. .subvendor = 0xd460,
  2186. .subdevice = 0x9022,
  2187. .card = CX88_BOARD_TEVII_S460,
  2188. }, {
  2189. .subvendor = 0xA044,
  2190. .subdevice = 0x2011,
  2191. .card = CX88_BOARD_OMICOM_SS4_PCI,
  2192. }, {
  2193. .subvendor = 0x8920,
  2194. .subdevice = 0x8888,
  2195. .card = CX88_BOARD_TBS_8920,
  2196. },
  2197. };
  2198. /* ----------------------------------------------------------------------- */
  2199. /* some leadtek specific stuff */
  2200. static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2201. {
  2202. /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
  2203. * any others.
  2204. *
  2205. * Byte 0 is 1 on the NTSC board.
  2206. */
  2207. if (eeprom_data[4] != 0x7d ||
  2208. eeprom_data[5] != 0x10 ||
  2209. eeprom_data[7] != 0x66) {
  2210. warn_printk(core, "Leadtek eeprom invalid.\n");
  2211. return;
  2212. }
  2213. core->board.tuner_type = (eeprom_data[6] == 0x13) ?
  2214. TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
  2215. info_printk(core, "Leadtek Winfast 2000XP Expert config: "
  2216. "tuner=%d, eeprom[0]=0x%02x\n",
  2217. core->board.tuner_type, eeprom_data[0]);
  2218. }
  2219. static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2220. {
  2221. struct tveeprom tv;
  2222. tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
  2223. core->board.tuner_type = tv.tuner_type;
  2224. core->tuner_formats = tv.tuner_formats;
  2225. core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
  2226. /* Make sure we support the board model */
  2227. switch (tv.model)
  2228. {
  2229. case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
  2230. case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
  2231. case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
  2232. case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
  2233. case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
  2234. case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
  2235. case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
  2236. case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
  2237. case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
  2238. case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
  2239. case 34519: /* WinTV-PCI-FM */
  2240. case 69009:
  2241. /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
  2242. case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
  2243. case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
  2244. case 69559:
  2245. /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
  2246. case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
  2247. case 90002: /* Nova-T-PCI (9002) */
  2248. case 92001: /* Nova-S-Plus (Video and IR) */
  2249. case 92002: /* Nova-S-Plus (Video and IR) */
  2250. case 90003: /* Nova-T-PCI (9002 No RF out) */
  2251. case 90500: /* Nova-T-PCI (oem) */
  2252. case 90501: /* Nova-T-PCI (oem/IR) */
  2253. case 92000: /* Nova-SE2 (OEM, No Video or IR) */
  2254. case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
  2255. case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
  2256. case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
  2257. case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
  2258. case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
  2259. case 96569: /* WinTV-HVR1300 () */
  2260. case 96659: /* WinTV-HVR1300 () */
  2261. case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
  2262. /* known */
  2263. break;
  2264. default:
  2265. warn_printk(core, "warning: unknown hauppauge model #%d\n",
  2266. tv.model);
  2267. break;
  2268. }
  2269. info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
  2270. }
  2271. /* ----------------------------------------------------------------------- */
  2272. /* some GDI (was: Modular Technology) specific stuff */
  2273. static struct {
  2274. int id;
  2275. int fm;
  2276. char *name;
  2277. } gdi_tuner[] = {
  2278. [ 0x01 ] = { .id = TUNER_ABSENT,
  2279. .name = "NTSC_M" },
  2280. [ 0x02 ] = { .id = TUNER_ABSENT,
  2281. .name = "PAL_B" },
  2282. [ 0x03 ] = { .id = TUNER_ABSENT,
  2283. .name = "PAL_I" },
  2284. [ 0x04 ] = { .id = TUNER_ABSENT,
  2285. .name = "PAL_D" },
  2286. [ 0x05 ] = { .id = TUNER_ABSENT,
  2287. .name = "SECAM" },
  2288. [ 0x10 ] = { .id = TUNER_ABSENT,
  2289. .fm = 1,
  2290. .name = "TEMIC_4049" },
  2291. [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
  2292. .name = "TEMIC_4136" },
  2293. [ 0x12 ] = { .id = TUNER_ABSENT,
  2294. .name = "TEMIC_4146" },
  2295. [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
  2296. .fm = 1,
  2297. .name = "PHILIPS_FQ1216_MK3" },
  2298. [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
  2299. .name = "PHILIPS_FQ1236_MK3" },
  2300. [ 0x22 ] = { .id = TUNER_ABSENT,
  2301. .name = "PHILIPS_FI1236_MK3" },
  2302. [ 0x23 ] = { .id = TUNER_ABSENT,
  2303. .name = "PHILIPS_FI1216_MK3" },
  2304. };
  2305. static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
  2306. {
  2307. char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
  2308. ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
  2309. info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
  2310. if (NULL == name)
  2311. return;
  2312. core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
  2313. core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
  2314. CX88_RADIO : 0;
  2315. }
  2316. /* ------------------------------------------------------------------- */
  2317. /* some Divco specific stuff */
  2318. static int cx88_dvico_xc2028_callback(struct cx88_core *core,
  2319. int command, int arg)
  2320. {
  2321. switch (command) {
  2322. case XC2028_TUNER_RESET:
  2323. switch (core->boardnr) {
  2324. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2325. /* GPIO-4 xc3028 tuner */
  2326. cx_set(MO_GP0_IO, 0x00001000);
  2327. cx_clear(MO_GP0_IO, 0x00000010);
  2328. msleep(100);
  2329. cx_set(MO_GP0_IO, 0x00000010);
  2330. msleep(100);
  2331. break;
  2332. default:
  2333. cx_write(MO_GP0_IO, 0x101000);
  2334. mdelay(5);
  2335. cx_set(MO_GP0_IO, 0x101010);
  2336. }
  2337. break;
  2338. default:
  2339. return -EINVAL;
  2340. }
  2341. return 0;
  2342. }
  2343. /* ----------------------------------------------------------------------- */
  2344. /* some Geniatech specific stuff */
  2345. static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
  2346. int command, int mode)
  2347. {
  2348. switch (command) {
  2349. case XC2028_TUNER_RESET:
  2350. switch (INPUT(core->input).type) {
  2351. case CX88_RADIO:
  2352. break;
  2353. case CX88_VMUX_DVB:
  2354. cx_write(MO_GP1_IO, 0x030302);
  2355. mdelay(50);
  2356. break;
  2357. default:
  2358. cx_write(MO_GP1_IO, 0x030301);
  2359. mdelay(50);
  2360. }
  2361. cx_write(MO_GP1_IO, 0x101010);
  2362. mdelay(50);
  2363. cx_write(MO_GP1_IO, 0x101000);
  2364. mdelay(50);
  2365. cx_write(MO_GP1_IO, 0x101010);
  2366. mdelay(50);
  2367. return 0;
  2368. }
  2369. return -EINVAL;
  2370. }
  2371. /* ------------------------------------------------------------------- */
  2372. /* some Divco specific stuff */
  2373. static int cx88_pv_8000gt_callback(struct cx88_core *core,
  2374. int command, int arg)
  2375. {
  2376. switch (command) {
  2377. case XC2028_TUNER_RESET:
  2378. cx_write(MO_GP2_IO, 0xcf7);
  2379. mdelay(50);
  2380. cx_write(MO_GP2_IO, 0xef5);
  2381. mdelay(50);
  2382. cx_write(MO_GP2_IO, 0xcf7);
  2383. break;
  2384. default:
  2385. return -EINVAL;
  2386. }
  2387. return 0;
  2388. }
  2389. /* ----------------------------------------------------------------------- */
  2390. /* some DViCO specific stuff */
  2391. static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
  2392. {
  2393. struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
  2394. int i, err;
  2395. static u8 init_bufs[13][5] = {
  2396. { 0x10, 0x00, 0x20, 0x01, 0x03 },
  2397. { 0x10, 0x10, 0x01, 0x00, 0x21 },
  2398. { 0x10, 0x10, 0x10, 0x00, 0xCA },
  2399. { 0x10, 0x10, 0x12, 0x00, 0x08 },
  2400. { 0x10, 0x10, 0x13, 0x00, 0x0A },
  2401. { 0x10, 0x10, 0x16, 0x01, 0xC0 },
  2402. { 0x10, 0x10, 0x22, 0x01, 0x3D },
  2403. { 0x10, 0x10, 0x73, 0x01, 0x2E },
  2404. { 0x10, 0x10, 0x72, 0x00, 0xC5 },
  2405. { 0x10, 0x10, 0x71, 0x01, 0x97 },
  2406. { 0x10, 0x10, 0x70, 0x00, 0x0F },
  2407. { 0x10, 0x10, 0xB0, 0x00, 0x01 },
  2408. { 0x03, 0x0C },
  2409. };
  2410. for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
  2411. msg.buf = init_bufs[i];
  2412. msg.len = (i != 12 ? 5 : 2);
  2413. err = i2c_transfer(&core->i2c_adap, &msg, 1);
  2414. if (err != 1) {
  2415. warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
  2416. "failed (err = %d)!\n", i, err);
  2417. return;
  2418. }
  2419. }
  2420. }
  2421. static int cx88_xc2028_tuner_callback(struct cx88_core *core,
  2422. int command, int arg)
  2423. {
  2424. /* Board-specific callbacks */
  2425. switch (core->boardnr) {
  2426. case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
  2427. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  2428. case CX88_BOARD_GENIATECH_X8000_MT:
  2429. case CX88_BOARD_KWORLD_ATSC_120:
  2430. return cx88_xc3028_geniatech_tuner_callback(core,
  2431. command, arg);
  2432. case CX88_BOARD_PROLINK_PV_8000GT:
  2433. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  2434. return cx88_pv_8000gt_callback(core, command, arg);
  2435. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2436. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2437. return cx88_dvico_xc2028_callback(core, command, arg);
  2438. }
  2439. switch (command) {
  2440. case XC2028_TUNER_RESET:
  2441. switch (INPUT(core->input).type) {
  2442. case CX88_RADIO:
  2443. info_printk(core, "setting GPIO to radio!\n");
  2444. cx_write(MO_GP0_IO, 0x4ff);
  2445. mdelay(250);
  2446. cx_write(MO_GP2_IO, 0xff);
  2447. mdelay(250);
  2448. break;
  2449. case CX88_VMUX_DVB: /* Digital TV*/
  2450. default: /* Analog TV */
  2451. info_printk(core, "setting GPIO to TV!\n");
  2452. break;
  2453. }
  2454. cx_write(MO_GP1_IO, 0x101010);
  2455. mdelay(250);
  2456. cx_write(MO_GP1_IO, 0x101000);
  2457. mdelay(250);
  2458. cx_write(MO_GP1_IO, 0x101010);
  2459. mdelay(250);
  2460. return 0;
  2461. }
  2462. return -EINVAL;
  2463. }
  2464. /* ----------------------------------------------------------------------- */
  2465. /* Tuner callback function. Currently only needed for the Pinnacle *
  2466. * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
  2467. * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
  2468. static int cx88_xc5000_tuner_callback(struct cx88_core *core,
  2469. int command, int arg)
  2470. {
  2471. switch (core->boardnr) {
  2472. case CX88_BOARD_PINNACLE_PCTV_HD_800i:
  2473. if (command == 0) { /* This is the reset command from xc5000 */
  2474. /* Reset XC5000 tuner via SYS_RSTO_pin */
  2475. cx_write(MO_SRST_IO, 0);
  2476. msleep(10);
  2477. cx_write(MO_SRST_IO, 1);
  2478. return 0;
  2479. } else {
  2480. err_printk(core, "xc5000: unknown tuner "
  2481. "callback command.\n");
  2482. return -EINVAL;
  2483. }
  2484. break;
  2485. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  2486. if (command == 0) { /* This is the reset command from xc5000 */
  2487. cx_clear(MO_GP0_IO, 0x00000010);
  2488. msleep(10);
  2489. cx_set(MO_GP0_IO, 0x00000010);
  2490. return 0;
  2491. } else {
  2492. printk(KERN_ERR
  2493. "xc5000: unknown tuner callback command.\n");
  2494. return -EINVAL;
  2495. }
  2496. break;
  2497. }
  2498. return 0; /* Should never be here */
  2499. }
  2500. int cx88_tuner_callback(void *priv, int component, int command, int arg)
  2501. {
  2502. struct i2c_algo_bit_data *i2c_algo = priv;
  2503. struct cx88_core *core;
  2504. if (!i2c_algo) {
  2505. printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
  2506. return -EINVAL;
  2507. }
  2508. core = i2c_algo->data;
  2509. if (!core) {
  2510. printk(KERN_ERR "cx88: Error - device struct undefined.\n");
  2511. return -EINVAL;
  2512. }
  2513. if (component != DVB_FRONTEND_COMPONENT_TUNER)
  2514. return -EINVAL;
  2515. switch (core->board.tuner_type) {
  2516. case TUNER_XC2028:
  2517. info_printk(core, "Calling XC2028/3028 callback\n");
  2518. return cx88_xc2028_tuner_callback(core, command, arg);
  2519. case TUNER_XC5000:
  2520. info_printk(core, "Calling XC5000 callback\n");
  2521. return cx88_xc5000_tuner_callback(core, command, arg);
  2522. }
  2523. err_printk(core, "Error: Calling callback for tuner %d\n",
  2524. core->board.tuner_type);
  2525. return -EINVAL;
  2526. }
  2527. EXPORT_SYMBOL(cx88_tuner_callback);
  2528. /* ----------------------------------------------------------------------- */
  2529. static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
  2530. {
  2531. int i;
  2532. if (0 == pci->subsystem_vendor &&
  2533. 0 == pci->subsystem_device) {
  2534. printk(KERN_ERR
  2535. "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
  2536. "%s: be autodetected. Please pass card=<n> insmod option to\n"
  2537. "%s: workaround that. Redirect complaints to the vendor of\n"
  2538. "%s: the TV card. Best regards,\n"
  2539. "%s: -- tux\n",
  2540. core->name,core->name,core->name,core->name,core->name);
  2541. } else {
  2542. printk(KERN_ERR
  2543. "%s: Your board isn't known (yet) to the driver. You can\n"
  2544. "%s: try to pick one of the existing card configs via\n"
  2545. "%s: card=<n> insmod option. Updating to the latest\n"
  2546. "%s: version might help as well.\n",
  2547. core->name,core->name,core->name,core->name);
  2548. }
  2549. err_printk(core, "Here is a list of valid choices for the card=<n> "
  2550. "insmod option:\n");
  2551. for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
  2552. printk(KERN_ERR "%s: card=%d -> %s\n",
  2553. core->name, i, cx88_boards[i].name);
  2554. }
  2555. static void cx88_card_setup_pre_i2c(struct cx88_core *core)
  2556. {
  2557. switch (core->boardnr) {
  2558. case CX88_BOARD_HAUPPAUGE_HVR1300:
  2559. /*
  2560. * Bring the 702 demod up before i2c scanning/attach or devices are hidden
  2561. * We leave here with the 702 on the bus
  2562. *
  2563. * "reset the IR receiver on GPIO[3]"
  2564. * Reported by Mike Crash <mike AT mikecrash.com>
  2565. */
  2566. cx_write(MO_GP0_IO, 0x0000ef88);
  2567. udelay(1000);
  2568. cx_clear(MO_GP0_IO, 0x00000088);
  2569. udelay(50);
  2570. cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
  2571. udelay(1000);
  2572. break;
  2573. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  2574. case CX88_BOARD_PROLINK_PV_8000GT:
  2575. cx_write(MO_GP2_IO, 0xcf7);
  2576. mdelay(50);
  2577. cx_write(MO_GP2_IO, 0xef5);
  2578. mdelay(50);
  2579. cx_write(MO_GP2_IO, 0xcf7);
  2580. msleep(10);
  2581. break;
  2582. case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
  2583. /* Enable the xc5000 tuner */
  2584. cx_set(MO_GP0_IO, 0x00001010);
  2585. break;
  2586. case CX88_BOARD_HAUPPAUGE_HVR3000:
  2587. case CX88_BOARD_HAUPPAUGE_HVR4000:
  2588. case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
  2589. /* Init GPIO */
  2590. cx_write(MO_GP0_IO, core->board.input[0].gpio0);
  2591. udelay(1000);
  2592. break;
  2593. }
  2594. }
  2595. /*
  2596. * Sets board-dependent xc3028 configuration
  2597. */
  2598. void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
  2599. {
  2600. memset(ctl, 0, sizeof(*ctl));
  2601. ctl->fname = XC2028_DEFAULT_FIRMWARE;
  2602. ctl->max_len = 64;
  2603. switch (core->boardnr) {
  2604. case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
  2605. /* Now works with firmware version 2.7 */
  2606. if (core->i2c_algo.udelay < 16)
  2607. core->i2c_algo.udelay = 16;
  2608. break;
  2609. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2610. ctl->scode_table = XC3028_FE_ZARLINK456;
  2611. break;
  2612. case CX88_BOARD_KWORLD_ATSC_120:
  2613. case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
  2614. ctl->demod = XC3028_FE_OREN538;
  2615. break;
  2616. case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
  2617. case CX88_BOARD_PROLINK_PV_8000GT:
  2618. /*
  2619. * Those boards uses non-MTS firmware
  2620. */
  2621. break;
  2622. case CX88_BOARD_PINNACLE_HYBRID_PCTV:
  2623. ctl->demod = XC3028_FE_ZARLINK456;
  2624. ctl->mts = 1;
  2625. break;
  2626. default:
  2627. ctl->demod = XC3028_FE_OREN538;
  2628. ctl->mts = 1;
  2629. }
  2630. }
  2631. EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
  2632. static void cx88_card_setup(struct cx88_core *core)
  2633. {
  2634. static u8 eeprom[256];
  2635. struct tuner_setup tun_setup;
  2636. unsigned int mode_mask = T_RADIO |
  2637. T_ANALOG_TV |
  2638. T_DIGITAL_TV;
  2639. memset(&tun_setup, 0, sizeof(tun_setup));
  2640. if (0 == core->i2c_rc) {
  2641. core->i2c_client.addr = 0xa0 >> 1;
  2642. tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
  2643. }
  2644. switch (core->boardnr) {
  2645. case CX88_BOARD_HAUPPAUGE:
  2646. case CX88_BOARD_HAUPPAUGE_ROSLYN:
  2647. if (0 == core->i2c_rc)
  2648. hauppauge_eeprom(core, eeprom+8);
  2649. break;
  2650. case CX88_BOARD_GDI:
  2651. if (0 == core->i2c_rc)
  2652. gdi_eeprom(core, eeprom);
  2653. break;
  2654. case CX88_BOARD_WINFAST2000XP_EXPERT:
  2655. if (0 == core->i2c_rc)
  2656. leadtek_eeprom(core, eeprom);
  2657. break;
  2658. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  2659. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  2660. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  2661. case CX88_BOARD_HAUPPAUGE_HVR1100:
  2662. case CX88_BOARD_HAUPPAUGE_HVR1100LP:
  2663. case CX88_BOARD_HAUPPAUGE_HVR3000:
  2664. case CX88_BOARD_HAUPPAUGE_HVR1300:
  2665. case CX88_BOARD_HAUPPAUGE_HVR4000:
  2666. case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
  2667. if (0 == core->i2c_rc)
  2668. hauppauge_eeprom(core, eeprom);
  2669. break;
  2670. case CX88_BOARD_KWORLD_DVBS_100:
  2671. cx_write(MO_GP0_IO, 0x000007f8);
  2672. cx_write(MO_GP1_IO, 0x00000001);
  2673. break;
  2674. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
  2675. /* GPIO0:0 is hooked to demod reset */
  2676. /* GPIO0:4 is hooked to xc3028 reset */
  2677. cx_write(MO_GP0_IO, 0x00111100);
  2678. msleep(1);
  2679. cx_write(MO_GP0_IO, 0x00111111);
  2680. break;
  2681. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
  2682. /* GPIO0:6 is hooked to FX2 reset pin */
  2683. cx_set(MO_GP0_IO, 0x00004040);
  2684. cx_clear(MO_GP0_IO, 0x00000040);
  2685. msleep(1000);
  2686. cx_set(MO_GP0_IO, 0x00004040);
  2687. /* FALLTHROUGH */
  2688. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
  2689. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
  2690. case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
  2691. /* GPIO0:0 is hooked to mt352 reset pin */
  2692. cx_set(MO_GP0_IO, 0x00000101);
  2693. cx_clear(MO_GP0_IO, 0x00000001);
  2694. msleep(1);
  2695. cx_set(MO_GP0_IO, 0x00000101);
  2696. if (0 == core->i2c_rc &&
  2697. core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
  2698. dvico_fusionhdtv_hybrid_init(core);
  2699. break;
  2700. case CX88_BOARD_KWORLD_DVB_T:
  2701. case CX88_BOARD_DNTV_LIVE_DVB_T:
  2702. cx_set(MO_GP0_IO, 0x00000707);
  2703. cx_set(MO_GP2_IO, 0x00000101);
  2704. cx_clear(MO_GP2_IO, 0x00000001);
  2705. msleep(1);
  2706. cx_clear(MO_GP0_IO, 0x00000007);
  2707. cx_set(MO_GP2_IO, 0x00000101);
  2708. break;
  2709. case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
  2710. cx_write(MO_GP0_IO, 0x00080808);
  2711. break;
  2712. case CX88_BOARD_ATI_HDTVWONDER:
  2713. if (0 == core->i2c_rc) {
  2714. /* enable tuner */
  2715. int i;
  2716. static const u8 buffer [][2] = {
  2717. {0x10,0x12},
  2718. {0x13,0x04},
  2719. {0x16,0x00},
  2720. {0x14,0x04},
  2721. {0x17,0x00}
  2722. };
  2723. core->i2c_client.addr = 0x0a;
  2724. for (i = 0; i < ARRAY_SIZE(buffer); i++)
  2725. if (2 != i2c_master_send(&core->i2c_client,
  2726. buffer[i],2))
  2727. warn_printk(core, "Unable to enable "
  2728. "tuner(%i).\n", i);
  2729. }
  2730. break;
  2731. case CX88_BOARD_MSI_TVANYWHERE_MASTER:
  2732. {
  2733. struct v4l2_priv_tun_config tea5767_cfg;
  2734. struct tea5767_ctrl ctl;
  2735. memset(&ctl, 0, sizeof(ctl));
  2736. ctl.high_cut = 1;
  2737. ctl.st_noise = 1;
  2738. ctl.deemph_75 = 1;
  2739. ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
  2740. tea5767_cfg.tuner = TUNER_TEA5767;
  2741. tea5767_cfg.priv = &ctl;
  2742. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
  2743. break;
  2744. }
  2745. case CX88_BOARD_TEVII_S420:
  2746. case CX88_BOARD_TEVII_S460:
  2747. cx_write(MO_SRST_IO, 0);
  2748. msleep(100);
  2749. cx_write(MO_SRST_IO, 1);
  2750. msleep(100);
  2751. break;
  2752. case CX88_BOARD_OMICOM_SS4_PCI:
  2753. cx_write(MO_SRST_IO, 0);
  2754. msleep(100);
  2755. cx_write(MO_SRST_IO, 1);
  2756. msleep(100);
  2757. break;
  2758. case CX88_BOARD_TBS_8920:
  2759. cx_write(MO_SRST_IO, 0);
  2760. msleep(100);
  2761. cx_write(MO_SRST_IO, 1);
  2762. msleep(100);
  2763. break;
  2764. } /*end switch() */
  2765. /* Setup tuners */
  2766. if ((core->board.radio_type != UNSET)) {
  2767. tun_setup.mode_mask = T_RADIO;
  2768. tun_setup.type = core->board.radio_type;
  2769. tun_setup.addr = core->board.radio_addr;
  2770. tun_setup.tuner_callback = cx88_tuner_callback;
  2771. cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
  2772. mode_mask &= ~T_RADIO;
  2773. }
  2774. if (core->board.tuner_type != TUNER_ABSENT) {
  2775. tun_setup.mode_mask = mode_mask;
  2776. tun_setup.type = core->board.tuner_type;
  2777. tun_setup.addr = core->board.tuner_addr;
  2778. tun_setup.tuner_callback = cx88_tuner_callback;
  2779. cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
  2780. }
  2781. if (core->board.tda9887_conf) {
  2782. struct v4l2_priv_tun_config tda9887_cfg;
  2783. tda9887_cfg.tuner = TUNER_TDA9887;
  2784. tda9887_cfg.priv = &core->board.tda9887_conf;
  2785. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tda9887_cfg);
  2786. }
  2787. if (core->board.tuner_type == TUNER_XC2028) {
  2788. struct v4l2_priv_tun_config xc2028_cfg;
  2789. struct xc2028_ctrl ctl;
  2790. /* Fills device-dependent initialization parameters */
  2791. cx88_setup_xc3028(core, &ctl);
  2792. /* Sends parameters to xc2028/3028 tuner */
  2793. memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
  2794. xc2028_cfg.tuner = TUNER_XC2028;
  2795. xc2028_cfg.priv = &ctl;
  2796. info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
  2797. ctl.fname);
  2798. cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg);
  2799. }
  2800. cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
  2801. }
  2802. /* ------------------------------------------------------------------ */
  2803. static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
  2804. {
  2805. unsigned int lat = UNSET;
  2806. u8 ctrl = 0;
  2807. u8 value;
  2808. /* check pci quirks */
  2809. if (pci_pci_problems & PCIPCI_TRITON) {
  2810. printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
  2811. name);
  2812. ctrl |= CX88X_EN_TBFX;
  2813. }
  2814. if (pci_pci_problems & PCIPCI_NATOMA) {
  2815. printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
  2816. name);
  2817. ctrl |= CX88X_EN_TBFX;
  2818. }
  2819. if (pci_pci_problems & PCIPCI_VIAETBF) {
  2820. printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
  2821. name);
  2822. ctrl |= CX88X_EN_TBFX;
  2823. }
  2824. if (pci_pci_problems & PCIPCI_VSFX) {
  2825. printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
  2826. name);
  2827. ctrl |= CX88X_EN_VSFX;
  2828. }
  2829. #ifdef PCIPCI_ALIMAGIK
  2830. if (pci_pci_problems & PCIPCI_ALIMAGIK) {
  2831. printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
  2832. name);
  2833. lat = 0x0A;
  2834. }
  2835. #endif
  2836. /* check insmod options */
  2837. if (UNSET != latency)
  2838. lat = latency;
  2839. /* apply stuff */
  2840. if (ctrl) {
  2841. pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
  2842. value |= ctrl;
  2843. pci_write_config_byte(pci, CX88X_DEVCTRL, value);
  2844. }
  2845. if (UNSET != lat) {
  2846. printk(KERN_INFO "%s: setting pci latency timer to %d\n",
  2847. name, latency);
  2848. pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
  2849. }
  2850. return 0;
  2851. }
  2852. int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
  2853. {
  2854. if (request_mem_region(pci_resource_start(pci,0),
  2855. pci_resource_len(pci,0),
  2856. core->name))
  2857. return 0;
  2858. printk(KERN_ERR
  2859. "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
  2860. core->name, PCI_FUNC(pci->devfn),
  2861. (unsigned long long)pci_resource_start(pci, 0),
  2862. pci->subsystem_vendor, pci->subsystem_device);
  2863. return -EBUSY;
  2864. }
  2865. /* Allocate and initialize the cx88 core struct. One should hold the
  2866. * devlist mutex before calling this. */
  2867. struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
  2868. {
  2869. struct cx88_core *core;
  2870. int i;
  2871. core = kzalloc(sizeof(*core), GFP_KERNEL);
  2872. atomic_inc(&core->refcount);
  2873. core->pci_bus = pci->bus->number;
  2874. core->pci_slot = PCI_SLOT(pci->devfn);
  2875. core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
  2876. PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
  2877. PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
  2878. mutex_init(&core->lock);
  2879. core->nr = nr;
  2880. sprintf(core->name, "cx88[%d]", core->nr);
  2881. if (0 != cx88_get_resources(core, pci)) {
  2882. kfree(core);
  2883. return NULL;
  2884. }
  2885. /* PCI stuff */
  2886. cx88_pci_quirks(core->name, pci);
  2887. core->lmmio = ioremap(pci_resource_start(pci, 0),
  2888. pci_resource_len(pci, 0));
  2889. core->bmmio = (u8 __iomem *)core->lmmio;
  2890. /* board config */
  2891. core->boardnr = UNSET;
  2892. if (card[core->nr] < ARRAY_SIZE(cx88_boards))
  2893. core->boardnr = card[core->nr];
  2894. for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
  2895. if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
  2896. pci->subsystem_device == cx88_subids[i].subdevice)
  2897. core->boardnr = cx88_subids[i].card;
  2898. if (UNSET == core->boardnr) {
  2899. core->boardnr = CX88_BOARD_UNKNOWN;
  2900. cx88_card_list(core, pci);
  2901. }
  2902. memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
  2903. info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
  2904. pci->subsystem_vendor, pci->subsystem_device, core->board.name,
  2905. core->boardnr, card[core->nr] == core->boardnr ?
  2906. "insmod option" : "autodetected");
  2907. if (tuner[core->nr] != UNSET)
  2908. core->board.tuner_type = tuner[core->nr];
  2909. if (radio[core->nr] != UNSET)
  2910. core->board.radio_type = radio[core->nr];
  2911. info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
  2912. core->board.tuner_type, core->board.radio_type);
  2913. /* init hardware */
  2914. cx88_reset(core);
  2915. cx88_card_setup_pre_i2c(core);
  2916. cx88_i2c_init(core, pci);
  2917. /* load tuner module, if needed */
  2918. if (TUNER_ABSENT != core->board.tuner_type)
  2919. request_module("tuner");
  2920. cx88_card_setup(core);
  2921. cx88_ir_init(core, pci);
  2922. return core;
  2923. }