Closed
Bug 823273
Opened 12 years ago
Closed 11 years ago
[B2G][Music] Music volume does not change when a user receives a notification.
Categories
(Firefox OS Graveyard :: AudioChannel, defect)
Tracking
(blocking-b2g:koi+, firefox26 verified, b2g18 affected, b2g18-v1.0.1 affected)
People
(Reporter: croesch, Assigned: mchen)
References
Details
(Whiteboard: testrun 4, inarirun1, leorun1, leorun3, leorun4, retest_leorun4 MEDIA_RECORDING, [FT:Media Recording], [Sprint:4])
Attachments
(6 files, 12 obsolete files)
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
mchen
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mchen
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mchen
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mchen
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mchen
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0
Build ID: 20121128204232
Steps to reproduce:
1. Launch build 20121217070202 Version 18.0
2. Launch the Music app and play any song.
3. While the song is playing, send that phone a notification such as a text message.
4. When the phone receives the notification, notice that the volume level does not change so that the user can hear the notification coming in.
According to test case 3703 the volume level should fade temporarily so the user can hear the notification coming in.
Repro: 100%
Actual results:
When receiving a notification on the phone while music was playing, the user does not hear the volume fade so the notification audio is heard.
Expected results:
Music volume level should fade so that the user can hear the notification come in while listening to music.
Updated•12 years ago
|
OS: All → Gonk (Firefox OS)
Hardware: All → ARM
Assignee | ||
Comment 1•12 years ago
|
||
This is the result after landing of Bug 828200 - Incall video playback doesn't work.
In that bug, we decided to let app in foreground can always play the audio and assume that another audio source will be made by an app which takes the foreground.
An possible way is to make a new Web API for notifying the foreground app there is an channel of higher priority fired by another app. So foreground app can fade it's volume down then back. (Or do it in the Gecko.)
Maybe we should make an exception for the notification channel since that's expected to be short-lived?
An ideal solution might be to do something crazy like "turn down volume by 75% for all other channels in foreground apps when alarm or notification channel is playing. And don't adjust it at all when telephony channel is playing". But that seems too complicated for now.
Nominating in any case since we're failing a user story.
blocking-b2g: --- → tef?
We need to get an answer from someone on which user story to ignore and/or tweak here.
Flags: needinfo?(ladamski)
Comment 5•12 years ago
|
||
Peter, which user story is the correct one here?
Flags: needinfo?(ladamski) → needinfo?(pdolanjski)
So I think the two realistic options we have here is:
Keep current behavior. This means changing the user story which requires the current app to be silenced while the notification is playing.
Change behavior so that we silence the audio of the current app when the "notification" or "alarm" channels are used, but not when the "telephony" channel is used. I.e. use the old behavior for the "notification" and "alarm" channels, but use the new behavior for the "telephony" channel.
I don't know how much work this would be. Andrea, mchen, what do you think?
(In reply to Jonas Sicking (:sicking) from comment #2)
> An ideal solution might be to do something crazy like "turn down volume by
> 75% for all other channels in foreground apps when alarm or notification
> channel is playing. And don't adjust it at all when telephony channel is
> playing". But that seems too complicated for now.
This was the intended UX that I had in mind when writing the user story for sound.
Assignee | ||
Comment 8•12 years ago
|
||
This is a version for fading the volume of content/normal channels in foreground when alarm/notification channels are fired in the background.
I think fallback to comment 6 is more easy so check the faded version first.
Thanks.
Attachment #704471 -
Flags: feedback?(jonas)
Attachment #704471 -
Flags: feedback?(amarchesini)
Assignee | ||
Comment 9•12 years ago
|
||
The rough idea is
1. AudioChannelService/Agent:
a. To change getMuted() to return three states - normal, faded and mute.
b. In service, it return faded state in getMuted() when
-> checking content is normal/content in the foreground.
-> There are notification/alarm channels in playing.
2. nsHTMLMediaElement:
When faded stat is returned, reducing the volume by 75% and hook setVolume/setMuted related functions for checking faded state.
3. Camera/Phone:
Just apply the API change from AudioChannelAgent.
4. FM Radio:
Still mute the FM in faded state.
Assignee | ||
Comment 10•12 years ago
|
||
Assignee | ||
Comment 11•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #704483 -
Attachment is patch: true
Assignee | ||
Comment 12•12 years ago
|
||
Assignee | ||
Comment 13•12 years ago
|
||
Provide separated patches on different domain for easing the review process.
Assignee | ||
Comment 14•12 years ago
|
||
Comment on attachment 704484 [details] [diff] [review]
Part 3: media elment
Hi Matthew,
Could you help to give a feedback on this part of patch?
The target here is want to reduce the volume when AudioChannelService asks a channel to fade it sound temporarily.
Thanks.
Attachment #704484 -
Flags: feedback?(kinetik)
Updated•12 years ago
|
Attachment #704484 -
Flags: feedback?(kinetik) → feedback+
Comment 15•12 years ago
|
||
Fading the volume to hear the incoming notification was the original user story, however it was deemed out of scope at some point.
I don't think we should block on this.
Flags: needinfo?(pdolanjski)
Updated•12 years ago
|
blocking-b2g: tef? → -
Assignee | ||
Updated•12 years ago
|
Attachment #704471 -
Flags: feedback?(jonas)
Attachment #704471 -
Flags: feedback?(amarchesini)
Assignee | ||
Updated•12 years ago
|
Attachment #704482 -
Flags: feedback?(amarchesini)
Assignee | ||
Updated•12 years ago
|
Attachment #704483 -
Flags: feedback?(amarchesini)
Assignee | ||
Updated•12 years ago
|
Attachment #704486 -
Flags: feedback?(rlin)
Updated•12 years ago
|
Attachment #704486 -
Flags: feedback?(rlin) → feedback+
Comment 16•12 years ago
|
||
Comment on attachment 704482 [details] [diff] [review]
Part 1: Audio Channel
Review of attachment 704482 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/audiochannel/AudioChannelService.cpp
@@ +88,5 @@
> AudioChannelType aType)
> {
> AudioChannelAgentData* data = new AudioChannelAgentData(aType,
> true /* mElementHidden */,
> + AUDIO_CHANNEL_STATE_MUTED /* mMuted */);
mElementHidden => aElementHidden
mMuted => aState
@@ +141,1 @@
> AudioChannelService::GetMuted(AudioChannelAgent* aAgent, bool aElementHidden)
I think we should rename GetMuted() in GetState()
@@ +146,3 @@
> }
>
> + AudioChannelState muted = GetMutedInternal(data->mType, CONTENT_PARENT_UNKNOWN_CHILD_ID,
GetStateInternal()
@@ +188,3 @@
> }
>
> + if (muted == AUDIO_CHANNEL_STATE_NORMAL) {
if (muted != AUDIO_CHANNEL_STATE_MUTED)
@@ +191,3 @@
> MOZ_ASSERT(newType != AUDIO_CHANNEL_INT_NORMAL_HIDDEN);
> + if (ChannelsActiveWithHigherPriorityThan(newType)) {
> + muted = AUDIO_CHANNEL_STATE_MUTED;
Does it make sense to use CheckVolumeFededCondition() here too?
@@ +207,5 @@
> +
> + // Consider that audio from notification & alarm channels are with short duration
> + // so just faded the volume not pause it
> + if (mChannelCounters[AUDIO_CHANNEL_INT_NOTIFICATION].IsEmpty() &&
> + mChannelCounters[AUDIO_CHANNEL_INT_ALARM].IsEmpty()) {
What about Public Notification?
Comment 17•12 years ago
|
||
Comment on attachment 704483 [details] [diff] [review]
Part 2: IPC
Review of attachment 704483 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/audiochannel/AudioChannelServiceChild.h
@@ +35,5 @@
>
> /**
> * Return true if this type + this mozHidden should be muted.
> */
> + virtual AudioChannelState GetMuted(AudioChannelAgent* aAgent, bool aMozHidden);
GetMuted => GetState
Updated•12 years ago
|
Attachment #704482 -
Flags: feedback?(amarchesini) → feedback+
Updated•12 years ago
|
Attachment #704483 -
Flags: feedback?(amarchesini) → feedback+
Reporter | ||
Comment 18•12 years ago
|
||
In Unagi build 20130130070201 version 18.0, I'm finding that I only get audio to lower or mute if the headphones are in. If the headphones are NOT in the device, then the volume will not change if i get a text message or a phone call.
Build ID: 20130130070201
Kernel: Dec 5
Gecko http://hg.mozilla.org/releases/mozilla-b2g18/rev/4593f3e765eb
Gaia f7f5a0cd17e3d04308cc5850b254947e127122b9
In testrun 4 Fails case
https://moztrap.mozilla.org/runtests/run/712/env/296/?pagenumber=1&pagesize=100&sortfield=order&sortdirection=asc&filter-id=3703&filter-suite=124
UCID music-026
Whiteboard: testrun 4
Reporter | ||
Comment 19•12 years ago
|
||
Unagi Build: 20130304070201
Gecko http://hg.mozilla.org/releases/mozilla-b2g18/rev/bccf111e9131
Gaia 77fb74ebf3bea340be9f8f4b4c9ac9dd7c12ab0b
Kernel: Dec 5th
In this latest build, the functionality happens exactly as comment 18 describes. When no headphones are present, the music does not become quiet so that the user can hear the notification. Headphones work fine when the music decreases for a second so the incoming notification can be heard.
Reporter | ||
Comment 20•12 years ago
|
||
Inari Build: 20130418070206
Gecko http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/0c76ef5f8677
Gaia 64d5096e1746bd4b08bc1bf69844d164ac961970
Kernel: Feb 21st
For the Inari device build above, the same exact behavior occurs as described in comment 19 occurs.
status-b2g18:
--- → affected
status-b2g18-v1.0.1:
--- → affected
Whiteboard: testrun 4 → testrun 4, inarirun1
Updated•12 years ago
|
Whiteboard: testrun 4, inarirun1 → testrun 4, inarirun1, leorun1
Comment 21•11 years ago
|
||
Issue repros on
Leo Build ID: 20130610070206
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/8e3f39363c54
Gaia: ce3b99781d182ad550a325206990c249b0dbcf0e
Platform Version: 18.0
Description of issue is the same as comment 19
Whiteboard: testrun 4, inarirun1, leorun1 → testrun 4, inarirun1, leorun1, leorun3
Comment 22•11 years ago
|
||
Not blocking on this.
Updated•11 years ago
|
blocking-b2g: - → ---
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → mchen
Comment 23•11 years ago
|
||
Comment 24•11 years ago
|
||
Issue repros on
Leo Build ID: 20130625070217
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/29933d1937db
Gaia: 1436e2778b90bd74635b0b94d1cf8ccb0d71b60c
Platform Version: 18.1
When headphones are being used music will pause and play notification and then resume music. Meanwhile if no head phones are used music will continue to play at same volume with no pauses or fading out.
Reporter | ||
Updated•11 years ago
|
Whiteboard: testrun 4, inarirun1, leorun1, leorun3 → testrun 4, inarirun1, leorun1, leorun3, leorun4
Updated•11 years ago
|
Whiteboard: testrun 4, inarirun1, leorun1, leorun3, leorun4 → testrun 4, inarirun1, leorun1, leorun3, leorun4, retest_leorun4
Comment 25•11 years ago
|
||
Nothing has changed here.
Gecko http://hg.mozilla.org/releases/mozilla-b2g18/rev/282b5c37cf8d
Gaia e2ef782119b7e79fc62c48d36f0c36909d982988
BuildID 20130712070210
Version 18.0
What is the correct behavior? Can you Peter, please clarify what is supposed the correct behavior in this case?
Flags: needinfo?(pdolanjski)
Comment 26•11 years ago
|
||
Nomming for Koi as this would be a good feature to have - if in fact there is actually a feature here.
blocking-b2g: --- → koi?
Comment 27•11 years ago
|
||
(In reply to John Hammink from comment #25)
> What is the correct behavior? Can you Peter, please clarify what is
> supposed the correct behavior in this case?
I believe it currently works as expected given the original user story was deemed out of scope for 1.0.1 and never re-raised for 1.1. It is a good suggestion to add it to the backlog. I have added it into the Systems team backlog.
Flags: needinfo?(pdolanjski)
Updated•11 years ago
|
Whiteboard: testrun 4, inarirun1, leorun1, leorun3, leorun4, retest_leorun4 → testrun 4, inarirun1, leorun1, leorun3, leorun4, retest_leorun4 MEDIA_RECORDING
Comment 28•11 years ago
|
||
Nominate it to koi+ and remove the dependency on 976631 to keep this feature moving on for v1.2
blocking-b2g: koi? → koi+
No longer depends on: 876631
Comment 29•11 years ago
|
||
Correct the comment 28 about dependency. It should be 876631
Assignee | ||
Comment 30•11 years ago
|
||
Today I rebase the patches here to newest master version and fix some bugs.
Now I am modifying the test case.
Updated•11 years ago
|
Whiteboard: testrun 4, inarirun1, leorun1, leorun3, leorun4, retest_leorun4 MEDIA_RECORDING → testrun 4, inarirun1, leorun1, leorun3, leorun4, retest_leorun4 MEDIA_RECORDING, [FT:Media Recording], [Sprint:4]
Assignee | ||
Comment 31•11 years ago
|
||
Hi Baku,
Thanks for your review first and in this patch I did
1. Change getMuted to getState.
2. And states will be normal, muted and faded.
3. Only consider the faded state when notification channel is playing.
4. CheckVolumeFededCondition() will be checked when agent is on fg or bg state.
Attachment #704471 -
Attachment is obsolete: true
Attachment #704482 -
Attachment is obsolete: true
Attachment #798454 -
Flags: review?(amarchesini)
Assignee | ||
Comment 32•11 years ago
|
||
Hi Baku,
1. GetMuted => GetState
Attachment #704483 -
Attachment is obsolete: true
Attachment #798455 -
Flags: review?(amarchesini)
Assignee | ||
Updated•11 years ago
|
Attachment #798454 -
Attachment description: bug-823273-music-noti-faded-v2-audiochannel → v2 Part 1 : AudioChannel
Assignee | ||
Comment 33•11 years ago
|
||
Hi kinetik,
Please help to review this version. Thanks.
Attachment #704484 -
Attachment is obsolete: true
Attachment #798456 -
Flags: review?(kinetik)
Assignee | ||
Comment 34•11 years ago
|
||
Hi Randy,
Please help to review this part. Thanks.
Attachment #704486 -
Attachment is obsolete: true
Attachment #798457 -
Flags: review?(rlin)
Updated•11 years ago
|
Attachment #798457 -
Flags: review?(rlin) → review+
Updated•11 years ago
|
Attachment #798456 -
Flags: review?(kinetik) → review+
Assignee | ||
Updated•11 years ago
|
Component: Gaia::Music → AudioChannel
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(amarchesini)
Updated•11 years ago
|
Attachment #798455 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 35•11 years ago
|
||
Attachment #803588 -
Flags: review?(amarchesini)
Comment 36•11 years ago
|
||
Comment on attachment 798454 [details] [diff] [review]
v2 Part 1 : AudioChannel
Review of attachment 798454 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm
::: dom/audiochannel/nsIAudioChannelAgent.idl
@@ +44,5 @@
> const long AUDIO_AGENT_CHANNEL_PUBLICNOTIFICATION = 6;
>
> const long AUDIO_AGENT_CHANNEL_ERROR = 1000;
>
> + const long AUDIO_AGENT_STATE_NORMAL = 0;
indent :)
Attachment #798454 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 37•11 years ago
|
||
Fixing the compile error on OS X 10.7 Opt build.
Attachment #803588 -
Attachment is obsolete: true
Attachment #803588 -
Flags: review?(amarchesini)
Attachment #804283 -
Flags: review?(amarchesini)
Updated•11 years ago
|
Attachment #804283 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 38•11 years ago
|
||
Carry the reviewer's name.
Attachment #798454 -
Attachment is obsolete: true
Attachment #804671 -
Flags: review+
Assignee | ||
Comment 39•11 years ago
|
||
Carry reviewer's name.
Attachment #798455 -
Attachment is obsolete: true
Attachment #804672 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 40•11 years ago
|
||
Carry reviewer's name.
Attachment #798456 -
Attachment is obsolete: true
Attachment #804676 -
Flags: review+
Assignee | ||
Comment 41•11 years ago
|
||
Carry reviewer's name.
Attachment #798457 -
Attachment is obsolete: true
Attachment #804678 -
Flags: review+
Assignee | ||
Comment 42•11 years ago
|
||
Carry reviewer’s name.
Attachment #804283 -
Attachment is obsolete: true
Attachment #804679 -
Flags: review+
Assignee | ||
Comment 43•11 years ago
|
||
Fix nit in comment 36
Attachment #804671 -
Attachment is obsolete: true
Attachment #804687 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 44•11 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/fd8ca2b2cbdb
https://hg.mozilla.org/integration/b2g-inbound/rev/7b4046fcaf53
https://hg.mozilla.org/integration/b2g-inbound/rev/583edf914fd7
https://hg.mozilla.org/integration/b2g-inbound/rev/39408bd9b813
https://hg.mozilla.org/integration/b2g-inbound/rev/813902236d3a
A reminder - *please* use commit messages that describe what each individual patch is doing rather than repeating the bug summary 5x.
Flags: in-testsuite+
Keywords: checkin-needed
Assignee | ||
Comment 45•11 years ago
|
||
Right. Thanks Ryan.
I didn't my patch name into commit messages. Will take care next time.
Comment 46•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fd8ca2b2cbdb
https://hg.mozilla.org/mozilla-central/rev/7b4046fcaf53
https://hg.mozilla.org/mozilla-central/rev/583edf914fd7
https://hg.mozilla.org/mozilla-central/rev/39408bd9b813
https://hg.mozilla.org/mozilla-central/rev/813902236d3a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.2 FC (16sep)
Updated•11 years ago
|
status-firefox26:
--- → fixed
Comment 47•11 years ago
|
||
The issue still reproduces on the latest Buri 1.2 Aurora MOZ RIL & Leo 1.1 Moz RIL
When receiving a notification while music is playing the music doesn't fade out when receiving the notification.
On Buri 1.2 Aurora build, the music getting a little quieter for a second, after the notification is received, but doesn't fade out completely.
But meanwhile, the issue doesn't reproduce when the device is connected to headphones, the music fades out when receiving notifications
Device: Buri v1.2 Mozilla RIL
BuildID: 20131015004002
Gaia: 94e3088c56c7348655ae76613defd126426cc722
Gecko: f80fd27d367f
Version: 26.0a2
Firmware Version: US_20130912
Device: Leo V1.1 Mozilla RIL)
BuildID: 20131015041203
Gaia: 680f3b86b1e4ff1411ece6ba397b8b0e56b4b31c
Gecko: 4bfd6a51cd05
Version: 18.0
Comment 48•11 years ago
|
||
Marco - Can you clarify if what we're seeing in comment 47 is a followup bug from this patch or not?
Flags: needinfo?(mchen)
Assignee | ||
Comment 49•11 years ago
|
||
(In reply to sarsenyev from comment #47)
> The issue still reproduces on the latest Buri 1.2 Aurora MOZ RIL & Leo 1.1
> Moz RIL
This is a V1.2 feature so Leo 1.1 didn't have this effect.
> On Buri 1.2 Aurora build, the music getting a little quieter for a second,
> after the notification is received, but doesn't fade out completely.
>
The effect here is just "reduce the volume level to 0.25 of current one" not a completely fade out to no sound.
So I think "getting a little quieter for a second" is a expected behavior.
> But meanwhile, the issue doesn't reproduce when the device is connected to
> headphones, the music fades out when receiving notifications
This is not done by Gecko implementation but did by vendor's audio HAL.
In order to notify user about notification event, audio will be output to both of speaker and headset.
And in order to avoid other content leak to speaker, the channel small then notification will be "muted".
The conclusion is that that are all under expectation.
Flags: needinfo?(mchen)
You need to log in
before you can comment on or make changes to this bug.
Description
•