105 #include <linux/kernel.h>
106 #include <linux/module.h>
107 #include <linux/slab.h>
111 #define MIN_TX_POWER_FOR_ADAPTION 64
112 #define MIN_RX_POWER_FOR_ADAPTION 64
113 #define DTD_HANGOVER 600
114 #define DC_LOG2BETA 3
119 static inline void lms_adapt_bg(
struct oslec_state *ec,
int clean,
int shift)
131 factor = clean << shift;
133 factor = clean >> -shift;
145 for (i = 0, j = offset2; i <
n; i++, j++) {
146 exp = *phist++ * factor;
191 static inline void lms_adapt_bg(
struct oslec_state *ec,
int clean,
int shift)
201 factor = clean << shift;
203 factor = clean >> -shift;
210 for (i = ec->
taps - 1; i >= offset1; i--) {
214 for (; i >= 0; i--) {
221 static inline int top_bit(
unsigned int bits)
226 return (
int)fls((
int32_t) bits) - 1;
242 for (i = 0; i < 2; i++) {
252 for (i = 0; i < 5; i++)
274 for (i = 0; i < 2; i++)
288 for (i = 0; i < 2; i++)
319 for (i = 0; i < 2; i++)
388 tmp1 = ec->
rx_1 >> 15;
406 new = (
int)tx * (
int)
tx;
426 ec->
clean = rx - echo_value;
433 clean_bg = rx - echo_value;
483 shift = 30 - 2 - logP;
486 lms_adapt_bg(ec, clean_bg, shift);
646 tmp1 = ec->
tx_1 >> 15;