krunal09 / csipsimple

Automatically exported from code.google.com/p/csipsimple
0 stars 0 forks source link

Echo on HTC Sense and Samsung Galaxy Tab #954

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start CSipSimple on HTC Sense and Samsung Galaxy Tab
2. Register with GNU SIP Witch and place a call
3. Speak into either device to hear repeated echo

What is the expected output? What do you see instead?

No echo of speech, at least four loud echoes after any speech. I used a short 
clicking noise to count the echoes.

What version of the product are you using? On what operating system?

0.02-01 r841 on both devices. Android 2.2, version 2.29.405.5 on the HTC 
Sense.Android 2.2, Froyo.XWJMI on the Samsung Galaxy Tab (GT-P1000).

Please provide any additional information below.

After hearing the echo, I tried to change the default codec to Speex 8 kHz by 
reordering this codec to the top, but no change in the echo. I tried to adjust 
the microphone and speaker, but this was not successful either, the echo 
prevailed.

Yours sincerely,
Haakon Meland Eriksen, Norway

Original issue reported on code.google.com by haakon.e...@gmail.com on 12 May 2011 at 5:44

GoogleCodeExporter commented 9 years ago
In fact in android - previously to android 2.3 - the audio API is absolutely 
not designed to do voice over IP. Even after android 2.3 it's not as good as it 
could be on all other platforms you may know.

The android audio API is not really well defined to do audio streaming and as 
consequence each manufacturer has its own interpretation of the API. 
Some do things cleanly. HTC does. Other, like Samsung do really weird things 
and each of their device is really hard to support.
In your case, I think that the echo is produced by the Galaxy Tab. It's known 
to have a very bad audio layer. Latency is very high and a correct audio 
routing is obtained by a lot of hacks. 
If you have a look to the code and to the method I use to get it working, 
you'll be afraid... And we are lucky, the method I found for the galaxy S (and 
that also work for the Galaxy Tab) could not have been there at all.

However, you can try to play with audio hacking options. 
You should read :
http://code.google.com/p/csipsimple/wiki/FAQ?wl=en#Audio_routing_troubleshooting
And this issue comment too :
http://code.google.com/p/csipsimple/issues/detail?id=119#c38

You could also try to play with echo options (there is a software echo 
canceller, the one of pjsip), you can try speex echo mode (AEC) or simple echo 
canceller implementation and also try to increase the echo tail length.

However in your case the software echo canceller is not really useful cause the 
problem is about an high latency + materials and audio layer that loop the 
speaker to the micro.

When you'll play with audio workarounds you'll see that both device does not 
get optimal settings with the same settings. By default CSipSimple tries to 
detect device and based on users feedback set up the "best" settings. 
If you find better settings do not hesitate to share, I'll integrate it as 
default settings for these devices.

Last point about echo, the future release of android are really promising 
regarding this point. Since google now need something reliable they now force 
manufacturer to implement correctly things in order to support their own stock 
SIP application and google Talk VoIP.
As consequence SIP application will benefit it. I had the luck to test on an 
Acer Iconia tab running android 3.0 and results regarding echo cancellation and 
latency are impressive.

Original comment by r3gis...@gmail.com on 12 May 2011 at 8:34

GoogleCodeExporter commented 9 years ago
Thanks, I'll let you know if I make any progress.

Original comment by haakon.e...@gmail.com on 12 May 2011 at 10:01

GoogleCodeExporter commented 9 years ago
Issue 968 has been merged into this issue.

Original comment by r3gis...@gmail.com on 18 May 2011 at 12:23