pyj4104 / sipdroid

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

Sipdroid sound problems when using a headset (on Motorola Droid) #241

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Sipdroid works fine when listening to calls on the phone and speaking into 
the phone's mic. However, Sipdroid has sound problems when using a headset.

There are two related problems:
1. mic volume is too low with headset under all conditions.
2. under special conditions, the caller cannot hear any sound -- not even 
the called phone ringing -- when using a headset. This happens when the 
VoIP call is initiated by Google Voice (using web page). I'll elaborate on 
this problem below.

--
What steps will reproduce the problem?
1. plug any headset with mic into Droid.
2. go to Google Voice website (on phone or other computer) and initiate a 
call using Gizmo (which can be answered on the Droid).
3. answer the call.

What is the expected output? 
Expect to hear called party's phone ringing and expect to hear the other 
person speaking after they answer.

What do you see instead?
Do not hear other phone ringing, although it is ringing. Other party 
answers, but I cannot hear them speaking.

What version of the product are you using?
Sipdroid 1.2.1 beta

On what operating system?
Android 2.01 on Droid

Which SIP server are you using?
Gizmo5

Which type of network are you using?
WiFi

Please provide any additional information below.
Hopefully the formatting of the table below will be OK.
Legend: 
After=Headset Plugged in Only After call was connected.
Prior=Headset Plugged in Prior to dialing call (normal use case).
* asterisk indicates lower microphone sound volume

                    NoHeadset   After   Prior
Call Initiated By:      ----            -----   -----
Google Voice (Web)  Good            OK* no sound
Sipdroid from phone Good            OK* OK*
Droid Phone App         Good            Good    Good

This table shows that with Sipdroid, there are always sound issues when 
using a headset, but no sound issues when not using a headset. The worst 
case is when using Sipdroid and the call is initiated by Google Voice and a 
headset is used. The caller hears no sound and sound transmitted by the mic 
is the lowest. 

Original issue reported on code.google.com by davidshi...@gmail.com on 18 Dec 2009 at 7:24

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

Original comment by pmerl...@googlemail.com on 18 Dec 2009 at 9:30

GoogleCodeExporter commented 9 years ago
Can you find out more about Google Voice calls where no sound can be heard, 
please. Is 
this a callback, and does this apply to all incoming calls?

Original comment by pmerl...@googlemail.com on 23 Dec 2009 at 3:47

GoogleCodeExporter commented 9 years ago
Thank you for looking into this. I just did some additional tests to verify my 
earlier findings. All these tests are on WiFi with a good signal. Test 2b below 
is 
interesting.

Test 1. I used Google Voice to initiate a call with a headset plugged in. The 
person 
I called heard me, but I did not hear their phone ringing and I did not hear 
them 
speak.
Test 2. The person called me back through my Google Voice number. The headset 
was 
plugged in. I answered. They could hear me. I could NOT hear them.
Test 3. The person called me back through my Google Voice number again. I did 
NOT 
have a headset plugged in. The call quality was good. We could both hear each 
other 
and the volume was OK.

I repeated similar tests with a different person.
Test 1b. The 2nd person called me through my Google Voice number. The headset 
was 
plugged in. Same result as prior test: I could not hear them. They could hear 
me (but 
with a lot of static). 
Test 2b. The 2nd person called me again through my Google Voice number. The 
headset 
was not plugged in. This time I answered the call and immediately plugged the 
headset 
in. We could both hear each other.
Test 3b. I called the person using the Droid's phone app. The call went through 
Sipdroid, as it should with my settings. My headset was plugged in. We could 
both 
hear each other. 

The lack of sound (on my end) applies to INCOMING calls IF a headset is plugged 
in 
and I'm using Sipdroid/Gizmo5/Google Voice. It does not matter if the call is a 
GV 
Callback or a regular incoming call. If the headset is plugged in, I will not 
hear 
any sound on the INCOMING call. 

FYI, outgoing calls are always OK (with or without headset).

Original comment by davidshi...@gmail.com on 23 Dec 2009 at 4:42

GoogleCodeExporter commented 9 years ago
Could a muting function be getting invoked when the headset is plugged in? I 
noticed 
something earlier so I did a test to confirm:

Test 1. No headset. Allow incoming call to ring without answering. It continues 
to 
rings as expected.

Test 2. Headset plugged in. Allow incoming call to ring without answering. It 
rings 
for about 1 second (less than 2 seconds for sure) and then ringing is muted. No 
sound.

My guess is that the Droid thinks a phone call is coming is and that it should 
mute 
the media player functionality. Obviously, Sipdroid needs the media player 
functionality. Could this explain what I'm seeing in my tests?

Original comment by davidshi...@gmail.com on 23 Dec 2009 at 4:51

GoogleCodeExporter commented 9 years ago
Thank you for working on this issue. I did some additional testing today in an 
attempt to contribute any insights that I can. 

I repeated the tests as before using 1.2.1. The results were the same. Then I 
installed 1.2.3. I tested the music pause during call issue and that is indeed 
fixed. 
(Thank you!) But my other sound issues, as reported above, were the same - not 
fixed 
yet.

So then I experimented, looking for a work around. I may have found one. (BTW, 
as one 
symptom of this issue, When a call comes in and the headset is plugged in, the 
ringer 
will be muted after about 1 second.)

The workaround is:
1. when the phone is ringing, but before answering, adjust ringer volume. (It 
will 
still be muted and this seems to have no effect, but I think it is a required 
step.)
2. after answering the call, adjust media volume. 
Result: now I can hear the other party normally, even on incoming calls when 
using a 
headset. I have repeated it 3 times with success. In practice, I simply hit the 
volume key a few times before and immediately after answering the call and 
sound 
works as expected after that.

This is a very simple workaround. And it does seem to indicate that a mute 
function 
is being called inappropriately. I hope that helps in your troubleshooting. 
Please 
contact me if you want more help testing.

Original comment by davidshi...@gmail.com on 24 Dec 2009 at 4:09

GoogleCodeExporter commented 9 years ago
This issue also exists on the Nexus One running Android 2.1 and Sipdroid 1.2.4 
beta.
The steps to reproduce it are the same. I'm using WiFi and 3G and Gizmo.

Original comment by qipu...@gmail.com on 6 Jan 2010 at 7:50

GoogleCodeExporter commented 9 years ago
I have a Droid and a Nexus One. I have this forced-mute issue for incoming VoIP 
calls
on both phones. I am using Sipdroid 1.2.4 beta and Gizmo.

I set up Sipdroid as shown here:
http://davestechshop.net/VoIP-on-Motorola-Droid-With-Sipdroid-Gizmo-GoogleVoice-
Free-Calls

However, I may have found a workaround on the Nexus One. After I installed the
official Google Voice app (build 0.3.0) on my Nexus One, the problem of volume 
being
"force muted" on incoming VoIP calls was resolved. My other settings remain the 
same
as shown in the link above.

I tried the same workaround on the Droid. It did NOT work. BTW, in side by side
comparison tests (over many calls) using WiFi, Sipdroid and Gizmo, the Droid 
has much
better VoIP call quality than the Nexus One. Unfortunately, the Droid has the
forced-mute bug and the Nexus One at least has a workaround.

Original comment by davestec...@gmail.com on 8 Jan 2010 at 6:08

GoogleCodeExporter commented 9 years ago
I found out that fring doesn't suffer from this problem. I tested fring on both 
a
Droid and a Nexus One. The forced-mute on incoming calls with a headset does not
happen with fring. This is true with both the SIP and Skype add-ons. I tested 
using
Gizmo and Skype. The bug does not exist.

Unfortunately, fring is not reliable. Sipdroid is a much more reliable product. 
But I
just wanted to give you another reference point. This test proves that the 
hardware
can indeed work correctly, with regard to this issue.

If I can be of further help, please let me know. Thanks for your excellent 
product.

Original comment by davestec...@gmail.com on 11 Jan 2010 at 4:37

GoogleCodeExporter commented 9 years ago
More feedback. This problem also happens when using PBXes. The original report
mentioned Gizmo. I confirmed this problem with PBXes and CallCentric. Thanks 
for your
attention to this.

Original comment by davestec...@gmail.com on 12 Jan 2010 at 1:52

GoogleCodeExporter commented 9 years ago
Can you check if attached version fixes the problem? Maybe volume is not 
correctly set 
yet but it might not mute.

Original comment by pmerl...@googlemail.com on 12 Jan 2010 at 10:05

Attachments:

GoogleCodeExporter commented 9 years ago
I am installing the attached apk at this very moment. I will report back after 
24
hours of use. Thanks.

Original comment by davestec...@gmail.com on 13 Jan 2010 at 1:42

GoogleCodeExporter commented 9 years ago
The apk in comment 10 doesn't resolve this issue. Volume is muted on incoming 
calls
with a headset still.
But maybe this feedback will help:
1. the workaround given in comment #5 no longer works.
2. plugging a headset in after the call is answered still works around the bug.
3. without a headset, the phone's ringer volume is reduced after the first ring 
now.
This is a new bug in this (test) version.
Basically, this test version goes the wrong direction, but maybe that will help
identify what is happening.

To test this apk, I uninstalled the market version and installed this apk and 
entered
all settings from scratch.

Thanks for your work on this. I am ready to do more testing when needed.

Original comment by davestec...@gmail.com on 13 Jan 2010 at 1:57

GoogleCodeExporter commented 9 years ago
can you post or email the source code for the apk in comment #10?

Original comment by davestec...@gmail.com on 13 Jan 2010 at 2:01

GoogleCodeExporter commented 9 years ago
OK. Can you test attached image as well, please?

Original comment by pmerl...@googlemail.com on 13 Jan 2010 at 2:15

Attachments:

GoogleCodeExporter commented 9 years ago
> Can you test attached image as well, please?
Sure. Installing now...
Thanks.

Original comment by davestec...@gmail.com on 13 Jan 2010 at 2:21

GoogleCodeExporter commented 9 years ago
The apk from comment 14 has very similar behavior to the one from comment 10. 
The
volume is still muted. Issue not resolved yet.

The workaround from comment 5 still does not work in this image. But some 
strange and
interesting behavior is seen. I'll describe exactly what I am seeing.

1. headset plugged in and phone awake.
2. initiate call from Google Voice website. Call comes in.
3. hear one ring in headset, then volume is immediated muted.
4. moving the volume rocker down/up (from comment 5 workaround) has no effect 
now.
5. answer call by sliding box on screen up.
6. no sound is heard (expect to hear called party's phone ringing).
7. moving the volume rocker down/up (from comment 5 workaround) shows volume is 
off
initially. Volume up on rocker increases volume a couple notches, then 
continuing to
press volume up reduces volume by a notch. Continuing to press volume up 
thereafter
alternately increases a notch then reduces it a notch, as shown on the "volume 
level
bar" on the screen. But it never becomes unmuted. Pressing volume down 
immediately
moves the on-screen bar to zero level.

So, with this image, the phone's volume rocker behavior is very strange. :)

I repeated a test where the phone's screen was locked when the incoming call 
came.
Same results.

I'll keep testing.

Original comment by davestec...@gmail.com on 13 Jan 2010 at 2:42

GoogleCodeExporter commented 9 years ago
typo fix: 
3 should be
3. hear one ring in headset, then volume is immediately muted.

Original comment by davestec...@gmail.com on 13 Jan 2010 at 2:44

GoogleCodeExporter commented 9 years ago
Third attempt! I have removed setMode() call.

On the first attempt I tried another stream type. The second attempt was also 
with the 
other stream type and without setMode(), too.

Original comment by pmerl...@googlemail.com on 13 Jan 2010 at 10:41

Attachments:

GoogleCodeExporter commented 9 years ago
I will test now and give some feedback ASAP :)

Original comment by davestec...@gmail.com on 13 Jan 2010 at 10:56

GoogleCodeExporter commented 9 years ago
SipAgent has this problem too.

Original comment by qipu...@gmail.com on 13 Jan 2010 at 11:09

GoogleCodeExporter commented 9 years ago
The apk from comment 18 doesn't resolve this issue yet. Volume is muted on all
incoming calls with a headset. This happens on call-backs from GV and normal 
incoming
calls (routed via PBXes.com).

With "18" the workaround from comment 5 is again working. I hear one ring in the
headset, then ringer volume is muted. I do a down/up change in volume, then 
answer
the call. For an instant, I hear the normal background noise (as is expected on 
any
call) but then the sound is completely muted. A second down/up change in volume 
is
required, and then the caller can be heard and the conversation goes on 
normally.

Original comment by davestec...@gmail.com on 13 Jan 2010 at 11:14

GoogleCodeExporter commented 9 years ago
Let's try another change based on the workaround that you have found.

Original comment by pmerl...@googlemail.com on 14 Jan 2010 at 1:36

Attachments:

GoogleCodeExporter commented 9 years ago
This may surprise you, but the apk from comment 22 doesn't resolve the issue. 
?!?
At first I thought maybe I didn't install the right apk, but in the 
notifications
menu I now have a choice for "mute dial sounds", so I know this is the new code.

The workaround still works with this version.

The Android API must make this difficult... or is it the Droid hardware?

I am happy to keep testing. Thanks for working on this.

FYI, each time I am uninstalling the prior version before installing the new 
one. I
enter all the settings each time. I'm using PBXes, CallCentric and good WiFi 
for testing.

Original comment by davestec...@gmail.com on 14 Jan 2010 at 2:46

GoogleCodeExporter commented 9 years ago
I did some more very careful testing. The workaround is slightly different with 
the
apk from #22. Now, only the first down/up volume change is required. Previously 
two
down/up's were required.

Now, I only need to do a down/up after the first ring but before answering the 
call.
Then the call proceeds fine with 2-way sound as expected. 

Original comment by davestec...@gmail.com on 14 Jan 2010 at 3:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
What does the status change indicate?

If you are not going to fix it now, the latest code is an improvement. Only one
down/up volume change is actually much better than having to do two. So keep 
this
change in the code please -- at least until it is completely resolved. Thanks.

Original comment by davestec...@gmail.com on 14 Jan 2010 at 4:44

GoogleCodeExporter commented 9 years ago
This must be a bug of the operating system, but we are getting closer. You 
don't need 
to uninstall before installing the updated apk.

Original comment by pmerl...@googlemail.com on 14 Jan 2010 at 4:49

Attachments:

GoogleCodeExporter commented 9 years ago
I will test again right away. Thanks for continuing to work on this. :)
I figured it must be a strange bug of some type.

Original comment by davestec...@gmail.com on 14 Jan 2010 at 4:59

GoogleCodeExporter commented 9 years ago
It is a lot easier and faster to test without uninstalling the prior version. 
Thanks
for letting me know that is OK.

The version from #27 does not resolve the issue.
The workaround from comment #24 is the same.

Here are more details:
* Ringer is muted after first ring.
* Do a down/up volume change after first ring, as required by workaround.
* After down/up vol change, a beep is heard in the headset. Ringer is still 
muted (no
more ringing is heard, no matter what).
* Answer call and it works well.

If a call comes in and I do NOT do the down/up volume change after the first 
ring, I
hear no sound when I answer the call. Doing the down/up volume change after 
answering
the call does not work. No sound will be heard.

Original comment by davestec...@gmail.com on 14 Jan 2010 at 5:35

GoogleCodeExporter commented 9 years ago
Can you activate "Auto-answer in use" in Call Options and let me know the 
results, 
please?

Original comment by pmerl...@googlemail.com on 14 Jan 2010 at 5:57

GoogleCodeExporter commented 9 years ago
I'm reporting on 3 test calls.

1. First call. With "auto-answer in use" enabled, the call came in, my phone 
vibrated
instead of ringing, Sipdroid answered the call, I heard a brief period of normal
background noise indicating the call was connected, then I heard nothing, so I 
hung up.

2. The phone rang and did not auto-answer. Having not used that setting before, 
I
wonder if it disabled itself after each call was auto-answered. Checked 
settings, and
no, it is still enabled. For some reason, auto-answer didn't auto-answer. :)

3. "auto-answer in use" still enabled, call came in, my phone vibrated, Sipdroid
answered, I heard a brief period of normal background noise indicating the call 
was
connected, then I heard the other party and the call worked. Success. :)

I am running the apk from comment 27.

It looks like "auto-answer in use" will defeat this bug. I think maybe the 
setting
didn't really take effect until the 3rd call. I will test some more and see. 

Original comment by davestec...@gmail.com on 14 Jan 2010 at 8:14

GoogleCodeExporter commented 9 years ago
Maybe my screen was off for call #2 above. I did not note that. But as I am 
doing
more tests, I see that "auto-answer in use" only answers if my phone is awake, 
as the
name would imply :)

It is clear now that when "auto-answer in use" answers the call, the forced-mute
issue is not present. 

Original comment by davestec...@gmail.com on 14 Jan 2010 at 8:19

GoogleCodeExporter commented 9 years ago
Sorry for spamming multilple messages...

Whether the "auto-answer in use" setting is checked or not is not important 
here.
What matters is whether the call is actually answered automatically or not. 

That wasn't clear to me until just now. I hope I have explained it clearly. 

I can see that you are indeed getting close to resolving this.

Original comment by davestec...@gmail.com on 14 Jan 2010 at 8:22

GoogleCodeExporter commented 9 years ago
It is like walking in the fog catching this weird bug because I don't have such 
devices 
here. You are "lucky" that you have both Nexus and Droid to try with. We might 
be lucky 
that attached file also works for ringing and manually answered calls. I am 
injecting a 
small beep at the beginning of a call now.

Original comment by pmerl...@googlemail.com on 14 Jan 2010 at 10:06

Attachments:

GoogleCodeExporter commented 9 years ago
I do feel lucky. But we didn't get lucky yet with regard to this issue being 
resolved
by the apk from #34.

Here's my report on the latest image:
1. With "auto-answer in use" checked, when the call is auto-answered, the sound 
is
fine. Volume is not muted.
2. The short workaround from #24 doesn't work now.
3. The original double down/up vol change from #5 doesn't work now either.
4. Unplugging the headset before a call comes in and plugging it back in after 
the
call is answered still works around the issue.
5. I did not hear a small beep at the beginning of the call. Should this be 
audible
both with and without a headset? Is it audible on incoming calls only?

Original comment by davestec...@gmail.com on 14 Jan 2010 at 10:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
As another workaround I have added the option to select a silent ringer for the 
next 
release of Sipdroid.

Original comment by pmerl...@googlemail.com on 15 Jan 2010 at 8:17

GoogleCodeExporter commented 9 years ago
I am having similar problems on the Nexus One. No sound whatsoever with Sipdroid
(either running 3G or Wifi). I can place and receive calls but both with and 
without
the handset all calls are muted. Furthermore, placing mobile calls (i.e. non SIP
based) when the SIP client is running in the background also silences mobile 
calls.
Only quitting the Sipdroid client will re-enable mobile calls. Any advice? - 
there
some to be a rather large bug with the Nexus (not least combined with the 
terrible
irratic handover between 2G and 3G networks).

Original comment by stortebe...@gmail.com on 15 Jan 2010 at 1:32

GoogleCodeExporter commented 9 years ago
> As another workaround I have added the option to select a silent ringer for 
the next 
release of Sipdroid.

Just now I did a test by setting my ringer to vibrate only. Using a Droid under 
the
same test conditions as above, with headset plugged in, everything works as 
expected
now. There is no forced-mute on incoming calls in vibrate mode. I even heard 
the beep
at the very beginning of a call, as mentioned in #34.

I suppose this is why the "auto-answer in use" mode works around the issue too.

With this option to select a silent (or vibrating) ringer for Sipdroid, would 
it be
possible to specify that it is active only when a headset is plugged in?

Original comment by davestec...@gmail.com on 15 Jan 2010 at 2:34

GoogleCodeExporter commented 9 years ago
@stortebecker - In my experience, the VoIP quality on the Nexus One is not 
good, but
calls will work with 2-way audio. Maybe you have a problem in your VoIP 
settings? But
this is not the right place to get that kind of help. You need to post your 
question
in a forum.

Original comment by davestec...@gmail.com on 15 Jan 2010 at 2:39

GoogleCodeExporter commented 9 years ago
The apk from #34 together with a settings profiles app gives me a very nice
workaround now on the Droid. I made a settings profile that turns off the 
ringer when
a wired headset is plugged in. When a call comes in, I hear the short beep 
(which was
added in #34) and the phone vibrates, and I can answer the call with no sound 
issues. :)

That's good enough for me at this time. However, I will be happy to continue to 
help
wth testing to resolve the actual bug.

Original comment by davestec...@gmail.com on 15 Jan 2010 at 3:00

GoogleCodeExporter commented 9 years ago
Can you point me to the areas in the code that are related to this issue? 
Thanks.

Original comment by davestec...@gmail.com on 17 Jan 2010 at 12:10

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

Original comment by pmerl...@googlemail.com on 17 Jan 2010 at 8:28

GoogleCodeExporter commented 9 years ago
Did you check release 1.3.5 if it is any better for your Droid & headset than 
it was 
before? Could you re-enable the ringtone? The code is in RtpStreamReceiver.

Original comment by pmerl...@googlemail.com on 26 Jan 2010 at 1:26

GoogleCodeExporter commented 9 years ago
I will be glad to test 1.3.5. The last version I tested was 1.3.3. It was worse 
for
me because it had the same problems, but the workaround didn't function any 
more. So
I went back to an earlier version. But I will test 1.3.5 tomorrow and report 
back.
Thank you.

Original comment by davestec...@gmail.com on 26 Jan 2010 at 2:34

GoogleCodeExporter commented 9 years ago
I tested 1.3.7. This issue is not resolved. 

Here's my report on version 1.3.7:
1. With "auto-answer with wired headset" checked, the incoming call is not
auto-answered. After manually answering the call, volume is muted.
2. The short workaround from comment 24 doesn't work now.
3. The original double down/up vol change from comment 5 doesn't work now 
either.

Original comment by davestec...@gmail.com on 28 Jan 2010 at 3:16

GoogleCodeExporter commented 9 years ago
I don't know why the workarounds ceased to work.

Auto-answer with wired handset rings for 10 seconds before answering. To 
function as a 
workaround for this issue you would have to use it with a silent ringer for SIP 
calls.

Original comment by pmerl...@googlemail.com on 29 Jan 2010 at 9:28

GoogleCodeExporter commented 9 years ago
> Auto-answer with wired handset rings for 10 seconds before answering.

Yes, this works.

BTW, is it possible to make the changes mentioned in issue 270?

Thanks again!

Original comment by davestec...@gmail.com on 31 Jan 2010 at 4:41

GoogleCodeExporter commented 9 years ago
That were the changes of comment #10, #14, and #18. They did not help with this 
issue.

Original comment by pmerl...@googlemail.com on 1 Feb 2010 at 9:19

GoogleCodeExporter commented 9 years ago
Hi everybody.

I have the same problem with Samsung I5700. The volume of the headset is very, 
very low (not depending on the media volume)

Original comment by raspiele...@gmail.com on 24 Jun 2010 at 7:35