Closed GoogleCodeExporter closed 9 years ago
Yes, thanks, I forgot to open the issue here.
For reference, exactly same issue on Samsung Galaxy i7500.
I can reproduce this issue for each outgoing call with the X10 of a colleague.
Original comment by r3gis...@gmail.com
on 14 Jul 2010 at 9:12
Sounds that there is the same issue on Galaxy S.
Original comment by r3gis...@gmail.com
on 20 Jul 2010 at 11:04
Issue 93 has been merged into this issue.
Original comment by r3gis...@gmail.com
on 20 Jul 2010 at 11:04
I did verify My Galaxy S uses codec "GSM @8000" from (i)nfo function. I used
csipsimple that version is 'build 0.00-12-04'.
Original comment by winfa...@gmail.com
on 22 Jul 2010 at 1:16
Well a new version is available but... in fact there were already a easy
solution in all previous versions to solve this issue :
Some devices (X10, galaxy i7500 and i9000) audio driver is not really stable
with 16kHz audio streams. Setting Frequency (in Option > Media) to 8KHz will
solve audio stack deadlocks.
To be absolutely sure everything is good now, a new version (that also ensure a
better audio routing).
http://code.google.com/p/csipsimple/downloads/detail?name=CSipSimple_0.00-12-05.
apk.
Install it. Ensure that Options > Media > Frequency is set to 8kHz.
It's now the default value but if a previous version is installed 16kHz can
still appear.
This analyze confirms that in some configuration there is no problem (when the
codec in use force 8kHz audio stream - which can be different from 8kHz data
stream).
Just a last point : on Sony Ericson has a conceptual point of view of the MICRO
source. It appears that micro stream include audio playback line !
I played all the day long with an X10 (great thanks goes to a colleague who
lent it). Thanks to these test I understood that 16kHz audio pledge the CPU in
this implementation. Unfortunately I didn't find a work around to prevent the
micro source to be mixed with audio output. The result is that you will ear
clearly what your remote contact say....
But your remote contact will become crazy with it's own echo.
So question to the X10 owner, did you find a android sip application without
this problem (remote user ear his voice)?
If no, we probably should open a bug for Sony Ericson devs. They will probably
more focus this point if they implement 2.1 since changes in the 7 API clearly
make a distinction on the mic source (mixed or not to output voice).
Original comment by r3gis...@gmail.com
on 22 Jul 2010 at 8:46
I tested some calls on csipsimple(0.00-12-05) using Galaxy S.
Caller used Galaxy S and callee used Bria(by counterpath) and Acrobits.
The first I did test call through OpenSIPS and second I tested through Asterisk.
I could verify the result is different.
On the OpenSIPS callee could never hear my voice, but on the Asterisk callee
could hear some sound delayed and choppy. I don't know why.
You can verify detailed information in my zip file I attached
that contains three debug logs and two wave files.
I wish it is solved. If you need more information to solve I'll give you.
Thanks for your work.
Original comment by winfa...@gmail.com
on 23 Jul 2010 at 6:51
Attachments:
Well many thanks for theses logs.
I will search more about the error that could explain the fact mic doesn't work
well.
For reference :
ERROR/(2160): AFCCreateReSampler: avAFCInfo->bUsed[0] inSampleRate[44100]
outSampleRate[8000] nChannel[2] outbitDepth[16]
There is only one google result for this one... on stackoverflow but no answer
:(
Seems to be specific to Galaxy S.
On your side, can you try to do the same tests disabling both echo cancellation
and voice auto detection.
(Uncheck Menu>Option>Media>Echo cancellation & Voice audio detection).
Another interesting test could be to enable PCMU and PCMA codecs and disable
GSM codec: Menu>Option>Media>Codecs long clic on codec to enable/disable it.
According to provided traces, you have probably already disabled GSM but as
your asterisk only support GSM, PCMU and PCMA, pjsip fall back to GSM to allow
the call.
Thx again for your tests.
Original comment by r3gis...@gmail.com
on 23 Jul 2010 at 8:11
Another test you could do is changing media quality from 4 (the current default
value) to 3.
On my HTC magic I get a choppy sound with quality 4 using GSM codec. But
setting media quality to 3, disabling VAD and disabling echo cancellation make
things going really better (from something that you can't ear to something
pretty clear).
The other solution I have is to use PCMA instead of GSM.
Seems to be a little bit tricky to find out what are the good params and on
what device :).
Probably we should try to start writing a wiki page.
We should probably also define what should be default values for audio
parameters. Technically not a problem to define different params for different
phones.
Original comment by r3gis...@gmail.com
on 23 Jul 2010 at 9:58
Thanks for your response.
I tested according to the above, but it's still the same as before.
The first I set both echo cancellation and VAD disabled.
Second, I set the available codecs that
1) enabled GSM, ulaw, alaw.
=> csipsimple (GSM 8KHz) <---------------> Bria (G711u 8KHz)
=> csipsimple (GSM 8KHz) <---------------> Acrobits (ulaw)
2) enabled just ualw and alaw. It was the same as 1).
=> csipsimple (GSM 8KHz) <---------------> Bria (G711u 8KHz)
=> csipsimple (GSM 8KHz) <---------------> Acrobits (ulaw)
If you want logs I'll give you. Thanks.
Original comment by winfa...@gmail.com
on 23 Jul 2010 at 10:45
Did you try with Media quality set to 3 instead of 4? On my HTC Sapphire it's
the only way I have to get GSM codec working properly.
There is a problem with the codec disabling feature. That was already evoked in
another issue. I'll have a closer look on it too.
Original comment by r3gis...@gmail.com
on 23 Jul 2010 at 11:26
Yes, I did test on conditions that set quality to 3. The result is the same.
So I tried to test the 'fring' on my phone under the same conditions. It works
well.
But I could find the same problem reports on the internet. It seems to be fixed
recently. Now you can find it. But I could not find how to solve it.
Original comment by winfa...@gmail.com
on 23 Jul 2010 at 11:54
I have version 0.00-12 and Galaxy S. I am using custom SIP. Incoming voice
works perfect but outgoing voice is useless. It is robotics, it buzz and it
cutting words.
I can make some tests if you are going to fix this problem. It seems that this
problems appear also with other sip app. Only application which works with
Galaxy now is Fring but its voice quality is very poor. I think that CSipSimple
has so far best voice quality if you can fix that outgoing voice issue.
Original comment by jar...@gmail.com
on 16 Aug 2010 at 4:58
Ok sounds to be an issue with the codec (in incoming call codec is chosen by
caller and in outgoing csipsimple choose the codec and probably a codec that
require a high cpu usage).
Today, I'll build a new version that should improve CPU usage. And maybe it
will be intersting to test with it.
Besides, as it is probably an issue with the codec that is used, it would be
interesting to deactivate some codecs such as ilbc or speex for example that
seems to use a lot of extra cpu to encode/decode things. (This could be done
with the old release and the new one)
I'll notify the thread today when the new release is available.
Original comment by r3gis...@gmail.com
on 16 Aug 2010 at 6:23
[deleted comment]
Ok, I will test new version when it appear.
(Just to make sure, I mean above situation that I am caller so in that
situation my voice is bad and what I hear is very good)
In my situation my SIP provide accepts these codecs:
- G711
- G729A
- G729AB
- G723
- G723A
- ILBC
Of course G729 would be the best. With symbian I have got excellent voice
quality with iLBC.
I think Fring uses iLBC but that is terrible even if I compare Frings symbian
and android versions. So far other applications in Android uses G711 (pcma,
pcmu) without good result.
Original comment by jar...@gmail.com
on 16 Aug 2010 at 6:42
I have the same issue, on my Galaxy S I am able to listen to the incomming call
but the other party is listening garbage.
Original comment by ggpa...@gmail.com
on 16 Aug 2010 at 7:04
Ok, can also be an issue with micro stream too so. I know that Galaxy S produce
a warning when I create the stream but I didn't succeed in finding why. And as
I have no Galaxy S to test on, I can't debug it more precisely. For reference a
link on stack overflow about this issue :
http://stackoverflow.com/questions/3314760/what-the-error-message-afccreateresam
pler-avafcinfo-bused0-in-samplerate441/3316467 (as you can see, this is still
an open issue !).
Well this said, maybe worth to try the latest build that consume less cpu. But
I'm not confident on the fact it will solve the issue since really match the
problem described on stack overflow and really seems to be linked to a bad
audio driver from Samsung (maybe as it was reported to me, the latest rom from
samsung for galaxy S solves things).
http://code.google.com/p/csipsimple/downloads/detail?name=CSipSimple_0.00-12-13.
apk
Original comment by r3gis...@gmail.com
on 16 Aug 2010 at 10:25
Just as reminder if using a version from the android market you must uninstall
before installing the latest one.
Original comment by r3gis...@gmail.com
on 16 Aug 2010 at 10:56
I tested that fast. I will test it better on evening with variant codecs and
wlan and 3g. Do you want logs and how I should set logs option?
with that new version my voice is muted now so anybode cannot hear me. Also
there appear issue with whole application. It autostart itselves and when I
tried to exit, it autostart again. So finally it thinks that it is on but i
cannot make calls.
Original comment by jar...@gmail.com
on 16 Aug 2010 at 11:41
Did you uninstall previously the older version before installing that one?
For logs, there is an option in Settings > UI and log level (at the bottom) Set
it to 4. You can send me your logs if uninstalling/reinstalling (and maybe, why
not, rebooting too - maybe it keeps the old native library in cache).
Original comment by r3gis...@gmail.com
on 16 Aug 2010 at 12:54
Yes I uninstall and reinstall. Were I can found those logs? Which dir those are?
I tested know more with wlan but my voice doesn't go through.
I think that uninstall and reinstall again and make test again. Do you have any
suggestion for settings? I tried iLBC, PCMU and PCMA codecs. But how should I
set frequency and those others quality settings?
Original comment by jar...@gmail.com
on 16 Aug 2010 at 2:06
Logs are available on android using a tool : logcat. There is a lot of
application available on the market that will allow you to share these logs
(for example search alogcat).
As for frequency and quality settings 8Khz and quality of 4 should be good
enough but on such a device we should be able to reach quality of 5 and
frequency of 16kHz (that's what I use on my nexus one).
For codecs, disable ilbc there is issues with this one. It consume a lot of cpu
(and besides I'm not sure if there is not a bug / cpu leak in it). I advise
also to disable speex (as it consume a lot of cpu too). If you are using wifi
PCMU/A should be ok.
Last point, if the device fall in this awful state that I don't know yet how to
solve (android-devs didn't reply to my answer on the android-dev group)... but
in that case, on some devices and for an unknown reason, the entiere audio
stack of the device is frozen. It means that if you enter this state the only
way I found to restore a good state and be able to call again is to reboot the
phone. (I observed this problem only on galaxy spica i7500 & sony x10 for now).
If you want to quickly test if you are in this case, try to play music using
the standard music application... if nothing happens, let me know I'm
interesting in listing all devices for which we are able to reproduce this
issue....
Original comment by r3gis...@gmail.com
on 16 Aug 2010 at 2:49
I make some tests using only PCMA and wifi. At first notice that PCMU doesn't
work. I cannot even call if only PCMU is selected.
Second notice is that I have to you stun-server when I am using wifi because I
cannot hear anything when I am calling. This is strange because other
sip-application doesn't need that.
So with PCMA, wifi, 8kHz and quality 4 and still not got my voice through. I
don't be sure should I send debug log or what but here is a debug log.
I can test that music player feature later when I got another phone.
Original comment by jar...@gmail.com
on 16 Aug 2010 at 3:25
Attachments:
Ok for pcmu (to say right I never really tested ulaw separately... even not
sure that one of my sip provider support it).
For stun server that strange. With my config I never need neither stun nor turn
nor ice to get it working. Just simple direct configuration works properly. Is
there special firewalls, network architecture in front of your wifi access
point?
Thanks for the log, it well confirms the fact that nothing is get from the mic.
Can you get some logs a little bit before these one (when call is established).
You can directly send it to me by mail if you don't want your personal infos to
be displayed on the website.
So, you confirmed that issue with galaxy S is different from the one with i7500
and X10. That's a good news in one side but also a bad one since it will be
more complicated for me to reproduce it and debug it. Maybe if you can get the
log that appear before it could help me to ask on forums or samsung (why not).
I'm particulary interested in something like that : "AFCCreateReSampler:
avAFCInfo " that was the first thing I noticed with the log of another galaxy S
owner.
P.S. : I will probably split this issue into one for galaxy s and one for
X10/i7500. P.S.2: Any tests with x10/i7500 with the last version? (excepted the
fact there is a big echo on x10 that's another problem due to sony
implementation.... if only manufacturer has respected a good implementation of
their audio drivers.... grrrr)
Original comment by r3gis...@gmail.com
on 16 Aug 2010 at 3:48
There should not be any special thing on my wifi. Just NAT and all sip calls
has worked without STUN.
Yes, I can send the log directly to you. That logcat is just quite tricky :)
even when I tried to save the log or send it directly I feel that it doesn't
take all log-data within.
What log level do you want? Verbose, Debug...? Is your email your username and
gmail?
Has somebody before noticed Samsung of those audio driver problem? Could they
fix it until Android 2.2?
Original comment by jar...@gmail.com
on 16 Aug 2010 at 4:52
Verbose log level if possible. My email address is r3gis.3R at gmail dot com.
That's really strange for the need of stun. I'll check that in your log too.
Other devs has noticed the problem : follow the link on stack overflow on my
comment 17, it was asked by somebody else and matches exactly the issue we have
on csipsimple - I added a comment to be notified of the progress on this issue
but unfortunately nothing new. Someone who own the galaxy S with the firmware
XXJM2 get it work and said me that the firmware XXJF3 is known to be buggy.
(He had other issues related to network too... maybe something special with
network on galaxy S too :/ )
I don't know what is the version of the firmware you have. Can you provide me
the info with your mail (you'll find the info in Android Settings>About the
phone >Build number or Firmware version if any).
Original comment by r3gis...@gmail.com
on 16 Aug 2010 at 5:13
[deleted comment]
For galaxy S users particularly, worth to try :
http://code.google.com/p/csipsimple/downloads/detail?name=CSipSimple_0.00-12-24.
apk
This one has a big change in the way audio record is created.
Original comment by r3gis...@gmail.com
on 27 Aug 2010 at 8:46
so, I'm back from holiday. I did try it out, and there is something
understandable in on the other line.
Now i'm running the 12-26 build and when I do speak very slowly, I can
understand it on the other line, if I do speak normal, there is all times a
strange noise if the speaking volume goes up and down, like between different
words.
I will send a log file by mail to you, r3gis.
Maybe a recording of the call will help, or not?
Original comment by m...@ufritz.de
on 31 Aug 2010 at 6:58
forgot to say, I have the galaxy I9000
Original comment by m...@ufritz.de
on 31 Aug 2010 at 6:59
Well thanks a lot for the test (and the logs), that confirm exactly what we get
with another device with alsa (alsa is the audio driver used by the samsung
galaxy S).
So there is still something I have to work on, but since progress is the same
on all device that use ALSA, that's a really good news for me :)
Original comment by r3gis...@gmail.com
on 31 Aug 2010 at 7:14
Then more interesting for me is:
what sound system using the other devices?
For alsa:
what higher-level sound toolkits, such as SDL, OpenAL is used in the android
phone?
when I lsmod the loaded modules in my galaxy, I see no alsa module so I can not
find any particular information from the device...
Original comment by m...@ufritz.de
on 31 Aug 2010 at 10:59
When using other sound software with my galaxy i9000, there are no special
sound issues. I tried now the sipdroic client with no special problems. I do
not know anything about the android and java decencies, but maybe looking at
other open source solutions will help to fix the problem?
Original comment by m...@ufritz.de
on 31 Aug 2010 at 11:05
Yes I'm currently diving into what is done by sipdroid. Their implementation is
much more mature than mine and they probably already encounter this kind of
problem. Although what I do is done in native (C) side, concepts can be reused.
There is something I'm currently trying to add regarding record process.
I'll keep you in touch when it will be done.
As for your first question (comment 32), there is not really high level sound
system used on other devices. Most of the time they use their own private
driver directly plugged to the android sound api. However there is a recent
effort to port a real sound api to android.
There is also some effort on OpenCore framework
(http://www.opencore.net/files/opencore_framework_capabilities.pdf) that comes
on the top of alsa I think.
But all of these nice libs can't be directly used by application developers
(since it can deeply depends on the device). - It is technically possible, (my
first version of csipsimple was based on privates api) but that is dead end
since maintaining one version per device (in best case by manufacturer) is
really hard to do.
If you are interested in what are the "known" audio implementation you can
quickly have an overview in each package on the android git :
http://android.git.kernel.org/?p=platform/hardware/alsa_sound.git;a=summary
(this one is the glue for alsa).
If you click "projects" you'll see other specific implementation for htc for
example -- or at least .ko they provide to the community.
Another interesting link on this subject :
http://www.kandroid.org/android_pdk/audio_sub_system.html . It's a little bit
outdated and intended for porting android on a device, but really interesting
to read.
Original comment by r3gis...@gmail.com
on 1 Sep 2010 at 8:17
samsung will soon provide a update to android 2.2. maybe things will get better
or more worse, who knows.
Yes, the links are all interesting, but not very helpful for the sound issues,
to find a solution..
> Their implementation is much more mature than mine
but the sipdroid client has a horrible echo for the other call party, this
seems much more better on csipsimple.
If you changed something again, I will test it.
Original comment by m...@ufritz.de
on 1 Sep 2010 at 11:15
Yeah, I noticed echo problem with sipdroid also. Even you select gain to min.
there is still echo. Also there are greater delay that csipsimple. Still I
think that csipsimple is better. I just wish that there will be solution for
audio problems. Outgoing voice is still mess.
Original comment by jar...@gmail.com
on 2 Sep 2010 at 8:53
Last version (-12-27) includes an implementation based on sipdroid methods to
read micro stream.
Not sure it will improves things but worth to try.
Else I have another thing that I can try to see if things are better.
Original comment by r3gis...@gmail.com
on 3 Sep 2010 at 9:09
Issue 178 has been merged into this issue.
Original comment by r3gis...@gmail.com
on 3 Sep 2010 at 9:09
I tested this version
http://code.google.com/p/csipsimple/downloads/detail?name=CSipSimple_0.00-12-27-
archos.apk
and with iLBC, quality 4, 16kHz, mic and speaker gain 0.1 it seems to work fine
with 3G. When trying to 8kHz it was little bit worse quality than with 16 kHz.
So very good so far!
Original comment by jar...@gmail.com
on 4 Sep 2010 at 8:20
Great, we should say thanks to sipdroid guys ! Their method to get record
frames only when needed was the solution at least for this choppy sound.
Just for information, archos edition is intended for Archos 5 internet tablets
- that has no GSM application, so my android integration is done one level
upper using privates API of android. So should probably not be used on other
devices. However it is the same code, the only thing that change is the
manifest file. I've just pushed 0.00-12-28 that fixes a regression introduced
in -12-27.
I've still to find out why like on the X10 there is this awful echo. I think
that the reason is the same (line and mic are mixed up so I record both what
come from the mic and what I diffuse on the earpiece/speaker.
In worse case (will be the case for X10 I think since there is no hope in the
1.6 api), I'll try to tune echo cancellation feature to remove the echo
produced by this hardware implementation.
Just another question, on galaxy S, do speaker/earpiece switch work fine?
Original comment by r3gis...@gmail.com
on 4 Sep 2010 at 8:51
I use the gain of mic and speaker gain 0.2, the codec choice seems to does not
make a big different here with my SIP provider.
Using 16kHz is also quite better, than the 8kHz, but the phone reacts a little
bit slower. Using 32kHz, the phone nearly hangs.
The Quality setting is 3, the voice detection switched off and echo canc is on.
The echo on the other line end is now something between nothing and very quiet,
testing over 3G call. The delay is about quarter a second.
So in overall, this are the best results, compared to the other available SIP
clients for android.
Great work!!
Original comment by m...@ufritz.de
on 4 Sep 2010 at 9:07
Forgot, the volume up/down on the side of the phone is not working on the
galaxy i9000
Original comment by m...@ufritz.de
on 4 Sep 2010 at 9:08
Speaker mode works fine but I noticed that mute (if it is mic mute) doesn't
work.
Original comment by jar...@gmail.com
on 4 Sep 2010 at 9:40
Ok; for mute issue you can track issue 161.
I think that i'll not use the android mute feature (as it's done now) but the
one included in the sip stack... much more reliable ;)
Original comment by r3gis...@gmail.com
on 4 Sep 2010 at 9:52
> Just another question, on galaxy S, do speaker/earpiece switch work fine?
no, I can switch to the speaker, but not able to switch back to earspeaker.
Same issue with sipdroid...
Original comment by m...@ufritz.de
on 4 Sep 2010 at 10:19
>no, I can switch to the speaker, but not able to switch back to earspeaker.
Same issue with sipdroid...
Yeah, more test and I also confirm that issue.
Original comment by jar...@gmail.com
on 4 Sep 2010 at 10:23
[deleted comment]
I have found a new sound relevated issue:
If I answer a call (incoming). my earphone is dead, so I can't hear anything.
There are two reasons:
1. I have to pause the call, then resume it, to hear anything.
2. I need to set the speaker gain to 1.0
If I set the speaker gain to 0.2, I do not hear anything on incoming calls, but
on outgoing it is fine. Gain 0.2 on other hand is the best choice.
Maybe, if the volume up/down button is working, it will be fine. I guess at the
moment I do hear with gain 1.0 the highest possible volume.
I'm talking here only about the speaker (ear piece), not the microphone.
I will send a log to r3gis.3R, here I will receive a call, pause it and resume
it, until I do hear the other caller.
Original comment by m...@ufritz.de
on 5 Sep 2010 at 11:44
update to comment 48:
Ok. I see, it happens not all times and also the pause and resume do not help
on all calls. I will test more for this.
Someone have similar issues?
Original comment by m...@ufritz.de
on 5 Sep 2010 at 11:51
Ok for comment 45/46 I've got a little idea about what I can do to solve it.
For 48, do you reproduce when it doesn't ring? (set ringing volume to vibrate
or none ).
I ask this because I think that the fact there is a really short time when both
ringing and voice are both active. It can maybe affect voice call.
If when you deactivate ringing you get something equivalent to outgoing call, I
can quickly try something to solve it.
Original comment by r3gis...@gmail.com
on 5 Sep 2010 at 11:53
Original issue reported on code.google.com by
mcampbel...@gmail.com
on 14 Jul 2010 at 1:26