cx88-cards.c 66 KB

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