af9013_priv.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  1. /*
  2. * Afatech AF9013 demodulator driver
  3. *
  4. * Copyright (C) 2007 Antti Palosaari <crope@iki.fi>
  5. *
  6. * Thanks to Afatech who kindly provided information.
  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. */
  23. #ifndef _AF9013_PRIV_
  24. #define _AF9013_PRIV_
  25. #define LOG_PREFIX "af9013"
  26. extern int af9013_debug;
  27. #define dprintk(var, level, args...) \
  28. do { if ((var & level)) printk(args); } while (0)
  29. #define debug_dump(b, l, func) {\
  30. int loop_; \
  31. for (loop_ = 0; loop_ < l; loop_++) \
  32. func("%02x ", b[loop_]); \
  33. func("\n");\
  34. }
  35. #define deb_info(args...) dprintk(af9013_debug, 0x01, args)
  36. #undef err
  37. #define err(f, arg...) printk(KERN_ERR LOG_PREFIX": " f "\n" , ## arg)
  38. #undef info
  39. #define info(f, arg...) printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)
  40. #undef warn
  41. #define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg)
  42. #define AF9013_DEFAULT_FIRMWARE "dvb-fe-af9013.fw"
  43. struct regdesc {
  44. u16 addr;
  45. u8 pos:4;
  46. u8 len:4;
  47. u8 val;
  48. };
  49. struct snr_table {
  50. u32 val;
  51. u8 snr;
  52. };
  53. struct coeff {
  54. u32 adc_clock;
  55. fe_bandwidth_t bw;
  56. u8 val[24];
  57. };
  58. /* pre-calculated coeff lookup table */
  59. static struct coeff coeff_table[] = {
  60. /* 28.800 MHz */
  61. { 28800, BANDWIDTH_8_MHZ, { 0x02, 0x8a, 0x28, 0xa3, 0x05, 0x14,
  62. 0x51, 0x11, 0x00, 0xa2, 0x8f, 0x3d, 0x00, 0xa2, 0x8a,
  63. 0x29, 0x00, 0xa2, 0x85, 0x14, 0x01, 0x45, 0x14, 0x14 } },
  64. { 28800, BANDWIDTH_7_MHZ, { 0x02, 0x38, 0xe3, 0x8e, 0x04, 0x71,
  65. 0xc7, 0x07, 0x00, 0x8e, 0x3d, 0x55, 0x00, 0x8e, 0x38,
  66. 0xe4, 0x00, 0x8e, 0x34, 0x72, 0x01, 0x1c, 0x71, 0x32 } },
  67. { 28800, BANDWIDTH_6_MHZ, { 0x01, 0xe7, 0x9e, 0x7a, 0x03, 0xcf,
  68. 0x3c, 0x3d, 0x00, 0x79, 0xeb, 0x6e, 0x00, 0x79, 0xe7,
  69. 0x9e, 0x00, 0x79, 0xe3, 0xcf, 0x00, 0xf3, 0xcf, 0x0f } },
  70. /* 20.480 MHz */
  71. { 20480, BANDWIDTH_8_MHZ, { 0x03, 0x92, 0x49, 0x26, 0x07, 0x24,
  72. 0x92, 0x13, 0x00, 0xe4, 0x99, 0x6e, 0x00, 0xe4, 0x92,
  73. 0x49, 0x00, 0xe4, 0x8b, 0x25, 0x01, 0xc9, 0x24, 0x25 } },
  74. { 20480, BANDWIDTH_7_MHZ, { 0x03, 0x20, 0x00, 0x01, 0x06, 0x40,
  75. 0x00, 0x00, 0x00, 0xc8, 0x06, 0x40, 0x00, 0xc8, 0x00,
  76. 0x00, 0x00, 0xc7, 0xf9, 0xc0, 0x01, 0x90, 0x00, 0x00 } },
  77. { 20480, BANDWIDTH_6_MHZ, { 0x02, 0xad, 0xb6, 0xdc, 0x05, 0x5b,
  78. 0x6d, 0x2e, 0x00, 0xab, 0x73, 0x13, 0x00, 0xab, 0x6d,
  79. 0xb7, 0x00, 0xab, 0x68, 0x5c, 0x01, 0x56, 0xdb, 0x1c } },
  80. /* 28.000 MHz */
  81. { 28000, BANDWIDTH_8_MHZ, { 0x02, 0x9c, 0xbc, 0x15, 0x05, 0x39,
  82. 0x78, 0x0a, 0x00, 0xa7, 0x34, 0x3f, 0x00, 0xa7, 0x2f,
  83. 0x05, 0x00, 0xa7, 0x29, 0xcc, 0x01, 0x4e, 0x5e, 0x03 } },
  84. { 28000, BANDWIDTH_7_MHZ, { 0x02, 0x49, 0x24, 0x92, 0x04, 0x92,
  85. 0x49, 0x09, 0x00, 0x92, 0x4d, 0xb7, 0x00, 0x92, 0x49,
  86. 0x25, 0x00, 0x92, 0x44, 0x92, 0x01, 0x24, 0x92, 0x12 } },
  87. { 28000, BANDWIDTH_6_MHZ, { 0x01, 0xf5, 0x8d, 0x10, 0x03, 0xeb,
  88. 0x1a, 0x08, 0x00, 0x7d, 0x67, 0x2f, 0x00, 0x7d, 0x63,
  89. 0x44, 0x00, 0x7d, 0x5f, 0x59, 0x00, 0xfa, 0xc6, 0x22 } },
  90. /* 25.000 MHz */
  91. { 25000, BANDWIDTH_8_MHZ, { 0x02, 0xec, 0xfb, 0x9d, 0x05, 0xd9,
  92. 0xf7, 0x0e, 0x00, 0xbb, 0x44, 0xc1, 0x00, 0xbb, 0x3e,
  93. 0xe7, 0x00, 0xbb, 0x39, 0x0d, 0x01, 0x76, 0x7d, 0x34 } },
  94. { 25000, BANDWIDTH_7_MHZ, { 0x02, 0x8f, 0x5c, 0x29, 0x05, 0x1e,
  95. 0xb8, 0x14, 0x00, 0xa3, 0xdc, 0x29, 0x00, 0xa3, 0xd7,
  96. 0x0a, 0x00, 0xa3, 0xd1, 0xec, 0x01, 0x47, 0xae, 0x05 } },
  97. { 25000, BANDWIDTH_6_MHZ, { 0x02, 0x31, 0xbc, 0xb5, 0x04, 0x63,
  98. 0x79, 0x1b, 0x00, 0x8c, 0x73, 0x91, 0x00, 0x8c, 0x6f,
  99. 0x2d, 0x00, 0x8c, 0x6a, 0xca, 0x01, 0x18, 0xde, 0x17 } },
  100. };
  101. /* QPSK SNR lookup table */
  102. static struct snr_table qpsk_snr_table[] = {
  103. { 0x0b4771, 0 },
  104. { 0x0c1aed, 1 },
  105. { 0x0d0d27, 2 },
  106. { 0x0e4d19, 3 },
  107. { 0x0e5da8, 4 },
  108. { 0x107097, 5 },
  109. { 0x116975, 6 },
  110. { 0x1252d9, 7 },
  111. { 0x131fa4, 8 },
  112. { 0x13d5e1, 9 },
  113. { 0x148e53, 10 },
  114. { 0x15358b, 11 },
  115. { 0x15dd29, 12 },
  116. { 0x168112, 13 },
  117. { 0x170b61, 14 },
  118. { 0xffffff, 15 },
  119. };
  120. /* QAM16 SNR lookup table */
  121. static struct snr_table qam16_snr_table[] = {
  122. { 0x05eb62, 5 },
  123. { 0x05fecf, 6 },
  124. { 0x060b80, 7 },
  125. { 0x062501, 8 },
  126. { 0x064865, 9 },
  127. { 0x069604, 10 },
  128. { 0x06f356, 11 },
  129. { 0x07706a, 12 },
  130. { 0x0804d3, 13 },
  131. { 0x089d1a, 14 },
  132. { 0x093e3d, 15 },
  133. { 0x09e35d, 16 },
  134. { 0x0a7c3c, 17 },
  135. { 0x0afaf8, 18 },
  136. { 0x0b719d, 19 },
  137. { 0xffffff, 20 },
  138. };
  139. /* QAM64 SNR lookup table */
  140. static struct snr_table qam64_snr_table[] = {
  141. { 0x03109b, 12 },
  142. { 0x0310d4, 13 },
  143. { 0x031920, 14 },
  144. { 0x0322d0, 15 },
  145. { 0x0339fc, 16 },
  146. { 0x0364a1, 17 },
  147. { 0x038bcc, 18 },
  148. { 0x03c7d3, 19 },
  149. { 0x0408cc, 20 },
  150. { 0x043bed, 21 },
  151. { 0x048061, 22 },
  152. { 0x04be95, 23 },
  153. { 0x04fa7d, 24 },
  154. { 0x052405, 25 },
  155. { 0x05570d, 26 },
  156. { 0xffffff, 27 },
  157. };
  158. static struct regdesc ofsm_init[] = {
  159. { 0xd73a, 0, 8, 0xa1 },
  160. { 0xd73b, 0, 8, 0x1f },
  161. { 0xd73c, 4, 4, 0x0a },
  162. { 0xd732, 3, 1, 0x00 },
  163. { 0xd731, 4, 2, 0x03 },
  164. { 0xd73d, 7, 1, 0x01 },
  165. { 0xd740, 0, 1, 0x00 },
  166. { 0xd740, 1, 1, 0x00 },
  167. { 0xd740, 2, 1, 0x00 },
  168. { 0xd740, 3, 1, 0x01 },
  169. { 0xd3c1, 4, 1, 0x01 },
  170. { 0x9124, 0, 8, 0x58 },
  171. { 0x9125, 0, 2, 0x02 },
  172. { 0xd3a2, 0, 8, 0x00 },
  173. { 0xd3a3, 0, 8, 0x04 },
  174. { 0xd305, 0, 8, 0x32 },
  175. { 0xd306, 0, 8, 0x10 },
  176. { 0xd304, 0, 8, 0x04 },
  177. { 0x9112, 0, 1, 0x01 },
  178. { 0x911d, 0, 1, 0x01 },
  179. { 0x911a, 0, 1, 0x01 },
  180. { 0x911b, 0, 1, 0x01 },
  181. { 0x9bce, 0, 4, 0x02 },
  182. { 0x9116, 0, 1, 0x01 },
  183. { 0x9122, 0, 8, 0xd0 },
  184. { 0xd2e0, 0, 8, 0xd0 },
  185. { 0xd2e9, 0, 4, 0x0d },
  186. { 0xd38c, 0, 8, 0xfc },
  187. { 0xd38d, 0, 8, 0x00 },
  188. { 0xd38e, 0, 8, 0x7e },
  189. { 0xd38f, 0, 8, 0x00 },
  190. { 0xd390, 0, 8, 0x2f },
  191. { 0xd145, 4, 1, 0x01 },
  192. { 0xd1a9, 4, 1, 0x01 },
  193. { 0xd158, 5, 3, 0x01 },
  194. { 0xd159, 0, 6, 0x06 },
  195. { 0xd167, 0, 8, 0x00 },
  196. { 0xd168, 0, 4, 0x07 },
  197. { 0xd1c3, 5, 3, 0x00 },
  198. { 0xd1c4, 0, 6, 0x00 },
  199. { 0xd1c5, 0, 7, 0x10 },
  200. { 0xd1c6, 0, 3, 0x02 },
  201. { 0xd080, 2, 5, 0x03 },
  202. { 0xd081, 4, 4, 0x09 },
  203. { 0xd098, 4, 4, 0x0f },
  204. { 0xd098, 0, 4, 0x03 },
  205. { 0xdbc0, 4, 1, 0x01 },
  206. { 0xdbc7, 0, 8, 0x08 },
  207. { 0xdbc8, 4, 4, 0x00 },
  208. { 0xdbc9, 0, 5, 0x01 },
  209. { 0xd280, 0, 8, 0xe0 },
  210. { 0xd281, 0, 8, 0xff },
  211. { 0xd282, 0, 8, 0xff },
  212. { 0xd283, 0, 8, 0xc3 },
  213. { 0xd284, 0, 8, 0xff },
  214. { 0xd285, 0, 4, 0x01 },
  215. { 0xd0f0, 0, 7, 0x1a },
  216. { 0xd0f1, 4, 1, 0x01 },
  217. { 0xd0f2, 0, 8, 0x0c },
  218. { 0xd101, 5, 3, 0x06 },
  219. { 0xd103, 0, 4, 0x08 },
  220. { 0xd0f8, 0, 7, 0x20 },
  221. { 0xd111, 5, 1, 0x00 },
  222. { 0xd111, 6, 1, 0x00 },
  223. { 0x910b, 0, 8, 0x0a },
  224. { 0x9115, 0, 8, 0x02 },
  225. { 0x910c, 0, 8, 0x02 },
  226. { 0x910d, 0, 8, 0x08 },
  227. { 0x910e, 0, 8, 0x0a },
  228. { 0x9bf6, 0, 8, 0x06 },
  229. { 0x9bf8, 0, 8, 0x02 },
  230. { 0x9bf7, 0, 8, 0x05 },
  231. { 0x9bf9, 0, 8, 0x0f },
  232. { 0x9bfc, 0, 8, 0x13 },
  233. { 0x9bd3, 0, 8, 0xff },
  234. { 0x9bbe, 0, 1, 0x01 },
  235. { 0x9bcc, 0, 1, 0x01 },
  236. };
  237. /* Panasonic ENV77H11D5 tuner init
  238. AF9013_TUNER_ENV77H11D5 = 129 */
  239. static struct regdesc tuner_init_env77h11d5[] = {
  240. { 0x9bd5, 0, 8, 0x01 },
  241. { 0x9bd6, 0, 8, 0x03 },
  242. { 0x9bbe, 0, 8, 0x01 },
  243. { 0xd1a0, 1, 1, 0x01 },
  244. { 0xd000, 0, 1, 0x01 },
  245. { 0xd000, 1, 1, 0x00 },
  246. { 0xd001, 1, 1, 0x01 },
  247. { 0xd001, 0, 1, 0x00 },
  248. { 0xd001, 5, 1, 0x00 },
  249. { 0xd002, 0, 5, 0x19 },
  250. { 0xd003, 0, 5, 0x1a },
  251. { 0xd004, 0, 5, 0x19 },
  252. { 0xd005, 0, 5, 0x1a },
  253. { 0xd00e, 0, 5, 0x10 },
  254. { 0xd00f, 0, 3, 0x04 },
  255. { 0xd00f, 3, 3, 0x05 },
  256. { 0xd010, 0, 3, 0x04 },
  257. { 0xd010, 3, 3, 0x05 },
  258. { 0xd016, 4, 4, 0x03 },
  259. { 0xd01f, 0, 6, 0x0a },
  260. { 0xd020, 0, 6, 0x0a },
  261. { 0x9bda, 0, 8, 0x00 },
  262. { 0x9be3, 0, 8, 0x00 },
  263. { 0xd015, 0, 8, 0x50 },
  264. { 0xd016, 0, 1, 0x00 },
  265. { 0xd044, 0, 8, 0x46 },
  266. { 0xd045, 0, 1, 0x00 },
  267. { 0xd008, 0, 8, 0xdf },
  268. { 0xd009, 0, 2, 0x02 },
  269. { 0xd006, 0, 8, 0x44 },
  270. { 0xd007, 0, 2, 0x01 },
  271. { 0xd00c, 0, 8, 0xeb },
  272. { 0xd00d, 0, 2, 0x02 },
  273. { 0xd00a, 0, 8, 0xf4 },
  274. { 0xd00b, 0, 2, 0x01 },
  275. { 0x9bba, 0, 8, 0xf9 },
  276. { 0x9bc3, 0, 8, 0xdf },
  277. { 0x9bc4, 0, 8, 0x02 },
  278. { 0x9bc5, 0, 8, 0xeb },
  279. { 0x9bc6, 0, 8, 0x02 },
  280. { 0x9bc9, 0, 8, 0x52 },
  281. { 0xd011, 0, 8, 0x3c },
  282. { 0xd012, 0, 2, 0x01 },
  283. { 0xd013, 0, 8, 0xf7 },
  284. { 0xd014, 0, 2, 0x02 },
  285. { 0xd040, 0, 8, 0x0b },
  286. { 0xd041, 0, 2, 0x02 },
  287. { 0xd042, 0, 8, 0x4d },
  288. { 0xd043, 0, 2, 0x00 },
  289. { 0xd045, 1, 1, 0x00 },
  290. { 0x9bcf, 0, 1, 0x01 },
  291. { 0xd045, 2, 1, 0x01 },
  292. { 0xd04f, 0, 8, 0x9a },
  293. { 0xd050, 0, 1, 0x01 },
  294. { 0xd051, 0, 8, 0x5a },
  295. { 0xd052, 0, 1, 0x01 },
  296. { 0xd053, 0, 8, 0x50 },
  297. { 0xd054, 0, 8, 0x46 },
  298. { 0x9bd7, 0, 8, 0x0a },
  299. { 0x9bd8, 0, 8, 0x14 },
  300. { 0x9bd9, 0, 8, 0x08 },
  301. };
  302. /* Microtune MT2060 tuner init
  303. AF9013_TUNER_MT2060 = 130 */
  304. static struct regdesc tuner_init_mt2060[] = {
  305. { 0x9bd5, 0, 8, 0x01 },
  306. { 0x9bd6, 0, 8, 0x07 },
  307. { 0xd1a0, 1, 1, 0x01 },
  308. { 0xd000, 0, 1, 0x01 },
  309. { 0xd000, 1, 1, 0x00 },
  310. { 0xd001, 1, 1, 0x01 },
  311. { 0xd001, 0, 1, 0x00 },
  312. { 0xd001, 5, 1, 0x00 },
  313. { 0xd002, 0, 5, 0x19 },
  314. { 0xd003, 0, 5, 0x1a },
  315. { 0xd004, 0, 5, 0x19 },
  316. { 0xd005, 0, 5, 0x1a },
  317. { 0xd00e, 0, 5, 0x10 },
  318. { 0xd00f, 0, 3, 0x04 },
  319. { 0xd00f, 3, 3, 0x05 },
  320. { 0xd010, 0, 3, 0x04 },
  321. { 0xd010, 3, 3, 0x05 },
  322. { 0xd016, 4, 4, 0x03 },
  323. { 0xd01f, 0, 6, 0x0a },
  324. { 0xd020, 0, 6, 0x0a },
  325. { 0x9bda, 0, 8, 0x00 },
  326. { 0x9be3, 0, 8, 0x00 },
  327. { 0x9bbe, 0, 1, 0x00 },
  328. { 0x9bcc, 0, 1, 0x00 },
  329. { 0x9bb9, 0, 8, 0x75 },
  330. { 0x9bcd, 0, 8, 0x24 },
  331. { 0x9bff, 0, 8, 0x30 },
  332. { 0xd015, 0, 8, 0x46 },
  333. { 0xd016, 0, 1, 0x00 },
  334. { 0xd044, 0, 8, 0x46 },
  335. { 0xd045, 0, 1, 0x00 },
  336. { 0xd008, 0, 8, 0x0f },
  337. { 0xd009, 0, 2, 0x02 },
  338. { 0xd006, 0, 8, 0x32 },
  339. { 0xd007, 0, 2, 0x01 },
  340. { 0xd00c, 0, 8, 0x36 },
  341. { 0xd00d, 0, 2, 0x03 },
  342. { 0xd00a, 0, 8, 0x35 },
  343. { 0xd00b, 0, 2, 0x01 },
  344. { 0x9bc7, 0, 8, 0x07 },
  345. { 0x9bc8, 0, 8, 0x90 },
  346. { 0x9bc3, 0, 8, 0x0f },
  347. { 0x9bc4, 0, 8, 0x02 },
  348. { 0x9bc5, 0, 8, 0x36 },
  349. { 0x9bc6, 0, 8, 0x03 },
  350. { 0x9bba, 0, 8, 0xc9 },
  351. { 0x9bc9, 0, 8, 0x79 },
  352. { 0xd011, 0, 8, 0x10 },
  353. { 0xd012, 0, 2, 0x01 },
  354. { 0xd013, 0, 8, 0x45 },
  355. { 0xd014, 0, 2, 0x03 },
  356. { 0xd040, 0, 8, 0x98 },
  357. { 0xd041, 0, 2, 0x00 },
  358. { 0xd042, 0, 8, 0xcf },
  359. { 0xd043, 0, 2, 0x03 },
  360. { 0xd045, 1, 1, 0x00 },
  361. { 0x9bcf, 0, 1, 0x01 },
  362. { 0xd045, 2, 1, 0x01 },
  363. { 0xd04f, 0, 8, 0x9a },
  364. { 0xd050, 0, 1, 0x01 },
  365. { 0xd051, 0, 8, 0x5a },
  366. { 0xd052, 0, 1, 0x01 },
  367. { 0xd053, 0, 8, 0x50 },
  368. { 0xd054, 0, 8, 0x46 },
  369. { 0x9bd7, 0, 8, 0x0a },
  370. { 0x9bd8, 0, 8, 0x14 },
  371. { 0x9bd9, 0, 8, 0x08 },
  372. { 0x9bd0, 0, 8, 0xcc },
  373. { 0x9be4, 0, 8, 0xa0 },
  374. { 0x9bbd, 0, 8, 0x8e },
  375. { 0x9be2, 0, 8, 0x4d },
  376. { 0x9bee, 0, 1, 0x01 },
  377. };
  378. /* Microtune MT2060 tuner init
  379. AF9013_TUNER_MT2060_2 = 147 */
  380. static struct regdesc tuner_init_mt2060_2[] = {
  381. { 0x9bd5, 0, 8, 0x01 },
  382. { 0x9bd6, 0, 8, 0x06 },
  383. { 0x9bbe, 0, 8, 0x01 },
  384. { 0xd1a0, 1, 1, 0x01 },
  385. { 0xd000, 0, 1, 0x01 },
  386. { 0xd000, 1, 1, 0x00 },
  387. { 0xd001, 1, 1, 0x01 },
  388. { 0xd001, 0, 1, 0x00 },
  389. { 0xd001, 5, 1, 0x00 },
  390. { 0xd002, 0, 5, 0x19 },
  391. { 0xd003, 0, 5, 0x1a },
  392. { 0xd004, 0, 5, 0x19 },
  393. { 0xd005, 0, 5, 0x1a },
  394. { 0xd00e, 0, 5, 0x10 },
  395. { 0xd00f, 0, 3, 0x04 },
  396. { 0xd00f, 3, 3, 0x05 },
  397. { 0xd010, 0, 3, 0x04 },
  398. { 0xd010, 3, 3, 0x05 },
  399. { 0xd016, 4, 4, 0x03 },
  400. { 0xd01f, 0, 6, 0x0a },
  401. { 0xd020, 0, 6, 0x0a },
  402. { 0xd015, 0, 8, 0x46 },
  403. { 0xd016, 0, 1, 0x00 },
  404. { 0xd044, 0, 8, 0x46 },
  405. { 0xd045, 0, 1, 0x00 },
  406. { 0xd008, 0, 8, 0x0f },
  407. { 0xd009, 0, 2, 0x02 },
  408. { 0xd006, 0, 8, 0x32 },
  409. { 0xd007, 0, 2, 0x01 },
  410. { 0xd00c, 0, 8, 0x36 },
  411. { 0xd00d, 0, 2, 0x03 },
  412. { 0xd00a, 0, 8, 0x35 },
  413. { 0xd00b, 0, 2, 0x01 },
  414. { 0x9bc7, 0, 8, 0x07 },
  415. { 0x9bc8, 0, 8, 0x90 },
  416. { 0x9bc3, 0, 8, 0x0f },
  417. { 0x9bc4, 0, 8, 0x02 },
  418. { 0x9bc5, 0, 8, 0x36 },
  419. { 0x9bc6, 0, 8, 0x03 },
  420. { 0x9bba, 0, 8, 0xc9 },
  421. { 0x9bc9, 0, 8, 0x79 },
  422. { 0xd011, 0, 8, 0x10 },
  423. { 0xd012, 0, 2, 0x01 },
  424. { 0xd013, 0, 8, 0x45 },
  425. { 0xd014, 0, 2, 0x03 },
  426. { 0xd040, 0, 8, 0x98 },
  427. { 0xd041, 0, 2, 0x00 },
  428. { 0xd042, 0, 8, 0xcf },
  429. { 0xd043, 0, 2, 0x03 },
  430. { 0xd045, 1, 1, 0x00 },
  431. { 0x9bcf, 0, 8, 0x01 },
  432. { 0xd045, 2, 1, 0x01 },
  433. { 0xd04f, 0, 8, 0x9a },
  434. { 0xd050, 0, 1, 0x01 },
  435. { 0xd051, 0, 8, 0x5a },
  436. { 0xd052, 0, 1, 0x01 },
  437. { 0xd053, 0, 8, 0x96 },
  438. { 0xd054, 0, 8, 0x46 },
  439. { 0xd045, 7, 1, 0x00 },
  440. { 0x9bd7, 0, 8, 0x0a },
  441. { 0x9bd8, 0, 8, 0x14 },
  442. { 0x9bd9, 0, 8, 0x08 },
  443. };
  444. /* MaxLinear MXL5003 tuner init
  445. AF9013_TUNER_MXL5003D = 3 */
  446. static struct regdesc tuner_init_mxl5003d[] = {
  447. { 0x9bd5, 0, 8, 0x01 },
  448. { 0x9bd6, 0, 8, 0x09 },
  449. { 0xd1a0, 1, 1, 0x01 },
  450. { 0xd000, 0, 1, 0x01 },
  451. { 0xd000, 1, 1, 0x00 },
  452. { 0xd001, 1, 1, 0x01 },
  453. { 0xd001, 0, 1, 0x00 },
  454. { 0xd001, 5, 1, 0x00 },
  455. { 0xd002, 0, 5, 0x19 },
  456. { 0xd003, 0, 5, 0x1a },
  457. { 0xd004, 0, 5, 0x19 },
  458. { 0xd005, 0, 5, 0x1a },
  459. { 0xd00e, 0, 5, 0x10 },
  460. { 0xd00f, 0, 3, 0x04 },
  461. { 0xd00f, 3, 3, 0x05 },
  462. { 0xd010, 0, 3, 0x04 },
  463. { 0xd010, 3, 3, 0x05 },
  464. { 0xd016, 4, 4, 0x03 },
  465. { 0xd01f, 0, 6, 0x0a },
  466. { 0xd020, 0, 6, 0x0a },
  467. { 0x9bda, 0, 8, 0x00 },
  468. { 0x9be3, 0, 8, 0x00 },
  469. { 0x9bfc, 0, 8, 0x0f },
  470. { 0x9bf6, 0, 8, 0x01 },
  471. { 0x9bbe, 0, 1, 0x01 },
  472. { 0xd015, 0, 8, 0x33 },
  473. { 0xd016, 0, 1, 0x00 },
  474. { 0xd044, 0, 8, 0x40 },
  475. { 0xd045, 0, 1, 0x00 },
  476. { 0xd008, 0, 8, 0x0f },
  477. { 0xd009, 0, 2, 0x02 },
  478. { 0xd006, 0, 8, 0x6c },
  479. { 0xd007, 0, 2, 0x00 },
  480. { 0xd00c, 0, 8, 0x3d },
  481. { 0xd00d, 0, 2, 0x00 },
  482. { 0xd00a, 0, 8, 0x45 },
  483. { 0xd00b, 0, 2, 0x01 },
  484. { 0x9bc7, 0, 8, 0x07 },
  485. { 0x9bc8, 0, 8, 0x52 },
  486. { 0x9bc3, 0, 8, 0x0f },
  487. { 0x9bc4, 0, 8, 0x02 },
  488. { 0x9bc5, 0, 8, 0x3d },
  489. { 0x9bc6, 0, 8, 0x00 },
  490. { 0x9bba, 0, 8, 0xa2 },
  491. { 0x9bc9, 0, 8, 0xa0 },
  492. { 0xd011, 0, 8, 0x56 },
  493. { 0xd012, 0, 2, 0x00 },
  494. { 0xd013, 0, 8, 0x50 },
  495. { 0xd014, 0, 2, 0x00 },
  496. { 0xd040, 0, 8, 0x56 },
  497. { 0xd041, 0, 2, 0x00 },
  498. { 0xd042, 0, 8, 0x50 },
  499. { 0xd043, 0, 2, 0x00 },
  500. { 0xd045, 1, 1, 0x00 },
  501. { 0x9bcf, 0, 8, 0x01 },
  502. { 0xd045, 2, 1, 0x01 },
  503. { 0xd04f, 0, 8, 0x9a },
  504. { 0xd050, 0, 1, 0x01 },
  505. { 0xd051, 0, 8, 0x5a },
  506. { 0xd052, 0, 1, 0x01 },
  507. { 0xd053, 0, 8, 0x50 },
  508. { 0xd054, 0, 8, 0x46 },
  509. { 0x9bd7, 0, 8, 0x0a },
  510. { 0x9bd8, 0, 8, 0x14 },
  511. { 0x9bd9, 0, 8, 0x08 },
  512. };
  513. /* MaxLinear MXL5005S & MXL5007T tuner init
  514. AF9013_TUNER_MXL5005D = 13
  515. AF9013_TUNER_MXL5005R = 30
  516. AF9013_TUNER_MXL5007T = 177 */
  517. static struct regdesc tuner_init_mxl5005[] = {
  518. { 0x9bd5, 0, 8, 0x01 },
  519. { 0x9bd6, 0, 8, 0x07 },
  520. { 0xd1a0, 1, 1, 0x01 },
  521. { 0xd000, 0, 1, 0x01 },
  522. { 0xd000, 1, 1, 0x00 },
  523. { 0xd001, 1, 1, 0x01 },
  524. { 0xd001, 0, 1, 0x00 },
  525. { 0xd001, 5, 1, 0x00 },
  526. { 0xd002, 0, 5, 0x19 },
  527. { 0xd003, 0, 5, 0x1a },
  528. { 0xd004, 0, 5, 0x19 },
  529. { 0xd005, 0, 5, 0x1a },
  530. { 0xd00e, 0, 5, 0x10 },
  531. { 0xd00f, 0, 3, 0x04 },
  532. { 0xd00f, 3, 3, 0x05 },
  533. { 0xd010, 0, 3, 0x04 },
  534. { 0xd010, 3, 3, 0x05 },
  535. { 0xd016, 4, 4, 0x03 },
  536. { 0xd01f, 0, 6, 0x0a },
  537. { 0xd020, 0, 6, 0x0a },
  538. { 0x9bda, 0, 8, 0x01 },
  539. { 0x9be3, 0, 8, 0x01 },
  540. { 0x9bbe, 0, 1, 0x01 },
  541. { 0x9bcc, 0, 1, 0x01 },
  542. { 0x9bb9, 0, 8, 0x00 },
  543. { 0x9bcd, 0, 8, 0x28 },
  544. { 0x9bff, 0, 8, 0x24 },
  545. { 0xd015, 0, 8, 0x40 },
  546. { 0xd016, 0, 1, 0x00 },
  547. { 0xd044, 0, 8, 0x40 },
  548. { 0xd045, 0, 1, 0x00 },
  549. { 0xd008, 0, 8, 0x0f },
  550. { 0xd009, 0, 2, 0x02 },
  551. { 0xd006, 0, 8, 0x73 },
  552. { 0xd007, 0, 2, 0x01 },
  553. { 0xd00c, 0, 8, 0xfa },
  554. { 0xd00d, 0, 2, 0x01 },
  555. { 0xd00a, 0, 8, 0xff },
  556. { 0xd00b, 0, 2, 0x01 },
  557. { 0x9bc7, 0, 8, 0x23 },
  558. { 0x9bc8, 0, 8, 0x55 },
  559. { 0x9bc3, 0, 8, 0x01 },
  560. { 0x9bc4, 0, 8, 0x02 },
  561. { 0x9bc5, 0, 8, 0xfa },
  562. { 0x9bc6, 0, 8, 0x01 },
  563. { 0x9bba, 0, 8, 0xff },
  564. { 0x9bc9, 0, 8, 0xff },
  565. { 0x9bd3, 0, 8, 0x95 },
  566. { 0xd011, 0, 8, 0x70 },
  567. { 0xd012, 0, 2, 0x01 },
  568. { 0xd013, 0, 8, 0xfb },
  569. { 0xd014, 0, 2, 0x01 },
  570. { 0xd040, 0, 8, 0x70 },
  571. { 0xd041, 0, 2, 0x01 },
  572. { 0xd042, 0, 8, 0xfb },
  573. { 0xd043, 0, 2, 0x01 },
  574. { 0xd045, 1, 1, 0x00 },
  575. { 0x9bcf, 0, 1, 0x01 },
  576. { 0xd045, 2, 1, 0x01 },
  577. { 0xd04f, 0, 8, 0x9a },
  578. { 0xd050, 0, 1, 0x01 },
  579. { 0xd051, 0, 8, 0x5a },
  580. { 0xd052, 0, 1, 0x01 },
  581. { 0xd053, 0, 8, 0x50 },
  582. { 0xd054, 0, 8, 0x46 },
  583. { 0x9bd7, 0, 8, 0x0a },
  584. { 0x9bd8, 0, 8, 0x14 },
  585. { 0x9bd9, 0, 8, 0x08 },
  586. { 0x9bd0, 0, 8, 0x93 },
  587. { 0x9be4, 0, 8, 0xfe },
  588. { 0x9bbd, 0, 8, 0x63 },
  589. { 0x9be2, 0, 8, 0xfe },
  590. { 0x9bee, 0, 1, 0x01 },
  591. };
  592. /* Quantek QT1010 tuner init
  593. AF9013_TUNER_QT1010 = 134
  594. AF9013_TUNER_QT1010A = 162 */
  595. static struct regdesc tuner_init_qt1010[] = {
  596. { 0x9bd5, 0, 8, 0x01 },
  597. { 0x9bd6, 0, 8, 0x09 },
  598. { 0xd1a0, 1, 1, 0x01 },
  599. { 0xd000, 0, 1, 0x01 },
  600. { 0xd000, 1, 1, 0x00 },
  601. { 0xd001, 1, 1, 0x01 },
  602. { 0xd001, 0, 1, 0x00 },
  603. { 0xd001, 5, 1, 0x00 },
  604. { 0xd002, 0, 5, 0x19 },
  605. { 0xd003, 0, 5, 0x1a },
  606. { 0xd004, 0, 5, 0x19 },
  607. { 0xd005, 0, 5, 0x1a },
  608. { 0xd00e, 0, 5, 0x10 },
  609. { 0xd00f, 0, 3, 0x04 },
  610. { 0xd00f, 3, 3, 0x05 },
  611. { 0xd010, 0, 3, 0x04 },
  612. { 0xd010, 3, 3, 0x05 },
  613. { 0xd016, 4, 4, 0x03 },
  614. { 0xd01f, 0, 6, 0x0a },
  615. { 0xd020, 0, 6, 0x0a },
  616. { 0x9bda, 0, 8, 0x01 },
  617. { 0x9be3, 0, 8, 0x01 },
  618. { 0xd015, 0, 8, 0x46 },
  619. { 0xd016, 0, 1, 0x00 },
  620. { 0xd044, 0, 8, 0x46 },
  621. { 0xd045, 0, 1, 0x00 },
  622. { 0x9bbe, 0, 1, 0x01 },
  623. { 0x9bcc, 0, 1, 0x01 },
  624. { 0x9bb9, 0, 8, 0x00 },
  625. { 0x9bcd, 0, 8, 0x28 },
  626. { 0x9bff, 0, 8, 0x20 },
  627. { 0xd008, 0, 8, 0x0f },
  628. { 0xd009, 0, 2, 0x02 },
  629. { 0xd006, 0, 8, 0x99 },
  630. { 0xd007, 0, 2, 0x01 },
  631. { 0xd00c, 0, 8, 0x0f },
  632. { 0xd00d, 0, 2, 0x02 },
  633. { 0xd00a, 0, 8, 0x50 },
  634. { 0xd00b, 0, 2, 0x01 },
  635. { 0x9bc7, 0, 8, 0x00 },
  636. { 0x9bc8, 0, 8, 0x00 },
  637. { 0x9bc3, 0, 8, 0x0f },
  638. { 0x9bc4, 0, 8, 0x02 },
  639. { 0x9bc5, 0, 8, 0x0f },
  640. { 0x9bc6, 0, 8, 0x02 },
  641. { 0x9bba, 0, 8, 0xc5 },
  642. { 0x9bc9, 0, 8, 0xff },
  643. { 0xd011, 0, 8, 0x58 },
  644. { 0xd012, 0, 2, 0x02 },
  645. { 0xd013, 0, 8, 0x89 },
  646. { 0xd014, 0, 2, 0x01 },
  647. { 0xd040, 0, 8, 0x58 },
  648. { 0xd041, 0, 2, 0x02 },
  649. { 0xd042, 0, 8, 0x89 },
  650. { 0xd043, 0, 2, 0x01 },
  651. { 0xd045, 1, 1, 0x00 },
  652. { 0x9bcf, 0, 1, 0x01 },
  653. { 0xd045, 2, 1, 0x01 },
  654. { 0xd04f, 0, 8, 0x9a },
  655. { 0xd050, 0, 1, 0x01 },
  656. { 0xd051, 0, 8, 0x5a },
  657. { 0xd052, 0, 1, 0x01 },
  658. { 0xd053, 0, 8, 0x50 },
  659. { 0xd054, 0, 8, 0x46 },
  660. { 0x9bd7, 0, 8, 0x0a },
  661. { 0x9bd8, 0, 8, 0x14 },
  662. { 0x9bd9, 0, 8, 0x08 },
  663. { 0x9bd0, 0, 8, 0xcd },
  664. { 0x9be4, 0, 8, 0xbb },
  665. { 0x9bbd, 0, 8, 0x93 },
  666. { 0x9be2, 0, 8, 0x80 },
  667. { 0x9bee, 0, 1, 0x01 },
  668. };
  669. /* Freescale MC44S803 tuner init
  670. AF9013_TUNER_MC44S803 = 133 */
  671. static struct regdesc tuner_init_mc44s803[] = {
  672. { 0x9bd5, 0, 8, 0x01 },
  673. { 0x9bd6, 0, 8, 0x06 },
  674. { 0xd1a0, 1, 1, 0x01 },
  675. { 0xd000, 0, 1, 0x01 },
  676. { 0xd000, 1, 1, 0x00 },
  677. { 0xd001, 1, 1, 0x01 },
  678. { 0xd001, 0, 1, 0x00 },
  679. { 0xd001, 5, 1, 0x00 },
  680. { 0xd002, 0, 5, 0x19 },
  681. { 0xd003, 0, 5, 0x1a },
  682. { 0xd004, 0, 5, 0x19 },
  683. { 0xd005, 0, 5, 0x1a },
  684. { 0xd00e, 0, 5, 0x10 },
  685. { 0xd00f, 0, 3, 0x04 },
  686. { 0xd00f, 3, 3, 0x05 },
  687. { 0xd010, 0, 3, 0x04 },
  688. { 0xd010, 3, 3, 0x05 },
  689. { 0xd016, 4, 4, 0x03 },
  690. { 0xd01f, 0, 6, 0x0a },
  691. { 0xd020, 0, 6, 0x0a },
  692. { 0x9bda, 0, 8, 0x00 },
  693. { 0x9be3, 0, 8, 0x00 },
  694. { 0x9bf6, 0, 8, 0x01 },
  695. { 0x9bf8, 0, 8, 0x02 },
  696. { 0x9bf9, 0, 8, 0x02 },
  697. { 0x9bfc, 0, 8, 0x1f },
  698. { 0x9bbe, 0, 1, 0x01 },
  699. { 0x9bcc, 0, 1, 0x01 },
  700. { 0x9bb9, 0, 8, 0x00 },
  701. { 0x9bcd, 0, 8, 0x24 },
  702. { 0x9bff, 0, 8, 0x24 },
  703. { 0xd015, 0, 8, 0x46 },
  704. { 0xd016, 0, 1, 0x00 },
  705. { 0xd044, 0, 8, 0x46 },
  706. { 0xd045, 0, 1, 0x00 },
  707. { 0xd008, 0, 8, 0x01 },
  708. { 0xd009, 0, 2, 0x02 },
  709. { 0xd006, 0, 8, 0x7b },
  710. { 0xd007, 0, 2, 0x00 },
  711. { 0xd00c, 0, 8, 0x7c },
  712. { 0xd00d, 0, 2, 0x02 },
  713. { 0xd00a, 0, 8, 0xfe },
  714. { 0xd00b, 0, 2, 0x01 },
  715. { 0x9bc7, 0, 8, 0x08 },
  716. { 0x9bc8, 0, 8, 0x9a },
  717. { 0x9bc3, 0, 8, 0x01 },
  718. { 0x9bc4, 0, 8, 0x02 },
  719. { 0x9bc5, 0, 8, 0x7c },
  720. { 0x9bc6, 0, 8, 0x02 },
  721. { 0x9bba, 0, 8, 0xfc },
  722. { 0x9bc9, 0, 8, 0xaa },
  723. { 0xd011, 0, 8, 0x6b },
  724. { 0xd012, 0, 2, 0x00 },
  725. { 0xd013, 0, 8, 0x88 },
  726. { 0xd014, 0, 2, 0x02 },
  727. { 0xd040, 0, 8, 0x6b },
  728. { 0xd041, 0, 2, 0x00 },
  729. { 0xd042, 0, 8, 0x7c },
  730. { 0xd043, 0, 2, 0x02 },
  731. { 0xd045, 1, 1, 0x00 },
  732. { 0x9bcf, 0, 1, 0x01 },
  733. { 0xd045, 2, 1, 0x01 },
  734. { 0xd04f, 0, 8, 0x9a },
  735. { 0xd050, 0, 1, 0x01 },
  736. { 0xd051, 0, 8, 0x5a },
  737. { 0xd052, 0, 1, 0x01 },
  738. { 0xd053, 0, 8, 0x50 },
  739. { 0xd054, 0, 8, 0x46 },
  740. { 0x9bd7, 0, 8, 0x0a },
  741. { 0x9bd8, 0, 8, 0x14 },
  742. { 0x9bd9, 0, 8, 0x08 },
  743. { 0x9bd0, 0, 8, 0x9e },
  744. { 0x9be4, 0, 8, 0xff },
  745. { 0x9bbd, 0, 8, 0x9e },
  746. { 0x9be2, 0, 8, 0x25 },
  747. { 0x9bee, 0, 1, 0x01 },
  748. { 0xd73b, 3, 1, 0x00 },
  749. };
  750. /* unknown, probably for tin can tuner, tuner init
  751. AF9013_TUNER_UNKNOWN = 140 */
  752. static struct regdesc tuner_init_unknown[] = {
  753. { 0x9bd5, 0, 8, 0x01 },
  754. { 0x9bd6, 0, 8, 0x02 },
  755. { 0xd1a0, 1, 1, 0x01 },
  756. { 0xd000, 0, 1, 0x01 },
  757. { 0xd000, 1, 1, 0x00 },
  758. { 0xd001, 1, 1, 0x01 },
  759. { 0xd001, 0, 1, 0x00 },
  760. { 0xd001, 5, 1, 0x00 },
  761. { 0xd002, 0, 5, 0x19 },
  762. { 0xd003, 0, 5, 0x1a },
  763. { 0xd004, 0, 5, 0x19 },
  764. { 0xd005, 0, 5, 0x1a },
  765. { 0xd00e, 0, 5, 0x10 },
  766. { 0xd00f, 0, 3, 0x04 },
  767. { 0xd00f, 3, 3, 0x05 },
  768. { 0xd010, 0, 3, 0x04 },
  769. { 0xd010, 3, 3, 0x05 },
  770. { 0xd016, 4, 4, 0x03 },
  771. { 0xd01f, 0, 6, 0x0a },
  772. { 0xd020, 0, 6, 0x0a },
  773. { 0x9bda, 0, 8, 0x01 },
  774. { 0x9be3, 0, 8, 0x01 },
  775. { 0xd1a0, 1, 1, 0x00 },
  776. { 0x9bbe, 0, 1, 0x01 },
  777. { 0x9bcc, 0, 1, 0x01 },
  778. { 0x9bb9, 0, 8, 0x00 },
  779. { 0x9bcd, 0, 8, 0x18 },
  780. { 0x9bff, 0, 8, 0x2c },
  781. { 0xd015, 0, 8, 0x46 },
  782. { 0xd016, 0, 1, 0x00 },
  783. { 0xd044, 0, 8, 0x46 },
  784. { 0xd045, 0, 1, 0x00 },
  785. { 0xd008, 0, 8, 0xdf },
  786. { 0xd009, 0, 2, 0x02 },
  787. { 0xd006, 0, 8, 0x44 },
  788. { 0xd007, 0, 2, 0x01 },
  789. { 0xd00c, 0, 8, 0x00 },
  790. { 0xd00d, 0, 2, 0x02 },
  791. { 0xd00a, 0, 8, 0xf6 },
  792. { 0xd00b, 0, 2, 0x01 },
  793. { 0x9bba, 0, 8, 0xf9 },
  794. { 0x9bc8, 0, 8, 0xaa },
  795. { 0x9bc3, 0, 8, 0xdf },
  796. { 0x9bc4, 0, 8, 0x02 },
  797. { 0x9bc5, 0, 8, 0x00 },
  798. { 0x9bc6, 0, 8, 0x02 },
  799. { 0x9bc9, 0, 8, 0xf0 },
  800. { 0xd011, 0, 8, 0x3c },
  801. { 0xd012, 0, 2, 0x01 },
  802. { 0xd013, 0, 8, 0xf7 },
  803. { 0xd014, 0, 2, 0x02 },
  804. { 0xd040, 0, 8, 0x0b },
  805. { 0xd041, 0, 2, 0x02 },
  806. { 0xd042, 0, 8, 0x4d },
  807. { 0xd043, 0, 2, 0x00 },
  808. { 0xd045, 1, 1, 0x00 },
  809. { 0x9bcf, 0, 1, 0x01 },
  810. { 0xd045, 2, 1, 0x01 },
  811. { 0xd04f, 0, 8, 0x9a },
  812. { 0xd050, 0, 1, 0x01 },
  813. { 0xd051, 0, 8, 0x5a },
  814. { 0xd052, 0, 1, 0x01 },
  815. { 0xd053, 0, 8, 0x50 },
  816. { 0xd054, 0, 8, 0x46 },
  817. { 0x9bd7, 0, 8, 0x0a },
  818. { 0x9bd8, 0, 8, 0x14 },
  819. { 0x9bd9, 0, 8, 0x08 },
  820. };
  821. /* NXP TDA18271 & TDA18218 tuner init
  822. AF9013_TUNER_TDA18271 = 156
  823. AF9013_TUNER_TDA18218 = 179 */
  824. static struct regdesc tuner_init_tda18271[] = {
  825. { 0x9bd5, 0, 8, 0x01 },
  826. { 0x9bd6, 0, 8, 0x04 },
  827. { 0xd1a0, 1, 1, 0x01 },
  828. { 0xd000, 0, 1, 0x01 },
  829. { 0xd000, 1, 1, 0x00 },
  830. { 0xd001, 1, 1, 0x01 },
  831. { 0xd001, 0, 1, 0x00 },
  832. { 0xd001, 5, 1, 0x00 },
  833. { 0xd002, 0, 5, 0x19 },
  834. { 0xd003, 0, 5, 0x1a },
  835. { 0xd004, 0, 5, 0x19 },
  836. { 0xd005, 0, 5, 0x1a },
  837. { 0xd00e, 0, 5, 0x10 },
  838. { 0xd00f, 0, 3, 0x04 },
  839. { 0xd00f, 3, 3, 0x05 },
  840. { 0xd010, 0, 3, 0x04 },
  841. { 0xd010, 3, 3, 0x05 },
  842. { 0xd016, 4, 4, 0x03 },
  843. { 0xd01f, 0, 6, 0x0a },
  844. { 0xd020, 0, 6, 0x0a },
  845. { 0x9bda, 0, 8, 0x01 },
  846. { 0x9be3, 0, 8, 0x01 },
  847. { 0xd1a0, 1, 1, 0x00 },
  848. { 0x9bbe, 0, 1, 0x01 },
  849. { 0x9bcc, 0, 1, 0x01 },
  850. { 0x9bb9, 0, 8, 0x00 },
  851. { 0x9bcd, 0, 8, 0x18 },
  852. { 0x9bff, 0, 8, 0x2c },
  853. { 0xd015, 0, 8, 0x46 },
  854. { 0xd016, 0, 1, 0x00 },
  855. { 0xd044, 0, 8, 0x46 },
  856. { 0xd045, 0, 1, 0x00 },
  857. { 0xd008, 0, 8, 0xdf },
  858. { 0xd009, 0, 2, 0x02 },
  859. { 0xd006, 0, 8, 0x44 },
  860. { 0xd007, 0, 2, 0x01 },
  861. { 0xd00c, 0, 8, 0x00 },
  862. { 0xd00d, 0, 2, 0x02 },
  863. { 0xd00a, 0, 8, 0xf6 },
  864. { 0xd00b, 0, 2, 0x01 },
  865. { 0x9bba, 0, 8, 0xf9 },
  866. { 0x9bc8, 0, 8, 0xaa },
  867. { 0x9bc3, 0, 8, 0xdf },
  868. { 0x9bc4, 0, 8, 0x02 },
  869. { 0x9bc5, 0, 8, 0x00 },
  870. { 0x9bc6, 0, 8, 0x02 },
  871. { 0x9bc9, 0, 8, 0xf0 },
  872. { 0xd011, 0, 8, 0x3c },
  873. { 0xd012, 0, 2, 0x01 },
  874. { 0xd013, 0, 8, 0xf7 },
  875. { 0xd014, 0, 2, 0x02 },
  876. { 0xd040, 0, 8, 0x0b },
  877. { 0xd041, 0, 2, 0x02 },
  878. { 0xd042, 0, 8, 0x4d },
  879. { 0xd043, 0, 2, 0x00 },
  880. { 0xd045, 1, 1, 0x00 },
  881. { 0x9bcf, 0, 1, 0x01 },
  882. { 0xd045, 2, 1, 0x01 },
  883. { 0xd04f, 0, 8, 0x9a },
  884. { 0xd050, 0, 1, 0x01 },
  885. { 0xd051, 0, 8, 0x5a },
  886. { 0xd052, 0, 1, 0x01 },
  887. { 0xd053, 0, 8, 0x50 },
  888. { 0xd054, 0, 8, 0x46 },
  889. { 0x9bd7, 0, 8, 0x0a },
  890. { 0x9bd8, 0, 8, 0x14 },
  891. { 0x9bd9, 0, 8, 0x08 },
  892. { 0x9bd0, 0, 8, 0xa8 },
  893. { 0x9be4, 0, 8, 0x7f },
  894. { 0x9bbd, 0, 8, 0xa8 },
  895. { 0x9be2, 0, 8, 0x20 },
  896. { 0x9bee, 0, 1, 0x01 },
  897. };
  898. #endif /* _AF9013_PRIV_ */