18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci tda18271-maps.c - driver for the Philips / NXP TDA18271 silicon tuner 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci Copyright (C) 2007, 2008 Michael Krufky <mkrufky@linuxtv.org> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci*/ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include "tda18271-priv.h" 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_cistruct tda18271_pll_map { 128c2ecf20Sopenharmony_ci u32 lomax; 138c2ecf20Sopenharmony_ci u8 pd; /* post div */ 148c2ecf20Sopenharmony_ci u8 d; /* div */ 158c2ecf20Sopenharmony_ci}; 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_cistruct tda18271_map { 188c2ecf20Sopenharmony_ci u32 rfmax; 198c2ecf20Sopenharmony_ci u8 val; 208c2ecf20Sopenharmony_ci}; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci/*---------------------------------------------------------------------*/ 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_cistatic struct tda18271_pll_map tda18271c1_main_pll[] = { 258c2ecf20Sopenharmony_ci { .lomax = 32000, .pd = 0x5f, .d = 0xf0 }, 268c2ecf20Sopenharmony_ci { .lomax = 35000, .pd = 0x5e, .d = 0xe0 }, 278c2ecf20Sopenharmony_ci { .lomax = 37000, .pd = 0x5d, .d = 0xd0 }, 288c2ecf20Sopenharmony_ci { .lomax = 41000, .pd = 0x5c, .d = 0xc0 }, 298c2ecf20Sopenharmony_ci { .lomax = 44000, .pd = 0x5b, .d = 0xb0 }, 308c2ecf20Sopenharmony_ci { .lomax = 49000, .pd = 0x5a, .d = 0xa0 }, 318c2ecf20Sopenharmony_ci { .lomax = 54000, .pd = 0x59, .d = 0x90 }, 328c2ecf20Sopenharmony_ci { .lomax = 61000, .pd = 0x58, .d = 0x80 }, 338c2ecf20Sopenharmony_ci { .lomax = 65000, .pd = 0x4f, .d = 0x78 }, 348c2ecf20Sopenharmony_ci { .lomax = 70000, .pd = 0x4e, .d = 0x70 }, 358c2ecf20Sopenharmony_ci { .lomax = 75000, .pd = 0x4d, .d = 0x68 }, 368c2ecf20Sopenharmony_ci { .lomax = 82000, .pd = 0x4c, .d = 0x60 }, 378c2ecf20Sopenharmony_ci { .lomax = 89000, .pd = 0x4b, .d = 0x58 }, 388c2ecf20Sopenharmony_ci { .lomax = 98000, .pd = 0x4a, .d = 0x50 }, 398c2ecf20Sopenharmony_ci { .lomax = 109000, .pd = 0x49, .d = 0x48 }, 408c2ecf20Sopenharmony_ci { .lomax = 123000, .pd = 0x48, .d = 0x40 }, 418c2ecf20Sopenharmony_ci { .lomax = 131000, .pd = 0x3f, .d = 0x3c }, 428c2ecf20Sopenharmony_ci { .lomax = 141000, .pd = 0x3e, .d = 0x38 }, 438c2ecf20Sopenharmony_ci { .lomax = 151000, .pd = 0x3d, .d = 0x34 }, 448c2ecf20Sopenharmony_ci { .lomax = 164000, .pd = 0x3c, .d = 0x30 }, 458c2ecf20Sopenharmony_ci { .lomax = 179000, .pd = 0x3b, .d = 0x2c }, 468c2ecf20Sopenharmony_ci { .lomax = 197000, .pd = 0x3a, .d = 0x28 }, 478c2ecf20Sopenharmony_ci { .lomax = 219000, .pd = 0x39, .d = 0x24 }, 488c2ecf20Sopenharmony_ci { .lomax = 246000, .pd = 0x38, .d = 0x20 }, 498c2ecf20Sopenharmony_ci { .lomax = 263000, .pd = 0x2f, .d = 0x1e }, 508c2ecf20Sopenharmony_ci { .lomax = 282000, .pd = 0x2e, .d = 0x1c }, 518c2ecf20Sopenharmony_ci { .lomax = 303000, .pd = 0x2d, .d = 0x1a }, 528c2ecf20Sopenharmony_ci { .lomax = 329000, .pd = 0x2c, .d = 0x18 }, 538c2ecf20Sopenharmony_ci { .lomax = 359000, .pd = 0x2b, .d = 0x16 }, 548c2ecf20Sopenharmony_ci { .lomax = 395000, .pd = 0x2a, .d = 0x14 }, 558c2ecf20Sopenharmony_ci { .lomax = 438000, .pd = 0x29, .d = 0x12 }, 568c2ecf20Sopenharmony_ci { .lomax = 493000, .pd = 0x28, .d = 0x10 }, 578c2ecf20Sopenharmony_ci { .lomax = 526000, .pd = 0x1f, .d = 0x0f }, 588c2ecf20Sopenharmony_ci { .lomax = 564000, .pd = 0x1e, .d = 0x0e }, 598c2ecf20Sopenharmony_ci { .lomax = 607000, .pd = 0x1d, .d = 0x0d }, 608c2ecf20Sopenharmony_ci { .lomax = 658000, .pd = 0x1c, .d = 0x0c }, 618c2ecf20Sopenharmony_ci { .lomax = 718000, .pd = 0x1b, .d = 0x0b }, 628c2ecf20Sopenharmony_ci { .lomax = 790000, .pd = 0x1a, .d = 0x0a }, 638c2ecf20Sopenharmony_ci { .lomax = 877000, .pd = 0x19, .d = 0x09 }, 648c2ecf20Sopenharmony_ci { .lomax = 987000, .pd = 0x18, .d = 0x08 }, 658c2ecf20Sopenharmony_ci { .lomax = 0, .pd = 0x00, .d = 0x00 }, /* end */ 668c2ecf20Sopenharmony_ci}; 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_cistatic struct tda18271_pll_map tda18271c2_main_pll[] = { 698c2ecf20Sopenharmony_ci { .lomax = 33125, .pd = 0x57, .d = 0xf0 }, 708c2ecf20Sopenharmony_ci { .lomax = 35500, .pd = 0x56, .d = 0xe0 }, 718c2ecf20Sopenharmony_ci { .lomax = 38188, .pd = 0x55, .d = 0xd0 }, 728c2ecf20Sopenharmony_ci { .lomax = 41375, .pd = 0x54, .d = 0xc0 }, 738c2ecf20Sopenharmony_ci { .lomax = 45125, .pd = 0x53, .d = 0xb0 }, 748c2ecf20Sopenharmony_ci { .lomax = 49688, .pd = 0x52, .d = 0xa0 }, 758c2ecf20Sopenharmony_ci { .lomax = 55188, .pd = 0x51, .d = 0x90 }, 768c2ecf20Sopenharmony_ci { .lomax = 62125, .pd = 0x50, .d = 0x80 }, 778c2ecf20Sopenharmony_ci { .lomax = 66250, .pd = 0x47, .d = 0x78 }, 788c2ecf20Sopenharmony_ci { .lomax = 71000, .pd = 0x46, .d = 0x70 }, 798c2ecf20Sopenharmony_ci { .lomax = 76375, .pd = 0x45, .d = 0x68 }, 808c2ecf20Sopenharmony_ci { .lomax = 82750, .pd = 0x44, .d = 0x60 }, 818c2ecf20Sopenharmony_ci { .lomax = 90250, .pd = 0x43, .d = 0x58 }, 828c2ecf20Sopenharmony_ci { .lomax = 99375, .pd = 0x42, .d = 0x50 }, 838c2ecf20Sopenharmony_ci { .lomax = 110375, .pd = 0x41, .d = 0x48 }, 848c2ecf20Sopenharmony_ci { .lomax = 124250, .pd = 0x40, .d = 0x40 }, 858c2ecf20Sopenharmony_ci { .lomax = 132500, .pd = 0x37, .d = 0x3c }, 868c2ecf20Sopenharmony_ci { .lomax = 142000, .pd = 0x36, .d = 0x38 }, 878c2ecf20Sopenharmony_ci { .lomax = 152750, .pd = 0x35, .d = 0x34 }, 888c2ecf20Sopenharmony_ci { .lomax = 165500, .pd = 0x34, .d = 0x30 }, 898c2ecf20Sopenharmony_ci { .lomax = 180500, .pd = 0x33, .d = 0x2c }, 908c2ecf20Sopenharmony_ci { .lomax = 198750, .pd = 0x32, .d = 0x28 }, 918c2ecf20Sopenharmony_ci { .lomax = 220750, .pd = 0x31, .d = 0x24 }, 928c2ecf20Sopenharmony_ci { .lomax = 248500, .pd = 0x30, .d = 0x20 }, 938c2ecf20Sopenharmony_ci { .lomax = 265000, .pd = 0x27, .d = 0x1e }, 948c2ecf20Sopenharmony_ci { .lomax = 284000, .pd = 0x26, .d = 0x1c }, 958c2ecf20Sopenharmony_ci { .lomax = 305500, .pd = 0x25, .d = 0x1a }, 968c2ecf20Sopenharmony_ci { .lomax = 331000, .pd = 0x24, .d = 0x18 }, 978c2ecf20Sopenharmony_ci { .lomax = 361000, .pd = 0x23, .d = 0x16 }, 988c2ecf20Sopenharmony_ci { .lomax = 397500, .pd = 0x22, .d = 0x14 }, 998c2ecf20Sopenharmony_ci { .lomax = 441500, .pd = 0x21, .d = 0x12 }, 1008c2ecf20Sopenharmony_ci { .lomax = 497000, .pd = 0x20, .d = 0x10 }, 1018c2ecf20Sopenharmony_ci { .lomax = 530000, .pd = 0x17, .d = 0x0f }, 1028c2ecf20Sopenharmony_ci { .lomax = 568000, .pd = 0x16, .d = 0x0e }, 1038c2ecf20Sopenharmony_ci { .lomax = 611000, .pd = 0x15, .d = 0x0d }, 1048c2ecf20Sopenharmony_ci { .lomax = 662000, .pd = 0x14, .d = 0x0c }, 1058c2ecf20Sopenharmony_ci { .lomax = 722000, .pd = 0x13, .d = 0x0b }, 1068c2ecf20Sopenharmony_ci { .lomax = 795000, .pd = 0x12, .d = 0x0a }, 1078c2ecf20Sopenharmony_ci { .lomax = 883000, .pd = 0x11, .d = 0x09 }, 1088c2ecf20Sopenharmony_ci { .lomax = 994000, .pd = 0x10, .d = 0x08 }, 1098c2ecf20Sopenharmony_ci { .lomax = 0, .pd = 0x00, .d = 0x00 }, /* end */ 1108c2ecf20Sopenharmony_ci}; 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_cistatic struct tda18271_pll_map tda18271c1_cal_pll[] = { 1138c2ecf20Sopenharmony_ci { .lomax = 33000, .pd = 0xdd, .d = 0xd0 }, 1148c2ecf20Sopenharmony_ci { .lomax = 36000, .pd = 0xdc, .d = 0xc0 }, 1158c2ecf20Sopenharmony_ci { .lomax = 40000, .pd = 0xdb, .d = 0xb0 }, 1168c2ecf20Sopenharmony_ci { .lomax = 44000, .pd = 0xda, .d = 0xa0 }, 1178c2ecf20Sopenharmony_ci { .lomax = 49000, .pd = 0xd9, .d = 0x90 }, 1188c2ecf20Sopenharmony_ci { .lomax = 55000, .pd = 0xd8, .d = 0x80 }, 1198c2ecf20Sopenharmony_ci { .lomax = 63000, .pd = 0xd3, .d = 0x70 }, 1208c2ecf20Sopenharmony_ci { .lomax = 67000, .pd = 0xcd, .d = 0x68 }, 1218c2ecf20Sopenharmony_ci { .lomax = 73000, .pd = 0xcc, .d = 0x60 }, 1228c2ecf20Sopenharmony_ci { .lomax = 80000, .pd = 0xcb, .d = 0x58 }, 1238c2ecf20Sopenharmony_ci { .lomax = 88000, .pd = 0xca, .d = 0x50 }, 1248c2ecf20Sopenharmony_ci { .lomax = 98000, .pd = 0xc9, .d = 0x48 }, 1258c2ecf20Sopenharmony_ci { .lomax = 110000, .pd = 0xc8, .d = 0x40 }, 1268c2ecf20Sopenharmony_ci { .lomax = 126000, .pd = 0xc3, .d = 0x38 }, 1278c2ecf20Sopenharmony_ci { .lomax = 135000, .pd = 0xbd, .d = 0x34 }, 1288c2ecf20Sopenharmony_ci { .lomax = 147000, .pd = 0xbc, .d = 0x30 }, 1298c2ecf20Sopenharmony_ci { .lomax = 160000, .pd = 0xbb, .d = 0x2c }, 1308c2ecf20Sopenharmony_ci { .lomax = 176000, .pd = 0xba, .d = 0x28 }, 1318c2ecf20Sopenharmony_ci { .lomax = 196000, .pd = 0xb9, .d = 0x24 }, 1328c2ecf20Sopenharmony_ci { .lomax = 220000, .pd = 0xb8, .d = 0x20 }, 1338c2ecf20Sopenharmony_ci { .lomax = 252000, .pd = 0xb3, .d = 0x1c }, 1348c2ecf20Sopenharmony_ci { .lomax = 271000, .pd = 0xad, .d = 0x1a }, 1358c2ecf20Sopenharmony_ci { .lomax = 294000, .pd = 0xac, .d = 0x18 }, 1368c2ecf20Sopenharmony_ci { .lomax = 321000, .pd = 0xab, .d = 0x16 }, 1378c2ecf20Sopenharmony_ci { .lomax = 353000, .pd = 0xaa, .d = 0x14 }, 1388c2ecf20Sopenharmony_ci { .lomax = 392000, .pd = 0xa9, .d = 0x12 }, 1398c2ecf20Sopenharmony_ci { .lomax = 441000, .pd = 0xa8, .d = 0x10 }, 1408c2ecf20Sopenharmony_ci { .lomax = 505000, .pd = 0xa3, .d = 0x0e }, 1418c2ecf20Sopenharmony_ci { .lomax = 543000, .pd = 0x9d, .d = 0x0d }, 1428c2ecf20Sopenharmony_ci { .lomax = 589000, .pd = 0x9c, .d = 0x0c }, 1438c2ecf20Sopenharmony_ci { .lomax = 642000, .pd = 0x9b, .d = 0x0b }, 1448c2ecf20Sopenharmony_ci { .lomax = 707000, .pd = 0x9a, .d = 0x0a }, 1458c2ecf20Sopenharmony_ci { .lomax = 785000, .pd = 0x99, .d = 0x09 }, 1468c2ecf20Sopenharmony_ci { .lomax = 883000, .pd = 0x98, .d = 0x08 }, 1478c2ecf20Sopenharmony_ci { .lomax = 1010000, .pd = 0x93, .d = 0x07 }, 1488c2ecf20Sopenharmony_ci { .lomax = 0, .pd = 0x00, .d = 0x00 }, /* end */ 1498c2ecf20Sopenharmony_ci}; 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_cistatic struct tda18271_pll_map tda18271c2_cal_pll[] = { 1528c2ecf20Sopenharmony_ci { .lomax = 33813, .pd = 0xdd, .d = 0xd0 }, 1538c2ecf20Sopenharmony_ci { .lomax = 36625, .pd = 0xdc, .d = 0xc0 }, 1548c2ecf20Sopenharmony_ci { .lomax = 39938, .pd = 0xdb, .d = 0xb0 }, 1558c2ecf20Sopenharmony_ci { .lomax = 43938, .pd = 0xda, .d = 0xa0 }, 1568c2ecf20Sopenharmony_ci { .lomax = 48813, .pd = 0xd9, .d = 0x90 }, 1578c2ecf20Sopenharmony_ci { .lomax = 54938, .pd = 0xd8, .d = 0x80 }, 1588c2ecf20Sopenharmony_ci { .lomax = 62813, .pd = 0xd3, .d = 0x70 }, 1598c2ecf20Sopenharmony_ci { .lomax = 67625, .pd = 0xcd, .d = 0x68 }, 1608c2ecf20Sopenharmony_ci { .lomax = 73250, .pd = 0xcc, .d = 0x60 }, 1618c2ecf20Sopenharmony_ci { .lomax = 79875, .pd = 0xcb, .d = 0x58 }, 1628c2ecf20Sopenharmony_ci { .lomax = 87875, .pd = 0xca, .d = 0x50 }, 1638c2ecf20Sopenharmony_ci { .lomax = 97625, .pd = 0xc9, .d = 0x48 }, 1648c2ecf20Sopenharmony_ci { .lomax = 109875, .pd = 0xc8, .d = 0x40 }, 1658c2ecf20Sopenharmony_ci { .lomax = 125625, .pd = 0xc3, .d = 0x38 }, 1668c2ecf20Sopenharmony_ci { .lomax = 135250, .pd = 0xbd, .d = 0x34 }, 1678c2ecf20Sopenharmony_ci { .lomax = 146500, .pd = 0xbc, .d = 0x30 }, 1688c2ecf20Sopenharmony_ci { .lomax = 159750, .pd = 0xbb, .d = 0x2c }, 1698c2ecf20Sopenharmony_ci { .lomax = 175750, .pd = 0xba, .d = 0x28 }, 1708c2ecf20Sopenharmony_ci { .lomax = 195250, .pd = 0xb9, .d = 0x24 }, 1718c2ecf20Sopenharmony_ci { .lomax = 219750, .pd = 0xb8, .d = 0x20 }, 1728c2ecf20Sopenharmony_ci { .lomax = 251250, .pd = 0xb3, .d = 0x1c }, 1738c2ecf20Sopenharmony_ci { .lomax = 270500, .pd = 0xad, .d = 0x1a }, 1748c2ecf20Sopenharmony_ci { .lomax = 293000, .pd = 0xac, .d = 0x18 }, 1758c2ecf20Sopenharmony_ci { .lomax = 319500, .pd = 0xab, .d = 0x16 }, 1768c2ecf20Sopenharmony_ci { .lomax = 351500, .pd = 0xaa, .d = 0x14 }, 1778c2ecf20Sopenharmony_ci { .lomax = 390500, .pd = 0xa9, .d = 0x12 }, 1788c2ecf20Sopenharmony_ci { .lomax = 439500, .pd = 0xa8, .d = 0x10 }, 1798c2ecf20Sopenharmony_ci { .lomax = 502500, .pd = 0xa3, .d = 0x0e }, 1808c2ecf20Sopenharmony_ci { .lomax = 541000, .pd = 0x9d, .d = 0x0d }, 1818c2ecf20Sopenharmony_ci { .lomax = 586000, .pd = 0x9c, .d = 0x0c }, 1828c2ecf20Sopenharmony_ci { .lomax = 639000, .pd = 0x9b, .d = 0x0b }, 1838c2ecf20Sopenharmony_ci { .lomax = 703000, .pd = 0x9a, .d = 0x0a }, 1848c2ecf20Sopenharmony_ci { .lomax = 781000, .pd = 0x99, .d = 0x09 }, 1858c2ecf20Sopenharmony_ci { .lomax = 879000, .pd = 0x98, .d = 0x08 }, 1868c2ecf20Sopenharmony_ci { .lomax = 0, .pd = 0x00, .d = 0x00 }, /* end */ 1878c2ecf20Sopenharmony_ci}; 1888c2ecf20Sopenharmony_ci 1898c2ecf20Sopenharmony_cistatic struct tda18271_map tda18271_bp_filter[] = { 1908c2ecf20Sopenharmony_ci { .rfmax = 62000, .val = 0x00 }, 1918c2ecf20Sopenharmony_ci { .rfmax = 84000, .val = 0x01 }, 1928c2ecf20Sopenharmony_ci { .rfmax = 100000, .val = 0x02 }, 1938c2ecf20Sopenharmony_ci { .rfmax = 140000, .val = 0x03 }, 1948c2ecf20Sopenharmony_ci { .rfmax = 170000, .val = 0x04 }, 1958c2ecf20Sopenharmony_ci { .rfmax = 180000, .val = 0x05 }, 1968c2ecf20Sopenharmony_ci { .rfmax = 865000, .val = 0x06 }, 1978c2ecf20Sopenharmony_ci { .rfmax = 0, .val = 0x00 }, /* end */ 1988c2ecf20Sopenharmony_ci}; 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_cistatic struct tda18271_map tda18271c1_km[] = { 2018c2ecf20Sopenharmony_ci { .rfmax = 61100, .val = 0x74 }, 2028c2ecf20Sopenharmony_ci { .rfmax = 350000, .val = 0x40 }, 2038c2ecf20Sopenharmony_ci { .rfmax = 720000, .val = 0x30 }, 2048c2ecf20Sopenharmony_ci { .rfmax = 865000, .val = 0x40 }, 2058c2ecf20Sopenharmony_ci { .rfmax = 0, .val = 0x00 }, /* end */ 2068c2ecf20Sopenharmony_ci}; 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_cistatic struct tda18271_map tda18271c2_km[] = { 2098c2ecf20Sopenharmony_ci { .rfmax = 47900, .val = 0x38 }, 2108c2ecf20Sopenharmony_ci { .rfmax = 61100, .val = 0x44 }, 2118c2ecf20Sopenharmony_ci { .rfmax = 350000, .val = 0x30 }, 2128c2ecf20Sopenharmony_ci { .rfmax = 720000, .val = 0x24 }, 2138c2ecf20Sopenharmony_ci { .rfmax = 865000, .val = 0x3c }, 2148c2ecf20Sopenharmony_ci { .rfmax = 0, .val = 0x00 }, /* end */ 2158c2ecf20Sopenharmony_ci}; 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_cistatic struct tda18271_map tda18271_rf_band[] = { 2188c2ecf20Sopenharmony_ci { .rfmax = 47900, .val = 0x00 }, 2198c2ecf20Sopenharmony_ci { .rfmax = 61100, .val = 0x01 }, 2208c2ecf20Sopenharmony_ci { .rfmax = 152600, .val = 0x02 }, 2218c2ecf20Sopenharmony_ci { .rfmax = 164700, .val = 0x03 }, 2228c2ecf20Sopenharmony_ci { .rfmax = 203500, .val = 0x04 }, 2238c2ecf20Sopenharmony_ci { .rfmax = 457800, .val = 0x05 }, 2248c2ecf20Sopenharmony_ci { .rfmax = 865000, .val = 0x06 }, 2258c2ecf20Sopenharmony_ci { .rfmax = 0, .val = 0x00 }, /* end */ 2268c2ecf20Sopenharmony_ci}; 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_cistatic struct tda18271_map tda18271_gain_taper[] = { 2298c2ecf20Sopenharmony_ci { .rfmax = 45400, .val = 0x1f }, 2308c2ecf20Sopenharmony_ci { .rfmax = 45800, .val = 0x1e }, 2318c2ecf20Sopenharmony_ci { .rfmax = 46200, .val = 0x1d }, 2328c2ecf20Sopenharmony_ci { .rfmax = 46700, .val = 0x1c }, 2338c2ecf20Sopenharmony_ci { .rfmax = 47100, .val = 0x1b }, 2348c2ecf20Sopenharmony_ci { .rfmax = 47500, .val = 0x1a }, 2358c2ecf20Sopenharmony_ci { .rfmax = 47900, .val = 0x19 }, 2368c2ecf20Sopenharmony_ci { .rfmax = 49600, .val = 0x17 }, 2378c2ecf20Sopenharmony_ci { .rfmax = 51200, .val = 0x16 }, 2388c2ecf20Sopenharmony_ci { .rfmax = 52900, .val = 0x15 }, 2398c2ecf20Sopenharmony_ci { .rfmax = 54500, .val = 0x14 }, 2408c2ecf20Sopenharmony_ci { .rfmax = 56200, .val = 0x13 }, 2418c2ecf20Sopenharmony_ci { .rfmax = 57800, .val = 0x12 }, 2428c2ecf20Sopenharmony_ci { .rfmax = 59500, .val = 0x11 }, 2438c2ecf20Sopenharmony_ci { .rfmax = 61100, .val = 0x10 }, 2448c2ecf20Sopenharmony_ci { .rfmax = 67600, .val = 0x0d }, 2458c2ecf20Sopenharmony_ci { .rfmax = 74200, .val = 0x0c }, 2468c2ecf20Sopenharmony_ci { .rfmax = 80700, .val = 0x0b }, 2478c2ecf20Sopenharmony_ci { .rfmax = 87200, .val = 0x0a }, 2488c2ecf20Sopenharmony_ci { .rfmax = 93800, .val = 0x09 }, 2498c2ecf20Sopenharmony_ci { .rfmax = 100300, .val = 0x08 }, 2508c2ecf20Sopenharmony_ci { .rfmax = 106900, .val = 0x07 }, 2518c2ecf20Sopenharmony_ci { .rfmax = 113400, .val = 0x06 }, 2528c2ecf20Sopenharmony_ci { .rfmax = 119900, .val = 0x05 }, 2538c2ecf20Sopenharmony_ci { .rfmax = 126500, .val = 0x04 }, 2548c2ecf20Sopenharmony_ci { .rfmax = 133000, .val = 0x03 }, 2558c2ecf20Sopenharmony_ci { .rfmax = 139500, .val = 0x02 }, 2568c2ecf20Sopenharmony_ci { .rfmax = 146100, .val = 0x01 }, 2578c2ecf20Sopenharmony_ci { .rfmax = 152600, .val = 0x00 }, 2588c2ecf20Sopenharmony_ci { .rfmax = 154300, .val = 0x1f }, 2598c2ecf20Sopenharmony_ci { .rfmax = 156100, .val = 0x1e }, 2608c2ecf20Sopenharmony_ci { .rfmax = 157800, .val = 0x1d }, 2618c2ecf20Sopenharmony_ci { .rfmax = 159500, .val = 0x1c }, 2628c2ecf20Sopenharmony_ci { .rfmax = 161200, .val = 0x1b }, 2638c2ecf20Sopenharmony_ci { .rfmax = 163000, .val = 0x1a }, 2648c2ecf20Sopenharmony_ci { .rfmax = 164700, .val = 0x19 }, 2658c2ecf20Sopenharmony_ci { .rfmax = 170200, .val = 0x17 }, 2668c2ecf20Sopenharmony_ci { .rfmax = 175800, .val = 0x16 }, 2678c2ecf20Sopenharmony_ci { .rfmax = 181300, .val = 0x15 }, 2688c2ecf20Sopenharmony_ci { .rfmax = 186900, .val = 0x14 }, 2698c2ecf20Sopenharmony_ci { .rfmax = 192400, .val = 0x13 }, 2708c2ecf20Sopenharmony_ci { .rfmax = 198000, .val = 0x12 }, 2718c2ecf20Sopenharmony_ci { .rfmax = 203500, .val = 0x11 }, 2728c2ecf20Sopenharmony_ci { .rfmax = 216200, .val = 0x14 }, 2738c2ecf20Sopenharmony_ci { .rfmax = 228900, .val = 0x13 }, 2748c2ecf20Sopenharmony_ci { .rfmax = 241600, .val = 0x12 }, 2758c2ecf20Sopenharmony_ci { .rfmax = 254400, .val = 0x11 }, 2768c2ecf20Sopenharmony_ci { .rfmax = 267100, .val = 0x10 }, 2778c2ecf20Sopenharmony_ci { .rfmax = 279800, .val = 0x0f }, 2788c2ecf20Sopenharmony_ci { .rfmax = 292500, .val = 0x0e }, 2798c2ecf20Sopenharmony_ci { .rfmax = 305200, .val = 0x0d }, 2808c2ecf20Sopenharmony_ci { .rfmax = 317900, .val = 0x0c }, 2818c2ecf20Sopenharmony_ci { .rfmax = 330700, .val = 0x0b }, 2828c2ecf20Sopenharmony_ci { .rfmax = 343400, .val = 0x0a }, 2838c2ecf20Sopenharmony_ci { .rfmax = 356100, .val = 0x09 }, 2848c2ecf20Sopenharmony_ci { .rfmax = 368800, .val = 0x08 }, 2858c2ecf20Sopenharmony_ci { .rfmax = 381500, .val = 0x07 }, 2868c2ecf20Sopenharmony_ci { .rfmax = 394200, .val = 0x06 }, 2878c2ecf20Sopenharmony_ci { .rfmax = 406900, .val = 0x05 }, 2888c2ecf20Sopenharmony_ci { .rfmax = 419700, .val = 0x04 }, 2898c2ecf20Sopenharmony_ci { .rfmax = 432400, .val = 0x03 }, 2908c2ecf20Sopenharmony_ci { .rfmax = 445100, .val = 0x02 }, 2918c2ecf20Sopenharmony_ci { .rfmax = 457800, .val = 0x01 }, 2928c2ecf20Sopenharmony_ci { .rfmax = 476300, .val = 0x19 }, 2938c2ecf20Sopenharmony_ci { .rfmax = 494800, .val = 0x18 }, 2948c2ecf20Sopenharmony_ci { .rfmax = 513300, .val = 0x17 }, 2958c2ecf20Sopenharmony_ci { .rfmax = 531800, .val = 0x16 }, 2968c2ecf20Sopenharmony_ci { .rfmax = 550300, .val = 0x15 }, 2978c2ecf20Sopenharmony_ci { .rfmax = 568900, .val = 0x14 }, 2988c2ecf20Sopenharmony_ci { .rfmax = 587400, .val = 0x13 }, 2998c2ecf20Sopenharmony_ci { .rfmax = 605900, .val = 0x12 }, 3008c2ecf20Sopenharmony_ci { .rfmax = 624400, .val = 0x11 }, 3018c2ecf20Sopenharmony_ci { .rfmax = 642900, .val = 0x10 }, 3028c2ecf20Sopenharmony_ci { .rfmax = 661400, .val = 0x0f }, 3038c2ecf20Sopenharmony_ci { .rfmax = 679900, .val = 0x0e }, 3048c2ecf20Sopenharmony_ci { .rfmax = 698400, .val = 0x0d }, 3058c2ecf20Sopenharmony_ci { .rfmax = 716900, .val = 0x0c }, 3068c2ecf20Sopenharmony_ci { .rfmax = 735400, .val = 0x0b }, 3078c2ecf20Sopenharmony_ci { .rfmax = 753900, .val = 0x0a }, 3088c2ecf20Sopenharmony_ci { .rfmax = 772500, .val = 0x09 }, 3098c2ecf20Sopenharmony_ci { .rfmax = 791000, .val = 0x08 }, 3108c2ecf20Sopenharmony_ci { .rfmax = 809500, .val = 0x07 }, 3118c2ecf20Sopenharmony_ci { .rfmax = 828000, .val = 0x06 }, 3128c2ecf20Sopenharmony_ci { .rfmax = 846500, .val = 0x05 }, 3138c2ecf20Sopenharmony_ci { .rfmax = 865000, .val = 0x04 }, 3148c2ecf20Sopenharmony_ci { .rfmax = 0, .val = 0x00 }, /* end */ 3158c2ecf20Sopenharmony_ci}; 3168c2ecf20Sopenharmony_ci 3178c2ecf20Sopenharmony_cistatic struct tda18271_map tda18271c1_rf_cal[] = { 3188c2ecf20Sopenharmony_ci { .rfmax = 41000, .val = 0x1e }, 3198c2ecf20Sopenharmony_ci { .rfmax = 43000, .val = 0x30 }, 3208c2ecf20Sopenharmony_ci { .rfmax = 45000, .val = 0x43 }, 3218c2ecf20Sopenharmony_ci { .rfmax = 46000, .val = 0x4d }, 3228c2ecf20Sopenharmony_ci { .rfmax = 47000, .val = 0x54 }, 3238c2ecf20Sopenharmony_ci { .rfmax = 47900, .val = 0x64 }, 3248c2ecf20Sopenharmony_ci { .rfmax = 49100, .val = 0x20 }, 3258c2ecf20Sopenharmony_ci { .rfmax = 50000, .val = 0x22 }, 3268c2ecf20Sopenharmony_ci { .rfmax = 51000, .val = 0x2a }, 3278c2ecf20Sopenharmony_ci { .rfmax = 53000, .val = 0x32 }, 3288c2ecf20Sopenharmony_ci { .rfmax = 55000, .val = 0x35 }, 3298c2ecf20Sopenharmony_ci { .rfmax = 56000, .val = 0x3c }, 3308c2ecf20Sopenharmony_ci { .rfmax = 57000, .val = 0x3f }, 3318c2ecf20Sopenharmony_ci { .rfmax = 58000, .val = 0x48 }, 3328c2ecf20Sopenharmony_ci { .rfmax = 59000, .val = 0x4d }, 3338c2ecf20Sopenharmony_ci { .rfmax = 60000, .val = 0x58 }, 3348c2ecf20Sopenharmony_ci { .rfmax = 61100, .val = 0x5f }, 3358c2ecf20Sopenharmony_ci { .rfmax = 0, .val = 0x00 }, /* end */ 3368c2ecf20Sopenharmony_ci}; 3378c2ecf20Sopenharmony_ci 3388c2ecf20Sopenharmony_cistatic struct tda18271_map tda18271c2_rf_cal[] = { 3398c2ecf20Sopenharmony_ci { .rfmax = 41000, .val = 0x0f }, 3408c2ecf20Sopenharmony_ci { .rfmax = 43000, .val = 0x1c }, 3418c2ecf20Sopenharmony_ci { .rfmax = 45000, .val = 0x2f }, 3428c2ecf20Sopenharmony_ci { .rfmax = 46000, .val = 0x39 }, 3438c2ecf20Sopenharmony_ci { .rfmax = 47000, .val = 0x40 }, 3448c2ecf20Sopenharmony_ci { .rfmax = 47900, .val = 0x50 }, 3458c2ecf20Sopenharmony_ci { .rfmax = 49100, .val = 0x16 }, 3468c2ecf20Sopenharmony_ci { .rfmax = 50000, .val = 0x18 }, 3478c2ecf20Sopenharmony_ci { .rfmax = 51000, .val = 0x20 }, 3488c2ecf20Sopenharmony_ci { .rfmax = 53000, .val = 0x28 }, 3498c2ecf20Sopenharmony_ci { .rfmax = 55000, .val = 0x2b }, 3508c2ecf20Sopenharmony_ci { .rfmax = 56000, .val = 0x32 }, 3518c2ecf20Sopenharmony_ci { .rfmax = 57000, .val = 0x35 }, 3528c2ecf20Sopenharmony_ci { .rfmax = 58000, .val = 0x3e }, 3538c2ecf20Sopenharmony_ci { .rfmax = 59000, .val = 0x43 }, 3548c2ecf20Sopenharmony_ci { .rfmax = 60000, .val = 0x4e }, 3558c2ecf20Sopenharmony_ci { .rfmax = 61100, .val = 0x55 }, 3568c2ecf20Sopenharmony_ci { .rfmax = 63000, .val = 0x0f }, 3578c2ecf20Sopenharmony_ci { .rfmax = 64000, .val = 0x11 }, 3588c2ecf20Sopenharmony_ci { .rfmax = 65000, .val = 0x12 }, 3598c2ecf20Sopenharmony_ci { .rfmax = 66000, .val = 0x15 }, 3608c2ecf20Sopenharmony_ci { .rfmax = 67000, .val = 0x16 }, 3618c2ecf20Sopenharmony_ci { .rfmax = 68000, .val = 0x17 }, 3628c2ecf20Sopenharmony_ci { .rfmax = 70000, .val = 0x19 }, 3638c2ecf20Sopenharmony_ci { .rfmax = 71000, .val = 0x1c }, 3648c2ecf20Sopenharmony_ci { .rfmax = 72000, .val = 0x1d }, 3658c2ecf20Sopenharmony_ci { .rfmax = 73000, .val = 0x1f }, 3668c2ecf20Sopenharmony_ci { .rfmax = 74000, .val = 0x20 }, 3678c2ecf20Sopenharmony_ci { .rfmax = 75000, .val = 0x21 }, 3688c2ecf20Sopenharmony_ci { .rfmax = 76000, .val = 0x24 }, 3698c2ecf20Sopenharmony_ci { .rfmax = 77000, .val = 0x25 }, 3708c2ecf20Sopenharmony_ci { .rfmax = 78000, .val = 0x27 }, 3718c2ecf20Sopenharmony_ci { .rfmax = 80000, .val = 0x28 }, 3728c2ecf20Sopenharmony_ci { .rfmax = 81000, .val = 0x29 }, 3738c2ecf20Sopenharmony_ci { .rfmax = 82000, .val = 0x2d }, 3748c2ecf20Sopenharmony_ci { .rfmax = 83000, .val = 0x2e }, 3758c2ecf20Sopenharmony_ci { .rfmax = 84000, .val = 0x2f }, 3768c2ecf20Sopenharmony_ci { .rfmax = 85000, .val = 0x31 }, 3778c2ecf20Sopenharmony_ci { .rfmax = 86000, .val = 0x33 }, 3788c2ecf20Sopenharmony_ci { .rfmax = 87000, .val = 0x34 }, 3798c2ecf20Sopenharmony_ci { .rfmax = 88000, .val = 0x35 }, 3808c2ecf20Sopenharmony_ci { .rfmax = 89000, .val = 0x37 }, 3818c2ecf20Sopenharmony_ci { .rfmax = 90000, .val = 0x38 }, 3828c2ecf20Sopenharmony_ci { .rfmax = 91000, .val = 0x39 }, 3838c2ecf20Sopenharmony_ci { .rfmax = 93000, .val = 0x3c }, 3848c2ecf20Sopenharmony_ci { .rfmax = 94000, .val = 0x3e }, 3858c2ecf20Sopenharmony_ci { .rfmax = 95000, .val = 0x3f }, 3868c2ecf20Sopenharmony_ci { .rfmax = 96000, .val = 0x40 }, 3878c2ecf20Sopenharmony_ci { .rfmax = 97000, .val = 0x42 }, 3888c2ecf20Sopenharmony_ci { .rfmax = 99000, .val = 0x45 }, 3898c2ecf20Sopenharmony_ci { .rfmax = 100000, .val = 0x46 }, 3908c2ecf20Sopenharmony_ci { .rfmax = 102000, .val = 0x48 }, 3918c2ecf20Sopenharmony_ci { .rfmax = 103000, .val = 0x4a }, 3928c2ecf20Sopenharmony_ci { .rfmax = 105000, .val = 0x4d }, 3938c2ecf20Sopenharmony_ci { .rfmax = 106000, .val = 0x4e }, 3948c2ecf20Sopenharmony_ci { .rfmax = 107000, .val = 0x50 }, 3958c2ecf20Sopenharmony_ci { .rfmax = 108000, .val = 0x51 }, 3968c2ecf20Sopenharmony_ci { .rfmax = 110000, .val = 0x54 }, 3978c2ecf20Sopenharmony_ci { .rfmax = 111000, .val = 0x56 }, 3988c2ecf20Sopenharmony_ci { .rfmax = 112000, .val = 0x57 }, 3998c2ecf20Sopenharmony_ci { .rfmax = 113000, .val = 0x58 }, 4008c2ecf20Sopenharmony_ci { .rfmax = 114000, .val = 0x59 }, 4018c2ecf20Sopenharmony_ci { .rfmax = 115000, .val = 0x5c }, 4028c2ecf20Sopenharmony_ci { .rfmax = 116000, .val = 0x5d }, 4038c2ecf20Sopenharmony_ci { .rfmax = 117000, .val = 0x5f }, 4048c2ecf20Sopenharmony_ci { .rfmax = 119000, .val = 0x60 }, 4058c2ecf20Sopenharmony_ci { .rfmax = 120000, .val = 0x64 }, 4068c2ecf20Sopenharmony_ci { .rfmax = 121000, .val = 0x65 }, 4078c2ecf20Sopenharmony_ci { .rfmax = 122000, .val = 0x66 }, 4088c2ecf20Sopenharmony_ci { .rfmax = 123000, .val = 0x68 }, 4098c2ecf20Sopenharmony_ci { .rfmax = 124000, .val = 0x69 }, 4108c2ecf20Sopenharmony_ci { .rfmax = 125000, .val = 0x6c }, 4118c2ecf20Sopenharmony_ci { .rfmax = 126000, .val = 0x6d }, 4128c2ecf20Sopenharmony_ci { .rfmax = 127000, .val = 0x6e }, 4138c2ecf20Sopenharmony_ci { .rfmax = 128000, .val = 0x70 }, 4148c2ecf20Sopenharmony_ci { .rfmax = 129000, .val = 0x71 }, 4158c2ecf20Sopenharmony_ci { .rfmax = 130000, .val = 0x75 }, 4168c2ecf20Sopenharmony_ci { .rfmax = 131000, .val = 0x77 }, 4178c2ecf20Sopenharmony_ci { .rfmax = 132000, .val = 0x78 }, 4188c2ecf20Sopenharmony_ci { .rfmax = 133000, .val = 0x7b }, 4198c2ecf20Sopenharmony_ci { .rfmax = 134000, .val = 0x7e }, 4208c2ecf20Sopenharmony_ci { .rfmax = 135000, .val = 0x81 }, 4218c2ecf20Sopenharmony_ci { .rfmax = 136000, .val = 0x82 }, 4228c2ecf20Sopenharmony_ci { .rfmax = 137000, .val = 0x87 }, 4238c2ecf20Sopenharmony_ci { .rfmax = 138000, .val = 0x88 }, 4248c2ecf20Sopenharmony_ci { .rfmax = 139000, .val = 0x8d }, 4258c2ecf20Sopenharmony_ci { .rfmax = 140000, .val = 0x8e }, 4268c2ecf20Sopenharmony_ci { .rfmax = 141000, .val = 0x91 }, 4278c2ecf20Sopenharmony_ci { .rfmax = 142000, .val = 0x95 }, 4288c2ecf20Sopenharmony_ci { .rfmax = 143000, .val = 0x9a }, 4298c2ecf20Sopenharmony_ci { .rfmax = 144000, .val = 0x9d }, 4308c2ecf20Sopenharmony_ci { .rfmax = 145000, .val = 0xa1 }, 4318c2ecf20Sopenharmony_ci { .rfmax = 146000, .val = 0xa2 }, 4328c2ecf20Sopenharmony_ci { .rfmax = 147000, .val = 0xa4 }, 4338c2ecf20Sopenharmony_ci { .rfmax = 148000, .val = 0xa9 }, 4348c2ecf20Sopenharmony_ci { .rfmax = 149000, .val = 0xae }, 4358c2ecf20Sopenharmony_ci { .rfmax = 150000, .val = 0xb0 }, 4368c2ecf20Sopenharmony_ci { .rfmax = 151000, .val = 0xb1 }, 4378c2ecf20Sopenharmony_ci { .rfmax = 152000, .val = 0xb7 }, 4388c2ecf20Sopenharmony_ci { .rfmax = 152600, .val = 0xbd }, 4398c2ecf20Sopenharmony_ci { .rfmax = 154000, .val = 0x20 }, 4408c2ecf20Sopenharmony_ci { .rfmax = 155000, .val = 0x22 }, 4418c2ecf20Sopenharmony_ci { .rfmax = 156000, .val = 0x24 }, 4428c2ecf20Sopenharmony_ci { .rfmax = 157000, .val = 0x25 }, 4438c2ecf20Sopenharmony_ci { .rfmax = 158000, .val = 0x27 }, 4448c2ecf20Sopenharmony_ci { .rfmax = 159000, .val = 0x29 }, 4458c2ecf20Sopenharmony_ci { .rfmax = 160000, .val = 0x2c }, 4468c2ecf20Sopenharmony_ci { .rfmax = 161000, .val = 0x2d }, 4478c2ecf20Sopenharmony_ci { .rfmax = 163000, .val = 0x2e }, 4488c2ecf20Sopenharmony_ci { .rfmax = 164000, .val = 0x2f }, 4498c2ecf20Sopenharmony_ci { .rfmax = 164700, .val = 0x30 }, 4508c2ecf20Sopenharmony_ci { .rfmax = 166000, .val = 0x11 }, 4518c2ecf20Sopenharmony_ci { .rfmax = 167000, .val = 0x12 }, 4528c2ecf20Sopenharmony_ci { .rfmax = 168000, .val = 0x13 }, 4538c2ecf20Sopenharmony_ci { .rfmax = 169000, .val = 0x14 }, 4548c2ecf20Sopenharmony_ci { .rfmax = 170000, .val = 0x15 }, 4558c2ecf20Sopenharmony_ci { .rfmax = 172000, .val = 0x16 }, 4568c2ecf20Sopenharmony_ci { .rfmax = 173000, .val = 0x17 }, 4578c2ecf20Sopenharmony_ci { .rfmax = 174000, .val = 0x18 }, 4588c2ecf20Sopenharmony_ci { .rfmax = 175000, .val = 0x1a }, 4598c2ecf20Sopenharmony_ci { .rfmax = 176000, .val = 0x1b }, 4608c2ecf20Sopenharmony_ci { .rfmax = 178000, .val = 0x1d }, 4618c2ecf20Sopenharmony_ci { .rfmax = 179000, .val = 0x1e }, 4628c2ecf20Sopenharmony_ci { .rfmax = 180000, .val = 0x1f }, 4638c2ecf20Sopenharmony_ci { .rfmax = 181000, .val = 0x20 }, 4648c2ecf20Sopenharmony_ci { .rfmax = 182000, .val = 0x21 }, 4658c2ecf20Sopenharmony_ci { .rfmax = 183000, .val = 0x22 }, 4668c2ecf20Sopenharmony_ci { .rfmax = 184000, .val = 0x24 }, 4678c2ecf20Sopenharmony_ci { .rfmax = 185000, .val = 0x25 }, 4688c2ecf20Sopenharmony_ci { .rfmax = 186000, .val = 0x26 }, 4698c2ecf20Sopenharmony_ci { .rfmax = 187000, .val = 0x27 }, 4708c2ecf20Sopenharmony_ci { .rfmax = 188000, .val = 0x29 }, 4718c2ecf20Sopenharmony_ci { .rfmax = 189000, .val = 0x2a }, 4728c2ecf20Sopenharmony_ci { .rfmax = 190000, .val = 0x2c }, 4738c2ecf20Sopenharmony_ci { .rfmax = 191000, .val = 0x2d }, 4748c2ecf20Sopenharmony_ci { .rfmax = 192000, .val = 0x2e }, 4758c2ecf20Sopenharmony_ci { .rfmax = 193000, .val = 0x2f }, 4768c2ecf20Sopenharmony_ci { .rfmax = 194000, .val = 0x30 }, 4778c2ecf20Sopenharmony_ci { .rfmax = 195000, .val = 0x33 }, 4788c2ecf20Sopenharmony_ci { .rfmax = 196000, .val = 0x35 }, 4798c2ecf20Sopenharmony_ci { .rfmax = 198000, .val = 0x36 }, 4808c2ecf20Sopenharmony_ci { .rfmax = 200000, .val = 0x38 }, 4818c2ecf20Sopenharmony_ci { .rfmax = 201000, .val = 0x3c }, 4828c2ecf20Sopenharmony_ci { .rfmax = 202000, .val = 0x3d }, 4838c2ecf20Sopenharmony_ci { .rfmax = 203500, .val = 0x3e }, 4848c2ecf20Sopenharmony_ci { .rfmax = 206000, .val = 0x0e }, 4858c2ecf20Sopenharmony_ci { .rfmax = 208000, .val = 0x0f }, 4868c2ecf20Sopenharmony_ci { .rfmax = 212000, .val = 0x10 }, 4878c2ecf20Sopenharmony_ci { .rfmax = 216000, .val = 0x11 }, 4888c2ecf20Sopenharmony_ci { .rfmax = 217000, .val = 0x12 }, 4898c2ecf20Sopenharmony_ci { .rfmax = 218000, .val = 0x13 }, 4908c2ecf20Sopenharmony_ci { .rfmax = 220000, .val = 0x14 }, 4918c2ecf20Sopenharmony_ci { .rfmax = 222000, .val = 0x15 }, 4928c2ecf20Sopenharmony_ci { .rfmax = 225000, .val = 0x16 }, 4938c2ecf20Sopenharmony_ci { .rfmax = 228000, .val = 0x17 }, 4948c2ecf20Sopenharmony_ci { .rfmax = 231000, .val = 0x18 }, 4958c2ecf20Sopenharmony_ci { .rfmax = 234000, .val = 0x19 }, 4968c2ecf20Sopenharmony_ci { .rfmax = 235000, .val = 0x1a }, 4978c2ecf20Sopenharmony_ci { .rfmax = 236000, .val = 0x1b }, 4988c2ecf20Sopenharmony_ci { .rfmax = 237000, .val = 0x1c }, 4998c2ecf20Sopenharmony_ci { .rfmax = 240000, .val = 0x1d }, 5008c2ecf20Sopenharmony_ci { .rfmax = 242000, .val = 0x1e }, 5018c2ecf20Sopenharmony_ci { .rfmax = 244000, .val = 0x1f }, 5028c2ecf20Sopenharmony_ci { .rfmax = 247000, .val = 0x20 }, 5038c2ecf20Sopenharmony_ci { .rfmax = 249000, .val = 0x21 }, 5048c2ecf20Sopenharmony_ci { .rfmax = 252000, .val = 0x22 }, 5058c2ecf20Sopenharmony_ci { .rfmax = 253000, .val = 0x23 }, 5068c2ecf20Sopenharmony_ci { .rfmax = 254000, .val = 0x24 }, 5078c2ecf20Sopenharmony_ci { .rfmax = 256000, .val = 0x25 }, 5088c2ecf20Sopenharmony_ci { .rfmax = 259000, .val = 0x26 }, 5098c2ecf20Sopenharmony_ci { .rfmax = 262000, .val = 0x27 }, 5108c2ecf20Sopenharmony_ci { .rfmax = 264000, .val = 0x28 }, 5118c2ecf20Sopenharmony_ci { .rfmax = 267000, .val = 0x29 }, 5128c2ecf20Sopenharmony_ci { .rfmax = 269000, .val = 0x2a }, 5138c2ecf20Sopenharmony_ci { .rfmax = 271000, .val = 0x2b }, 5148c2ecf20Sopenharmony_ci { .rfmax = 273000, .val = 0x2c }, 5158c2ecf20Sopenharmony_ci { .rfmax = 275000, .val = 0x2d }, 5168c2ecf20Sopenharmony_ci { .rfmax = 277000, .val = 0x2e }, 5178c2ecf20Sopenharmony_ci { .rfmax = 279000, .val = 0x2f }, 5188c2ecf20Sopenharmony_ci { .rfmax = 282000, .val = 0x30 }, 5198c2ecf20Sopenharmony_ci { .rfmax = 284000, .val = 0x31 }, 5208c2ecf20Sopenharmony_ci { .rfmax = 286000, .val = 0x32 }, 5218c2ecf20Sopenharmony_ci { .rfmax = 287000, .val = 0x33 }, 5228c2ecf20Sopenharmony_ci { .rfmax = 290000, .val = 0x34 }, 5238c2ecf20Sopenharmony_ci { .rfmax = 293000, .val = 0x35 }, 5248c2ecf20Sopenharmony_ci { .rfmax = 295000, .val = 0x36 }, 5258c2ecf20Sopenharmony_ci { .rfmax = 297000, .val = 0x37 }, 5268c2ecf20Sopenharmony_ci { .rfmax = 300000, .val = 0x38 }, 5278c2ecf20Sopenharmony_ci { .rfmax = 303000, .val = 0x39 }, 5288c2ecf20Sopenharmony_ci { .rfmax = 305000, .val = 0x3a }, 5298c2ecf20Sopenharmony_ci { .rfmax = 306000, .val = 0x3b }, 5308c2ecf20Sopenharmony_ci { .rfmax = 307000, .val = 0x3c }, 5318c2ecf20Sopenharmony_ci { .rfmax = 310000, .val = 0x3d }, 5328c2ecf20Sopenharmony_ci { .rfmax = 312000, .val = 0x3e }, 5338c2ecf20Sopenharmony_ci { .rfmax = 315000, .val = 0x3f }, 5348c2ecf20Sopenharmony_ci { .rfmax = 318000, .val = 0x40 }, 5358c2ecf20Sopenharmony_ci { .rfmax = 320000, .val = 0x41 }, 5368c2ecf20Sopenharmony_ci { .rfmax = 323000, .val = 0x42 }, 5378c2ecf20Sopenharmony_ci { .rfmax = 324000, .val = 0x43 }, 5388c2ecf20Sopenharmony_ci { .rfmax = 325000, .val = 0x44 }, 5398c2ecf20Sopenharmony_ci { .rfmax = 327000, .val = 0x45 }, 5408c2ecf20Sopenharmony_ci { .rfmax = 331000, .val = 0x46 }, 5418c2ecf20Sopenharmony_ci { .rfmax = 334000, .val = 0x47 }, 5428c2ecf20Sopenharmony_ci { .rfmax = 337000, .val = 0x48 }, 5438c2ecf20Sopenharmony_ci { .rfmax = 339000, .val = 0x49 }, 5448c2ecf20Sopenharmony_ci { .rfmax = 340000, .val = 0x4a }, 5458c2ecf20Sopenharmony_ci { .rfmax = 341000, .val = 0x4b }, 5468c2ecf20Sopenharmony_ci { .rfmax = 343000, .val = 0x4c }, 5478c2ecf20Sopenharmony_ci { .rfmax = 345000, .val = 0x4d }, 5488c2ecf20Sopenharmony_ci { .rfmax = 349000, .val = 0x4e }, 5498c2ecf20Sopenharmony_ci { .rfmax = 352000, .val = 0x4f }, 5508c2ecf20Sopenharmony_ci { .rfmax = 353000, .val = 0x50 }, 5518c2ecf20Sopenharmony_ci { .rfmax = 355000, .val = 0x51 }, 5528c2ecf20Sopenharmony_ci { .rfmax = 357000, .val = 0x52 }, 5538c2ecf20Sopenharmony_ci { .rfmax = 359000, .val = 0x53 }, 5548c2ecf20Sopenharmony_ci { .rfmax = 361000, .val = 0x54 }, 5558c2ecf20Sopenharmony_ci { .rfmax = 362000, .val = 0x55 }, 5568c2ecf20Sopenharmony_ci { .rfmax = 364000, .val = 0x56 }, 5578c2ecf20Sopenharmony_ci { .rfmax = 368000, .val = 0x57 }, 5588c2ecf20Sopenharmony_ci { .rfmax = 370000, .val = 0x58 }, 5598c2ecf20Sopenharmony_ci { .rfmax = 372000, .val = 0x59 }, 5608c2ecf20Sopenharmony_ci { .rfmax = 375000, .val = 0x5a }, 5618c2ecf20Sopenharmony_ci { .rfmax = 376000, .val = 0x5b }, 5628c2ecf20Sopenharmony_ci { .rfmax = 377000, .val = 0x5c }, 5638c2ecf20Sopenharmony_ci { .rfmax = 379000, .val = 0x5d }, 5648c2ecf20Sopenharmony_ci { .rfmax = 382000, .val = 0x5e }, 5658c2ecf20Sopenharmony_ci { .rfmax = 384000, .val = 0x5f }, 5668c2ecf20Sopenharmony_ci { .rfmax = 385000, .val = 0x60 }, 5678c2ecf20Sopenharmony_ci { .rfmax = 386000, .val = 0x61 }, 5688c2ecf20Sopenharmony_ci { .rfmax = 388000, .val = 0x62 }, 5698c2ecf20Sopenharmony_ci { .rfmax = 390000, .val = 0x63 }, 5708c2ecf20Sopenharmony_ci { .rfmax = 393000, .val = 0x64 }, 5718c2ecf20Sopenharmony_ci { .rfmax = 394000, .val = 0x65 }, 5728c2ecf20Sopenharmony_ci { .rfmax = 396000, .val = 0x66 }, 5738c2ecf20Sopenharmony_ci { .rfmax = 397000, .val = 0x67 }, 5748c2ecf20Sopenharmony_ci { .rfmax = 398000, .val = 0x68 }, 5758c2ecf20Sopenharmony_ci { .rfmax = 400000, .val = 0x69 }, 5768c2ecf20Sopenharmony_ci { .rfmax = 402000, .val = 0x6a }, 5778c2ecf20Sopenharmony_ci { .rfmax = 403000, .val = 0x6b }, 5788c2ecf20Sopenharmony_ci { .rfmax = 407000, .val = 0x6c }, 5798c2ecf20Sopenharmony_ci { .rfmax = 408000, .val = 0x6d }, 5808c2ecf20Sopenharmony_ci { .rfmax = 409000, .val = 0x6e }, 5818c2ecf20Sopenharmony_ci { .rfmax = 410000, .val = 0x6f }, 5828c2ecf20Sopenharmony_ci { .rfmax = 411000, .val = 0x70 }, 5838c2ecf20Sopenharmony_ci { .rfmax = 412000, .val = 0x71 }, 5848c2ecf20Sopenharmony_ci { .rfmax = 413000, .val = 0x72 }, 5858c2ecf20Sopenharmony_ci { .rfmax = 414000, .val = 0x73 }, 5868c2ecf20Sopenharmony_ci { .rfmax = 417000, .val = 0x74 }, 5878c2ecf20Sopenharmony_ci { .rfmax = 418000, .val = 0x75 }, 5888c2ecf20Sopenharmony_ci { .rfmax = 420000, .val = 0x76 }, 5898c2ecf20Sopenharmony_ci { .rfmax = 422000, .val = 0x77 }, 5908c2ecf20Sopenharmony_ci { .rfmax = 423000, .val = 0x78 }, 5918c2ecf20Sopenharmony_ci { .rfmax = 424000, .val = 0x79 }, 5928c2ecf20Sopenharmony_ci { .rfmax = 427000, .val = 0x7a }, 5938c2ecf20Sopenharmony_ci { .rfmax = 428000, .val = 0x7b }, 5948c2ecf20Sopenharmony_ci { .rfmax = 429000, .val = 0x7d }, 5958c2ecf20Sopenharmony_ci { .rfmax = 432000, .val = 0x7f }, 5968c2ecf20Sopenharmony_ci { .rfmax = 434000, .val = 0x80 }, 5978c2ecf20Sopenharmony_ci { .rfmax = 435000, .val = 0x81 }, 5988c2ecf20Sopenharmony_ci { .rfmax = 436000, .val = 0x83 }, 5998c2ecf20Sopenharmony_ci { .rfmax = 437000, .val = 0x84 }, 6008c2ecf20Sopenharmony_ci { .rfmax = 438000, .val = 0x85 }, 6018c2ecf20Sopenharmony_ci { .rfmax = 439000, .val = 0x86 }, 6028c2ecf20Sopenharmony_ci { .rfmax = 440000, .val = 0x87 }, 6038c2ecf20Sopenharmony_ci { .rfmax = 441000, .val = 0x88 }, 6048c2ecf20Sopenharmony_ci { .rfmax = 442000, .val = 0x89 }, 6058c2ecf20Sopenharmony_ci { .rfmax = 445000, .val = 0x8a }, 6068c2ecf20Sopenharmony_ci { .rfmax = 446000, .val = 0x8b }, 6078c2ecf20Sopenharmony_ci { .rfmax = 447000, .val = 0x8c }, 6088c2ecf20Sopenharmony_ci { .rfmax = 448000, .val = 0x8e }, 6098c2ecf20Sopenharmony_ci { .rfmax = 449000, .val = 0x8f }, 6108c2ecf20Sopenharmony_ci { .rfmax = 450000, .val = 0x90 }, 6118c2ecf20Sopenharmony_ci { .rfmax = 452000, .val = 0x91 }, 6128c2ecf20Sopenharmony_ci { .rfmax = 453000, .val = 0x93 }, 6138c2ecf20Sopenharmony_ci { .rfmax = 454000, .val = 0x94 }, 6148c2ecf20Sopenharmony_ci { .rfmax = 456000, .val = 0x96 }, 6158c2ecf20Sopenharmony_ci { .rfmax = 457800, .val = 0x98 }, 6168c2ecf20Sopenharmony_ci { .rfmax = 461000, .val = 0x11 }, 6178c2ecf20Sopenharmony_ci { .rfmax = 468000, .val = 0x12 }, 6188c2ecf20Sopenharmony_ci { .rfmax = 472000, .val = 0x13 }, 6198c2ecf20Sopenharmony_ci { .rfmax = 473000, .val = 0x14 }, 6208c2ecf20Sopenharmony_ci { .rfmax = 474000, .val = 0x15 }, 6218c2ecf20Sopenharmony_ci { .rfmax = 481000, .val = 0x16 }, 6228c2ecf20Sopenharmony_ci { .rfmax = 486000, .val = 0x17 }, 6238c2ecf20Sopenharmony_ci { .rfmax = 491000, .val = 0x18 }, 6248c2ecf20Sopenharmony_ci { .rfmax = 498000, .val = 0x19 }, 6258c2ecf20Sopenharmony_ci { .rfmax = 499000, .val = 0x1a }, 6268c2ecf20Sopenharmony_ci { .rfmax = 501000, .val = 0x1b }, 6278c2ecf20Sopenharmony_ci { .rfmax = 506000, .val = 0x1c }, 6288c2ecf20Sopenharmony_ci { .rfmax = 511000, .val = 0x1d }, 6298c2ecf20Sopenharmony_ci { .rfmax = 516000, .val = 0x1e }, 6308c2ecf20Sopenharmony_ci { .rfmax = 520000, .val = 0x1f }, 6318c2ecf20Sopenharmony_ci { .rfmax = 521000, .val = 0x20 }, 6328c2ecf20Sopenharmony_ci { .rfmax = 525000, .val = 0x21 }, 6338c2ecf20Sopenharmony_ci { .rfmax = 529000, .val = 0x22 }, 6348c2ecf20Sopenharmony_ci { .rfmax = 533000, .val = 0x23 }, 6358c2ecf20Sopenharmony_ci { .rfmax = 539000, .val = 0x24 }, 6368c2ecf20Sopenharmony_ci { .rfmax = 541000, .val = 0x25 }, 6378c2ecf20Sopenharmony_ci { .rfmax = 547000, .val = 0x26 }, 6388c2ecf20Sopenharmony_ci { .rfmax = 549000, .val = 0x27 }, 6398c2ecf20Sopenharmony_ci { .rfmax = 551000, .val = 0x28 }, 6408c2ecf20Sopenharmony_ci { .rfmax = 556000, .val = 0x29 }, 6418c2ecf20Sopenharmony_ci { .rfmax = 561000, .val = 0x2a }, 6428c2ecf20Sopenharmony_ci { .rfmax = 563000, .val = 0x2b }, 6438c2ecf20Sopenharmony_ci { .rfmax = 565000, .val = 0x2c }, 6448c2ecf20Sopenharmony_ci { .rfmax = 569000, .val = 0x2d }, 6458c2ecf20Sopenharmony_ci { .rfmax = 571000, .val = 0x2e }, 6468c2ecf20Sopenharmony_ci { .rfmax = 577000, .val = 0x2f }, 6478c2ecf20Sopenharmony_ci { .rfmax = 580000, .val = 0x30 }, 6488c2ecf20Sopenharmony_ci { .rfmax = 582000, .val = 0x31 }, 6498c2ecf20Sopenharmony_ci { .rfmax = 584000, .val = 0x32 }, 6508c2ecf20Sopenharmony_ci { .rfmax = 588000, .val = 0x33 }, 6518c2ecf20Sopenharmony_ci { .rfmax = 591000, .val = 0x34 }, 6528c2ecf20Sopenharmony_ci { .rfmax = 596000, .val = 0x35 }, 6538c2ecf20Sopenharmony_ci { .rfmax = 598000, .val = 0x36 }, 6548c2ecf20Sopenharmony_ci { .rfmax = 603000, .val = 0x37 }, 6558c2ecf20Sopenharmony_ci { .rfmax = 604000, .val = 0x38 }, 6568c2ecf20Sopenharmony_ci { .rfmax = 606000, .val = 0x39 }, 6578c2ecf20Sopenharmony_ci { .rfmax = 612000, .val = 0x3a }, 6588c2ecf20Sopenharmony_ci { .rfmax = 615000, .val = 0x3b }, 6598c2ecf20Sopenharmony_ci { .rfmax = 617000, .val = 0x3c }, 6608c2ecf20Sopenharmony_ci { .rfmax = 621000, .val = 0x3d }, 6618c2ecf20Sopenharmony_ci { .rfmax = 622000, .val = 0x3e }, 6628c2ecf20Sopenharmony_ci { .rfmax = 625000, .val = 0x3f }, 6638c2ecf20Sopenharmony_ci { .rfmax = 632000, .val = 0x40 }, 6648c2ecf20Sopenharmony_ci { .rfmax = 633000, .val = 0x41 }, 6658c2ecf20Sopenharmony_ci { .rfmax = 634000, .val = 0x42 }, 6668c2ecf20Sopenharmony_ci { .rfmax = 642000, .val = 0x43 }, 6678c2ecf20Sopenharmony_ci { .rfmax = 643000, .val = 0x44 }, 6688c2ecf20Sopenharmony_ci { .rfmax = 647000, .val = 0x45 }, 6698c2ecf20Sopenharmony_ci { .rfmax = 650000, .val = 0x46 }, 6708c2ecf20Sopenharmony_ci { .rfmax = 652000, .val = 0x47 }, 6718c2ecf20Sopenharmony_ci { .rfmax = 657000, .val = 0x48 }, 6728c2ecf20Sopenharmony_ci { .rfmax = 661000, .val = 0x49 }, 6738c2ecf20Sopenharmony_ci { .rfmax = 662000, .val = 0x4a }, 6748c2ecf20Sopenharmony_ci { .rfmax = 665000, .val = 0x4b }, 6758c2ecf20Sopenharmony_ci { .rfmax = 667000, .val = 0x4c }, 6768c2ecf20Sopenharmony_ci { .rfmax = 670000, .val = 0x4d }, 6778c2ecf20Sopenharmony_ci { .rfmax = 673000, .val = 0x4e }, 6788c2ecf20Sopenharmony_ci { .rfmax = 676000, .val = 0x4f }, 6798c2ecf20Sopenharmony_ci { .rfmax = 677000, .val = 0x50 }, 6808c2ecf20Sopenharmony_ci { .rfmax = 681000, .val = 0x51 }, 6818c2ecf20Sopenharmony_ci { .rfmax = 683000, .val = 0x52 }, 6828c2ecf20Sopenharmony_ci { .rfmax = 686000, .val = 0x53 }, 6838c2ecf20Sopenharmony_ci { .rfmax = 688000, .val = 0x54 }, 6848c2ecf20Sopenharmony_ci { .rfmax = 689000, .val = 0x55 }, 6858c2ecf20Sopenharmony_ci { .rfmax = 691000, .val = 0x56 }, 6868c2ecf20Sopenharmony_ci { .rfmax = 695000, .val = 0x57 }, 6878c2ecf20Sopenharmony_ci { .rfmax = 698000, .val = 0x58 }, 6888c2ecf20Sopenharmony_ci { .rfmax = 703000, .val = 0x59 }, 6898c2ecf20Sopenharmony_ci { .rfmax = 704000, .val = 0x5a }, 6908c2ecf20Sopenharmony_ci { .rfmax = 705000, .val = 0x5b }, 6918c2ecf20Sopenharmony_ci { .rfmax = 707000, .val = 0x5c }, 6928c2ecf20Sopenharmony_ci { .rfmax = 710000, .val = 0x5d }, 6938c2ecf20Sopenharmony_ci { .rfmax = 712000, .val = 0x5e }, 6948c2ecf20Sopenharmony_ci { .rfmax = 717000, .val = 0x5f }, 6958c2ecf20Sopenharmony_ci { .rfmax = 718000, .val = 0x60 }, 6968c2ecf20Sopenharmony_ci { .rfmax = 721000, .val = 0x61 }, 6978c2ecf20Sopenharmony_ci { .rfmax = 722000, .val = 0x62 }, 6988c2ecf20Sopenharmony_ci { .rfmax = 723000, .val = 0x63 }, 6998c2ecf20Sopenharmony_ci { .rfmax = 725000, .val = 0x64 }, 7008c2ecf20Sopenharmony_ci { .rfmax = 727000, .val = 0x65 }, 7018c2ecf20Sopenharmony_ci { .rfmax = 730000, .val = 0x66 }, 7028c2ecf20Sopenharmony_ci { .rfmax = 732000, .val = 0x67 }, 7038c2ecf20Sopenharmony_ci { .rfmax = 735000, .val = 0x68 }, 7048c2ecf20Sopenharmony_ci { .rfmax = 740000, .val = 0x69 }, 7058c2ecf20Sopenharmony_ci { .rfmax = 741000, .val = 0x6a }, 7068c2ecf20Sopenharmony_ci { .rfmax = 742000, .val = 0x6b }, 7078c2ecf20Sopenharmony_ci { .rfmax = 743000, .val = 0x6c }, 7088c2ecf20Sopenharmony_ci { .rfmax = 745000, .val = 0x6d }, 7098c2ecf20Sopenharmony_ci { .rfmax = 747000, .val = 0x6e }, 7108c2ecf20Sopenharmony_ci { .rfmax = 748000, .val = 0x6f }, 7118c2ecf20Sopenharmony_ci { .rfmax = 750000, .val = 0x70 }, 7128c2ecf20Sopenharmony_ci { .rfmax = 752000, .val = 0x71 }, 7138c2ecf20Sopenharmony_ci { .rfmax = 754000, .val = 0x72 }, 7148c2ecf20Sopenharmony_ci { .rfmax = 757000, .val = 0x73 }, 7158c2ecf20Sopenharmony_ci { .rfmax = 758000, .val = 0x74 }, 7168c2ecf20Sopenharmony_ci { .rfmax = 760000, .val = 0x75 }, 7178c2ecf20Sopenharmony_ci { .rfmax = 763000, .val = 0x76 }, 7188c2ecf20Sopenharmony_ci { .rfmax = 764000, .val = 0x77 }, 7198c2ecf20Sopenharmony_ci { .rfmax = 766000, .val = 0x78 }, 7208c2ecf20Sopenharmony_ci { .rfmax = 767000, .val = 0x79 }, 7218c2ecf20Sopenharmony_ci { .rfmax = 768000, .val = 0x7a }, 7228c2ecf20Sopenharmony_ci { .rfmax = 773000, .val = 0x7b }, 7238c2ecf20Sopenharmony_ci { .rfmax = 774000, .val = 0x7c }, 7248c2ecf20Sopenharmony_ci { .rfmax = 776000, .val = 0x7d }, 7258c2ecf20Sopenharmony_ci { .rfmax = 777000, .val = 0x7e }, 7268c2ecf20Sopenharmony_ci { .rfmax = 778000, .val = 0x7f }, 7278c2ecf20Sopenharmony_ci { .rfmax = 779000, .val = 0x80 }, 7288c2ecf20Sopenharmony_ci { .rfmax = 781000, .val = 0x81 }, 7298c2ecf20Sopenharmony_ci { .rfmax = 783000, .val = 0x82 }, 7308c2ecf20Sopenharmony_ci { .rfmax = 784000, .val = 0x83 }, 7318c2ecf20Sopenharmony_ci { .rfmax = 785000, .val = 0x84 }, 7328c2ecf20Sopenharmony_ci { .rfmax = 786000, .val = 0x85 }, 7338c2ecf20Sopenharmony_ci { .rfmax = 793000, .val = 0x86 }, 7348c2ecf20Sopenharmony_ci { .rfmax = 794000, .val = 0x87 }, 7358c2ecf20Sopenharmony_ci { .rfmax = 795000, .val = 0x88 }, 7368c2ecf20Sopenharmony_ci { .rfmax = 797000, .val = 0x89 }, 7378c2ecf20Sopenharmony_ci { .rfmax = 799000, .val = 0x8a }, 7388c2ecf20Sopenharmony_ci { .rfmax = 801000, .val = 0x8b }, 7398c2ecf20Sopenharmony_ci { .rfmax = 802000, .val = 0x8c }, 7408c2ecf20Sopenharmony_ci { .rfmax = 803000, .val = 0x8d }, 7418c2ecf20Sopenharmony_ci { .rfmax = 804000, .val = 0x8e }, 7428c2ecf20Sopenharmony_ci { .rfmax = 810000, .val = 0x90 }, 7438c2ecf20Sopenharmony_ci { .rfmax = 811000, .val = 0x91 }, 7448c2ecf20Sopenharmony_ci { .rfmax = 812000, .val = 0x92 }, 7458c2ecf20Sopenharmony_ci { .rfmax = 814000, .val = 0x93 }, 7468c2ecf20Sopenharmony_ci { .rfmax = 816000, .val = 0x94 }, 7478c2ecf20Sopenharmony_ci { .rfmax = 817000, .val = 0x96 }, 7488c2ecf20Sopenharmony_ci { .rfmax = 818000, .val = 0x97 }, 7498c2ecf20Sopenharmony_ci { .rfmax = 820000, .val = 0x98 }, 7508c2ecf20Sopenharmony_ci { .rfmax = 821000, .val = 0x99 }, 7518c2ecf20Sopenharmony_ci { .rfmax = 822000, .val = 0x9a }, 7528c2ecf20Sopenharmony_ci { .rfmax = 828000, .val = 0x9b }, 7538c2ecf20Sopenharmony_ci { .rfmax = 829000, .val = 0x9d }, 7548c2ecf20Sopenharmony_ci { .rfmax = 830000, .val = 0x9f }, 7558c2ecf20Sopenharmony_ci { .rfmax = 831000, .val = 0xa0 }, 7568c2ecf20Sopenharmony_ci { .rfmax = 833000, .val = 0xa1 }, 7578c2ecf20Sopenharmony_ci { .rfmax = 835000, .val = 0xa2 }, 7588c2ecf20Sopenharmony_ci { .rfmax = 836000, .val = 0xa3 }, 7598c2ecf20Sopenharmony_ci { .rfmax = 837000, .val = 0xa4 }, 7608c2ecf20Sopenharmony_ci { .rfmax = 838000, .val = 0xa6 }, 7618c2ecf20Sopenharmony_ci { .rfmax = 840000, .val = 0xa8 }, 7628c2ecf20Sopenharmony_ci { .rfmax = 842000, .val = 0xa9 }, 7638c2ecf20Sopenharmony_ci { .rfmax = 845000, .val = 0xaa }, 7648c2ecf20Sopenharmony_ci { .rfmax = 846000, .val = 0xab }, 7658c2ecf20Sopenharmony_ci { .rfmax = 847000, .val = 0xad }, 7668c2ecf20Sopenharmony_ci { .rfmax = 848000, .val = 0xae }, 7678c2ecf20Sopenharmony_ci { .rfmax = 852000, .val = 0xaf }, 7688c2ecf20Sopenharmony_ci { .rfmax = 853000, .val = 0xb0 }, 7698c2ecf20Sopenharmony_ci { .rfmax = 858000, .val = 0xb1 }, 7708c2ecf20Sopenharmony_ci { .rfmax = 860000, .val = 0xb2 }, 7718c2ecf20Sopenharmony_ci { .rfmax = 861000, .val = 0xb3 }, 7728c2ecf20Sopenharmony_ci { .rfmax = 862000, .val = 0xb4 }, 7738c2ecf20Sopenharmony_ci { .rfmax = 863000, .val = 0xb6 }, 7748c2ecf20Sopenharmony_ci { .rfmax = 864000, .val = 0xb8 }, 7758c2ecf20Sopenharmony_ci { .rfmax = 865000, .val = 0xb9 }, 7768c2ecf20Sopenharmony_ci { .rfmax = 0, .val = 0x00 }, /* end */ 7778c2ecf20Sopenharmony_ci}; 7788c2ecf20Sopenharmony_ci 7798c2ecf20Sopenharmony_cistatic struct tda18271_map tda18271_ir_measure[] = { 7808c2ecf20Sopenharmony_ci { .rfmax = 30000, .val = 4 }, 7818c2ecf20Sopenharmony_ci { .rfmax = 200000, .val = 5 }, 7828c2ecf20Sopenharmony_ci { .rfmax = 600000, .val = 6 }, 7838c2ecf20Sopenharmony_ci { .rfmax = 865000, .val = 7 }, 7848c2ecf20Sopenharmony_ci { .rfmax = 0, .val = 0 }, /* end */ 7858c2ecf20Sopenharmony_ci}; 7868c2ecf20Sopenharmony_ci 7878c2ecf20Sopenharmony_cistatic struct tda18271_map tda18271_rf_cal_dc_over_dt[] = { 7888c2ecf20Sopenharmony_ci { .rfmax = 47900, .val = 0x00 }, 7898c2ecf20Sopenharmony_ci { .rfmax = 55000, .val = 0x00 }, 7908c2ecf20Sopenharmony_ci { .rfmax = 61100, .val = 0x0a }, 7918c2ecf20Sopenharmony_ci { .rfmax = 64000, .val = 0x0a }, 7928c2ecf20Sopenharmony_ci { .rfmax = 82000, .val = 0x14 }, 7938c2ecf20Sopenharmony_ci { .rfmax = 84000, .val = 0x19 }, 7948c2ecf20Sopenharmony_ci { .rfmax = 119000, .val = 0x1c }, 7958c2ecf20Sopenharmony_ci { .rfmax = 124000, .val = 0x20 }, 7968c2ecf20Sopenharmony_ci { .rfmax = 129000, .val = 0x2a }, 7978c2ecf20Sopenharmony_ci { .rfmax = 134000, .val = 0x32 }, 7988c2ecf20Sopenharmony_ci { .rfmax = 139000, .val = 0x39 }, 7998c2ecf20Sopenharmony_ci { .rfmax = 144000, .val = 0x3e }, 8008c2ecf20Sopenharmony_ci { .rfmax = 149000, .val = 0x3f }, 8018c2ecf20Sopenharmony_ci { .rfmax = 152600, .val = 0x40 }, 8028c2ecf20Sopenharmony_ci { .rfmax = 154000, .val = 0x40 }, 8038c2ecf20Sopenharmony_ci { .rfmax = 164700, .val = 0x41 }, 8048c2ecf20Sopenharmony_ci { .rfmax = 203500, .val = 0x32 }, 8058c2ecf20Sopenharmony_ci { .rfmax = 353000, .val = 0x19 }, 8068c2ecf20Sopenharmony_ci { .rfmax = 356000, .val = 0x1a }, 8078c2ecf20Sopenharmony_ci { .rfmax = 359000, .val = 0x1b }, 8088c2ecf20Sopenharmony_ci { .rfmax = 363000, .val = 0x1c }, 8098c2ecf20Sopenharmony_ci { .rfmax = 366000, .val = 0x1d }, 8108c2ecf20Sopenharmony_ci { .rfmax = 369000, .val = 0x1e }, 8118c2ecf20Sopenharmony_ci { .rfmax = 373000, .val = 0x1f }, 8128c2ecf20Sopenharmony_ci { .rfmax = 376000, .val = 0x20 }, 8138c2ecf20Sopenharmony_ci { .rfmax = 379000, .val = 0x21 }, 8148c2ecf20Sopenharmony_ci { .rfmax = 383000, .val = 0x22 }, 8158c2ecf20Sopenharmony_ci { .rfmax = 386000, .val = 0x23 }, 8168c2ecf20Sopenharmony_ci { .rfmax = 389000, .val = 0x24 }, 8178c2ecf20Sopenharmony_ci { .rfmax = 393000, .val = 0x25 }, 8188c2ecf20Sopenharmony_ci { .rfmax = 396000, .val = 0x26 }, 8198c2ecf20Sopenharmony_ci { .rfmax = 399000, .val = 0x27 }, 8208c2ecf20Sopenharmony_ci { .rfmax = 402000, .val = 0x28 }, 8218c2ecf20Sopenharmony_ci { .rfmax = 404000, .val = 0x29 }, 8228c2ecf20Sopenharmony_ci { .rfmax = 407000, .val = 0x2a }, 8238c2ecf20Sopenharmony_ci { .rfmax = 409000, .val = 0x2b }, 8248c2ecf20Sopenharmony_ci { .rfmax = 412000, .val = 0x2c }, 8258c2ecf20Sopenharmony_ci { .rfmax = 414000, .val = 0x2d }, 8268c2ecf20Sopenharmony_ci { .rfmax = 417000, .val = 0x2e }, 8278c2ecf20Sopenharmony_ci { .rfmax = 419000, .val = 0x2f }, 8288c2ecf20Sopenharmony_ci { .rfmax = 422000, .val = 0x30 }, 8298c2ecf20Sopenharmony_ci { .rfmax = 424000, .val = 0x31 }, 8308c2ecf20Sopenharmony_ci { .rfmax = 427000, .val = 0x32 }, 8318c2ecf20Sopenharmony_ci { .rfmax = 429000, .val = 0x33 }, 8328c2ecf20Sopenharmony_ci { .rfmax = 432000, .val = 0x34 }, 8338c2ecf20Sopenharmony_ci { .rfmax = 434000, .val = 0x35 }, 8348c2ecf20Sopenharmony_ci { .rfmax = 437000, .val = 0x36 }, 8358c2ecf20Sopenharmony_ci { .rfmax = 439000, .val = 0x37 }, 8368c2ecf20Sopenharmony_ci { .rfmax = 442000, .val = 0x38 }, 8378c2ecf20Sopenharmony_ci { .rfmax = 444000, .val = 0x39 }, 8388c2ecf20Sopenharmony_ci { .rfmax = 447000, .val = 0x3a }, 8398c2ecf20Sopenharmony_ci { .rfmax = 449000, .val = 0x3b }, 8408c2ecf20Sopenharmony_ci { .rfmax = 457800, .val = 0x3c }, 8418c2ecf20Sopenharmony_ci { .rfmax = 465000, .val = 0x0f }, 8428c2ecf20Sopenharmony_ci { .rfmax = 477000, .val = 0x12 }, 8438c2ecf20Sopenharmony_ci { .rfmax = 483000, .val = 0x14 }, 8448c2ecf20Sopenharmony_ci { .rfmax = 502000, .val = 0x19 }, 8458c2ecf20Sopenharmony_ci { .rfmax = 508000, .val = 0x1b }, 8468c2ecf20Sopenharmony_ci { .rfmax = 519000, .val = 0x1c }, 8478c2ecf20Sopenharmony_ci { .rfmax = 522000, .val = 0x1d }, 8488c2ecf20Sopenharmony_ci { .rfmax = 524000, .val = 0x1e }, 8498c2ecf20Sopenharmony_ci { .rfmax = 534000, .val = 0x1f }, 8508c2ecf20Sopenharmony_ci { .rfmax = 549000, .val = 0x20 }, 8518c2ecf20Sopenharmony_ci { .rfmax = 554000, .val = 0x22 }, 8528c2ecf20Sopenharmony_ci { .rfmax = 584000, .val = 0x24 }, 8538c2ecf20Sopenharmony_ci { .rfmax = 589000, .val = 0x26 }, 8548c2ecf20Sopenharmony_ci { .rfmax = 658000, .val = 0x27 }, 8558c2ecf20Sopenharmony_ci { .rfmax = 664000, .val = 0x2c }, 8568c2ecf20Sopenharmony_ci { .rfmax = 669000, .val = 0x2d }, 8578c2ecf20Sopenharmony_ci { .rfmax = 699000, .val = 0x2e }, 8588c2ecf20Sopenharmony_ci { .rfmax = 704000, .val = 0x30 }, 8598c2ecf20Sopenharmony_ci { .rfmax = 709000, .val = 0x31 }, 8608c2ecf20Sopenharmony_ci { .rfmax = 714000, .val = 0x32 }, 8618c2ecf20Sopenharmony_ci { .rfmax = 724000, .val = 0x33 }, 8628c2ecf20Sopenharmony_ci { .rfmax = 729000, .val = 0x36 }, 8638c2ecf20Sopenharmony_ci { .rfmax = 739000, .val = 0x38 }, 8648c2ecf20Sopenharmony_ci { .rfmax = 744000, .val = 0x39 }, 8658c2ecf20Sopenharmony_ci { .rfmax = 749000, .val = 0x3b }, 8668c2ecf20Sopenharmony_ci { .rfmax = 754000, .val = 0x3c }, 8678c2ecf20Sopenharmony_ci { .rfmax = 759000, .val = 0x3d }, 8688c2ecf20Sopenharmony_ci { .rfmax = 764000, .val = 0x3e }, 8698c2ecf20Sopenharmony_ci { .rfmax = 769000, .val = 0x3f }, 8708c2ecf20Sopenharmony_ci { .rfmax = 774000, .val = 0x40 }, 8718c2ecf20Sopenharmony_ci { .rfmax = 779000, .val = 0x41 }, 8728c2ecf20Sopenharmony_ci { .rfmax = 784000, .val = 0x43 }, 8738c2ecf20Sopenharmony_ci { .rfmax = 789000, .val = 0x46 }, 8748c2ecf20Sopenharmony_ci { .rfmax = 794000, .val = 0x48 }, 8758c2ecf20Sopenharmony_ci { .rfmax = 799000, .val = 0x4b }, 8768c2ecf20Sopenharmony_ci { .rfmax = 804000, .val = 0x4f }, 8778c2ecf20Sopenharmony_ci { .rfmax = 809000, .val = 0x54 }, 8788c2ecf20Sopenharmony_ci { .rfmax = 814000, .val = 0x59 }, 8798c2ecf20Sopenharmony_ci { .rfmax = 819000, .val = 0x5d }, 8808c2ecf20Sopenharmony_ci { .rfmax = 824000, .val = 0x61 }, 8818c2ecf20Sopenharmony_ci { .rfmax = 829000, .val = 0x68 }, 8828c2ecf20Sopenharmony_ci { .rfmax = 834000, .val = 0x6e }, 8838c2ecf20Sopenharmony_ci { .rfmax = 839000, .val = 0x75 }, 8848c2ecf20Sopenharmony_ci { .rfmax = 844000, .val = 0x7e }, 8858c2ecf20Sopenharmony_ci { .rfmax = 849000, .val = 0x82 }, 8868c2ecf20Sopenharmony_ci { .rfmax = 854000, .val = 0x84 }, 8878c2ecf20Sopenharmony_ci { .rfmax = 859000, .val = 0x8f }, 8888c2ecf20Sopenharmony_ci { .rfmax = 865000, .val = 0x9a }, 8898c2ecf20Sopenharmony_ci { .rfmax = 0, .val = 0x00 }, /* end */ 8908c2ecf20Sopenharmony_ci}; 8918c2ecf20Sopenharmony_ci 8928c2ecf20Sopenharmony_ci/*---------------------------------------------------------------------*/ 8938c2ecf20Sopenharmony_ci 8948c2ecf20Sopenharmony_cistruct tda18271_thermo_map { 8958c2ecf20Sopenharmony_ci u8 d; 8968c2ecf20Sopenharmony_ci u8 r0; 8978c2ecf20Sopenharmony_ci u8 r1; 8988c2ecf20Sopenharmony_ci}; 8998c2ecf20Sopenharmony_ci 9008c2ecf20Sopenharmony_cistatic struct tda18271_thermo_map tda18271_thermometer[] = { 9018c2ecf20Sopenharmony_ci { .d = 0x00, .r0 = 60, .r1 = 92 }, 9028c2ecf20Sopenharmony_ci { .d = 0x01, .r0 = 62, .r1 = 94 }, 9038c2ecf20Sopenharmony_ci { .d = 0x02, .r0 = 66, .r1 = 98 }, 9048c2ecf20Sopenharmony_ci { .d = 0x03, .r0 = 64, .r1 = 96 }, 9058c2ecf20Sopenharmony_ci { .d = 0x04, .r0 = 74, .r1 = 106 }, 9068c2ecf20Sopenharmony_ci { .d = 0x05, .r0 = 72, .r1 = 104 }, 9078c2ecf20Sopenharmony_ci { .d = 0x06, .r0 = 68, .r1 = 100 }, 9088c2ecf20Sopenharmony_ci { .d = 0x07, .r0 = 70, .r1 = 102 }, 9098c2ecf20Sopenharmony_ci { .d = 0x08, .r0 = 90, .r1 = 122 }, 9108c2ecf20Sopenharmony_ci { .d = 0x09, .r0 = 88, .r1 = 120 }, 9118c2ecf20Sopenharmony_ci { .d = 0x0a, .r0 = 84, .r1 = 116 }, 9128c2ecf20Sopenharmony_ci { .d = 0x0b, .r0 = 86, .r1 = 118 }, 9138c2ecf20Sopenharmony_ci { .d = 0x0c, .r0 = 76, .r1 = 108 }, 9148c2ecf20Sopenharmony_ci { .d = 0x0d, .r0 = 78, .r1 = 110 }, 9158c2ecf20Sopenharmony_ci { .d = 0x0e, .r0 = 82, .r1 = 114 }, 9168c2ecf20Sopenharmony_ci { .d = 0x0f, .r0 = 80, .r1 = 112 }, 9178c2ecf20Sopenharmony_ci { .d = 0x00, .r0 = 0, .r1 = 0 }, /* end */ 9188c2ecf20Sopenharmony_ci}; 9198c2ecf20Sopenharmony_ci 9208c2ecf20Sopenharmony_ciint tda18271_lookup_thermometer(struct dvb_frontend *fe) 9218c2ecf20Sopenharmony_ci{ 9228c2ecf20Sopenharmony_ci struct tda18271_priv *priv = fe->tuner_priv; 9238c2ecf20Sopenharmony_ci unsigned char *regs = priv->tda18271_regs; 9248c2ecf20Sopenharmony_ci int val, i = 0; 9258c2ecf20Sopenharmony_ci 9268c2ecf20Sopenharmony_ci while (tda18271_thermometer[i].d < (regs[R_TM] & 0x0f)) { 9278c2ecf20Sopenharmony_ci if (tda18271_thermometer[i + 1].d == 0) 9288c2ecf20Sopenharmony_ci break; 9298c2ecf20Sopenharmony_ci i++; 9308c2ecf20Sopenharmony_ci } 9318c2ecf20Sopenharmony_ci 9328c2ecf20Sopenharmony_ci if ((regs[R_TM] & 0x20) == 0x20) 9338c2ecf20Sopenharmony_ci val = tda18271_thermometer[i].r1; 9348c2ecf20Sopenharmony_ci else 9358c2ecf20Sopenharmony_ci val = tda18271_thermometer[i].r0; 9368c2ecf20Sopenharmony_ci 9378c2ecf20Sopenharmony_ci tda_map("(%d) tm = %d\n", i, val); 9388c2ecf20Sopenharmony_ci 9398c2ecf20Sopenharmony_ci return val; 9408c2ecf20Sopenharmony_ci} 9418c2ecf20Sopenharmony_ci 9428c2ecf20Sopenharmony_ci/*---------------------------------------------------------------------*/ 9438c2ecf20Sopenharmony_ci 9448c2ecf20Sopenharmony_cistruct tda18271_cid_target_map { 9458c2ecf20Sopenharmony_ci u32 rfmax; 9468c2ecf20Sopenharmony_ci u8 target; 9478c2ecf20Sopenharmony_ci u16 limit; 9488c2ecf20Sopenharmony_ci}; 9498c2ecf20Sopenharmony_ci 9508c2ecf20Sopenharmony_cistatic struct tda18271_cid_target_map tda18271_cid_target[] = { 9518c2ecf20Sopenharmony_ci { .rfmax = 46000, .target = 0x04, .limit = 1800 }, 9528c2ecf20Sopenharmony_ci { .rfmax = 52200, .target = 0x0a, .limit = 1500 }, 9538c2ecf20Sopenharmony_ci { .rfmax = 70100, .target = 0x01, .limit = 4000 }, 9548c2ecf20Sopenharmony_ci { .rfmax = 136800, .target = 0x18, .limit = 4000 }, 9558c2ecf20Sopenharmony_ci { .rfmax = 156700, .target = 0x18, .limit = 4000 }, 9568c2ecf20Sopenharmony_ci { .rfmax = 186250, .target = 0x0a, .limit = 4000 }, 9578c2ecf20Sopenharmony_ci { .rfmax = 230000, .target = 0x0a, .limit = 4000 }, 9588c2ecf20Sopenharmony_ci { .rfmax = 345000, .target = 0x18, .limit = 4000 }, 9598c2ecf20Sopenharmony_ci { .rfmax = 426000, .target = 0x0e, .limit = 4000 }, 9608c2ecf20Sopenharmony_ci { .rfmax = 489500, .target = 0x1e, .limit = 4000 }, 9618c2ecf20Sopenharmony_ci { .rfmax = 697500, .target = 0x32, .limit = 4000 }, 9628c2ecf20Sopenharmony_ci { .rfmax = 842000, .target = 0x3a, .limit = 4000 }, 9638c2ecf20Sopenharmony_ci { .rfmax = 0, .target = 0x00, .limit = 0 }, /* end */ 9648c2ecf20Sopenharmony_ci}; 9658c2ecf20Sopenharmony_ci 9668c2ecf20Sopenharmony_ciint tda18271_lookup_cid_target(struct dvb_frontend *fe, 9678c2ecf20Sopenharmony_ci u32 *freq, u8 *cid_target, u16 *count_limit) 9688c2ecf20Sopenharmony_ci{ 9698c2ecf20Sopenharmony_ci struct tda18271_priv *priv = fe->tuner_priv; 9708c2ecf20Sopenharmony_ci int i = 0; 9718c2ecf20Sopenharmony_ci 9728c2ecf20Sopenharmony_ci while ((tda18271_cid_target[i].rfmax * 1000) < *freq) { 9738c2ecf20Sopenharmony_ci if (tda18271_cid_target[i + 1].rfmax == 0) 9748c2ecf20Sopenharmony_ci break; 9758c2ecf20Sopenharmony_ci i++; 9768c2ecf20Sopenharmony_ci } 9778c2ecf20Sopenharmony_ci *cid_target = tda18271_cid_target[i].target; 9788c2ecf20Sopenharmony_ci *count_limit = tda18271_cid_target[i].limit; 9798c2ecf20Sopenharmony_ci 9808c2ecf20Sopenharmony_ci tda_map("(%d) cid_target = %02x, count_limit = %d\n", i, 9818c2ecf20Sopenharmony_ci tda18271_cid_target[i].target, tda18271_cid_target[i].limit); 9828c2ecf20Sopenharmony_ci 9838c2ecf20Sopenharmony_ci return 0; 9848c2ecf20Sopenharmony_ci} 9858c2ecf20Sopenharmony_ci 9868c2ecf20Sopenharmony_ci/*---------------------------------------------------------------------*/ 9878c2ecf20Sopenharmony_ci 9888c2ecf20Sopenharmony_cistatic struct tda18271_rf_tracking_filter_cal tda18271_rf_band_template[] = { 9898c2ecf20Sopenharmony_ci { .rfmax = 47900, .rfband = 0x00, 9908c2ecf20Sopenharmony_ci .rf1_def = 46000, .rf2_def = 0, .rf3_def = 0 }, 9918c2ecf20Sopenharmony_ci { .rfmax = 61100, .rfband = 0x01, 9928c2ecf20Sopenharmony_ci .rf1_def = 52200, .rf2_def = 0, .rf3_def = 0 }, 9938c2ecf20Sopenharmony_ci { .rfmax = 152600, .rfband = 0x02, 9948c2ecf20Sopenharmony_ci .rf1_def = 70100, .rf2_def = 136800, .rf3_def = 0 }, 9958c2ecf20Sopenharmony_ci { .rfmax = 164700, .rfband = 0x03, 9968c2ecf20Sopenharmony_ci .rf1_def = 156700, .rf2_def = 0, .rf3_def = 0 }, 9978c2ecf20Sopenharmony_ci { .rfmax = 203500, .rfband = 0x04, 9988c2ecf20Sopenharmony_ci .rf1_def = 186250, .rf2_def = 0, .rf3_def = 0 }, 9998c2ecf20Sopenharmony_ci { .rfmax = 457800, .rfband = 0x05, 10008c2ecf20Sopenharmony_ci .rf1_def = 230000, .rf2_def = 345000, .rf3_def = 426000 }, 10018c2ecf20Sopenharmony_ci { .rfmax = 865000, .rfband = 0x06, 10028c2ecf20Sopenharmony_ci .rf1_def = 489500, .rf2_def = 697500, .rf3_def = 842000 }, 10038c2ecf20Sopenharmony_ci { .rfmax = 0, .rfband = 0x00, 10048c2ecf20Sopenharmony_ci .rf1_def = 0, .rf2_def = 0, .rf3_def = 0 }, /* end */ 10058c2ecf20Sopenharmony_ci}; 10068c2ecf20Sopenharmony_ci 10078c2ecf20Sopenharmony_ciint tda18271_lookup_rf_band(struct dvb_frontend *fe, u32 *freq, u8 *rf_band) 10088c2ecf20Sopenharmony_ci{ 10098c2ecf20Sopenharmony_ci struct tda18271_priv *priv = fe->tuner_priv; 10108c2ecf20Sopenharmony_ci struct tda18271_rf_tracking_filter_cal *map = priv->rf_cal_state; 10118c2ecf20Sopenharmony_ci int i = 0; 10128c2ecf20Sopenharmony_ci 10138c2ecf20Sopenharmony_ci while ((map[i].rfmax * 1000) < *freq) { 10148c2ecf20Sopenharmony_ci if (tda18271_debug & DBG_ADV) 10158c2ecf20Sopenharmony_ci tda_map("(%d) rfmax = %d < freq = %d, rf1_def = %d, rf2_def = %d, rf3_def = %d, rf1 = %d, rf2 = %d, rf3 = %d, rf_a1 = %d, rf_a2 = %d, rf_b1 = %d, rf_b2 = %d\n", 10168c2ecf20Sopenharmony_ci i, map[i].rfmax * 1000, *freq, 10178c2ecf20Sopenharmony_ci map[i].rf1_def, map[i].rf2_def, map[i].rf3_def, 10188c2ecf20Sopenharmony_ci map[i].rf1, map[i].rf2, map[i].rf3, 10198c2ecf20Sopenharmony_ci map[i].rf_a1, map[i].rf_a2, 10208c2ecf20Sopenharmony_ci map[i].rf_b1, map[i].rf_b2); 10218c2ecf20Sopenharmony_ci if (map[i].rfmax == 0) 10228c2ecf20Sopenharmony_ci return -EINVAL; 10238c2ecf20Sopenharmony_ci i++; 10248c2ecf20Sopenharmony_ci } 10258c2ecf20Sopenharmony_ci if (rf_band) 10268c2ecf20Sopenharmony_ci *rf_band = map[i].rfband; 10278c2ecf20Sopenharmony_ci 10288c2ecf20Sopenharmony_ci tda_map("(%d) rf_band = %02x\n", i, map[i].rfband); 10298c2ecf20Sopenharmony_ci 10308c2ecf20Sopenharmony_ci return i; 10318c2ecf20Sopenharmony_ci} 10328c2ecf20Sopenharmony_ci 10338c2ecf20Sopenharmony_ci/*---------------------------------------------------------------------*/ 10348c2ecf20Sopenharmony_ci 10358c2ecf20Sopenharmony_cistruct tda18271_map_layout { 10368c2ecf20Sopenharmony_ci struct tda18271_pll_map *main_pll; 10378c2ecf20Sopenharmony_ci struct tda18271_pll_map *cal_pll; 10388c2ecf20Sopenharmony_ci 10398c2ecf20Sopenharmony_ci struct tda18271_map *rf_cal; 10408c2ecf20Sopenharmony_ci struct tda18271_map *rf_cal_kmco; 10418c2ecf20Sopenharmony_ci struct tda18271_map *rf_cal_dc_over_dt; 10428c2ecf20Sopenharmony_ci 10438c2ecf20Sopenharmony_ci struct tda18271_map *bp_filter; 10448c2ecf20Sopenharmony_ci struct tda18271_map *rf_band; 10458c2ecf20Sopenharmony_ci struct tda18271_map *gain_taper; 10468c2ecf20Sopenharmony_ci struct tda18271_map *ir_measure; 10478c2ecf20Sopenharmony_ci}; 10488c2ecf20Sopenharmony_ci 10498c2ecf20Sopenharmony_ci/*---------------------------------------------------------------------*/ 10508c2ecf20Sopenharmony_ci 10518c2ecf20Sopenharmony_ciint tda18271_lookup_pll_map(struct dvb_frontend *fe, 10528c2ecf20Sopenharmony_ci enum tda18271_map_type map_type, 10538c2ecf20Sopenharmony_ci u32 *freq, u8 *post_div, u8 *div) 10548c2ecf20Sopenharmony_ci{ 10558c2ecf20Sopenharmony_ci struct tda18271_priv *priv = fe->tuner_priv; 10568c2ecf20Sopenharmony_ci struct tda18271_pll_map *map = NULL; 10578c2ecf20Sopenharmony_ci unsigned int i = 0; 10588c2ecf20Sopenharmony_ci char *map_name; 10598c2ecf20Sopenharmony_ci int ret = 0; 10608c2ecf20Sopenharmony_ci 10618c2ecf20Sopenharmony_ci BUG_ON(!priv->maps); 10628c2ecf20Sopenharmony_ci 10638c2ecf20Sopenharmony_ci switch (map_type) { 10648c2ecf20Sopenharmony_ci case MAIN_PLL: 10658c2ecf20Sopenharmony_ci map = priv->maps->main_pll; 10668c2ecf20Sopenharmony_ci map_name = "main_pll"; 10678c2ecf20Sopenharmony_ci break; 10688c2ecf20Sopenharmony_ci case CAL_PLL: 10698c2ecf20Sopenharmony_ci map = priv->maps->cal_pll; 10708c2ecf20Sopenharmony_ci map_name = "cal_pll"; 10718c2ecf20Sopenharmony_ci break; 10728c2ecf20Sopenharmony_ci default: 10738c2ecf20Sopenharmony_ci /* we should never get here */ 10748c2ecf20Sopenharmony_ci map_name = "undefined"; 10758c2ecf20Sopenharmony_ci break; 10768c2ecf20Sopenharmony_ci } 10778c2ecf20Sopenharmony_ci 10788c2ecf20Sopenharmony_ci if (!map) { 10798c2ecf20Sopenharmony_ci tda_warn("%s map is not set!\n", map_name); 10808c2ecf20Sopenharmony_ci ret = -EINVAL; 10818c2ecf20Sopenharmony_ci goto fail; 10828c2ecf20Sopenharmony_ci } 10838c2ecf20Sopenharmony_ci 10848c2ecf20Sopenharmony_ci while ((map[i].lomax * 1000) < *freq) { 10858c2ecf20Sopenharmony_ci if (map[i + 1].lomax == 0) { 10868c2ecf20Sopenharmony_ci tda_map("%s: frequency (%d) out of range\n", 10878c2ecf20Sopenharmony_ci map_name, *freq); 10888c2ecf20Sopenharmony_ci ret = -ERANGE; 10898c2ecf20Sopenharmony_ci break; 10908c2ecf20Sopenharmony_ci } 10918c2ecf20Sopenharmony_ci i++; 10928c2ecf20Sopenharmony_ci } 10938c2ecf20Sopenharmony_ci *post_div = map[i].pd; 10948c2ecf20Sopenharmony_ci *div = map[i].d; 10958c2ecf20Sopenharmony_ci 10968c2ecf20Sopenharmony_ci tda_map("(%d) %s: post div = 0x%02x, div = 0x%02x\n", 10978c2ecf20Sopenharmony_ci i, map_name, *post_div, *div); 10988c2ecf20Sopenharmony_cifail: 10998c2ecf20Sopenharmony_ci return ret; 11008c2ecf20Sopenharmony_ci} 11018c2ecf20Sopenharmony_ci 11028c2ecf20Sopenharmony_ciint tda18271_lookup_map(struct dvb_frontend *fe, 11038c2ecf20Sopenharmony_ci enum tda18271_map_type map_type, 11048c2ecf20Sopenharmony_ci u32 *freq, u8 *val) 11058c2ecf20Sopenharmony_ci{ 11068c2ecf20Sopenharmony_ci struct tda18271_priv *priv = fe->tuner_priv; 11078c2ecf20Sopenharmony_ci struct tda18271_map *map = NULL; 11088c2ecf20Sopenharmony_ci unsigned int i = 0; 11098c2ecf20Sopenharmony_ci char *map_name; 11108c2ecf20Sopenharmony_ci int ret = 0; 11118c2ecf20Sopenharmony_ci 11128c2ecf20Sopenharmony_ci BUG_ON(!priv->maps); 11138c2ecf20Sopenharmony_ci 11148c2ecf20Sopenharmony_ci switch (map_type) { 11158c2ecf20Sopenharmony_ci case BP_FILTER: 11168c2ecf20Sopenharmony_ci map = priv->maps->bp_filter; 11178c2ecf20Sopenharmony_ci map_name = "bp_filter"; 11188c2ecf20Sopenharmony_ci break; 11198c2ecf20Sopenharmony_ci case RF_CAL_KMCO: 11208c2ecf20Sopenharmony_ci map = priv->maps->rf_cal_kmco; 11218c2ecf20Sopenharmony_ci map_name = "km"; 11228c2ecf20Sopenharmony_ci break; 11238c2ecf20Sopenharmony_ci case RF_BAND: 11248c2ecf20Sopenharmony_ci map = priv->maps->rf_band; 11258c2ecf20Sopenharmony_ci map_name = "rf_band"; 11268c2ecf20Sopenharmony_ci break; 11278c2ecf20Sopenharmony_ci case GAIN_TAPER: 11288c2ecf20Sopenharmony_ci map = priv->maps->gain_taper; 11298c2ecf20Sopenharmony_ci map_name = "gain_taper"; 11308c2ecf20Sopenharmony_ci break; 11318c2ecf20Sopenharmony_ci case RF_CAL: 11328c2ecf20Sopenharmony_ci map = priv->maps->rf_cal; 11338c2ecf20Sopenharmony_ci map_name = "rf_cal"; 11348c2ecf20Sopenharmony_ci break; 11358c2ecf20Sopenharmony_ci case IR_MEASURE: 11368c2ecf20Sopenharmony_ci map = priv->maps->ir_measure; 11378c2ecf20Sopenharmony_ci map_name = "ir_measure"; 11388c2ecf20Sopenharmony_ci break; 11398c2ecf20Sopenharmony_ci case RF_CAL_DC_OVER_DT: 11408c2ecf20Sopenharmony_ci map = priv->maps->rf_cal_dc_over_dt; 11418c2ecf20Sopenharmony_ci map_name = "rf_cal_dc_over_dt"; 11428c2ecf20Sopenharmony_ci break; 11438c2ecf20Sopenharmony_ci default: 11448c2ecf20Sopenharmony_ci /* we should never get here */ 11458c2ecf20Sopenharmony_ci map_name = "undefined"; 11468c2ecf20Sopenharmony_ci break; 11478c2ecf20Sopenharmony_ci } 11488c2ecf20Sopenharmony_ci 11498c2ecf20Sopenharmony_ci if (!map) { 11508c2ecf20Sopenharmony_ci tda_warn("%s map is not set!\n", map_name); 11518c2ecf20Sopenharmony_ci ret = -EINVAL; 11528c2ecf20Sopenharmony_ci goto fail; 11538c2ecf20Sopenharmony_ci } 11548c2ecf20Sopenharmony_ci 11558c2ecf20Sopenharmony_ci while ((map[i].rfmax * 1000) < *freq) { 11568c2ecf20Sopenharmony_ci if (map[i + 1].rfmax == 0) { 11578c2ecf20Sopenharmony_ci tda_map("%s: frequency (%d) out of range\n", 11588c2ecf20Sopenharmony_ci map_name, *freq); 11598c2ecf20Sopenharmony_ci ret = -ERANGE; 11608c2ecf20Sopenharmony_ci break; 11618c2ecf20Sopenharmony_ci } 11628c2ecf20Sopenharmony_ci i++; 11638c2ecf20Sopenharmony_ci } 11648c2ecf20Sopenharmony_ci *val = map[i].val; 11658c2ecf20Sopenharmony_ci 11668c2ecf20Sopenharmony_ci tda_map("(%d) %s: 0x%02x\n", i, map_name, *val); 11678c2ecf20Sopenharmony_cifail: 11688c2ecf20Sopenharmony_ci return ret; 11698c2ecf20Sopenharmony_ci} 11708c2ecf20Sopenharmony_ci 11718c2ecf20Sopenharmony_ci/*---------------------------------------------------------------------*/ 11728c2ecf20Sopenharmony_ci 11738c2ecf20Sopenharmony_cistatic const struct tda18271_std_map tda18271c1_std_map = { 11748c2ecf20Sopenharmony_ci .fm_radio = { .if_freq = 1250, .fm_rfn = 1, .agc_mode = 3, .std = 0, 11758c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x18 */ 11768c2ecf20Sopenharmony_ci .atv_b = { .if_freq = 6750, .fm_rfn = 0, .agc_mode = 1, .std = 6, 11778c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0e */ 11788c2ecf20Sopenharmony_ci .atv_dk = { .if_freq = 7750, .fm_rfn = 0, .agc_mode = 1, .std = 7, 11798c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0f */ 11808c2ecf20Sopenharmony_ci .atv_gh = { .if_freq = 7750, .fm_rfn = 0, .agc_mode = 1, .std = 7, 11818c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0f */ 11828c2ecf20Sopenharmony_ci .atv_i = { .if_freq = 7750, .fm_rfn = 0, .agc_mode = 1, .std = 7, 11838c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0f */ 11848c2ecf20Sopenharmony_ci .atv_l = { .if_freq = 7750, .fm_rfn = 0, .agc_mode = 1, .std = 7, 11858c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0f */ 11868c2ecf20Sopenharmony_ci .atv_lc = { .if_freq = 1250, .fm_rfn = 0, .agc_mode = 1, .std = 7, 11878c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0f */ 11888c2ecf20Sopenharmony_ci .atv_mn = { .if_freq = 5750, .fm_rfn = 0, .agc_mode = 1, .std = 5, 11898c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0d */ 11908c2ecf20Sopenharmony_ci .atsc_6 = { .if_freq = 3250, .fm_rfn = 0, .agc_mode = 3, .std = 4, 11918c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1c */ 11928c2ecf20Sopenharmony_ci .dvbt_6 = { .if_freq = 3300, .fm_rfn = 0, .agc_mode = 3, .std = 4, 11938c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1c */ 11948c2ecf20Sopenharmony_ci .dvbt_7 = { .if_freq = 3800, .fm_rfn = 0, .agc_mode = 3, .std = 5, 11958c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1d */ 11968c2ecf20Sopenharmony_ci .dvbt_8 = { .if_freq = 4300, .fm_rfn = 0, .agc_mode = 3, .std = 6, 11978c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1e */ 11988c2ecf20Sopenharmony_ci .qam_6 = { .if_freq = 4000, .fm_rfn = 0, .agc_mode = 3, .std = 5, 11998c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1d */ 12008c2ecf20Sopenharmony_ci .qam_7 = { .if_freq = 4500, .fm_rfn = 0, .agc_mode = 3, .std = 6, 12018c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1e */ 12028c2ecf20Sopenharmony_ci .qam_8 = { .if_freq = 5000, .fm_rfn = 0, .agc_mode = 3, .std = 7, 12038c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1f */ 12048c2ecf20Sopenharmony_ci}; 12058c2ecf20Sopenharmony_ci 12068c2ecf20Sopenharmony_cistatic const struct tda18271_std_map tda18271c2_std_map = { 12078c2ecf20Sopenharmony_ci .fm_radio = { .if_freq = 1250, .fm_rfn = 1, .agc_mode = 3, .std = 0, 12088c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x18 */ 12098c2ecf20Sopenharmony_ci .atv_b = { .if_freq = 6000, .fm_rfn = 0, .agc_mode = 1, .std = 5, 12108c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0d */ 12118c2ecf20Sopenharmony_ci .atv_dk = { .if_freq = 6900, .fm_rfn = 0, .agc_mode = 1, .std = 6, 12128c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0e */ 12138c2ecf20Sopenharmony_ci .atv_gh = { .if_freq = 7100, .fm_rfn = 0, .agc_mode = 1, .std = 6, 12148c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0e */ 12158c2ecf20Sopenharmony_ci .atv_i = { .if_freq = 7250, .fm_rfn = 0, .agc_mode = 1, .std = 6, 12168c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0e */ 12178c2ecf20Sopenharmony_ci .atv_l = { .if_freq = 6900, .fm_rfn = 0, .agc_mode = 1, .std = 6, 12188c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0e */ 12198c2ecf20Sopenharmony_ci .atv_lc = { .if_freq = 1250, .fm_rfn = 0, .agc_mode = 1, .std = 6, 12208c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0e */ 12218c2ecf20Sopenharmony_ci .atv_mn = { .if_freq = 5400, .fm_rfn = 0, .agc_mode = 1, .std = 4, 12228c2ecf20Sopenharmony_ci .if_lvl = 0, .rfagc_top = 0x2c, }, /* EP3[4:0] 0x0c */ 12238c2ecf20Sopenharmony_ci .atsc_6 = { .if_freq = 3250, .fm_rfn = 0, .agc_mode = 3, .std = 4, 12248c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1c */ 12258c2ecf20Sopenharmony_ci .dvbt_6 = { .if_freq = 3300, .fm_rfn = 0, .agc_mode = 3, .std = 4, 12268c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1c */ 12278c2ecf20Sopenharmony_ci .dvbt_7 = { .if_freq = 3500, .fm_rfn = 0, .agc_mode = 3, .std = 4, 12288c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1c */ 12298c2ecf20Sopenharmony_ci .dvbt_8 = { .if_freq = 4000, .fm_rfn = 0, .agc_mode = 3, .std = 5, 12308c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1d */ 12318c2ecf20Sopenharmony_ci .qam_6 = { .if_freq = 4000, .fm_rfn = 0, .agc_mode = 3, .std = 5, 12328c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1d */ 12338c2ecf20Sopenharmony_ci .qam_7 = { .if_freq = 4500, .fm_rfn = 0, .agc_mode = 3, .std = 6, 12348c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1e */ 12358c2ecf20Sopenharmony_ci .qam_8 = { .if_freq = 5000, .fm_rfn = 0, .agc_mode = 3, .std = 7, 12368c2ecf20Sopenharmony_ci .if_lvl = 1, .rfagc_top = 0x37, }, /* EP3[4:0] 0x1f */ 12378c2ecf20Sopenharmony_ci}; 12388c2ecf20Sopenharmony_ci 12398c2ecf20Sopenharmony_ci/*---------------------------------------------------------------------*/ 12408c2ecf20Sopenharmony_ci 12418c2ecf20Sopenharmony_cistatic struct tda18271_map_layout tda18271c1_map_layout = { 12428c2ecf20Sopenharmony_ci .main_pll = tda18271c1_main_pll, 12438c2ecf20Sopenharmony_ci .cal_pll = tda18271c1_cal_pll, 12448c2ecf20Sopenharmony_ci 12458c2ecf20Sopenharmony_ci .rf_cal = tda18271c1_rf_cal, 12468c2ecf20Sopenharmony_ci .rf_cal_kmco = tda18271c1_km, 12478c2ecf20Sopenharmony_ci 12488c2ecf20Sopenharmony_ci .bp_filter = tda18271_bp_filter, 12498c2ecf20Sopenharmony_ci .rf_band = tda18271_rf_band, 12508c2ecf20Sopenharmony_ci .gain_taper = tda18271_gain_taper, 12518c2ecf20Sopenharmony_ci .ir_measure = tda18271_ir_measure, 12528c2ecf20Sopenharmony_ci}; 12538c2ecf20Sopenharmony_ci 12548c2ecf20Sopenharmony_cistatic struct tda18271_map_layout tda18271c2_map_layout = { 12558c2ecf20Sopenharmony_ci .main_pll = tda18271c2_main_pll, 12568c2ecf20Sopenharmony_ci .cal_pll = tda18271c2_cal_pll, 12578c2ecf20Sopenharmony_ci 12588c2ecf20Sopenharmony_ci .rf_cal = tda18271c2_rf_cal, 12598c2ecf20Sopenharmony_ci .rf_cal_kmco = tda18271c2_km, 12608c2ecf20Sopenharmony_ci 12618c2ecf20Sopenharmony_ci .rf_cal_dc_over_dt = tda18271_rf_cal_dc_over_dt, 12628c2ecf20Sopenharmony_ci 12638c2ecf20Sopenharmony_ci .bp_filter = tda18271_bp_filter, 12648c2ecf20Sopenharmony_ci .rf_band = tda18271_rf_band, 12658c2ecf20Sopenharmony_ci .gain_taper = tda18271_gain_taper, 12668c2ecf20Sopenharmony_ci .ir_measure = tda18271_ir_measure, 12678c2ecf20Sopenharmony_ci}; 12688c2ecf20Sopenharmony_ci 12698c2ecf20Sopenharmony_ciint tda18271_assign_map_layout(struct dvb_frontend *fe) 12708c2ecf20Sopenharmony_ci{ 12718c2ecf20Sopenharmony_ci struct tda18271_priv *priv = fe->tuner_priv; 12728c2ecf20Sopenharmony_ci int ret = 0; 12738c2ecf20Sopenharmony_ci 12748c2ecf20Sopenharmony_ci switch (priv->id) { 12758c2ecf20Sopenharmony_ci case TDA18271HDC1: 12768c2ecf20Sopenharmony_ci priv->maps = &tda18271c1_map_layout; 12778c2ecf20Sopenharmony_ci priv->std = tda18271c1_std_map; 12788c2ecf20Sopenharmony_ci break; 12798c2ecf20Sopenharmony_ci case TDA18271HDC2: 12808c2ecf20Sopenharmony_ci priv->maps = &tda18271c2_map_layout; 12818c2ecf20Sopenharmony_ci priv->std = tda18271c2_std_map; 12828c2ecf20Sopenharmony_ci break; 12838c2ecf20Sopenharmony_ci default: 12848c2ecf20Sopenharmony_ci ret = -EINVAL; 12858c2ecf20Sopenharmony_ci break; 12868c2ecf20Sopenharmony_ci } 12878c2ecf20Sopenharmony_ci memcpy(priv->rf_cal_state, &tda18271_rf_band_template, 12888c2ecf20Sopenharmony_ci sizeof(tda18271_rf_band_template)); 12898c2ecf20Sopenharmony_ci 12908c2ecf20Sopenharmony_ci return ret; 12918c2ecf20Sopenharmony_ci} 1292