Closed Bug 815322 Opened 12 years ago Closed 12 years ago

Phone rings on incoming call will pause audio

Categories

(Firefox OS Graveyard :: Gaia::System, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-basecamp:+, firefox18 fixed, firefox19 fixed)

VERIFIED FIXED
B2G C2 (20nov-10dec)
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: mtreese, Assigned: mchen)

References

Details

(Keywords: feature)

Attachments

(2 files, 4 obsolete files)

USER-SOUND-014	As a user my phone will ring when I receive an incoming call.   The ringer will pause and mute any audio content currently playing.
Component: Gaia → Gaia::System
Once bug 805333 is fixed, all that's needed here is to use mozaudiochannel="ringer" on the <audio> element used to play the incoming-call sound.
Depends on: 805333
AFAIW we don't have ringer channel type now. Or we have but no effect now. Marco knows more than me.
Currently gaia doesn't specify ringer channel to dialer's ringtone.
Step 1. I take this bug first for adding new audio channel type called ringer.

Step 2. Once 805333 is completed then add ringer into priority list.
Assignee: nobody → mchen
Target Milestone: --- → B2G C2 (20nov-10dec)
Marco, what's your estimate for how long this will take to fix once bug 805333 lands?
(In reply to Dietrich Ayala (:dietrich) from comment #5)
> Marco, what's your estimate for how long this will take to fix once bug
> 805333 lands?

It would be 2 ~ 3 days after bug 805333 landed.
Attached patch Part1-NewAudioChannelType-Ringer-WIPv1 (obsolete) (deleted) — Splinter Review
1. To add a new channel type called ringer (https://etherpad.mozilla.org/audio-bug80533), and the priority of this type is just lower then publicnotification only.

2. The next part will be added it into logic of AudioChannelService.
Attachment #685996 - Flags: review?(kinetik)
Attachment #685996 - Flags: review?(kinetik) → review+
Attached patch Ringer Channel v2 (obsolete) (deleted) — Splinter Review
1. According to bug 817043, it changed the support of mozAudioChannelType to ParseAttribute(). So rebase the ringer codes to this version.

2. Add ringer logic into AudioChannelService. (No impact on AudioChannelServiceChild even it is not landed.)
Attachment #685996 - Attachment is obsolete: true
Attachment #688588 - Flags: review?(kinetik)
Comment on attachment 688588 [details] [diff] [review]
Ringer Channel v2

Review of attachment 688588 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/html/content/src/nsHTMLMediaElement.cpp
@@ +1959,5 @@
>      { "content",            AUDIO_CHANNEL_CONTENT },
>      { "notification",       AUDIO_CHANNEL_NOTIFICATION },
>      { "alarm",              AUDIO_CHANNEL_ALARM },
>      { "telephony",          AUDIO_CHANNEL_TELEPHONY },
> +    { "ringer",          AUDIO_CHANNEL_RINGER },

Alignment of AUDIO_CHANNEL_RINGER is off compared to the others.
Attachment #688588 - Flags: review?(kinetik) → review+
Attached patch Ringer Channel Checkin-Version (obsolete) (deleted) — Splinter Review
1. Fix the alignment.
2. Add reviewer and blocking-basecamp.

--------------------------------

Will check with Gaia team for 
  a. Assign ringer channel to audio element of ring tone.
  b. Hook audio.volume.ring to settings for adjusting volume.

Will wait for landing of AudioChannelServiceChild part on bug 805333.

Then this issue is just resolved.
Attachment #688588 - Attachment is obsolete: true
Attachment #688621 - Flags: review+
Flags: needinfo?(alive)
Attached patch Ringer Channel Checkin-Version v2 (obsolete) (deleted) — Splinter Review
Resolve the conflict with newest central base.
Attachment #688621 - Attachment is obsolete: true
Attachment #689092 - Flags: review+
Already test it with the corresponding Gaia Codes.
Keywords: checkin-needed
Resolve the conflict again.
Attachment #689092 - Attachment is obsolete: true
Attachment #689122 - Flags: review+
Can we give "ringer" the priority below "telephony" rather than the one above it?

Otherwise we have to do a considerably more complex implementation of bug 815445. And it seems weird to me that we'd want a phone call interrupted by a ringer signal anyway.

I'm fine with landing what we have and doing a followup patch to switch the two if that's preferred.
(In reply to Jonas Sicking (:sicking) from comment #14)
> Can we give "ringer" the priority below "telephony" rather than the one
> above it?
> 
> Otherwise we have to do a considerably more complex implementation of bug
> 815445. And it seems weird to me that we'd want a phone call interrupted by
> a ringer signal anyway.
> 
> I'm fine with landing what we have and doing a followup patch to switch the
> two if that's preferred.

Consider to one case with telephony higher then ringer.
1. User is on in_call state.
2. There is another call coming in (multi-sim?)
3. Dialer detect that now is on in_call state so try to use a "Do Do Do" sound for notifying user.
The question is what channel type should be used by "Do Do Do"? If we use ringer then it will be muted by telephony channel.

On the other way, if we put ringer higher then telephony and actually we didn't let telephony muted by the reason from audio channel service. Then the case above can use ringer channel.

I would like to land it now and fire another bug for this. Thanks.
Should the "Do Do Do" sound mix with the audio from the call, or should the audio from the call be muted? If they should mix, then maybe we should use the "telephony" channel for the "Do Do Do" sound.

Should we use a sound to notify the user at all, or should we instead use the vibrator?
(In reply to Jonas Sicking (:sicking) from comment #16)
> Should the "Do Do Do" sound mix with the audio from the call, or should the
> audio from the call be muted? If they should mix, then maybe we should use
> the "telephony" channel for the "Do Do Do" sound.
> 
> Should we use a sound to notify the user at all, or should we instead use
> the vibrator?

1. They should be mixed together.
2. As I knew, normal behavior is using the sound not vibrate the phone near your ear.
If they should be mixed, and assuming that the sound should play in the earpiece and not the speaker, then then "telephony" channel sounds like the right channel for the "Do Do Do" sound.

The "ringer" channel would cause the audio to get muted, no? And the "ringer" channel usually plays in the speaker, no?
(In reply to Jonas Sicking (:sicking) from comment #18)
> If they should be mixed, and assuming that the sound should play in the
> earpiece and not the speaker, then then "telephony" channel sounds like the
> right channel for the "Do Do Do" sound.
> 
> The "ringer" channel would cause the audio to get muted, no? And the
> "ringer" channel usually plays in the speaker, no?


All the answers are yes. So we need to ask Dialer app using different channels for notifying people when in call or not. Then I will fire another bug for this.
Version for Aurora
Attachment #689199 - Flags: review+
No, already fired bug 819206 for Gaia part and notified Alive already.
Flags: needinfo?(alive)
NB: marking RESO FIXED when these bugs hit beta because it's getting hard for b2g folks to track remaining work for upcoming milestones.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
verified on 2012-12-12 unagi daily build
build info:
releases/gaia : db435724709181ffa3348c06cfcc80b71375e73d
releases/gecko : 8e66dde61aec02ba5a4a4e44583679aedc609a73
Status: RESOLVED → VERIFIED
As I test on this bug, 
- First play a music
- Make a phone call to the testing device
- Cancel the phone call

I found that
1. During the phone call, I can hear the music as a pulse in every short pause of ring
2. After I cancel the phone, the music will keep playing, i,e, the music didn't pause actually

Reopen the bug, feel free to let me know these are other bugs 
thanks
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
should be fixed by bug 815569
wait for landing in the release build
(In reply to John Shih from comment #29)
> should be fixed by bug 815569
> wait for landing in the release build

Can you retest now that bug 815569 has landed?
This is still reproducing for me.  segments of music plays in between the rings.  essentially, same as "I found that 1. During the phone call, I can hear the music as a pulse in every short pause of ring"

I'm on a 12-17 daily unagi build, so it should have picked up the bugfix from bug 815569.

BuildID=20121217070202
SourceRepository=http://hg.mozilla.org/releases/mozilla-b2g18

Str is same as comment 28.
(In reply to Tony Chung [:tchung] from comment #31)
> This is still reproducing for me.  segments of music plays in between the
> rings.  essentially, same as "I found that 1. During the phone call, I can
> hear the music as a pulse in every short pause of ring"
> 
> I'm on a 12-17 daily unagi build, so it should have picked up the bugfix
> from bug 815569.
> 
> BuildID=20121217070202
> SourceRepository=http://hg.mozilla.org/releases/mozilla-b2g18
> 
> Str is same as comment 28.

Screencast showing the problem:  http://youtu.be/BL01vB1rMxE
Just to be clear, the user will not be able to play music while in a call, even if he presses play after its paused. Is this correct?
You are seeing bug 819852.

Let's close this bug since the ringer signal has been hooked up to the audio channel manager. It's "just" not working perfectly yet.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Reviewed and verified on "Unagi"
BuildID:20130103070201
No music plays between incoming phone rings
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: