Closed Bug 1087200 Opened 10 years ago Closed 10 years ago

Behavior is not consistent while playing music and ringtones

Categories

(Firefox OS Graveyard :: AudioChannel, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:2.1+, b2g-v2.0 affected, b2g-v2.1 affected, b2g-v2.2 unaffected)

RESOLVED DUPLICATE of bug 1043762
blocking-b2g 2.1+
Tracking Status
b2g-v2.0 --- affected
b2g-v2.1 --- affected
b2g-v2.2 --- unaffected

People

(Reporter: vasanth, Assigned: rlin)

References

Details

(Whiteboard: [caf priority: p2][CR 744388])

Attachments

(1 file)

46 bytes, text/x-github-pull-request
squib
: review-
Details | Review
[Blocking Requested - why for this release]: Steps to reproduce: -------------------------- 1.Start playback by launching the music app 2.Now navigate to settings->sound->ringtones and start playing a ring tone. 3.Playback is stopped and ringtone is heard 4.Now go back to Menu->music app. Music playback starts again 5.Then come back to Settings->sound->ringtones 6.Observe that audio playback and ringtone both heard on device #3 and #6 are not consistent. Please confirm if this is an issue? Also we really need some doc to know the expected behaviors in cases like this? There are different sounds (music, voice call, ringtones etc.,) and different devices (headset, handset, speaker etc.,) where any sound can be started in any order and doc should state expected behavior in each case. We see the FFOS audio channel behavior is different in some cases when compared to Android, so we can't use Android audio channel docs here.
On step 5, if it leaves "Select Sound" menu and re-enter again, The music/ringtone audio sound won't mix.
Hi Alive, What's different on the step 5: "Select Sound" just show up or re-enter again?
Flags: needinfo?(alive)
QA, has this happened on previous releases? 2.1 CC blocker = 2.1+
blocking-b2g: 2.1? → 2.1+
Keywords: qawanted
Whiteboard: [CR 744388]
Whiteboard: [CR 744388] → [caf priority: p2][CR 744388]
It's really to reproduce this doing the following. 1. Launch both music app and Settings app. 2. Play some music the hold the home button to go to card view. 3. Switch to Settings and play a ringtone. 4. Hold home to go back to card view and music will automatically play again 5. Tap on the Settings card and play a ring tone. Results: Both instances of audio will play at the same time. Tested with Full Flash on 319mb using Engineering builds This bug repro's on Flame KK builds: Flame 2.1 KK, Flame 2.0 KK, Flame 2.0 Base Actual Results: Able to get the music to play over ringtone audio. Repro Rate: 6/6 Environmental Variables: Device: Flame 2.1 KK BuildID: 20141022081833 Gaia: 734d3547fb6c65e8bc4dd1a52b26f70bdfee7474 Gecko: 9646e94a041c Version: 34.0 (2.1) Firmware: V188 User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0 ----------------------------------------------------------------- Environmental Variables: Device: Flame 2.0 KK BuildID: 20141022081832 Gaia: ec722129a962704fda0dd5f39e7efd01261ae946 Gecko: 52280df0e39f Version: 32.0 (2.0) Firmware: V188 User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0 ----------------------------------------------------------------- Environmental Variables: Device: Flame 2.0 Base BuildID: 20141016183911 Gaia: 8c5c956ee6909408e29f375cc7d843a03d92f3d8 Version: 32.0 (2.0) Firmware: V188 User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0 ----------------------------------------------------------------- ----------------------------------------------------------------- This bug does NOT repro on Flame kk build: Flame 2.2 KK Actual Result: Audio channels correctly switch when playing music then playing ringtones. Repro Rate: 0/5 Environmental Variables: Device: Flame 2.2 KK BuildID: 20141021230530 Gaia: 4d7f051cede6544f4c83580253c743c22b0cb279 Gecko: ae4d9b4ff2ee Version: 36.0a1 (2.2) Firmware: V188 User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmercado)
Keywords: qawanted
QA Contact: croesch
Flags: needinfo?(jmercado) → needinfo?(ktucker)
Priority: -- → P1
Transfer ni to Dominic!
Flags: needinfo?(alive) → needinfo?(dkuo)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Flags: needinfo?(slee)
Hi Bobby, I think Randy is looking this bug or do you need any help from me?
Flags: needinfo?(slee) → needinfo?(bchien)
Randy, Assigning this to you as you are helping with investigation here. Can you please share an eta here given we have to resolve CAF issues blocking CS in the next few days...
Assignee: nobody → rlin
Flags: needinfo?
(In reply to StevenLee[:slee] from comment #6) > Hi Bobby, > I think Randy is looking this bug or do you need any help from me? Steven, just a reminder that we should take this. I will ask Dominic for evaluation. thanks.
Flags: needinfo?(bchien)
Randy, Any update? Could you directly discuss this issue with Dominic? Thanks
Flags: needinfo?(rlin)
Hi Dominic, Please help to check this, thanks a lot.
Assignee: rlin → dkuo
Flags: needinfo?(rlin)
Flags: needinfo?
This is probably another regression(bug 1086280 comment 7) that caused by the new window management from v2.0. Before v2.0, the system app used to close the inline activity window(here is the ringtone pick activity) after it goes to background, or the user press the home button. From v2.0, we keep the inline activity window with the caller app window(bug 1028502), that means for the inline activities, if we want to keep the behaviour - closed immediately after it goes to background, then the apps needed to handle this case by themselves, that's, the ringtone app needs to listen to visibility changes and close itself if it's in background. I will attach a patch later and probably needinfo from ux people to confirm my suggestion fix.
Flags: needinfo?(dkuo)
See Also: → 1086280
Attached file patch
Jim, I have commented the root cause in comment 11 and hope my fix make sense, would you please review this? thanks.
Attachment #8512450 - Flags: review?(squibblyflabbetydoo)
Katie, would you please read comment 11 and see if I am doing right for this ringtones issue? thanks!
Flags: needinfo?(kcaldwell)
Comment on attachment 8512450 [details] [review] patch It seems like this is actually an AudioChannel bug, and not something we need to change in the ringtones app. The ringtones app makes a special effort to block background audio from playing while we're previewing a ringtone. It's possible we're doing something wrong there, but otherwise, I think the fix for this should be in the AudioChannel code. That said, if an AudioChannel fix for this is too complex for 2.1, I wouldn't mind adding this as a temporary workaround. Also, see my comments on GitHub if we ultimately do decide to use this patch.
Attachment #8512450 - Flags: review?(squibblyflabbetydoo) → review-
(In reply to Jim Porter (:squib) from comment #14) > Comment on attachment 8512450 [details] [review] > patch > > It seems like this is actually an AudioChannel bug, and not something we > need to change in the ringtones app. The ringtones app makes a special > effort to block background audio from playing while we're previewing a > ringtone. It's possible we're doing something wrong there, but otherwise, I > think the fix for this should be in the AudioChannel code. > > That said, if an AudioChannel fix for this is too complex for 2.1, I > wouldn't mind adding this as a temporary workaround. > > Also, see my comments on GitHub if we ultimately do decide to use this patch. Thanks Jim, it make sense to fix this issue in AudioChannel if ringtones app already have the logic for audio competing, so I will just leave my patch for 2.1 if needed. Randy, would you please see if AudioChannel could do something for this issue? thanks.
Assignee: dkuo → rlin
I can't reproduce this on master, probably because it has bug 1043762, which hasn't been uplifted yet.
I think it's not easy to have a quick fix on audiochannelServices for this kind of visibility problem. In the audioChannelServices, we already has a lot of hack for those competing rule. And it's easy to introduce another side effect even solve this problem. In 2.2, Dominic and I already have plan to do the refactor for audiochannelServices.(Bug 1089539).
(In reply to Randy Lin [:rlin] from comment #17) > I think it's not easy to have a quick fix on audiochannelServices for this > kind of visibility problem. I think we can actually fix this by uplifting bug 1043762 (plus bug 1091137, which fixes an issue in that patch). It seems like this is an issue with how AudioContexts are created, but bug 1043762 changes how we do that, so it fixes the problem for me at least...
vasanth, can you please check if the patch of bug 1043762 fixes this bug?
Flags: needinfo?(vasanth)
Issue fixed with patches from bug 1043762 and bug 1091137! At any time, only ringtone or music is heard. In ringtone page, last music is heard till we select ringtone again. I guess this is fine.
Flags: needinfo?(vasanth)
Hi Bobby, As comment 20, can you please uplift the patches in bug 1043762 and bug 1091137. Thanks.
Flags: needinfo?(bchien)
Bhavana, please help uplift patch. many thanks.
Flags: needinfo?(bchien) → needinfo?(bbajaj)
Depends on: 1043762, 1091137
Flags: needinfo?(bbajaj)
According to comment 20, close this bug as duplicate of 1043762. And Randy will do followup task in bug 1089539.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
No longer blocks: CAF-v2.1-CC-metabug
Flags: needinfo?(kcaldwell)
QA Contact: croesch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: