aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/af9013_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/af9013_priv.h')
-rw-r--r--drivers/media/dvb/frontends/af9013_priv.h60
1 files changed, 56 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/af9013_priv.h b/drivers/media/dvb/frontends/af9013_priv.h
index 0fd42b7e248e..e00b2a4a2db6 100644
--- a/drivers/media/dvb/frontends/af9013_priv.h
+++ b/drivers/media/dvb/frontends/af9013_priv.h
@@ -60,6 +60,56 @@ struct snr_table {
60 u8 snr; 60 u8 snr;
61}; 61};
62 62
63struct coeff {
64 u32 adc_clock;
65 fe_bandwidth_t bw;
66 u8 val[24];
67};
68
69/* pre-calculated coeff lookup table */
70static struct coeff coeff_table[] = {
71 /* 28.800 MHz */
72 { 28800, BANDWIDTH_8_MHZ, { 0x02, 0x8a, 0x28, 0xa3, 0x05, 0x14,
73 0x51, 0x11, 0x00, 0xa2, 0x8f, 0x3d, 0x00, 0xa2, 0x8a,
74 0x29, 0x00, 0xa2, 0x85, 0x14, 0x01, 0x45, 0x14, 0x14 } },
75 { 28800, BANDWIDTH_7_MHZ, { 0x02, 0x38, 0xe3, 0x8e, 0x04, 0x71,
76 0xc7, 0x07, 0x00, 0x8e, 0x3d, 0x55, 0x00, 0x8e, 0x38,
77 0xe4, 0x00, 0x8e, 0x34, 0x72, 0x01, 0x1c, 0x71, 0x32 } },
78 { 28800, BANDWIDTH_6_MHZ, { 0x01, 0xe7, 0x9e, 0x7a, 0x03, 0xcf,
79 0x3c, 0x3d, 0x00, 0x79, 0xeb, 0x6e, 0x00, 0x79, 0xe7,
80 0x9e, 0x00, 0x79, 0xe3, 0xcf, 0x00, 0xf3, 0xcf, 0x0f } },
81 /* 20.480 MHz */
82 { 20480, BANDWIDTH_8_MHZ, { 0x03, 0x92, 0x49, 0x26, 0x07, 0x24,
83 0x92, 0x13, 0x00, 0xe4, 0x99, 0x6e, 0x00, 0xe4, 0x92,
84 0x49, 0x00, 0xe4, 0x8b, 0x25, 0x01, 0xc9, 0x24, 0x25 } },
85 { 20480, BANDWIDTH_7_MHZ, { 0x03, 0x20, 0x00, 0x01, 0x06, 0x40,
86 0x00, 0x00, 0x00, 0xc8, 0x06, 0x40, 0x00, 0xc8, 0x00,
87 0x00, 0x00, 0xc7, 0xf9, 0xc0, 0x01, 0x90, 0x00, 0x00 } },
88 { 20480, BANDWIDTH_6_MHZ, { 0x02, 0xad, 0xb6, 0xdc, 0x05, 0x5b,
89 0x6d, 0x2e, 0x00, 0xab, 0x73, 0x13, 0x00, 0xab, 0x6d,
90 0xb7, 0x00, 0xab, 0x68, 0x5c, 0x01, 0x56, 0xdb, 0x1c } },
91 /* 28.000 MHz */
92 { 28000, BANDWIDTH_8_MHZ, { 0x02, 0x9c, 0xbc, 0x15, 0x05, 0x39,
93 0x78, 0x0a, 0x00, 0xa7, 0x34, 0x3f, 0x00, 0xa7, 0x2f,
94 0x05, 0x00, 0xa7, 0x29, 0xcc, 0x01, 0x4e, 0x5e, 0x03 } },
95 { 28000, BANDWIDTH_7_MHZ, { 0x02, 0x49, 0x24, 0x92, 0x04, 0x92,
96 0x49, 0x09, 0x00, 0x92, 0x4d, 0xb7, 0x00, 0x92, 0x49,
97 0x25, 0x00, 0x92, 0x44, 0x92, 0x01, 0x24, 0x92, 0x12 } },
98 { 28000, BANDWIDTH_6_MHZ, { 0x01, 0xf5, 0x8d, 0x10, 0x03, 0xeb,
99 0x1a, 0x08, 0x00, 0x7d, 0x67, 0x2f, 0x00, 0x7d, 0x63,
100 0x44, 0x00, 0x7d, 0x5f, 0x59, 0x00, 0xfa, 0xc6, 0x22 } },
101 /* 25.000 MHz */
102 { 25000, BANDWIDTH_8_MHZ, { 0x02, 0xec, 0xfb, 0x9d, 0x05, 0xd9,
103 0xf7, 0x0e, 0x00, 0xbb, 0x44, 0xc1, 0x00, 0xbb, 0x3e,
104 0xe7, 0x00, 0xbb, 0x39, 0x0d, 0x01, 0x76, 0x7d, 0x34 } },
105 { 25000, BANDWIDTH_7_MHZ, { 0x02, 0x8f, 0x5c, 0x29, 0x05, 0x1e,
106 0xb8, 0x14, 0x00, 0xa3, 0xdc, 0x29, 0x00, 0xa3, 0xd7,
107 0x0a, 0x00, 0xa3, 0xd1, 0xec, 0x01, 0x47, 0xae, 0x05 } },
108 { 25000, BANDWIDTH_6_MHZ, { 0x02, 0x31, 0xbc, 0xb5, 0x04, 0x63,
109 0x79, 0x1b, 0x00, 0x8c, 0x73, 0x91, 0x00, 0x8c, 0x6f,
110 0x2d, 0x00, 0x8c, 0x6a, 0xca, 0x01, 0x18, 0xde, 0x17 } },
111};
112
63/* QPSK SNR lookup table */ 113/* QPSK SNR lookup table */
64static struct snr_table qpsk_snr_table[] = { 114static struct snr_table qpsk_snr_table[] = {
65 { 0x0b4771, 0 }, 115 { 0x0b4771, 0 },
@@ -480,9 +530,10 @@ static struct regdesc tuner_init_mxl5003d[] = {
480 { 0x9bd9, 0, 8, 0x08 }, 530 { 0x9bd9, 0, 8, 0x08 },
481}; 531};
482 532
483/* MaxLinear MXL5005 tuner init 533/* MaxLinear MXL5005S & MXL5007T tuner init
484 AF9013_TUNER_MXL5005D = 13 534 AF9013_TUNER_MXL5005D = 13
485 AF9013_TUNER_MXL5005R = 30 */ 535 AF9013_TUNER_MXL5005R = 30
536 AF9013_TUNER_MXL5007T = 177 */
486static struct regdesc tuner_init_mxl5005[] = { 537static struct regdesc tuner_init_mxl5005[] = {
487 { 0x9bd5, 0, 8, 0x01 }, 538 { 0x9bd5, 0, 8, 0x01 },
488 { 0x9bd6, 0, 8, 0x07 }, 539 { 0x9bd6, 0, 8, 0x07 },
@@ -791,8 +842,9 @@ static struct regdesc tuner_init_unknown[] = {
791 { 0x9bd9, 0, 8, 0x08 }, 842 { 0x9bd9, 0, 8, 0x08 },
792}; 843};
793 844
794/* NXP TDA18271 tuner init 845/* NXP TDA18271 & TDA18218 tuner init
795 AF9013_TUNER_TDA18271 = 156 */ 846 AF9013_TUNER_TDA18271 = 156
847 AF9013_TUNER_TDA18218 = 179 */
796static struct regdesc tuner_init_tda18271[] = { 848static struct regdesc tuner_init_tda18271[] = {
797 { 0x9bd5, 0, 8, 0x01 }, 849 { 0x9bd5, 0, 8, 0x01 },
798 { 0x9bd6, 0, 8, 0x04 }, 850 { 0x9bd6, 0, 8, 0x04 },