Commit 7a9aea51 authored by Rahul Tank's avatar Rahul Tank Committed by Greg Kroah-Hartman

staging: echo: Trivial indentation changes

--bcaec50161b317392804a33628dd
Content-Type: text/plain; charset=ISO-8859-1

Hi Greg,

 Please find patch attached .

Thanks,
 Rahul

Hi Greg,<br><br> Please find patch attached .<br><br>Thanks,<br> Rahul<br>

From ba1dbafaef1a87c1338c5bb0e6bba3be06071c90 Mon Sep 17 00:00:00 2001
From: Rahul Tank <rahul.tank@gmail.com>
Date: Sat, 14 May 2011 11:28:25 +0530
Subject: [PATCH] Trivial indentation cleanup
Signed-off-by: default avatarRahul Tank <rahul.tank@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1c6e79d9
...@@ -113,12 +113,10 @@ ...@@ -113,12 +113,10 @@
#define DTD_HANGOVER 600 /* 600 samples, or 75ms */ #define DTD_HANGOVER 600 /* 600 samples, or 75ms */
#define DC_LOG2BETA 3 /* log2() of DC filter Beta */ #define DC_LOG2BETA 3 /* log2() of DC filter Beta */
/* adapting coeffs using the traditional stochastic descent (N)LMS algorithm */ /* adapting coeffs using the traditional stochastic descent (N)LMS algorithm */
#ifdef __bfin__ #ifdef __bfin__
static inline void lms_adapt_bg(struct oslec_state *ec, int clean, static inline void lms_adapt_bg(struct oslec_state *ec, int clean, int shift)
int shift)
{ {
int i, j; int i, j;
int offset1; int offset1;
...@@ -189,8 +187,7 @@ static inline void lms_adapt_bg(struct oslec_state *ec, int clean, ...@@ -189,8 +187,7 @@ static inline void lms_adapt_bg(struct oslec_state *ec, int clean,
*/ */
#else #else
static inline void lms_adapt_bg(struct oslec_state *ec, int clean, static inline void lms_adapt_bg(struct oslec_state *ec, int clean, int shift)
int shift)
{ {
int i; int i;
...@@ -225,7 +222,7 @@ static inline int top_bit(unsigned int bits) ...@@ -225,7 +222,7 @@ static inline int top_bit(unsigned int bits)
if (bits == 0) if (bits == 0)
return -1; return -1;
else else
return (int)fls((int32_t)bits)-1; return (int)fls((int32_t) bits) - 1;
} }
struct oslec_state *oslec_create(int len, int adaption_mode) struct oslec_state *oslec_create(int len, int adaption_mode)
...@@ -279,6 +276,7 @@ struct oslec_state *oslec_create(int len, int adaption_mode) ...@@ -279,6 +276,7 @@ struct oslec_state *oslec_create(int len, int adaption_mode)
kfree(ec); kfree(ec);
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(oslec_create); EXPORT_SYMBOL_GPL(oslec_create);
void oslec_free(struct oslec_state *ec) void oslec_free(struct oslec_state *ec)
...@@ -292,12 +290,14 @@ void oslec_free(struct oslec_state *ec) ...@@ -292,12 +290,14 @@ void oslec_free(struct oslec_state *ec)
kfree(ec->snapshot); kfree(ec->snapshot);
kfree(ec); kfree(ec);
} }
EXPORT_SYMBOL_GPL(oslec_free); EXPORT_SYMBOL_GPL(oslec_free);
void oslec_adaption_mode(struct oslec_state *ec, int adaption_mode) void oslec_adaption_mode(struct oslec_state *ec, int adaption_mode)
{ {
ec->adaption_mode = adaption_mode; ec->adaption_mode = adaption_mode;
} }
EXPORT_SYMBOL_GPL(oslec_adaption_mode); EXPORT_SYMBOL_GPL(oslec_adaption_mode);
void oslec_flush(struct oslec_state *ec) void oslec_flush(struct oslec_state *ec)
...@@ -324,12 +324,14 @@ void oslec_flush(struct oslec_state *ec) ...@@ -324,12 +324,14 @@ void oslec_flush(struct oslec_state *ec)
ec->curr_pos = ec->taps - 1; ec->curr_pos = ec->taps - 1;
ec->Pstates = 0; ec->Pstates = 0;
} }
EXPORT_SYMBOL_GPL(oslec_flush); EXPORT_SYMBOL_GPL(oslec_flush);
void oslec_snapshot(struct oslec_state *ec) void oslec_snapshot(struct oslec_state *ec)
{ {
memcpy(ec->snapshot, ec->fir_taps16[0], ec->taps * sizeof(int16_t)); memcpy(ec->snapshot, ec->fir_taps16[0], ec->taps * sizeof(int16_t));
} }
EXPORT_SYMBOL_GPL(oslec_snapshot); EXPORT_SYMBOL_GPL(oslec_snapshot);
/* Dual Path Echo Canceller */ /* Dual Path Echo Canceller */
...@@ -404,11 +406,11 @@ int16_t oslec_update(struct oslec_state *ec, int16_t tx, int16_t rx) ...@@ -404,11 +406,11 @@ int16_t oslec_update(struct oslec_state *ec, int16_t tx, int16_t rx)
/* efficient "out with the old and in with the new" algorithm so /* efficient "out with the old and in with the new" algorithm so
we don't have to recalculate over the whole block of we don't have to recalculate over the whole block of
samples. */ samples. */
new = (int)tx * (int)tx; new = (int)tx *(int)tx;
old = (int)ec->fir_state.history[ec->fir_state.curr_pos] * old = (int)ec->fir_state.history[ec->fir_state.curr_pos] *
(int)ec->fir_state.history[ec->fir_state.curr_pos]; (int)ec->fir_state.history[ec->fir_state.curr_pos];
ec->Pstates += ec->Pstates +=
((new - old) + (1 << (ec->log2taps-1))) >> ec->log2taps; ((new - old) + (1 << (ec->log2taps - 1))) >> ec->log2taps;
if (ec->Pstates < 0) if (ec->Pstates < 0)
ec->Pstates = 0; ec->Pstates = 0;
} }
...@@ -601,6 +603,7 @@ int16_t oslec_update(struct oslec_state *ec, int16_t tx, int16_t rx) ...@@ -601,6 +603,7 @@ int16_t oslec_update(struct oslec_state *ec, int16_t tx, int16_t rx)
return (int16_t) ec->clean_nlp << 1; return (int16_t) ec->clean_nlp << 1;
} }
EXPORT_SYMBOL_GPL(oslec_update); EXPORT_SYMBOL_GPL(oslec_update);
/* This function is separated from the echo canceller is it is usually called /* This function is separated from the echo canceller is it is usually called
...@@ -625,7 +628,7 @@ EXPORT_SYMBOL_GPL(oslec_update); ...@@ -625,7 +628,7 @@ EXPORT_SYMBOL_GPL(oslec_update);
giving very clean DC removal. giving very clean DC removal.
*/ */
int16_t oslec_hpf_tx(struct oslec_state *ec, int16_t tx) int16_t oslec_hpf_tx(struct oslec_state * ec, int16_t tx)
{ {
int tmp, tmp1; int tmp, tmp1;
...@@ -654,6 +657,7 @@ int16_t oslec_hpf_tx(struct oslec_state *ec, int16_t tx) ...@@ -654,6 +657,7 @@ int16_t oslec_hpf_tx(struct oslec_state *ec, int16_t tx)
return tx; return tx;
} }
EXPORT_SYMBOL_GPL(oslec_hpf_tx); EXPORT_SYMBOL_GPL(oslec_hpf_tx);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment