cx88-cards.c 69 KB

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