diff options
author | Tzafrir Cohen <tzafrir@cohens.org.il> | 2008-10-12 01:17:26 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-22 12:56:33 -0400 |
commit | 9d8f2d5dfbcc9d2229f5e93653988d98360e248c (patch) | |
tree | cb8a35dbef650ce1de55aa179fc1b4ab28cb2b5b | |
parent | 5b97de8c63efb179064cc422e9748d422e02677d (diff) |
Staging: echo: Changed preffix from echo_can_ to oslec_
Signed-off-by: Tzafrir Cohen <tzafrir@cohens.org.il>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/echo/echo.c | 36 | ||||
-rw-r--r-- | drivers/staging/echo/echo.h | 2 | ||||
-rw-r--r-- | drivers/staging/echo/oslec.h | 16 |
3 files changed, 27 insertions, 27 deletions
diff --git a/drivers/staging/echo/echo.c b/drivers/staging/echo/echo.c index a408b62fae46..13792ef286f3 100644 --- a/drivers/staging/echo/echo.c +++ b/drivers/staging/echo/echo.c | |||
@@ -128,7 +128,7 @@ | |||
128 | 128 | ||
129 | 129 | ||
130 | #ifdef __BLACKFIN_ASM__ | 130 | #ifdef __BLACKFIN_ASM__ |
131 | static void __inline__ lms_adapt_bg(struct echo_can_state *ec, int clean, int shift) | 131 | static void __inline__ lms_adapt_bg(struct oslec_state *ec, int clean, int shift) |
132 | { | 132 | { |
133 | int i, j; | 133 | int i, j; |
134 | int offset1; | 134 | int offset1; |
@@ -200,7 +200,7 @@ static void __inline__ lms_adapt_bg(struct echo_can_state *ec, int clean, int sh | |||
200 | */ | 200 | */ |
201 | 201 | ||
202 | #else | 202 | #else |
203 | static __inline__ void lms_adapt_bg(struct echo_can_state *ec, int clean, int shift) | 203 | static __inline__ void lms_adapt_bg(struct oslec_state *ec, int clean, int shift) |
204 | { | 204 | { |
205 | int i; | 205 | int i; |
206 | 206 | ||
@@ -234,9 +234,9 @@ static __inline__ void lms_adapt_bg(struct echo_can_state *ec, int clean, int sh | |||
234 | 234 | ||
235 | /*- End of function --------------------------------------------------------*/ | 235 | /*- End of function --------------------------------------------------------*/ |
236 | 236 | ||
237 | struct echo_can_state *echo_can_create(int len, int adaption_mode) | 237 | struct oslec_state *oslec_create(int len, int adaption_mode) |
238 | { | 238 | { |
239 | struct echo_can_state *ec; | 239 | struct oslec_state *ec; |
240 | int i; | 240 | int i; |
241 | int j; | 241 | int j; |
242 | 242 | ||
@@ -273,7 +273,7 @@ struct echo_can_state *echo_can_create(int len, int adaption_mode) | |||
273 | } | 273 | } |
274 | 274 | ||
275 | ec->cng_level = 1000; | 275 | ec->cng_level = 1000; |
276 | echo_can_adaption_mode(ec, adaption_mode); | 276 | oslec_adaption_mode(ec, adaption_mode); |
277 | 277 | ||
278 | ec->snapshot = (int16_t*)malloc(ec->taps*sizeof(int16_t)); | 278 | ec->snapshot = (int16_t*)malloc(ec->taps*sizeof(int16_t)); |
279 | memset(ec->snapshot, 0, sizeof(int16_t)*ec->taps); | 279 | memset(ec->snapshot, 0, sizeof(int16_t)*ec->taps); |
@@ -289,10 +289,10 @@ struct echo_can_state *echo_can_create(int len, int adaption_mode) | |||
289 | 289 | ||
290 | return ec; | 290 | return ec; |
291 | } | 291 | } |
292 | EXPORT_SYMBOL_GPL(echo_can_create); | 292 | EXPORT_SYMBOL_GPL(oslec_create); |
293 | /*- End of function --------------------------------------------------------*/ | 293 | /*- End of function --------------------------------------------------------*/ |
294 | 294 | ||
295 | void echo_can_free(struct echo_can_state *ec) | 295 | void oslec_free(struct oslec_state *ec) |
296 | { | 296 | { |
297 | int i; | 297 | int i; |
298 | 298 | ||
@@ -303,17 +303,17 @@ void echo_can_free(struct echo_can_state *ec) | |||
303 | kfree(ec->snapshot); | 303 | kfree(ec->snapshot); |
304 | kfree(ec); | 304 | kfree(ec); |
305 | } | 305 | } |
306 | EXPORT_SYMBOL_GPL(echo_can_free); | 306 | EXPORT_SYMBOL_GPL(oslec_free); |
307 | /*- End of function --------------------------------------------------------*/ | 307 | /*- End of function --------------------------------------------------------*/ |
308 | 308 | ||
309 | void echo_can_adaption_mode(struct echo_can_state *ec, int adaption_mode) | 309 | void oslec_adaption_mode(struct oslec_state *ec, int adaption_mode) |
310 | { | 310 | { |
311 | ec->adaption_mode = adaption_mode; | 311 | ec->adaption_mode = adaption_mode; |
312 | } | 312 | } |
313 | EXPORT_SYMBOL_GPL(echo_can_adaption_mode); | 313 | EXPORT_SYMBOL_GPL(oslec_adaption_mode); |
314 | /*- End of function --------------------------------------------------------*/ | 314 | /*- End of function --------------------------------------------------------*/ |
315 | 315 | ||
316 | void echo_can_flush(struct echo_can_state *ec) | 316 | void oslec_flush(struct oslec_state *ec) |
317 | { | 317 | { |
318 | int i; | 318 | int i; |
319 | 319 | ||
@@ -337,18 +337,18 @@ void echo_can_flush(struct echo_can_state *ec) | |||
337 | ec->curr_pos = ec->taps - 1; | 337 | ec->curr_pos = ec->taps - 1; |
338 | ec->Pstates = 0; | 338 | ec->Pstates = 0; |
339 | } | 339 | } |
340 | EXPORT_SYMBOL_GPL(echo_can_flush); | 340 | EXPORT_SYMBOL_GPL(oslec_flush); |
341 | /*- End of function --------------------------------------------------------*/ | 341 | /*- End of function --------------------------------------------------------*/ |
342 | 342 | ||
343 | void echo_can_snapshot(struct echo_can_state *ec) { | 343 | void oslec_snapshot(struct oslec_state *ec) { |
344 | memcpy(ec->snapshot, ec->fir_taps16[0], ec->taps*sizeof(int16_t)); | 344 | memcpy(ec->snapshot, ec->fir_taps16[0], ec->taps*sizeof(int16_t)); |
345 | } | 345 | } |
346 | EXPORT_SYMBOL_GPL(echo_can_snapshot); | 346 | EXPORT_SYMBOL_GPL(oslec_snapshot); |
347 | /*- End of function --------------------------------------------------------*/ | 347 | /*- End of function --------------------------------------------------------*/ |
348 | 348 | ||
349 | /* Dual Path Echo Canceller ------------------------------------------------*/ | 349 | /* Dual Path Echo Canceller ------------------------------------------------*/ |
350 | 350 | ||
351 | int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx) | 351 | int16_t oslec_update(struct oslec_state *ec, int16_t tx, int16_t rx) |
352 | { | 352 | { |
353 | int32_t echo_value; | 353 | int32_t echo_value; |
354 | int clean_bg; | 354 | int clean_bg; |
@@ -589,7 +589,7 @@ int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx) | |||
589 | 589 | ||
590 | return (int16_t) ec->clean_nlp << 1; | 590 | return (int16_t) ec->clean_nlp << 1; |
591 | } | 591 | } |
592 | EXPORT_SYMBOL_GPL(echo_can_update); | 592 | EXPORT_SYMBOL_GPL(oslec_update); |
593 | /*- End of function --------------------------------------------------------*/ | 593 | /*- End of function --------------------------------------------------------*/ |
594 | 594 | ||
595 | /* This function is seperated from the echo canceller is it is usually called | 595 | /* This function is seperated from the echo canceller is it is usually called |
@@ -613,7 +613,7 @@ EXPORT_SYMBOL_GPL(echo_can_update); | |||
613 | precision, which noise shapes things, giving very clean DC removal. | 613 | precision, which noise shapes things, giving very clean DC removal. |
614 | */ | 614 | */ |
615 | 615 | ||
616 | int16_t echo_can_hpf_tx(struct echo_can_state *ec, int16_t tx) { | 616 | int16_t oslec_hpf_tx(struct oslec_state *ec, int16_t tx) { |
617 | int tmp, tmp1; | 617 | int tmp, tmp1; |
618 | 618 | ||
619 | if (ec->adaption_mode & ECHO_CAN_USE_TX_HPF) { | 619 | if (ec->adaption_mode & ECHO_CAN_USE_TX_HPF) { |
@@ -635,7 +635,7 @@ int16_t echo_can_hpf_tx(struct echo_can_state *ec, int16_t tx) { | |||
635 | 635 | ||
636 | return tx; | 636 | return tx; |
637 | } | 637 | } |
638 | EXPORT_SYMBOL_GPL(echo_can_hpf_tx); | 638 | EXPORT_SYMBOL_GPL(oslec_hpf_tx); |
639 | 639 | ||
640 | MODULE_LICENSE("GPL"); | 640 | MODULE_LICENSE("GPL"); |
641 | MODULE_AUTHOR("David Rowe"); | 641 | MODULE_AUTHOR("David Rowe"); |
diff --git a/drivers/staging/echo/echo.h b/drivers/staging/echo/echo.h index 5c8b5153b199..2a1d1d8a9295 100644 --- a/drivers/staging/echo/echo.h +++ b/drivers/staging/echo/echo.h | |||
@@ -124,7 +124,7 @@ a minor burden. | |||
124 | G.168 echo canceller descriptor. This defines the working state for a line | 124 | G.168 echo canceller descriptor. This defines the working state for a line |
125 | echo canceller. | 125 | echo canceller. |
126 | */ | 126 | */ |
127 | struct echo_can_state | 127 | struct oslec_state |
128 | { | 128 | { |
129 | int16_t tx,rx; | 129 | int16_t tx,rx; |
130 | int16_t clean; | 130 | int16_t clean; |
diff --git a/drivers/staging/echo/oslec.h b/drivers/staging/echo/oslec.h index 8227013cf49e..e41de61622db 100644 --- a/drivers/staging/echo/oslec.h +++ b/drivers/staging/echo/oslec.h | |||
@@ -42,31 +42,31 @@ | |||
42 | G.168 echo canceller descriptor. This defines the working state for a line | 42 | G.168 echo canceller descriptor. This defines the working state for a line |
43 | echo canceller. | 43 | echo canceller. |
44 | */ | 44 | */ |
45 | struct echo_can_state; | 45 | struct oslec_state; |
46 | 46 | ||
47 | /*! Create a voice echo canceller context. | 47 | /*! Create a voice echo canceller context. |
48 | \param len The length of the canceller, in samples. | 48 | \param len The length of the canceller, in samples. |
49 | \return The new canceller context, or NULL if the canceller could not be created. | 49 | \return The new canceller context, or NULL if the canceller could not be created. |
50 | */ | 50 | */ |
51 | struct echo_can_state *echo_can_create(int len, int adaption_mode); | 51 | struct oslec_state *oslec_create(int len, int adaption_mode); |
52 | 52 | ||
53 | /*! Free a voice echo canceller context. | 53 | /*! Free a voice echo canceller context. |
54 | \param ec The echo canceller context. | 54 | \param ec The echo canceller context. |
55 | */ | 55 | */ |
56 | void echo_can_free(struct echo_can_state *ec); | 56 | void oslec_free(struct oslec_state *ec); |
57 | 57 | ||
58 | /*! Flush (reinitialise) a voice echo canceller context. | 58 | /*! Flush (reinitialise) a voice echo canceller context. |
59 | \param ec The echo canceller context. | 59 | \param ec The echo canceller context. |
60 | */ | 60 | */ |
61 | void echo_can_flush(struct echo_can_state *ec); | 61 | void oslec_flush(struct oslec_state *ec); |
62 | 62 | ||
63 | /*! Set the adaption mode of a voice echo canceller context. | 63 | /*! Set the adaption mode of a voice echo canceller context. |
64 | \param ec The echo canceller context. | 64 | \param ec The echo canceller context. |
65 | \param adapt The mode. | 65 | \param adapt The mode. |
66 | */ | 66 | */ |
67 | void echo_can_adaption_mode(struct echo_can_state *ec, int adaption_mode); | 67 | void oslec_adaption_mode(struct oslec_state *ec, int adaption_mode); |
68 | 68 | ||
69 | void echo_can_snapshot(struct echo_can_state *ec); | 69 | void oslec_snapshot(struct oslec_state *ec); |
70 | 70 | ||
71 | /*! Process a sample through a voice echo canceller. | 71 | /*! Process a sample through a voice echo canceller. |
72 | \param ec The echo canceller context. | 72 | \param ec The echo canceller context. |
@@ -74,13 +74,13 @@ void echo_can_snapshot(struct echo_can_state *ec); | |||
74 | \param rx The received audio sample. | 74 | \param rx The received audio sample. |
75 | \return The clean (echo cancelled) received sample. | 75 | \return The clean (echo cancelled) received sample. |
76 | */ | 76 | */ |
77 | int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx); | 77 | int16_t oslec_update(struct oslec_state *ec, int16_t tx, int16_t rx); |
78 | 78 | ||
79 | /*! Process to high pass filter the tx signal. | 79 | /*! Process to high pass filter the tx signal. |
80 | \param ec The echo canceller context. | 80 | \param ec The echo canceller context. |
81 | \param tx The transmitted auio sample. | 81 | \param tx The transmitted auio sample. |
82 | \return The HP filtered transmit sample, send this to your D/A. | 82 | \return The HP filtered transmit sample, send this to your D/A. |
83 | */ | 83 | */ |
84 | int16_t echo_can_hpf_tx(struct echo_can_state *ec, int16_t tx); | 84 | int16_t oslec_hpf_tx(struct oslec_state *ec, int16_t tx); |
85 | 85 | ||
86 | #endif /* __OSLEC_H */ | 86 | #endif /* __OSLEC_H */ |