cx88-cards.c 66 KB

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