cx88-cards.c 78 KB

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