cx88-cards.c 78 KB

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