Closed
Bug 1038749
Opened 10 years ago
Closed 10 years ago
[B2G][Audio Channel]After playing sound through front speaker, all sound will play through front speaker instead of speakerphone
Categories
(Firefox OS Graveyard :: AudioChannel, defect)
Tracking
(blocking-b2g:2.0+, b2g-v1.4 unaffected, b2g-v2.0 verified, b2g-v2.1 verified)
Tracking | Status | |
---|---|---|
b2g-v1.4 | --- | unaffected |
b2g-v2.0 | --- | verified |
b2g-v2.1 | --- | verified |
People
(Reporter: rkuhlman, Assigned: jaoo)
References
Details
(Keywords: regression, Whiteboard: [2.0-daily-testing])
Attachments
(3 files, 1 obsolete file)
Once the front speaker has been used, all sound will be broadcast from the front speaker. The alarms, notifications, messages, music, video and ringtone are all affected. After a few minutes, the rear speakerphone will start working again.
Repro Steps:
Prerequisite: Have a second phone with a valid working phone number
1) Update a Flame to BuildID: 20140715000201
2) Call DuT from second phone
3) Answer call on DuT
4) Terminate call
5) Call DuT from second phone
Actual:
Ringtone now plays through front speaker, and is now much quieter
Expected:
Media apps, alerts, and ringtones all play through the rear speakerphone
v2.0 Environmental Variables:
Device: Flame v2.0
BuildID: 20140715000201
Gaia: 2c6c413ed729d465c52d6c2d5d458e2eee79e956
Gecko: d32649a24965
Version: 32.0a2
Firmware Version: v122
Notes:
Repro frequency: 100%
See attached: logcat
Reporter | ||
Comment 1•10 years ago
|
||
Issue also occurs in v2.1
Master M/C Environmental Variables:
Device: Flame MAster M/C
BuildID: 20140715040206
Gaia: 46cd188fdda2397d2b8f3303a184dcd52952e2b2
Gecko: e032c429908b
Firmware Version: v122
adding regression tags
QA Whiteboard: [QAnalyst-Triage?]
status-b2g-v2.0:
--- → affected
status-b2g-v2.1:
--- → affected
Flags: needinfo?(pbylenga)
Whiteboard: [2.0-daily-testing]
Comment 2•10 years ago
|
||
QAWanted to do the branch checks.
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(pbylenga)
Keywords: regression,
regressionwindow-wanted
Comment 3•10 years ago
|
||
This bug repro's on: Flame 2.1 Master, Flame 2.0 and Buri 2.1
Actual Results: Calling the Flame device once will use the front speaker and sound appropriate. Hanging up and calling a second time will result in the back speaker being used for the ring tone and the audio will be super quiet from the rear speaker.
Environmental Variables:
Device: Flame Master
Build ID: 20140715070915
Gaia: 46cd188fdda2397d2b8f3303a184dcd52952e2b2
Gecko: 835e22069c1a
Version: 33.0a1 (Master)
Firmware Version: v122
-----------------------------------------------
Environmental Variables:
Device: Flame 2.0
Build ID: 20140715082614
Gaia: 391258012d09cc1dde9a6f3f9a2078739043d0d6
Gecko: 7025d37f4b06
Version: 32.0a2 (2.0)
Firmware Version: v122
-----------------------------------------------
Environmental Variables:
Device: Buri Master
Build ID: 20140715070915
Gaia: 46cd188fdda2397d2b8f3303a184dcd52952e2b2
Gecko: 835e22069c1a
Version: 33.0a1 (Master)
Firmware Version: v1.2device.cfg
-----------------------------------------------
-----------------------------------------------
This bug does NOT repro on: Flame 1.4
Actual Result: Each phone call ringtone plays through the correct speaker.
Environmental Variables:
Device: Flame 1.4
Build ID: 20140715071209
Gaia: 7e49e66ae1f8f48bb23a4a551a8e393b0ae8a228
Gecko: 37382637c713
Version: 30.0 (1.4)
Firmware Version: v122
QA Whiteboard: [QAnalyst-Triage?]
status-b2g-v1.4:
--- → unaffected
Flags: needinfo?(jmitchell)
Keywords: qawanted → regression
QA Contact: croesch
Comment 4•10 years ago
|
||
nomming as 2.0 - for the breaking of a major feature (speakers). This bug results in sounds (alarms) playing at a less-than-expected volume creating the potential for a multitude of problems for the user)
blocking-b2g: --- → 2.0?
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
Keywords: regressionwindow-wanted
Updated•10 years ago
|
QA Contact: croesch → pcheng
Comment 5•10 years ago
|
||
b2g-inbound regression window:
Last Working Environmental Variables:
Device: Buri
Build ID: 20140714035114
Gaia: 2038b76e5bd4632d12944f9b3d835314fec9de39
Gecko: 189d66b64dfd
Version: 33.0a1 (Master)
Firmware Version: v1.2device.cfg
First Broken Environmental Variables:
Device: Buri
BuildID: 20140714042214
Gaia: ee645d7d0306d972cb3e1f9482278ffbf5e49c46
Gecko: eb677df545a2
Version: 33.0a1 (Master)
Firmware Version: v1.2device.cfg
First broken gecko & last working gaia - issue does NOT repro
Gaia: 2038b76e5bd4632d12944f9b3d835314fec9de39
Gecko: eb677df545a2
First broken gaia & last working gecko - issue DOES repro
Gaia: ee645d7d0306d972cb3e1f9482278ffbf5e49c46
Gecko: 189d66b64dfd
Gaia pushlog:
https://github.com/mozilla-b2g/gaia/compare/2038b76e5bd4632d12944f9b3d835314fec9de39...ee645d7d0306d972cb3e1f9482278ffbf5e49c46
Broken by Bug 1029581.
Note:
On Buri this bug reproduces a little differently than on the Flame; On Buri there is NO sound at all when executing step 5 of original STR.
Comment 6•10 years ago
|
||
broken by bug 1029581?
Blocks: 1029581
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell) → needinfo?(josea.olivera)
Comment 7•10 years ago
|
||
Sorry, it should be bug 1016277 that caused this bug.
Comment 8•10 years ago
|
||
Nothing to see here....
broken by bug 1016277?
Assignee | ||
Comment 9•10 years ago
|
||
I guess you meant bug 1016277. Well I have not noticed this issue while working on that bug but It might be a regression caused by that bug. We have been changing a bit the policy for the use of the telephony audio channel but I don't see any reason this bug to cause all the sounds being reproduced through the telephony audio channel once the user makes a phone call. Leave the ni? flag and take a look a it tomorrow.
Marco do you see any relationship between the change made in bug 1016277 and this issue? Thanks.
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(mchen)
Assignee | ||
Comment 10•10 years ago
|
||
I do reproduce the issue. It seems the second call plays the ringtone through the telephony audio channel (audio plays on the earpiece instead of the speaker).
Assignee | ||
Comment 11•10 years ago
|
||
Mmmm, that's weird. The ringtone is always played through the ringer audio channel (see [1]) but the audio plays through the earpiece the second time the ringtone plays.
[1] E/GeckoConsole( 293): Content JS LOG at app://system.gaiamobile.org/js/dialer_agent.js:166 in da_startAlerting: this._player.mozAudioChannelType is ringer
Assignee | ||
Comment 12•10 years ago
|
||
I set the audio channel type back to 'normal' once the call finished but the ringtone for the next call still plays on the earpiece.
Flags: needinfo?(anthony)
Comment 13•10 years ago
|
||
Hi :jaoo,
When you reproduce this bug could you perform 'dumpsys' in the adb shell?
That command will show you what stream type is on going and what force use is triggered.
Flags: needinfo?(mchen)
Comment 14•10 years ago
|
||
I gave a try and found some result from dumpsys.
Stream volume refCount muteCount
00 (voice) 1.000 01 00
01 0.501 00 00
02 (ring) 0.668 01 00
The result above is gathered when phone is ringing in step 5.
And it show that one telephony channel is still on going.
(even in step 4, there is still a telephony stream)
Not sure who created a audio stream with telehpony channel but not release.
I suspe
Updated•10 years ago
|
blocking-b2g: 2.0? → 2.0+
Comment 15•10 years ago
|
||
I've been testing in the hamachi device with v2.1 and the callscreen app, but I didn't find anything that can explain this behaviour. Below, I paste the results of the dumpsys command with the different steps that I made to reproduce the bug.
I noticed that just after a new notification is received then everything works fine, as you can see on the last output.
1. After the first call is finished:
Stream volume refCount muteCount
00 1.000 01 00
01 1.000 00 00
02 1.000 00 00
03 1.000 00 00
04 1.000 00 00
2. At this momento, I can see the callscreen app running, but nothing sounds:
Stream volume refCount muteCount
00 1.000 01 00
01 1.000 00 00
02 1.000 01 00
03 1.000 00 00
3. After the missedCall notification is received and its sound tone is emitted correctly:
Stream volume refCount muteCount
00 1.000 00 00
01 1.000 00 00
02 1.000 00 00
03 1.000 00 00
I hope this can help us to progress and give further clues.
Comment 17•10 years ago
|
||
Hi all,
I found that the root cause is
The Web Audio with telephony channel in callscreen didn't release it's resource so instance of audio stream in Gecko still occupies telephony ref count.
I am suprise that callscreen app is running on the b2g process. So it makes sense to me that kill communication app can't recover this issue.
(receive a phone call and ringer is fired)
E/Cubeb_OpenSL Marco( 1624): opensl_stream_init stream type 2, id 0
(answer the phone call - ringer is closed and telphone is fired)
E/Cubeb_OpenSL Marco( 1624): opensl_stream_destroy id 0, stream 2
E/Cubeb_OpenSL Marco( 1624): opensl_stream_init stream type 0, id 1
(hang up the call - not thing happen)
(receive second phone call and ringer is fired)
E/Cubeb_OpenSL Marco( 1624): opensl_stream_init stream type 2, id 2
(answer the phone call - ringer is closed and second telphone is fired)
E/Cubeb_OpenSL Marco( 1624): opensl_stream_destroy id 2, stream 2
E/Cubeb_OpenSL Marco( 1624): opensl_stream_init stream type 0, id 3
Flags: needinfo?(josea.olivera)
Assignee | ||
Comment 18•10 years ago
|
||
(In reply to Marco Chen [:mchen] from comment #17)
> I found that the root cause is
Glad to see you are debugging this. Thanks Marco!
> The Web Audio with telephony channel in callscreen didn't release it's
> resource so instance of audio stream in Gecko still occupies telephony ref
> count.
>
> I am suprise that callscreen app is running on the b2g process. So it
> makes sense to me that kill communication app can't recover this issue.
So the next question is how we can release the use of the telephony audio channel? I talked to :ehsan and the AudioContext object lives as the window does and there is no way to explicitly destroy them after using it.
Flags: needinfo?(mchen)
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(josea.olivera)
Comment 19•10 years ago
|
||
(In reply to José Antonio Olivera Ortega [:jaoo] from comment #18)
> So the next question is how we can release the use of the telephony audio
> channel? I talked to :ehsan and the AudioContext object lives as the window
> does and there is no way to explicitly destroy them after using it.
I found two clues -
1. [1] will allocate a new AudioContext object and hold it until next time [1] is hit again.
2. I found first AudioContext from first call will be garbage collected when second call is answered.
So maybe you need to find a timing for setting _ac to null so it get chance to be involved in garbage collection. But it still depend on timing of performing garbage collection.
For web audio itself, I am not familiar with it. So no suggestion right now.
[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/callscreen/js/audio_competing_helper.js#L71
Flags: needinfo?(mchen)
Assignee | ||
Comment 20•10 years ago
|
||
Marco, try this please. It seems it fixes the issue.
Flags: needinfo?(mchen)
Assignee | ||
Comment 22•10 years ago
|
||
(In reply to Marco Chen [:mchen] from comment #21)
> It is not working for me.
Mmm, I applied this patch and the ringtone for the second call plays on the rear speaker which is what It was not happening. This patch worked for me so maybe we are testing under different circumstance. I'm using flame BTW.
Well I did what you suggested at comment 19. I'm out of ideas.
Comment 23•10 years ago
|
||
Hi,
with the Jose Antonio patch I cannot reproduce the issue on hamachi device with v2.1.
Comment 25•10 years ago
|
||
Hi QA friend,
Since comment 22 and comment 23 show the patch can fix the bug, could you help to verify it?
I am not sure why I can't get fix by that patch. Thanks.
Keywords: qawanted
Comment 26•10 years ago
|
||
(In reply to Marco Chen [:mchen] from comment #25)
> Hi QA friend,
>
> Since comment 22 and comment 23 show the patch can fix the bug, could you
> help to verify it?
> I am not sure why I can't get fix by that patch. Thanks.
Could you put the patch here into a github branch? We could help verify it if we get that.
Comment 27•10 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #26)
> Could you put the patch here into a github branch? We could help verify it
> if we get that.
Hi,
Is [1] attached to this bug enough for testing?
Or you may need to needinfo :jaoo to create suitable patch.
[1] https://bug1038749.bugzilla.mozilla.org/attachment.cgi?id=8458522
Thanks for help.
Comment 28•10 years ago
|
||
(In reply to Marco Chen [:mchen] from comment #27)
> (In reply to Jason Smith [:jsmith] from comment #26)
> > Could you put the patch here into a github branch? We could help verify it
> > if we get that.
>
> Hi,
>
> Is [1] attached to this bug enough for testing?
> Or you may need to needinfo :jaoo to create suitable patch.
>
> [1] https://bug1038749.bugzilla.mozilla.org/attachment.cgi?id=8458522
>
> Thanks for help.
jaoo - Can you post a github pull request here? My team can help test this if I get a gaia branch to test against.
Flags: needinfo?(josea.olivera)
Assignee | ||
Comment 29•10 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #28)
> jaoo - Can you post a github pull request here? My team can help test this
> if I get a gaia branch to test against.
Sure, there you go.
Attachment #8458522 -
Attachment is obsolete: true
Flags: needinfo?(josea.olivera)
Comment 30•10 years ago
|
||
After applying the patch provided at comment 29, the bug no longer reproduces.
DUT correctly plays ringtone sound from the back speaker after finishing a call.
Device: Flame
Build ID: 20140721055837
Gaia: 92c86236ee655766c0084d00b736bded0947822c
Gecko: 0dc711216018
Version: 33.0a1 (Master)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0
Updated•10 years ago
|
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell)
Comment 31•10 years ago
|
||
Hi Jose,
Mind if you can take this 2.0 blocker since you are already working on it?
Flags: needinfo?(josea.olivera)
Updated•10 years ago
|
Flags: needinfo?(scheng)
Comment 32•10 years ago
|
||
Hi Jose,
I'm going to assign this to you since the patch you provided has been verified by QA. Could you assist with moving forward? We really need this to land since it's a 2.0 blocker. :)
Assignee: nobody → josea.olivera
Assignee | ||
Comment 33•10 years ago
|
||
Just updated the PR. Let's see what the tests say.
Flags: needinfo?(josea.olivera)
Assignee | ||
Comment 34•10 years ago
|
||
Comment on attachment 8459808 [details] [review]
Pointer to Github PR https://github.com/mozilla-b2g/gaia/pull/22003
Etienne, we needed to release the AudioContext object we used for the AudioCompetingHelper object added to the callscreen app. Would you mind to review this please? Thanks!
Attachment #8459808 -
Flags: review?(etienne)
Updated•10 years ago
|
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
Updated•10 years ago
|
Attachment #8459808 -
Flags: review?(etienne) → review+
Assignee | ||
Comment 35•10 years ago
|
||
Try was green. Landed at:
https://github.com/mozilla-b2g/gaia/commit/a4778317ca9d93afb10a5281812edc31c0fc5ff6
Thanks Etienne!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Target Milestone: --- → 2.1 S1 (1aug)
Comment 36•10 years ago
|
||
Comment 37•10 years ago
|
||
This issue has been verified successfully on Flame 2.0,2.1
See attachment: Verify_video.3gp
Reproducing rate: 0/5
Flame 2.0 versions:
Gaia-Rev 8d1e868864c8a8f1e037685f0656d1da70d08c06
Gecko-Rev https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/c756bd8bf3c3
Build-ID 20141130000204
Version 32.0
Flame 2.1 versions:
Gaia-Rev ccb49abe412c978a4045f0c75abff534372716c4
Gecko-Rev https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/18fb67530b22
Build-ID 20141130001203
Version 34.0
You need to log in
before you can comment on or make changes to this bug.
Description
•