[pulseaudio-discuss] module-echo-cancel

Baek Chang baeksan at ccrma.stanford.edu
Fri May 27 09:13:34 PDT 2011


On Thu, May 26, 2011 at 11:25 AM, Arun Raghavan <
arun.raghavan at collabora.co.uk> wrote:

> On Thu, 2011-05-26 at 10:07 -0700, Baek Chang wrote:
> > I'm trying to use the echo cancellation module on my embedded platform
> > but it seems to be taking all the cpu usage and renders audio useless.
> >
> >
> > I'm continually seeing these messages:
> > warning: The echo canceller started acting funny and got slapped
> > (reset). It swears it will behave now.
>
> This particular message is surprising. Was there a lot of feedback when
> you saw this? It's also possible that your clock is drifting a lot and
> is thus causing the echo canceller to give up. What hardware are you
> trying this on?
>
>
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.
I am on Qualcomm soc.



> > D: module-echo-cancel.c: diff -269 (43555 - 88163 + 44155) 0 0 9600
> > 184
> > E: module-echo-cancel.c: Playback after capture (-269), drop sink 84
> > warning: The echo canceller started acting funny and got slapped
> > (reset). It swears it will behave now.
> > warning: The echo canceller started acting funny and got slapped
> > (reset). It swears it will behave now.
> > D: module-echo-cancel.c: diff 475 (42663 - 87687 + 45315) 0 0 9600 184
> > warning: The echo canceller started acting funny and got slapped
> > (reset). It swears it will behave now.
> > D: module-echo-cancel.c: diff 168 (39254 - 87687 + 48410) 0 0 9600 191
> > D: module-echo-cancel.c: diff -411 (38089 - 87687 + 49002) 0 0 9600
> > 185
> > E: module-echo-cancel.c: Playback after capture (-411), drop sink 112
> > warning: The echo canceller started acting funny and got slapped
> > (reset). It swears it will behave now.
> > warning: The echo canceller started acting funny and got slapped
> > (reset). It swears it will behave now.
> > D: module-echo-cancel.c: diff 1491 (41407 - 87052 + 46961) 0 0 9600
> > 175
> > E: module-echo-cancel.c: playback too far ahead (1491), drop source
> > 260
> > warning: The echo canceller started acting funny and got slapped
> > (reset). It swears it will behave now.
> > warning: The echo canceller started acting funny and got slapped
> > (reset). It swears it will behave now.
> > D: module-echo-cancel.c: diff -1166 (44921 - 88526 + 42252) 0 0 9600
> > 187
> > E: module-echo-cancel.c: Playback after capture (-1166), drop sink 244
> >
> >
> > cpu is at 90-100% at the highest cpu scaling.
> >
> >
> > I was loading the module like so in my .pa conf file:
> >
> >
> > load-module module-echo-cancel source_name=echosource
> > source_master=pcm_input sink_name=echosink sink_master=pcm_output
> > rate=44100 channels=2
>
> Do you really need to work with 44.1 kHz stereo streams? Your voip stack
> is probably working with 8 or 16 kHz audio and running in single channel
> mode would probably not make a difference either. It will, however, make
> a huge difference with respect to your CPU consumption.
>
> 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.


> I pushed some more preprocessing code to module-echo-cancel yesterday,
> but there's a bit of a bug which I should be pushing a fix for by
> tomorrow. Once that's done, you can try it out by passing agc=1 /
> denoise=1 / echo_suppress=1. We're still looking at various potential
> improvements to get AEC working better, and I'll try to post a status in
> the coming weeks as things start to improve.
>
> You may also want to play with aec_method=adrian, which is an alternate
> canceller. It seems to learn faster than speex, but leaves a larger echo
> residue compared to once speex has had sufficient time to learn.
>
> Cheers,
> Arun
>
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>



-- 
-baeksanchang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110527/2adbe396/attachment.htm>


More information about the pulseaudio-discuss mailing list