Closed GoogleCodeExporter closed 9 years ago
Using the same version of IMSDroid, I am experiencing the same problem placing
calls to other SIP phones and to a Linux SIP client (LinPhone).
Analyzing the RTP stream with Wireshark shows that only silence is transmitted
from the Samsung Galaxy S I9000.
Calls made using Sipdroid on the Samsung Galaxy S I9000 don't have the problem,
i.e. audio works both ways.
Original comment by a.c.kal...@gmail.com
on 8 Feb 2011 at 5:00
I was able to restore 2-way audio (to back speaker only) by temporarily
disabling all occurrences of audioManager.setRouting() and
audioManager.setMode() in ScreenAV::setSpeakerphoneOn() and
ScreenAV::setInCallMode() .
From what I've read in the source code for libaudio on the Nexus S, I think
audioManager.setMode(AudioManager.MODE_IN_CALL) may cause the microphone to be
muted, since in this mode, mic muting is controlled by the RIL (over which we
have no control, can anyone spell 'proprietary'?).
Original comment by a.c.kal...@gmail.com
on 9 Feb 2011 at 10:53
Original comment by boss...@yahoo.fr
on 10 Feb 2011 at 12:04
Thanks for taking the time to look into this issue.
From trying some other SIP clients and looking at their code, it appears that
the only way to keep the microphone unmuted when switching between external
speaker and earpiece is to completely stop recording audio, switch the phone
temporarily to MODE_IN_CALL and back to MODE_NORMAL, then start recording again.
This will require some refactoring of MyProxyAudioProducer, I'll try to come up
with a patch.
Seems that this issue is in some way a reappearance of Issue 53, the
anti-phone-call-recording police have tightened the noose again.
Original comment by a.c.kal...@gmail.com
on 11 Feb 2011 at 2:18
On second thought, it might be better to use a wrapper class around AudioRecord
which (periodically) polls the speakerphone state and restarts recording when
neccessary. That way only minimal change is needed to MyProxyAudioProducer and
it can be easily reverted if/when this stupid Android policy^Wbug finally gets
fixed.
Original comment by a.c.kal...@gmail.com
on 11 Feb 2011 at 5:02
I am having same scenario but with low speech output. works both way perfecly.
the sound is not myuch audible in normal.
Original comment by er.harvi...@gmail.com
on 11 Feb 2011 at 8:07
Ok here is my first rough cut at a patch, tested on Galaxy S I9000, Android
2.2.1.
Audio works both ways, and earpiece / back speaker switching works also.
I'm also including a debug apk (API 5, for Android 2.0 and up) for those who
would like to try it. Please report if it breaks anything on other phones or on
older versions of Android.
Original comment by a.c.kal...@gmail.com
on 11 Feb 2011 at 9:52
Attachments:
Remaining issue is stuttery audio (in calls to some clients), which I
experienced already before any patching (with only audio routing disabled, see
my comment above).
This is probably an entirely different issue.
Original comment by a.c.kal...@gmail.com
on 11 Feb 2011 at 10:07
Cleaned-up patch: strip redundant comments (10KB less), always use class member
routingchanged, move check to end of method to save as much recorded data as
possible before recording restart, use project coding style.
Original comment by a.c.kal...@gmail.com
on 14 Feb 2011 at 3:13
Attachments:
To explain my suggestion of this somewhat heavy-handed approach: I get a very
strong feeling that some manufacturers (of which I'm quite certain Samsung is
one) will go all the way to make sure no app can record ongoing phone
conversations. Every app out there which I know could successfully record audio
from a phone conversation at some time in the past has been met by a swift
response from Samsung, blocking that particular workaround in their next
firmware update. Same seems to hold for the Nexus S. Maybe this is some legal
requirement for FCC/gov't approval these companies feel obliged to honour or
some such.
So the only way I think will work for most devices is to stop recording
altogether, change audio routing, then indicate to the RIL(!) that we really
don't intend to record an ongoing GSM or CDMA phone call (and also to make the
audio routing change 'stick') by temporarily switching to MODE_IN_CALL and back
to MODE_NORMAL, then start recording again.
Original comment by a.c.kal...@gmail.com
on 1 Mar 2011 at 12:51
Fixed in 2.0:
http://code.google.com/p/imsdroid/source/browse/#svn%2Fbranches%2F2.0
Will be part of the next release
Original comment by boss...@yahoo.fr
on 2 Mar 2011 at 3:29
Original comment by boss...@yahoo.fr
on 23 Jul 2011 at 5:02
Original issue reported on code.google.com by
nicolas....@gmail.com
on 8 Feb 2011 at 2:25