cx88-cards.c 77 KB

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