Commit 0c474826cfdd24226c63b8d012a51cb7d9c85a67
Committed by
Greg Kroah-Hartman
1 parent
ff4513705d
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
staging: echo: Fixed camel-case variable names
Fixed camel-case variable names in echo.c and echo.h. Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 2 changed files with 52 additions and 52 deletions Side-by-side Diff
drivers/staging/echo/echo.c
... | ... | @@ -267,13 +267,13 @@ |
267 | 267 | goto error_snap; |
268 | 268 | |
269 | 269 | ec->cond_met = 0; |
270 | - ec->Pstates = 0; | |
271 | - ec->Ltxacc = ec->Lrxacc = ec->Lcleanacc = ec->Lclean_bgacc = 0; | |
272 | - ec->Ltx = ec->Lrx = ec->Lclean = ec->Lclean_bg = 0; | |
270 | + ec->pstates = 0; | |
271 | + ec->ltxacc = ec->lrxacc = ec->lcleanacc = ec->lclean_bgacc = 0; | |
272 | + ec->ltx = ec->lrx = ec->lclean = ec->lclean_bg = 0; | |
273 | 273 | ec->tx_1 = ec->tx_2 = ec->rx_1 = ec->rx_2 = 0; |
274 | - ec->Lbgn = ec->Lbgn_acc = 0; | |
275 | - ec->Lbgn_upper = 200; | |
276 | - ec->Lbgn_upper_acc = ec->Lbgn_upper << 13; | |
274 | + ec->lbgn = ec->lbgn_acc = 0; | |
275 | + ec->lbgn_upper = 200; | |
276 | + ec->lbgn_upper_acc = ec->lbgn_upper << 13; | |
277 | 277 | |
278 | 278 | return ec; |
279 | 279 | |
280 | 280 | |
... | ... | @@ -314,13 +314,13 @@ |
314 | 314 | { |
315 | 315 | int i; |
316 | 316 | |
317 | - ec->Ltxacc = ec->Lrxacc = ec->Lcleanacc = ec->Lclean_bgacc = 0; | |
318 | - ec->Ltx = ec->Lrx = ec->Lclean = ec->Lclean_bg = 0; | |
317 | + ec->ltxacc = ec->lrxacc = ec->lcleanacc = ec->lclean_bgacc = 0; | |
318 | + ec->ltx = ec->lrx = ec->lclean = ec->lclean_bg = 0; | |
319 | 319 | ec->tx_1 = ec->tx_2 = ec->rx_1 = ec->rx_2 = 0; |
320 | 320 | |
321 | - ec->Lbgn = ec->Lbgn_acc = 0; | |
322 | - ec->Lbgn_upper = 200; | |
323 | - ec->Lbgn_upper_acc = ec->Lbgn_upper << 13; | |
321 | + ec->lbgn = ec->lbgn_acc = 0; | |
322 | + ec->lbgn_upper = 200; | |
323 | + ec->lbgn_upper_acc = ec->lbgn_upper << 13; | |
324 | 324 | |
325 | 325 | ec->nonupdate_dwell = 0; |
326 | 326 | |
... | ... | @@ -332,7 +332,7 @@ |
332 | 332 | memset(ec->fir_taps16[i], 0, ec->taps * sizeof(int16_t)); |
333 | 333 | |
334 | 334 | ec->curr_pos = ec->taps - 1; |
335 | - ec->Pstates = 0; | |
335 | + ec->pstates = 0; | |
336 | 336 | } |
337 | 337 | EXPORT_SYMBOL_GPL(oslec_flush); |
338 | 338 | |
339 | 339 | |
340 | 340 | |
341 | 341 | |
342 | 342 | |
... | ... | @@ -418,33 +418,33 @@ |
418 | 418 | new = (int)tx * (int)tx; |
419 | 419 | old = (int)ec->fir_state.history[ec->fir_state.curr_pos] * |
420 | 420 | (int)ec->fir_state.history[ec->fir_state.curr_pos]; |
421 | - ec->Pstates += | |
421 | + ec->pstates += | |
422 | 422 | ((new - old) + (1 << (ec->log2taps - 1))) >> ec->log2taps; |
423 | - if (ec->Pstates < 0) | |
424 | - ec->Pstates = 0; | |
423 | + if (ec->pstates < 0) | |
424 | + ec->pstates = 0; | |
425 | 425 | } |
426 | 426 | |
427 | 427 | /* Calculate short term average levels using simple single pole IIRs */ |
428 | 428 | |
429 | - ec->Ltxacc += abs(tx) - ec->Ltx; | |
430 | - ec->Ltx = (ec->Ltxacc + (1 << 4)) >> 5; | |
431 | - ec->Lrxacc += abs(rx) - ec->Lrx; | |
432 | - ec->Lrx = (ec->Lrxacc + (1 << 4)) >> 5; | |
429 | + ec->ltxacc += abs(tx) - ec->ltx; | |
430 | + ec->ltx = (ec->ltxacc + (1 << 4)) >> 5; | |
431 | + ec->lrxacc += abs(rx) - ec->lrx; | |
432 | + ec->lrx = (ec->lrxacc + (1 << 4)) >> 5; | |
433 | 433 | |
434 | 434 | /* Foreground filter */ |
435 | 435 | |
436 | 436 | ec->fir_state.coeffs = ec->fir_taps16[0]; |
437 | 437 | echo_value = fir16(&ec->fir_state, tx); |
438 | 438 | ec->clean = rx - echo_value; |
439 | - ec->Lcleanacc += abs(ec->clean) - ec->Lclean; | |
440 | - ec->Lclean = (ec->Lcleanacc + (1 << 4)) >> 5; | |
439 | + ec->lcleanacc += abs(ec->clean) - ec->lclean; | |
440 | + ec->lclean = (ec->lcleanacc + (1 << 4)) >> 5; | |
441 | 441 | |
442 | 442 | /* Background filter */ |
443 | 443 | |
444 | 444 | echo_value = fir16(&ec->fir_state_bg, tx); |
445 | 445 | clean_bg = rx - echo_value; |
446 | - ec->Lclean_bgacc += abs(clean_bg) - ec->Lclean_bg; | |
447 | - ec->Lclean_bg = (ec->Lclean_bgacc + (1 << 4)) >> 5; | |
446 | + ec->lclean_bgacc += abs(clean_bg) - ec->lclean_bg; | |
447 | + ec->lclean_bg = (ec->lclean_bgacc + (1 << 4)) >> 5; | |
448 | 448 | |
449 | 449 | /* Background Filter adaption */ |
450 | 450 | |
... | ... | @@ -455,7 +455,7 @@ |
455 | 455 | ec->factor = 0; |
456 | 456 | ec->shift = 0; |
457 | 457 | if ((ec->nonupdate_dwell == 0)) { |
458 | - int P, logP, shift; | |
458 | + int p, logp, shift; | |
459 | 459 | |
460 | 460 | /* Determine: |
461 | 461 | |
... | ... | @@ -490,9 +490,9 @@ |
490 | 490 | for a divide versus a top_bit() implementation. |
491 | 491 | */ |
492 | 492 | |
493 | - P = MIN_TX_POWER_FOR_ADAPTION + ec->Pstates; | |
494 | - logP = top_bit(P) + ec->log2taps; | |
495 | - shift = 30 - 2 - logP; | |
493 | + p = MIN_TX_POWER_FOR_ADAPTION + ec->pstates; | |
494 | + logp = top_bit(p) + ec->log2taps; | |
495 | + shift = 30 - 2 - logp; | |
496 | 496 | ec->shift = shift; |
497 | 497 | |
498 | 498 | lms_adapt_bg(ec, clean_bg, shift); |
... | ... | @@ -502,7 +502,7 @@ |
502 | 502 | near end speech */ |
503 | 503 | |
504 | 504 | ec->adapt = 0; |
505 | - if ((ec->Lrx > MIN_RX_POWER_FOR_ADAPTION) && (ec->Lrx > ec->Ltx)) | |
505 | + if ((ec->lrx > MIN_RX_POWER_FOR_ADAPTION) && (ec->lrx > ec->ltx)) | |
506 | 506 | ec->nonupdate_dwell = DTD_HANGOVER; |
507 | 507 | if (ec->nonupdate_dwell) |
508 | 508 | ec->nonupdate_dwell--; |
509 | 509 | |
... | ... | @@ -515,9 +515,9 @@ |
515 | 515 | if ((ec->adaption_mode & ECHO_CAN_USE_ADAPTION) && |
516 | 516 | (ec->nonupdate_dwell == 0) && |
517 | 517 | /* (ec->Lclean_bg < 0.875*ec->Lclean) */ |
518 | - (8 * ec->Lclean_bg < 7 * ec->Lclean) && | |
518 | + (8 * ec->lclean_bg < 7 * ec->lclean) && | |
519 | 519 | /* (ec->Lclean_bg < 0.125*ec->Ltx) */ |
520 | - (8 * ec->Lclean_bg < ec->Ltx)) { | |
520 | + (8 * ec->lclean_bg < ec->ltx)) { | |
521 | 521 | if (ec->cond_met == 6) { |
522 | 522 | /* |
523 | 523 | * BG filter has had better results for 6 consecutive |
524 | 524 | |
... | ... | @@ -541,14 +541,14 @@ |
541 | 541 | * non-linearity in the channel.". |
542 | 542 | */ |
543 | 543 | |
544 | - if ((16 * ec->Lclean < ec->Ltx)) { | |
544 | + if ((16 * ec->lclean < ec->ltx)) { | |
545 | 545 | /* |
546 | 546 | * Our e/c has improved echo by at least 24 dB (each |
547 | 547 | * factor of 2 is 6dB, so 2*2*2*2=16 is the same as |
548 | 548 | * 6+6+6+6=24dB) |
549 | 549 | */ |
550 | 550 | if (ec->adaption_mode & ECHO_CAN_USE_CNG) { |
551 | - ec->cng_level = ec->Lbgn; | |
551 | + ec->cng_level = ec->lbgn; | |
552 | 552 | |
553 | 553 | /* |
554 | 554 | * Very elementary comfort noise generation. |
... | ... | @@ -571,10 +571,10 @@ |
571 | 571 | |
572 | 572 | } else if (ec->adaption_mode & ECHO_CAN_USE_CLIP) { |
573 | 573 | /* This sounds much better than CNG */ |
574 | - if (ec->clean_nlp > ec->Lbgn) | |
575 | - ec->clean_nlp = ec->Lbgn; | |
576 | - if (ec->clean_nlp < -ec->Lbgn) | |
577 | - ec->clean_nlp = -ec->Lbgn; | |
574 | + if (ec->clean_nlp > ec->lbgn) | |
575 | + ec->clean_nlp = ec->lbgn; | |
576 | + if (ec->clean_nlp < -ec->lbgn) | |
577 | + ec->clean_nlp = -ec->lbgn; | |
578 | 578 | } else { |
579 | 579 | /* |
580 | 580 | * just mute the residual, doesn't sound very |
... | ... | @@ -593,9 +593,9 @@ |
593 | 593 | * level signals like near end speech. When combined |
594 | 594 | * with CNG or especially CLIP seems to work OK. |
595 | 595 | */ |
596 | - if (ec->Lclean < 40) { | |
597 | - ec->Lbgn_acc += abs(ec->clean) - ec->Lbgn; | |
598 | - ec->Lbgn = (ec->Lbgn_acc + (1 << 11)) >> 12; | |
596 | + if (ec->lclean < 40) { | |
597 | + ec->lbgn_acc += abs(ec->clean) - ec->lbgn; | |
598 | + ec->lbgn = (ec->lbgn_acc + (1 << 11)) >> 12; | |
599 | 599 | } |
600 | 600 | } |
601 | 601 | } |
drivers/staging/echo/echo.h
... | ... | @@ -139,24 +139,24 @@ |
139 | 139 | int adaption_mode; |
140 | 140 | |
141 | 141 | int cond_met; |
142 | - int32_t Pstates; | |
142 | + int32_t pstates; | |
143 | 143 | int16_t adapt; |
144 | 144 | int32_t factor; |
145 | 145 | int16_t shift; |
146 | 146 | |
147 | 147 | /* Average levels and averaging filter states */ |
148 | - int Ltxacc; | |
149 | - int Lrxacc; | |
150 | - int Lcleanacc; | |
151 | - int Lclean_bgacc; | |
152 | - int Ltx; | |
153 | - int Lrx; | |
154 | - int Lclean; | |
155 | - int Lclean_bg; | |
156 | - int Lbgn; | |
157 | - int Lbgn_acc; | |
158 | - int Lbgn_upper; | |
159 | - int Lbgn_upper_acc; | |
148 | + int ltxacc; | |
149 | + int lrxacc; | |
150 | + int lcleanacc; | |
151 | + int lclean_bgacc; | |
152 | + int ltx; | |
153 | + int lrx; | |
154 | + int lclean; | |
155 | + int lclean_bg; | |
156 | + int lbgn; | |
157 | + int lbgn_acc; | |
158 | + int lbgn_upper; | |
159 | + int lbgn_upper_acc; | |
160 | 160 | |
161 | 161 | /* foreground and background filter states */ |
162 | 162 | struct fir16_state_t fir_state; |