aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/af9013_priv.h
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2010-09-12 19:48:58 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:05:52 -0400
commit9b22edd4b0f3520bc1279338d52dc63e76852bef (patch)
tree09ff3b882f3bc07fb838570df1b4268f84266871 /drivers/media/dvb/frontends/af9013_priv.h
parentd3bb73de97a9685bb150f81017d7e184fdb18451 (diff)
V4L/DVB: af9013: optimize code size
Optimize af9013_set_coeff(). Move configuration values to own table. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/af9013_priv.h')
-rw-r--r--drivers/media/dvb/frontends/af9013_priv.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/af9013_priv.h b/drivers/media/dvb/frontends/af9013_priv.h
index 54ebf87551a2..fc9a32d9e632 100644
--- a/drivers/media/dvb/frontends/af9013_priv.h
+++ b/drivers/media/dvb/frontends/af9013_priv.h
@@ -60,6 +60,49 @@ 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 u32 ns_coeff1_2048nu;
67 u32 ns_coeff1_8191nu;
68 u32 ns_coeff1_8192nu;
69 u32 ns_coeff1_8193nu;
70 u32 ns_coeff2_2k;
71 u32 ns_coeff2_8k;
72};
73
74/* coeff lookup table */
75static struct coeff coeff_table[] = {
76 /* 28.800 MHz */
77 { 28800, BANDWIDTH_6_MHZ, 0x01e79e7a, 0x0079eb6e, 0x0079e79e,
78 0x0079e3cf, 0x00f3cf3d, 0x003cf3cf },
79 { 28800, BANDWIDTH_7_MHZ, 0x0238e38e, 0x008e3d55, 0x008e38e4,
80 0x008e3472, 0x011c71c7, 0x00471c72 },
81 { 28800, BANDWIDTH_8_MHZ, 0x028a28a3, 0x00a28f3d, 0x00a28a29,
82 0x00a28514, 0x01451451, 0x00514514 },
83 /* 20.480 MHz */
84 { 20480, BANDWIDTH_6_MHZ, 0x02adb6dc, 0x00ab7313, 0x00ab6db7,
85 0x00ab685c, 0x0156db6e, 0x0055b6dc },
86 { 20480, BANDWIDTH_7_MHZ, 0x03200001, 0x00c80640, 0x00c80000,
87 0x00c7f9c0, 0x01900000, 0x00640000 },
88 { 20480, BANDWIDTH_8_MHZ, 0x03924926, 0x00e4996e, 0x00e49249,
89 0x00e48b25, 0x01c92493, 0x00724925 },
90 /* 28.000 MHz */
91 { 28000, BANDWIDTH_6_MHZ, 0x01f58d10, 0x007d672f, 0x007d6344,
92 0x007d5f59, 0x00fac688, 0x003eb1a2 },
93 { 28000, BANDWIDTH_7_MHZ, 0x02492492, 0x00924db7, 0x00924925,
94 0x00924492, 0x01249249, 0x00492492 },
95 { 28000, BANDWIDTH_8_MHZ, 0x029cbc15, 0x00a7343f, 0x00a72f05,
96 0x00a729cc, 0x014e5e0a, 0x00539783 },
97 /* 25.000 MHz */
98 { 25000, BANDWIDTH_6_MHZ, 0x0231bcb5, 0x008c7391, 0x008c6f2d,
99 0x008c6aca, 0x0118de5b, 0x00463797 },
100 { 25000, BANDWIDTH_7_MHZ, 0x028f5c29, 0x00a3dc29, 0x00a3d70a,
101 0x00a3d1ec, 0x0147ae14, 0x0051eb85 },
102 { 25000, BANDWIDTH_8_MHZ, 0x02ecfb9d, 0x00bb44c1, 0x00bb3ee7,
103 0x00bb390d, 0x01767dce, 0x005d9f74 },
104};
105
63/* QPSK SNR lookup table */ 106/* QPSK SNR lookup table */
64static struct snr_table qpsk_snr_table[] = { 107static struct snr_table qpsk_snr_table[] = {
65 { 0x0b4771, 0 }, 108 { 0x0b4771, 0 },