<br><br><div class="gmail_quote">On Thu, May 26, 2011 at 11:25 AM, Arun Raghavan <span dir="ltr"><<a href="mailto:arun.raghavan@collabora.co.uk">arun.raghavan@collabora.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, 2011-05-26 at 10:07 -0700, Baek Chang wrote:<br>
> I'm trying to use the echo cancellation module on my embedded platform<br>
> but it seems to be taking all the cpu usage and renders audio useless.<br>
><br>
><br>
> I'm continually seeing these messages:<br>
> warning: The echo canceller started acting funny and got slapped<br>
> (reset). It swears it will behave now.<br>
<br>
</div>This particular message is surprising. Was there a lot of feedback when<br>
you saw this? It's also possible that your clock is drifting a lot and<br>
is thus causing the echo canceller to give up. What hardware are you<br>
trying this on?<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br></div><div>Well there was a lot of feedback, I was essentially doing an arecord and piping that to play, so a loopback test from mic to speakers.</div>
<div>I am on Qualcomm soc.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">
> D: module-echo-cancel.c: diff -269 <a href="tel:%2843555%20-%2088163" value="+14355588163">(43555 - 88163</a> + 44155) 0 0 9600<br>
> 184<br>
> E: module-echo-cancel.c: Playback after capture (-269), drop sink 84<br>
> warning: The echo canceller started acting funny and got slapped<br>
> (reset). It swears it will behave now.<br>
> warning: The echo canceller started acting funny and got slapped<br>
> (reset). It swears it will behave now.<br>
> D: module-echo-cancel.c: diff 475 (42663 - 87687 + 45315) 0 0 9600 184<br>
> warning: The echo canceller started acting funny and got slapped<br>
> (reset). It swears it will behave now.<br>
> D: module-echo-cancel.c: diff 168 (39254 - 87687 <a href="tel:%2B%2048410%29%200%200%209600" value="+48410009600">+ 48410) 0 0 9600</a> 191<br>
> D: module-echo-cancel.c: diff -411 <a href="tel:%2838089%20-%2087687" value="+13808987687">(38089 - 87687</a> <a href="tel:%2B%2049002%29%200%200%209600" value="+492009600">+ 49002) 0 0 9600</a><br>
> 185<br>
> E: module-echo-cancel.c: Playback after capture (-411), drop sink 112<br>
> warning: The echo canceller started acting funny and got slapped<br>
> (reset). It swears it will behave now.<br>
> warning: The echo canceller started acting funny and got slapped<br>
> (reset). It swears it will behave now.<br>
> D: module-echo-cancel.c: diff 1491 (41407 - 87052 <a href="tel:%2B%2046961%29%200%200%209600" value="+46961009600">+ 46961) 0 0 9600</a><br>
> 175<br>
> E: module-echo-cancel.c: playback too far ahead (1491), drop source<br>
> 260<br>
> warning: The echo canceller started acting funny and got slapped<br>
> (reset). It swears it will behave now.<br>
> warning: The echo canceller started acting funny and got slapped<br>
> (reset). It swears it will behave now.<br>
> D: module-echo-cancel.c: diff -1166 (44921 - 88526 + 42252) 0 0 9600<br>
> 187<br>
> E: module-echo-cancel.c: Playback after capture (-1166), drop sink 244<br>
><br>
><br>
> cpu is at 90-100% at the highest cpu scaling.<br>
><br>
><br>
> I was loading the module like so in my .pa conf file:<br>
><br>
><br>
> load-module module-echo-cancel source_name=echosource<br>
> source_master=pcm_input sink_name=echosink sink_master=pcm_output<br>
> rate=44100 channels=2<br>
<br>
</div></div>Do you really need to work with 44.1 kHz stereo streams? Your voip stack<br>
is probably working with 8 or 16 kHz audio and running in single channel<br>
mode would probably not make a difference either. It will, however, make<br>
a huge difference with respect to your CPU consumption.<br>
<br></blockquote><div>No, the voip stack should be at 8 or 16kHz like you said, I was just trying this without voip and it was set up at 44.1kHz. I can try it at 8kHz mono and see if this improves the cpu usage and echo.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I pushed some more preprocessing code to module-echo-cancel yesterday,<br>
but there's a bit of a bug which I should be pushing a fix for by<br>
tomorrow. Once that's done, you can try it out by passing agc=1 /<br>
denoise=1 / echo_suppress=1. We're still looking at various potential<br>
improvements to get AEC working better, and I'll try to post a status in<br>
the coming weeks as things start to improve.<br>
<br>
You may also want to play with aec_method=adrian, which is an alternate<br>
canceller. It seems to learn faster than speex, but leaves a larger echo<br>
residue compared to once speex has had sufficient time to learn.<br>
<br>
Cheers,<br>
Arun<br>
<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@mail.0pointer.de">pulseaudio-discuss@mail.0pointer.de</a><br>
<a href="https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss" target="_blank">https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>-baeksanchang<br>