joelf68 / imsdroid

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

Samsung Galaxy S audio problem and resolution #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to launch IMSDroid rev.188 on a Galaxy S phone faced the following 
problem - audio was recording only for a small period of time, then silence for 
ever. Further study showed, that algorithm used in IMSDroid was ok by itself if 
run separately for recording, but as soon as it was used in IMSDroid, the 
recording didn't produce the needed results. I have taken a look into the code, 
set some debug points and found out that the read method of AudioRecord was fed 
with zeroes by the phone itself, similar situation was  discussed in Android 
Issue 8187, but there people were not able to record a normal phone call on 
some modern Android devices. I further studied the code and found that you call 
audioManager.setMode(AudioManager.MODE_IN_CALL) in couple places, which did not 
actually serve any visible purposes, so I commented that out - and what a 
surprise! Everything works now! Seems like phone manufacturers somehow try to 
fight the voice recorders so they stop providing audio as soon as they know a 
phone is in the call mode. Attached is the patch fixing the issue, if there is 
no particular need in having this setMode call, please apply it.

Original issue reported on code.google.com by volkov.r...@gmail.com on 8 Sep 2010 at 3:37

Attachments:

GoogleCodeExporter commented 9 years ago
Here's a link to the Android issue 8187 - 
http://code.google.com/p/android/issues/detail?id=8187

Original comment by volkov.r...@gmail.com on 8 Sep 2010 at 3:40

GoogleCodeExporter commented 9 years ago
This is the only solution I've found to route the sound to the earpiece.
Do you have any alternative solution?

Original comment by boss...@yahoo.fr on 8 Sep 2010 at 10:03

GoogleCodeExporter commented 9 years ago
Definitely I do not have any earpiece solutions at the moment, thanks for 
clarifying the purpose of that call. Let's keep it as a possible patch for 
those who experience problems with recording on new devices, then. Until we 
find out what other ways we have to route or fix the sound. At the moment, 
everything I needed was hearing the Galaxy S mic in the SIP call, and I have it 
now.

Original comment by volkov.r...@gmail.com on 9 Sep 2010 at 6:55

GoogleCodeExporter commented 9 years ago
There is no relation with the issue but is it possible to test the pre-release 
version (http://imsdroid.googlecode.com/svn/trunk/debug/imsdroid-1.0.pre.apk) 
on your Galaxy S to see if front facing camera works?

Original comment by boss...@yahoo.fr on 14 Sep 2010 at 9:59

GoogleCodeExporter commented 9 years ago
Fixed in 1.0.296.

Original comment by boss...@yahoo.fr on 5 Oct 2010 at 4:59