Closed Bug 755405 Opened 13 years ago Closed 10 years ago

B2G Telephony: mic is not working on ICS SGS2

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-kilimanjaro:-, blocking-basecamp:-)

RESOLVED WONTFIX
blocking-kilimanjaro -
blocking-basecamp -

People

(Reporter: etienne, Unassigned)

Details

(Keywords: regression)

Attachments

(3 files)

ICS flashed. Tested on a phone call.
Etienne, which Gecko revision is this based on? Please always include this. Also, if you can. please enable DEBUG = true in RadioInterfaceLayer.js and attach the logcat output. Thanks! Hsinyi, could you take a look at this, perhaps? I wonder if this is a regression from your active call / audio patches.
Keywords: regression
I just discussed with Shian-Yow. Thanks for his information that this issue, mic not working on ICS, has been there since Gecko was ported on ICS. This issue looks like not a regression but a problem on ICS.
Summary: Regression: mic is not working on galaxy S2 anymore → B2G Telephony: mic is not working on galaxy S2 ICS
Apparently the issue was narrowed to an ICS issue. FWIW the gecko changeset was 0c78207fc93f. Thanks for the feedback, I'll work on a nexus s for now :)
flagging blocking-k9o. certainly a blocker to ship.
blocking-kilimanjaro: --- → ?
Summary: B2G Telephony: mic is not working on galaxy S2 ICS → B2G Telephony: mic is not working on ICS
This issue only happens at SGS2 ICS, on Nexus S ICS it's working fine.
Summary: B2G Telephony: mic is not working on ICS → B2G Telephony: mic is not working on ICS SGS2
This is the log captured on SGS2 phone.
blocking-basecamp: --- → +
blocking-kilimanjaro: ? → +
Depends on: 763061
This affects otoro too, so it's super-blocking.
This looks like same issue as bug 763061. For Otoro, it can be fixed by setting correct mMicMute value for IN_CALL state in AudioHardware.cpp of framework code. However, we cannot do same way for SGS2 since that part was binary only. Fabrice made a fix in Gaia to force the mic to be unmuted when starting a call.
The gaia fix for Otoro does not work for SGS2, should be a different issue then.
No longer depends on: 763061
Michael Wu suggested a way to fix it, but it requires local fork to patch framework code on Audio system. Also to note that the video play volume was lowered after using extracted audio_policy.exynos4.so. I list it here for your reference in case someone needs it. 1. Patch at device/samsung/galaxys2/extract-files.sh diff --git a/extract-files.sh b/extract-files.sh index 8fe149b..1910e31 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -249,6 +249,7 @@ COMMON_HW=" alsa.default.so audio.a2dp.default.so audio_policy.default.so + audio_policy.exynos4.so audio.primary.default.so audio.primary.exynos4.so audio.primary.goldfish.so 2. Patchs at frameworks/base diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 6a15f6e..34aea4a 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -69,6 +69,8 @@ public: // in the past inPastMs milliseconds static status_t isStreamActive(int stream, bool *state, uint32_t inPastMs = 0); + static status_t isSeparatedStream(audio_stream_type_t stream); + // set/get audio hardware parameters. The function accepts a list of parameters // key value pairs in the form: key1=value1;key2=value2;... // Some keys are reserved for standard parameters (See AudioParameter class). diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 7b14c18..df4090f 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -732,6 +732,10 @@ status_t AudioSystem::isStreamActive(int stream, bool* state, uint32_t inPastMs) return NO_ERROR; } +status_t AudioSystem::isSeparatedStream(audio_stream_type_t stream) +{ + return true; +} void AudioSystem::clearAudioConfigCache() {
BTW, this should not be blocking anything. We are not shipping the sgs2 and this is a sgs2 specific problem.
blocking-basecamp: + → ?
blocking-kilimanjaro: + → ?
blocking-basecamp: ? → -
blocking-kilimanjaro: ? → -
(In reply to Shian-Yow Wu from comment #10) > Michael Wu suggested a way to fix it, but it requires local fork to patch > framework code on Audio system. Also to note that the video play volume was > lowered after using extracted audio_policy.exynos4.so. > I list it here for your reference in case someone needs it. > > … I tried the 2 patches on my own copy of B2G and now it *works for me* after: - recovering the previous image of ICS. - running again the extract-files.sh in the galaxy-s2 directory as done by the config.sh script the first time. - building & flashing.
Can somebody detail why we need to add this function, was this function an expected symbol of audio_policy.exynos4.so or just a way to fix the video volume ? This patch should be submitted to android repository mirrored by linaro.org by following the commit rules http://source.android.com/source/submit-patches.html
Attachment #646936 - Flags: review?
List an additional library needed to handle the microphone.
Attachment #646937 - Flags: review?
Requesting review from no-one is probably not going to be effective. Mwu, who's the right person to review this patch?
Nicolas, this is not gecko code, so you should do a Pull Request on github.
We're using upstream repos for the code that this patch touches so pull requests won't be effective without forking the repos in question first.
Attachment #646936 - Flags: review?
Attachment #646937 - Flags: review?
What is the right approach for this contributor? Should they track down the correct upstream repo, and submit the pull-request directly against it?
(In reply to Nicolas B. Pierron [:pierron] from comment #13) > Created attachment 646936 [details] [diff] [review] > Add isSeparatedStream to the AudioSystem class. (In reply to Nicolas B. Pierron [:pierron] from comment #14) > Created attachment 646937 [details] [diff] [review] > Add missing library needed to handle the MIC of SGS2 Just to clarify, these 2 patches are extracted from comment #10 and put as attachment to this Bug.
I was tracking some audio problem with the SGS2 and once fixed I realized that it was affecting the microphone too. I have a fix for this bug so I would like to close it. As comment #10 suggests, the problem was a symbol required by the Samsung's Audio System HAL that is not part of the AOSP libmedia. So I forked AOSP libmedia, branch: android-4.0.4_r1.2 (that is included in Linaro's frameworks/base.git repository [1]) and implemented the symbol as the people of Cyanogenmod did [2]. This problem is probably happening on the Nexus, so this fix should be applied to this phone too (I don't have one to test it). This modified libmedia is right now under my github account [3], so as you already did before with my skia-b2g-sgs2, someone from b2g team have to fork it from there. I have pull-requested b2g-manifest and android-device-galaxys2 to point to the new libmedia fork, and to add the requiered Samsung's audio binary (audio_policy.exynos4.so) to the extract-files.sh script. Michael, I'm always bothering you with these kind of stuff :P... so if there's someone else that could help/review it, let me know!! (dhylands sometimes helped me too) [1] http://android.git.linaro.org/gitweb?p=platform/frameworks/base.git;a=tree;f=media/libmedia;h=25e169d6790e86160048001ad9e9375d6a156c5e;hb=df331873c8576e0ae34ae1ee3cc258beed373535 [2] http://review.cyanogenmod.org/#/c/15566/1/media/libmedia/AudioSystem.cpp [3] https://github.com/atilag/android-frameworks-base-libmedia-samsung
Flags: needinfo?(mwu)
I was tracking some audio problem with the SGS2 and once fixed I realized that it was affecting the microphone too. I have a fix for this bug so I would like to close it. As comment #10 suggests, the problem was a symbol required by the Samsung's Audio System HAL that is not part of the AOSP libmedia. So I forked AOSP libmedia, branch: android-4.0.4_r1.2 (that is included in Linaro's frameworks/base.git repository [1]) and implemented the symbol as the people of Cyanogenmod did [2]. This problem is probably happening on the Nexus, so this fix should be applied to this phone too (I don't have one to test it). This modified libmedia is right now under my github account [3], so as you already did before with my skia-b2g-sgs2, someone from b2g team have to fork it from there. I have pull-requested b2g-manifest and android-device-galaxys2 to point to the new libmedia fork, and to add the requiered Samsung's audio binary (audio_policy.exynos4.so) to the extract-files.sh script. Michael, I'm always bothering you with these kind of stuff :P... so if there's someone else that could help/review it, let me know!! (dhylands sometimes helped me too) [1] http://android.git.linaro.org/gitweb?p=platform/frameworks/base.git;a=tree;f=media/libmedia;h=25e169d6790e86160048001ad9e9375d6a156c5e;hb=df331873c8576e0ae34ae1ee3cc258beed373535 [2] http://review.cyanogenmod.org/#/c/15566/1/media/libmedia/AudioSystem.cpp [3] https://github.com/atilag/android-frameworks-base-libmedia-samsung
Flags: needinfo?(mwu) needinfo?(mwu) → needinfo-
tried patch from message #10 on current git state 1. mic mute during call problem solved 2. no ring sound when incoming call problem appear someone, please, help solve this issue no ring sound also when trying to select ringtone and when sms arrives i am pretty sure only this patch causes no ring sound, because tried to flash back not patched image and there was ring sound (but no mic) and applied patch on fresh tree, build and flash - and ring sound disappear (but mic working)
Guessing component. Reassign as necessary.
Component: General → Gaia::Dialer
Is this problem solved already?
I don't think we support this device anymore. Hence, this bug is out of date and we suspect that it's no longer valid. If you think this is in error, please reopen it.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: