cx88-cards.c 77 KB

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