mofadlalla / sipdroid

Automatically exported from code.google.com/p/sipdroid
GNU General Public License v3.0
1 stars 0 forks source link

Wrong Sound Channels on Samsung Spica i5700 #366

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Newest Version.

Sipdroid uses "Media" Sound Channel (so loadspeaker) instead of earphone for 
normal phone call.

Samsung Spica i5700 with Android 2.1.

Original issue reported on code.google.com by muellerr...@gmail.com on 11 Mar 2010 at 7:59

GoogleCodeExporter commented 8 years ago
This is the same issue as 341. What's new is apparantly that it is still there 
in
Android 2.1, unfortunately.
Let's hope some developer can get hold of a Spica and solve it...

Original comment by hanszorn...@gmail.com on 13 Mar 2010 at 12:47

GoogleCodeExporter commented 8 years ago
I have the same problem. Did anybody found a solution jet?

Original comment by nlrober...@gmail.com on 15 Mar 2010 at 10:42

GoogleCodeExporter commented 8 years ago
Hello,

I saw in the source code that sipdroid always uses AudioManager.STREAM_MUSIC and
calls AudioManager.setMode to switch between the speaker and the earpiece. 
Shouldn't
it work on the I5700 (and probably the other devices) with
AudioManager.STREAM_VOICE_CALL and then switch the speaker on/off with
AudioManager.setSpeakerphoneOn? I tried the ToneGenerator with
AudioManager.STREAM_VOCE_CALL and it works perfectly with the earpiece of the 
I5700.

Original comment by vsv000mo...@gmail.com on 17 Mar 2010 at 11:31

GoogleCodeExporter commented 8 years ago
Same problem, in Fring VoIP as well

Original comment by Surie....@gmail.com on 18 Mar 2010 at 6:38

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Issue 371 has been merged into this issue.

Original comment by pmerl...@googlemail.com on 25 Mar 2010 at 9:28

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Issue 341 has been merged into this issue.

Original comment by pmerl...@googlemail.com on 25 Mar 2010 at 9:30

GoogleCodeExporter commented 8 years ago
Does anybody know the progress on this issue? Is there someone trying to fix 
this? if
not, i`ll buy another phone. Any suggestions? I want:

Sipdroid working, 
OpenVPN working,

thats it,
Thanx, Robert

Original comment by nlrober...@gmail.com on 2 Apr 2010 at 10:25

GoogleCodeExporter commented 8 years ago
Issue 403 has been merged into this issue.

Original comment by pmerl...@googlemail.com on 5 Apr 2010 at 7:46

GoogleCodeExporter commented 8 years ago
Status update if possible please.

Original comment by stefan.f...@gmail.com on 6 Apr 2010 at 9:03

GoogleCodeExporter commented 8 years ago
Issue 412 has been merged into this issue.

Original comment by pmerl...@googlemail.com on 9 Apr 2010 at 9:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I am running 2.1 on my Samsung Moment.  Sipdroid and Fring put the audio on the 
back 
speaker instead of the earpeice.  It works for a second sometimes and then 
fails 
again.  I thought it might have something to do with the accelerometer trying 
to 
determine if the phone is upright by my ear or not like the iphone does.  I 
would 
love to be able to make calls over wifi but it is not working good enough at 
this 
point.  When i turn speaker phone on it stays on the back speaker but gets very 
loud 
and when I turn off the speaker phone it stays on the back speaker and gets 
quiet.  
Please help I want to use my Gizmo5 sipsorcery google voice free wifi calling 
plan 
like I do with my house phone.

Original comment by matthewk...@gmail.com on 16 Apr 2010 at 8:49

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Any news? please, this issue is really important

Original comment by alejandr...@gmail.com on 4 May 2010 at 4:34

GoogleCodeExporter commented 8 years ago
It seems that rev506 got the fix for the STREAM_MUSIC but it still doesnt work 
on the
spica.

svn diff -r 502:506 RtpStreamReceiver.java
-               am.setStreamVolume(AudioManager.STREAM_MUSIC,oldvol,0);
+               am.setStreamVolume(AudioManager.STREAM_VOICE_CALL,oldvol,0);

could there be something with the accelerometer in the spica, or SpeakerphoneOn?

Original comment by mattia...@gmail.com on 4 May 2010 at 1:30

GoogleCodeExporter commented 8 years ago
Same issue here, this is a real problem, tried just about every SIP software out
there.. what now?

Original comment by Alessio....@gmail.com on 7 May 2010 at 6:50

GoogleCodeExporter commented 8 years ago
No proper sound here either on the Spica

Original comment by coendeur...@gmail.com on 7 May 2010 at 10:22

GoogleCodeExporter commented 8 years ago
Here the same... Please fix!

Original comment by Sascha.B...@gmail.com on 14 May 2010 at 5:08

GoogleCodeExporter commented 8 years ago
any news to this issue?

Original comment by sir...@gmail.com on 17 May 2010 at 1:17

GoogleCodeExporter commented 8 years ago
Having the same issue with official android 2.1 installed. I've tried multiple 
VoIP
programs but they all seem to have the same issue with the sound coming out of 
the
back speaker.

Original comment by gote...@gmail.com on 17 May 2010 at 6:16

GoogleCodeExporter commented 8 years ago
Could this be related to some kernel error with the sound routing? Maybe this 
isn't
fixable via just the application? Samsung has the BSP availible on their 
opensource
website.

Original comment by mattia...@gmail.com on 18 May 2010 at 5:52

GoogleCodeExporter commented 8 years ago
@mattias.b

Do you have a link to this BSP? 

Original comment by gote...@gmail.com on 18 May 2010 at 5:59

GoogleCodeExporter commented 8 years ago
Certainly, you can find the BSP here.
http://opensource.samsungmobile.com/index.jsp?page=3

Its update2 that is android 2.1.

Original comment by mattia...@gmail.com on 18 May 2010 at 8:26

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I think I found a possible solution:
AudioRecord record = new AudioRecord(MediaRecorder.AudioSource.MIC, 8000, 
AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, 
6144);

Samsung devices doesn't support AudioFormat.ENCODING_PCM_16BIT on earpiece 
mode, so it 
will route to speaker_mode to work well.
Using AudioFormat.ENCODING_PCM_8BIT instead would solve the issue.

Original comment by sir...@gmail.com on 20 May 2010 at 11:51

GoogleCodeExporter commented 8 years ago
How do you know? Did you try that out or did you guess from looking at the BSP?

Original comment by pmerl...@googlemail.com on 20 May 2010 at 12:44

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
http://bit.ly/ctxTww the way i tested it. i didn't tested on sipdroid app
kmsg speaks itself, initializing with ENCODING_PCM_8BIT:

http://img571.imageshack.us/img571/1928/8bit.png

initializing AudioRecord with ENCODING_PCM_16BIT:

http://img706.imageshack.us/img706/1734/16bit.png

You could consult AK4671 header here -> 
http://paste.ideaslabs.com/show/xYZ5d05NR5

Thanks for your work&time

PD: sorry for posting & deleting but... there is no way to edit post here?

Original comment by sir...@gmail.com on 20 May 2010 at 12:59

GoogleCodeExporter commented 8 years ago
It looks to me like a solution. Please could you provide a patch which fixes 
this 
issue?

Original comment by jiri....@gmail.com on 20 May 2010 at 1:02

GoogleCodeExporter commented 8 years ago
i downloaded, modified these lines, compiled and runned sipdroid but it crash 
when 
calling. Using AudioRecord with ENCODING_PCM_8BIT audioformat would let 
AudioTrack 
reproduce incoming stream by earpiece, that's verified.

Hope pmerl could adapt the rest of code to work with both audioformat encoding, 
and let 
user choose between both. Rest of devices could use ENCODING_PCM_16BIT until 
now, and 
Samsung users could choose ENCODING_PCM_8BIT option to call using earpiece 
instead 
speaker.

Original comment by sir...@gmail.com on 20 May 2010 at 4:49

GoogleCodeExporter commented 8 years ago
Nice work sircid! I tried this patch and it does crash for me aswell. At least 
it
seems we have found the problem. Now we just have to make a working workaround 
for
sipdroid. Could this problem be related to some codecs only working in 16bit 
mode?

Original comment by mattia...@gmail.com on 20 May 2010 at 9:11

GoogleCodeExporter commented 8 years ago
Don't know if problem is related. I submitted a ticket to Samsung explaining 
the 
problem... they answered me that they will check it. Anyways I don't have any 
hope with 
Samsung tech support xD

Original comment by sir...@gmail.com on 20 May 2010 at 11:31

GoogleCodeExporter commented 8 years ago
sircid, did you add some code to convert the incoming audio from 8bits to 16bits
before passing it to the encoder? i think the encoder expects 16bits audio, so 
it
will probably crash if it gets 8bits audio = twice smaller data size.

Original comment by vsv000mo...@gmail.com on 25 May 2010 at 11:01

GoogleCodeExporter commented 8 years ago
im very sorry, forget my comments, my tests was wrong so that wasn't the 
solution =(. 
I'm trying to modify path_enable function(specifically MM_AUDIO_VOICEMEMO_MAIN 
path) on 
ak4671_spica.c code to get this working, but no success because my low level of 
electronic knowledge.

Original comment by sir...@gmail.com on 25 May 2010 at 2:41

GoogleCodeExporter commented 8 years ago
What was wrong with your tests? Are you sure this time?

Original comment by pmerl...@googlemail.com on 25 May 2010 at 3:23

GoogleCodeExporter commented 8 years ago
Yes, i'm sure this time. Initializing with ENCODING_PCM_8BIT, AudioRecord 
initialize 
gives an error, so it isn't initialized. I didn't checked logcat properly 
-___-... 
The issue is that when AudioRecord is initialized, audio codec (on i5700 case 
it's 
ak4671) set path to "MM_AUDIO_VOICEMEMO_MAIN". I checked code and using this 
path, 
codec turn on speaker instead earpiece.

There is no way to fix this from app, drivers files must be modified to get 
this 
working properly. I know what I must modify but no how... I don't know how to 
modify 
it to route sound to earpiece instead speaker. All info is on attached file to 
make 
this but I don't have electronic level to interpret those info... Any help =$?

Sorry for lose your time.

Original comment by sir...@gmail.com on 25 May 2010 at 11:23

Attachments:

GoogleCodeExporter commented 8 years ago
issue fixed modifying driver files.
http://forum.samdroid.net/threads/983-Sipdroid-(VoIP)-i5700-problems

tested with sipdroid call and working fine on my spica.

Original comment by sir...@gmail.com on 26 May 2010 at 6:53

GoogleCodeExporter commented 8 years ago

Thanks sircid for all this ...

However I do not understand what's involved in "modifying driver files" ?

Do we need to change phone firmware with Kies ?

Original comment by christop...@gmail.com on 18 Jun 2010 at 8:32

GoogleCodeExporter commented 8 years ago
yes if you install last version of samdroidmod(based on JE1 version) you will 
have this working.go to forum to get more details about installation.

Original comment by sir...@gmail.com on 18 Jun 2010 at 10:11

GoogleCodeExporter commented 8 years ago
This happens both on HTC hero and Sony X10 for me.  for  a while I simply 
flipped the phone over listening to the back of the hero while on a sipdroid 
call...

Original comment by wangtong...@gmail.com on 6 Jul 2010 at 3:27

GoogleCodeExporter commented 8 years ago
The new Samsung i9000 Galaxy S has this issue too, and there is no firmware fix 
yet..

Original comment by auz...@gmail.com on 17 Jul 2010 at 4:56

GoogleCodeExporter commented 8 years ago
is there any fix for spica??? still mixing the sound channels

Original comment by Zkumsiashvili on 22 Jul 2010 at 9:24

GoogleCodeExporter commented 8 years ago
Have done some testing with Samsung Galaxy S (aka I9000) and can confirm that 
the call audio is playing out of the rear speaker as well as the earpiece.

Phone is "rooted" and running the XWJM1 firmware (Android 2.1-update1 Eclair)

Running latest sipdroid (1.5.5)

Using the following configuration: Google Voice -> IPKall (DID) -> antisip.com 
-> sipDroid

Tried putting phone into "speaker" mode (ie. menu -> speaker) and icon on 
notification bar changes to phone handset with sound waves and volume up and 
down keys now modify "media volume".  Turned volume all the way down to off.

Turned speaker mode off (ie. menu -> speaker... should this say "earpiece??") 
and icon on notification bar turned back to green square with phone.  Sound 
still comes out rear speaker, and volume up and down keys now modify "in-call 
volume"

I have all 4 mic and headset gains set to "Low"

Aside from other people being able to hear the calls, I believe this is also 
the cause of the call echo that the other party can hear.

I think this is due to the phone microphone picking up the rear speaker audio 
and feeding it back to the other party.

Original comment by jared.ya...@gmail.com on 31 Jul 2010 at 2:43

GoogleCodeExporter commented 8 years ago
Issue 588 has been merged into this issue.

Original comment by pmerl...@googlemail.com on 10 Aug 2010 at 9:38

GoogleCodeExporter commented 8 years ago
I have this issue too on the international version of the Samsung Galaxy S. I 
noticed that the incorrect routing only happens when I RECEIVE A CALL but NOT 
if I place a call myself.
Also, if I have answered an incoming call, then press hold, wait a few seconds, 
and then press hold again, most of the times the audio gets correctly rerouted 
to the earspeaker.
Another thing: The other party hearing their own voice has happened for them 
even if I call or if I use the "fix" with holding and unholding the call 
(meaning there is no audio from the rear speaker). So I suppose it has nothing 
to do with the mic picking up the audio from the rear speaker.

Maybe this helps somehow in solving the problem.

Original comment by chrissss...@gmail.com on 15 Aug 2010 at 9:36

GoogleCodeExporter commented 8 years ago
I think the discussion on this topic is going in a loop-mode.
From what I read I conclude that the issue cannot be solved with Sipdroid (or 
any other voip app) because there is a problem with the hardware dependent part 
of Android that Samsung (and apparently other manufacturers as well) provide.
Also I understand that there is a fix for this software by Sircid and/ or 
Samdroid but not everyone likes to use software from other sources than the 
manufacturer of the device.
So the real solution should come frome the manufacturers, but the problem may 
be that they are not aware of this issue, or that they may not be too willing 
to solve it. 
Therefore I think we should move this discussion to a platform that is closer 
to Google and the Open Handset Alliance, so they can put pressure on the 
manufacturers to implement the Android standards or API's properly.
Also it would be useful to publish a list of devices and brands that have this 
problem.
After all, competitors like iPhone and some Nokias are known to be perfect voip 
phones, whereas my Galaxy Spica is currently totally useless in this area.

Does anyone know where to go with this idea, or want to pick it up? 

Original comment by hanszorn...@gmail.com on 16 Aug 2010 at 9:12