oussdag / csipsimple

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

Sound quality dropped in recent versions (auto level problem?) #211

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Make a call to an echo server.
2. Talk in short words, and in longer sencences.
3. Listen the change of level and quality of returned voice.

What is the expected output? What do you see instead?
Level and quality of the sound should be constant over time.
Instedad, the first half-second of speech is overmodulated to the level of 
unintelligibility. As you speek constantly, the level becomes lower and the 
speech undestandable. After a pause, sound becomes overmodulated again.

What version of the product are you using? On what operating system?
I first noticed it in .12-26 I think, after I skipped several previous 
versions. The problem persists as of .12-32. I have VAD on, echo cancellation 
on. Android 2.2 on HTC Desire. Codec in use is Speex 8k.

Please provide any additional information below.
I am sure that things did change. The sound was all right sometime about 
version .12-19, then I was on vacation, and when I returned and upgraded to 
.12-26 I noticed this problem (I did not make any other changes). The problem 
is bad enough for the people to whom I speak to start complaining.

Original issue reported on code.google.com by egcros...@gmail.com on 13 Sep 2010 at 6:20

GoogleCodeExporter commented 9 years ago
Ok, probably due to the fix I did for GalaxyS and all alsa implementation. It 
should probably be tweaked a little bit to ensure there is no loss in media 
quality.
In worse case, I'll revert this part of code for all HTC devices that support 
direct and safe access to micro buffer.

Original comment by r3gis...@gmail.com on 13 Sep 2010 at 6:44

GoogleCodeExporter commented 9 years ago
In 0.00-12-33 I included some improvements on sound stuff. 

But still no revert neither about audio focus, nor about the method to get 
audio frames.

Let me know if you observe some improvements, else we'll try revert audio focus 
or the micro read method.

Original comment by r3gis...@gmail.com on 19 Sep 2010 at 8:18

GoogleCodeExporter commented 9 years ago
I tried it and the results are mixed. I'd say, the effect is not as outrageous 
as it was but it it still feels wrong. I mean, the telephone sould not have 
sound level floating up and down like on a cheap dictaphone.

Anyway it's more usable now.

Original comment by egcros...@gmail.com on 20 Sep 2010 at 7:50

GoogleCodeExporter commented 9 years ago
I tried 12-3x but all of then having this sound problem. I have to downgrade to 
base version 12. In v.12, I have no problem with sound even Echo Cancellation 
and VAD are ON and Audio Frequency set to 16khz. In 12-3x, Even Echo and VAD 
are OFF and Frequency set to 8kHz. I still get garbled sound.

BTW, in v12, there is no codec choice to set. In 12-3x, I tried both ulaw and 
gsm with not much difference.  

Original comment by suka...@gmail.com on 22 Sep 2010 at 8:18

GoogleCodeExporter commented 9 years ago
Still getting somewhat fuzzy results, somewhat choppy sound, not as bad but not 
very good. Droid Eris, Froyo.

Original comment by huan...@gmail.com on 23 Sep 2010 at 6:01

GoogleCodeExporter commented 9 years ago
Sound quality is unusable on Desire 2.2 with 12-36.
Since it's ok on v12.
Is there any workaround yet?

Original comment by mrozents...@gmail.com on 25 Sep 2010 at 6:08

GoogleCodeExporter commented 9 years ago
On HTC desire with 12-36 : known issue -> see issue 233. Just a configuration 
parameter that you can already set to fix your issue. I'll fix the default 
parameter today.

For global audio quality, I'll also try to do something today that revert fix 
for galaxy S. So stay tuned :)

Original comment by r3gis...@gmail.com on 25 Sep 2010 at 9:00

GoogleCodeExporter commented 9 years ago
Ok, for those who had audio regression (I mean worse quality - not the bug of 
issue 233) from 12-29.
Could you try 
http://code.google.com/p/csipsimple/downloads/detail?name=CSipSimple_0.00-12-36-
NotAlsa.apk 
I reverted the part intended for GalaxyS (and all alsa based implementation).
Let me know whether better. If no, it's probably audio focus feature as stated 
by egrosser and I'll then try to disable that / or change the way it's done.

Let me know if changes are observed between 12-3x and this -12-36-NotAlsa.

Original comment by r3gis...@gmail.com on 25 Sep 2010 at 2:36

GoogleCodeExporter commented 9 years ago
In NotAlsa version the problem of floating volume is gone. I needed to 
re-adjust micro-amplification level and then it was all right, as before the 
change.

Original comment by egcros...@gmail.com on 25 Sep 2010 at 2:47

GoogleCodeExporter commented 9 years ago
It's not working for my spica (not alsa and lower micro amp)

Original comment by suka...@gmail.com on 25 Sep 2010 at 2:59

GoogleCodeExporter commented 9 years ago
@sukasem : using -12-29 solve the problem for you? Or the only one that make it 
work is -12 from the market?

Another information that could be interesting to me is what you get using the 
(i)nformation button on the in call screen.
You can see here : the codec actually in use (can be different from the top of 
your priority list) since other part can ask to use another supported codec by 
CSipSimple. Btw, CSipSimple support a lot of codec now (that was not all 
supported in -12 from the market). If your callee choose a codec that consume a 
lot of cpu on your device, it can has an impact on sound quality. 
You'll also be able to see packet loss %age. Could be interesting to be able to 
say if network has something to do with your problem.

@egcrosser : if it's the solution... it's really annoying... I've to divert the 
way packets are get from the mic... The worse thing is that there is no sure 
way to determine what method I have to use with a given device...
I'll make another try with the galaxyS method but with some improvements.

Original comment by r3gis...@gmail.com on 25 Sep 2010 at 3:53

GoogleCodeExporter commented 9 years ago
Cold there possibly be a way to use Alsa interface (?) that is suitable for 
Galaxy, but prevent it from automatically adjusting the volume? Just a thought.

Original comment by egcros...@gmail.com on 25 Sep 2010 at 4:28

GoogleCodeExporter commented 9 years ago
Actually, what I do doesn't really adjust the volume.
Alsa implementation requires we read on the micro buffer not faster than the 
frame rate of the micro stream. Else it fill the missing content with empty 
datas. Other devices usually wait before returning complete frame.
So in other device I just need the loop to read, but with galaxy S, I have 
sometime to wait before read. Sounds it has a side effect on some other 
devices. Actually on my Nexus One I didn't observed any sound variation but 
possible that for your Desire it has an impact.
For now, I didn't really optimized neither had a real though about my 
implementation. 

Original comment by r3gis...@gmail.com on 25 Sep 2010 at 4:47

GoogleCodeExporter commented 9 years ago
I use my own local asterisk. Actual codec use is ulaw (PCMU) and packet loss is 
0.1% (from (i) icon).
Ver 12-29 is still having problem but it's beeter than 12-3x. The best version 
for me still 12.

Original comment by suka...@gmail.com on 25 Sep 2010 at 5:20

GoogleCodeExporter commented 9 years ago
@sukasem : ok, interesting. So I guess it's linked to the audio mode. What 
version of android you have on your Spica ? Is that the official 2.1?

Original comment by r3gis...@gmail.com on 25 Sep 2010 at 5:34

GoogleCodeExporter commented 9 years ago
No, it's SamdroidMod version here 
http://forum.samdroid.net/f28/samdroidmod-kitchen-v-2-all-one-samsung-spica-i570
0-en-1901/ 

This firmware has modified linux kernel to get audio to work on earpiece, not 
speakerphone.

Right now I using Fring with PBXes to eliminte Keep Alive problem. It's work 
just OK. But I love to see csipsimple (real sip phone) working on Spice.

Cheers, 

Original comment by suka...@gmail.com on 25 Sep 2010 at 5:41

GoogleCodeExporter commented 9 years ago
BTW, do you think I should go back to official 2.1 one? Is the speakerphone 
problem fix on csipsimple?

Original comment by suka...@gmail.com on 25 Sep 2010 at 5:43

GoogleCodeExporter commented 9 years ago
I don't know. Probably not, it was just to know exactly what could be the 
problem.
Depending on the way SamDroid has solved the issue on his ROM, could impact 
what I should do on my side to get a good audio quality.

Can you send me some logs? See the wiki page to perform that : 
http://code.google.com/p/csipsimple/wiki/HowToCollectLogs
When log are recording, establish a call and about 5 seconds after end the 
call. In order to let me collect establishment and end of the call.
Then directly send me the logs to my email address. There is maybe some 
interesting things to analyze.

Another question the difference is really important between -12 and -12-3x?

Original comment by r3gis...@gmail.com on 25 Sep 2010 at 6:03

GoogleCodeExporter commented 9 years ago
log has been sent!
The audio is big different btw -12 and 12-3x. 12-3x is almost unuseable. The 
other end hardly understand the words I said.

Original comment by suka...@gmail.com on 25 Sep 2010 at 6:22

GoogleCodeExporter commented 9 years ago
to #13: well, I have no idea as to *why* but the side effect appeared to be 
that "something" was attempting to auto-adjust mic gain level, to most 
unpleasant effect. Could it be that while you are "waiting before read" the 
operating system takes an opportunity to re-adjust amplification level? Just a 
(very) wild guess...

Original comment by egcros...@gmail.com on 25 Sep 2010 at 6:54

GoogleCodeExporter commented 9 years ago
Indeed, the observed behavior can absolutely be the consequence of what I do to 
be compliant with the galaxy S implementation.
That's the reason why I tried this solution before the AudioFocus ;).
However, I think that I can find something that make it working in both case 
Galaxy S & HTC Desire

Original comment by r3gis...@gmail.com on 25 Sep 2010 at 7:21

GoogleCodeExporter commented 9 years ago
This improvement (alsa support deletion) will not be published in the market 
version however.
For now previous implementation is a good compromise for both devices.
But I'll treat this issue for next release :)

Now updates on the market should be more frequents.

Original comment by r3gis...@gmail.com on 26 Sep 2010 at 2:37

GoogleCodeExporter commented 9 years ago
I don't know what you did, but it seems like to me the sound quality has been 
improved recently. I can now have consistently good conversations.

HTC Eris, Froyo 2.2, Gizmo5.

Original comment by huan...@gmail.com on 27 Sep 2010 at 6:42

GoogleCodeExporter commented 9 years ago
@huantnh : maybe network issue or the update that improves things ;)

@egcrosser : I've pushed 0.00-13-01-bis on download section. It include an 
experimental implementation that ~should~ work on Samsung GalaxyS and should 
also not affect call quality for other devices. If you could have a look with 
you Desire. I'm really interested in your feedback on this build.

Original comment by r3gis...@gmail.com on 27 Sep 2010 at 7:08

GoogleCodeExporter commented 9 years ago
I tried 13.01-bis and it sounds all right: I do not hear any floating level. 
Thanks!

Original comment by egcros...@gmail.com on 27 Sep 2010 at 9:04

GoogleCodeExporter commented 9 years ago
Yeah, same here, 13-bis seems fixing sound problem now but only problem is NO 
RINGTONE for incoming call.

Samsung Spica SamdroidMod 2.1 

Original comment by suka...@gmail.com on 27 Sep 2010 at 7:56

GoogleCodeExporter commented 9 years ago
@egcrosser : I'll be again a little bit annoying and ask you to test the 
0.00-13-02. 
Once again refactored focusing on galaxy S, since -13.01-bis had bad results on 
galaxy S.
I'm trying to converge to something suitable for all devices.

@sukasem : this version will not solve your ringtone issue, I'll try to have a 
closer look today. But if you can retest 0.00-13-02 with your device, focusing 
on testing audio quality, I'm interested with your feedback too.

Original comment by r3gis...@gmail.com on 29 Sep 2010 at 10:30

GoogleCodeExporter commented 9 years ago
0.00-13-02 sounds all right.

Original comment by egcros...@gmail.com on 29 Sep 2010 at 11:40

GoogleCodeExporter commented 9 years ago
13-02 sounds OK (I think 01-bis a little better)

Original comment by suka...@gmail.com on 29 Sep 2010 at 7:58

GoogleCodeExporter commented 9 years ago

Original comment by r3gis...@gmail.com on 12 Oct 2010 at 5:24