aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/af9013_priv.h
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2010-10-06 20:35:20 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:17:54 -0400
commitedb709b61abd3ba475e59d1ad81aab21ad025db6 (patch)
tree1ba6e323683ea9b6a01e34f2bbcafafecfb684d1 /drivers/media/dvb/frontends/af9013_priv.h
parent589851d5990f85cce884f831ec70b9aa40b7ad5f (diff)
[media] af9013: optimize code size
Precalculate coefficients register values. This reduces text size around 300 bytes. 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.h69
1 files changed, 38 insertions, 31 deletions
diff --git a/drivers/media/dvb/frontends/af9013_priv.h b/drivers/media/dvb/frontends/af9013_priv.h
index fc9a32d9e632..e00b2a4a2db6 100644
--- a/drivers/media/dvb/frontends/af9013_priv.h
+++ b/drivers/media/dvb/frontends/af9013_priv.h
@@ -63,44 +63,51 @@ struct snr_table {
63struct coeff { 63struct coeff {
64 u32 adc_clock; 64 u32 adc_clock;
65 fe_bandwidth_t bw; 65 fe_bandwidth_t bw;
66 u32 ns_coeff1_2048nu; 66 u8 val[24];
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}; 67};
73 68
74/* coeff lookup table */ 69/* pre-calculated coeff lookup table */
75static struct coeff coeff_table[] = { 70static struct coeff coeff_table[] = {
76 /* 28.800 MHz */ 71 /* 28.800 MHz */
77 { 28800, BANDWIDTH_6_MHZ, 0x01e79e7a, 0x0079eb6e, 0x0079e79e, 72 { 28800, BANDWIDTH_8_MHZ, { 0x02, 0x8a, 0x28, 0xa3, 0x05, 0x14,
78 0x0079e3cf, 0x00f3cf3d, 0x003cf3cf }, 73 0x51, 0x11, 0x00, 0xa2, 0x8f, 0x3d, 0x00, 0xa2, 0x8a,
79 { 28800, BANDWIDTH_7_MHZ, 0x0238e38e, 0x008e3d55, 0x008e38e4, 74 0x29, 0x00, 0xa2, 0x85, 0x14, 0x01, 0x45, 0x14, 0x14 } },
80 0x008e3472, 0x011c71c7, 0x00471c72 }, 75 { 28800, BANDWIDTH_7_MHZ, { 0x02, 0x38, 0xe3, 0x8e, 0x04, 0x71,
81 { 28800, BANDWIDTH_8_MHZ, 0x028a28a3, 0x00a28f3d, 0x00a28a29, 76 0xc7, 0x07, 0x00, 0x8e, 0x3d, 0x55, 0x00, 0x8e, 0x38,
82 0x00a28514, 0x01451451, 0x00514514 }, 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 } },
83 /* 20.480 MHz */ 81 /* 20.480 MHz */
84 { 20480, BANDWIDTH_6_MHZ, 0x02adb6dc, 0x00ab7313, 0x00ab6db7, 82 { 20480, BANDWIDTH_8_MHZ, { 0x03, 0x92, 0x49, 0x26, 0x07, 0x24,
85 0x00ab685c, 0x0156db6e, 0x0055b6dc }, 83 0x92, 0x13, 0x00, 0xe4, 0x99, 0x6e, 0x00, 0xe4, 0x92,
86 { 20480, BANDWIDTH_7_MHZ, 0x03200001, 0x00c80640, 0x00c80000, 84 0x49, 0x00, 0xe4, 0x8b, 0x25, 0x01, 0xc9, 0x24, 0x25 } },
87 0x00c7f9c0, 0x01900000, 0x00640000 }, 85 { 20480, BANDWIDTH_7_MHZ, { 0x03, 0x20, 0x00, 0x01, 0x06, 0x40,
88 { 20480, BANDWIDTH_8_MHZ, 0x03924926, 0x00e4996e, 0x00e49249, 86 0x00, 0x00, 0x00, 0xc8, 0x06, 0x40, 0x00, 0xc8, 0x00,
89 0x00e48b25, 0x01c92493, 0x00724925 }, 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 } },
90 /* 28.000 MHz */ 91 /* 28.000 MHz */
91 { 28000, BANDWIDTH_6_MHZ, 0x01f58d10, 0x007d672f, 0x007d6344, 92 { 28000, BANDWIDTH_8_MHZ, { 0x02, 0x9c, 0xbc, 0x15, 0x05, 0x39,
92 0x007d5f59, 0x00fac688, 0x003eb1a2 }, 93 0x78, 0x0a, 0x00, 0xa7, 0x34, 0x3f, 0x00, 0xa7, 0x2f,
93 { 28000, BANDWIDTH_7_MHZ, 0x02492492, 0x00924db7, 0x00924925, 94 0x05, 0x00, 0xa7, 0x29, 0xcc, 0x01, 0x4e, 0x5e, 0x03 } },
94 0x00924492, 0x01249249, 0x00492492 }, 95 { 28000, BANDWIDTH_7_MHZ, { 0x02, 0x49, 0x24, 0x92, 0x04, 0x92,
95 { 28000, BANDWIDTH_8_MHZ, 0x029cbc15, 0x00a7343f, 0x00a72f05, 96 0x49, 0x09, 0x00, 0x92, 0x4d, 0xb7, 0x00, 0x92, 0x49,
96 0x00a729cc, 0x014e5e0a, 0x00539783 }, 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 } },
97 /* 25.000 MHz */ 101 /* 25.000 MHz */
98 { 25000, BANDWIDTH_6_MHZ, 0x0231bcb5, 0x008c7391, 0x008c6f2d, 102 { 25000, BANDWIDTH_8_MHZ, { 0x02, 0xec, 0xfb, 0x9d, 0x05, 0xd9,
99 0x008c6aca, 0x0118de5b, 0x00463797 }, 103 0xf7, 0x0e, 0x00, 0xbb, 0x44, 0xc1, 0x00, 0xbb, 0x3e,
100 { 25000, BANDWIDTH_7_MHZ, 0x028f5c29, 0x00a3dc29, 0x00a3d70a, 104 0xe7, 0x00, 0xbb, 0x39, 0x0d, 0x01, 0x76, 0x7d, 0x34 } },
101 0x00a3d1ec, 0x0147ae14, 0x0051eb85 }, 105 { 25000, BANDWIDTH_7_MHZ, { 0x02, 0x8f, 0x5c, 0x29, 0x05, 0x1e,
102 { 25000, BANDWIDTH_8_MHZ, 0x02ecfb9d, 0x00bb44c1, 0x00bb3ee7, 106 0xb8, 0x14, 0x00, 0xa3, 0xdc, 0x29, 0x00, 0xa3, 0xd7,
103 0x00bb390d, 0x01767dce, 0x005d9f74 }, 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 } },
104}; 111};
105 112
106/* QPSK SNR lookup table */ 113/* QPSK SNR lookup table */