cx88-cards.c 69 KB

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