[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Echo Canceler

From: Charles Eidsness
Subject: Re: [Linphone-developers] Echo Canceler
Date: Sat, 09 Oct 2004 21:10:46 -0400
User-agent: Mozilla Thunderbird 0.8 (Windows/20040913)

I had a chance to clean up some of these error messages. If anyone's interested I've uploaded a new patch here:

The two "opening soundcard" messages were because the osswrite filter was on the process chain twice. I have a not very elegant solution tacked on to the end of that patch, it makes a few changes to ms.c.

All of the error messages during call termination were a result of me forgetting to close some of the links properly in my original patch, this is fixed.

I've also found a new issue which only appears during an incoming call. I get a lot of ossread errors because the fifo between the ossread filter and the echo canceler filter is full. This is because the other fifo input to the echo canceler filter is empty. The process chain runs the filter until one input fifo is below the threshold, not both. The puzzling thing is that these error messages don't appear during an outgoing call. I'm guessing it has something to do with the initial filter process order.

I guess implementing a multi-input / multi-output filter will take a little more work but I think this is close.


Charles Eidsness wrote:

Thanks, and thank you for this excellent software. I particularly like the mediastremaer framework. It's so simple and straight-forward it didn't take me very long to figure out how to implement my own filter.

I had no "show-stopper" issues with a 2 input / 2 output filter but I do get some strange errors logged to the terminal that I haven't had time to take a look at. These errors don't seem to effect the call at all.

I get a bunch of these:

Debug: sleeping function called from invalid context at mm/slab.c:1989
in_atomic():1, irqs_disabled():1 .... followed by a long call trace

But this is probably just a result of the way I have my kernel / system configured.

I get two "Opening soundcard" messages, i.e.:

Message:ms_filter_add_link: OssRead,0 -> EC,1
Message:ms_filter_add_link: EC,1 -> GSMEncoder,0
Message:ms_filter_add_link: GSMEncoder,0 -> RTPSend,0
Message:ms_filter_add_link: RTPRecv,0 -> GSMDecoder,0
Message:ms_filter_add_link: GSMDecoder,0 -> EC,0
Message:ms_filter_add_link: EC,0 -> OssWrite,0
Message:Opening sound card in capture mode with stereo=0,rate=8000,bits=16
Message:dsp blocksize is 512.
Message:Opening sound card in playback mode with stereo=0,rate=8000,bits=16
Message:Opening sound card in playback mode with stereo=0,rate=8000,bits=16

And it doesn't terminate the call very cleanly. I get a bunch of these:

msosswrite.c:148- assertionw->sndcard!=NULLfailed
msfilter.c:414- assertionf->finputs==0failed
msfilter.c:415- assertionf->foutputs==0failed
msfilter.c:414- assertionf->finputs==0failed
msfilter.c:414- assertionf->finputs==0failed
msfilter.c:415- assertionf->foutputs==0failed

As mentioned in my previous email I'm using a fairly unique system. I'm running on an embedded MIPS processor using uclibc and using an ALSA driver I wrote myself so these errors may not appear on a "normal" system, or there may be different errors.

If you add a checkbox for this echo canceler make sure you mention it's experimental. :)

I think the algorithm itself could still use some tweaking too. It will behave in a different manner depending on the level of background noise and so far I've only been testing it with a fixed level. I'll try to improve it as I get more time but if there's anyone out there that is interested in signal processing and wants to take a look at it that would be really cool.


Simon MORLAT wrote:


I've just had a look on your excellent work, thank you very much.
I saw that you implemented a 2-input 2-output MSFilter to achieve this, this is actually exactly the right way... but I didn't think that the mediastreamer was able to nearly correctly handle those kind of complex graphs... Actually the scheduling algorithm I've implemented was first designed to run simple linear graphs. You haven't experienced strange things about that ? Anyway as it works I will integrate it into linphone and add checkbutton to enable/disable it. It may take some time, because the goal for now is to stabilize the 1.0.0 release first.


Charles Eidsness wrote:

Hi All,

I've been working on an acoustic echo canceler for Linphone. I have something that kind-of works for me and thought I'd post it in case there's someone else out there interested. I think it just needs a little more tuning, I hope to have it functional someday.

I've been using Linphone 0.12.1, and am using uClibc on an embedded MIPS processor so there's a chance it may not work on another platform. I've been trying to keep everything as fixed-point math since there's no FPU on my processor but I did implement a couple filters as floating point. (I'm using soft-float from gcc compiler) Also, I borrowed liberally from the mark2 echo canceler which is part of the Zaptel package for Asterisk so you can look at it as well if you're super-keen.

I split my changes / additions into three patches to make them easier to take a quick look at:
-- adds ec.c and ec.h to the mediastreamer
-- adds msEC.c, msEC.h and test_ec to the mediastreamer
-- edits the mediastreamers, audiostream.c and mediastream.h to add a echo canceler filter block in the audio stream
-- all three patches in one file


Linphone-developers mailing list

Linphone-developers mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]