2009-12-15 16:51:06 Is linphone echo cancellation working?
Nathan Whittington (UNITED STATES)
Message: 83538
I'm working on a two way audio app using linphone and I have some questions about echo cancellation. We've used an external dedicated chip to handle echo cancellation in the past but it has been a headache and it would be much better to use the speexec in software.
We're using an BF537, AD1981 and alsa, linphone 3.1.2 with 2009R1 and the audio is typically 8kHz ulaw.
Everything works fine - except echo cancellation. When I enable it and speak to our device from a remote phone - I can still hear the echo (though it's a bit choppy like the EC engine is trying but failing to filter out the echo)
Currently I get multiple warnings from mediastreamer2:
warning - speexec: in0=64, in1=2048
warning - too much echo signal, sending anyway.
If I enable extra debug messages I start getting messages similar to the ones Rob mentioned here:
blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=32851
warning - speexec: -reset of echo canceller- in0=1600, in1=256
Is speex echo cancellation working in for linphone?
QuoteReplyEditDelete
2009-12-15 17:26:58 Re: Is linphone echo cancellation working?
Robin Getz (UNITED STATES)
Message: 83539
Nathan:
Some people getting it working well - others don't.
It does take a little tuning, and Jean Marc can help out alot to. With the 1981 - you need to be a little careful - to decrease the latency that the drive has - I think Cliff might have some pointers on that.
-Robin
QuoteReplyEditDelete
2009-12-15 22:22:30 Re: Is linphone echo cancellation working?
Cliff Cai (CHINA)
Message: 83544
Nathan:
Do you need dmix or dsnoop for your application?If no,then don't select " Enable MMAP Support" for ad1981,becuase this feature will introduce extra latency,that is a key parameter for echo cancellation.The general idea is to select proper frame size and filter length,see www.speex.org/docs/manual/speex-manual.pdf
Cliff
QuoteReplyEditDelete
2009-12-16 14:03:38 Re: Is linphone echo cancellation working?
Nathan Whittington (UNITED STATES)
Message: 83608
Thanks for the response,
We're planning on moving to a ssm2602/2603 for our upcoming products. Will this external codec be any better with regards to latency?
Is this something that could be made better with a faster blackfin chip?
I turned off MMAP and read through the speex manual. I tried several changes to filter_length and framesize with no real improvement on the echo. I haven't yet tried the DUMP_ECHO_CANCEL_DATA diagnostic stuff but I'm not sure how this will help beyond telling me my latency is too high.
QuoteReplyEditDelete
2009-12-16 14:17:15 Re: Is linphone echo cancellation working?
Nathan Whittington (UNITED STATES)
Message: 83609
Just another thought,
We chose the ssm2603 on adi's recommendation because the 1981 is going end of life. Is there a better codec for reducing latency/handling echo cancellation?
QuoteReplyEditDelete
2009-12-17 00:34:55 Re: Is linphone echo cancellation working?
Cliff Cai (CHINA)
Message: 83612
The extra latency was introduced just due to a pseudo mmap implementation for AD1980,ssm2603 driver doesn't have this. btw, I'm not sure how much will dmix plugin affect the latency,dmix is enabled by default for ssm2603,If needed,you can remove it in the config file:lib/alsa-lib/alsa-lib-1.0.18/src/conf/cards/SSM2602.conf.
One more thing,you'd better run the echo_diagnostic as described in the manual to tune the filter length.
Cliff