Closed Bug 1249437 Opened 9 years ago Closed 9 years ago

The first phone call will reset the Ringtone and Notification volume to the default level.

Categories

(Firefox OS Graveyard :: AudioChannel, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox48 fixed, b2g-v2.5 unaffected, b2g-master affected)

RESOLVED FIXED
Tracking Status
firefox48 --- fixed
b2g-v2.5 --- unaffected
b2g-master --- affected

People

(Reporter: Marty, Assigned: sotaro)

References

()

Details

(Keywords: regression, Whiteboard: [2.6-Daily-Testing][Spark])

Attachments

(2 files, 1 obsolete file)

Attached file logcat_volume.txt
Description: The first time the user makes a phone call on a fresh flash, the volume level for Ringtones and Notifications will reset to the default level. Repro Steps: 1) Update a Aries to 20160218105740 2) Adjust the Ringtones and Notifications volume level to something other than the default. 3) Enter the Dialer app and make a call. 4) After the call, look at the Ringtones and Notifications volume level. Actual: The volume level is returned to the default level. Expected: The volume level is maintained where the user set it. Environmental Variables: Device: Aries 2.6 Build ID: 20160218105740 Gaia: 4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c Gecko: 3b35f0a98eba9f1c9be7d793650b3d5bec6c8fdb Gonk: a19052e4389c3ae2d8fc3e7a74a475401baacc56 Version: 46.0a1 (2.6) Firmware Version: D5803_23.1.A.1.28_NCB.ftf User Agent: Mozilla/5.0 (Mobile; rv:46.0) Gecko/46.0 Firefox/46.0 Repro frequency: 10/10 See attached: Logcat, Video (URL)
This issue DOES occur on the latest Flame 2.6 build. The volume level is returned to the default level after the first call. Environmental Variables: Device: Flame 2.6 BuildID: 20160218030207 Gaia: 4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c Gecko: 3b35f0a98eba9f1c9be7d793650b3d5bec6c8fdb Gonk: 8a066f7fa7410e32b58def35f322aa33f03db283 Version: 46.0a1 (2.6) Firmware Version: v18D User Agent: Mozilla/5.0 (Mobile; rv:46.0) Gecko/46.0 Firefox/46.0 ************************************* This issue does NOT occur on Aries 2.5 builds. The volume level is maintained where the user set it. Environmental Variables: Device: Aries 2.5 BuildID: 20160216002303 Gaia: 28880004bc5cd6e129d0a23b701a389753788ed0 Gecko: 9d519d3bedacb7f5ce467f4c6bef7ff55ff3b0f3 Gonk: a19052e4389c3ae2d8fc3e7a74a475401baacc56 Version: 44.0 (2.5) Firmware Version: D5803_23.1.A.1.28_NCB.ftf User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Contact: jthomas
Caused by changes made in Bug 1218629 Mozilla Inbound Regression Window Last Working Environmental Variables: Device: Flame 2.6 BuildID: 20151223220812 Gaia: 94cc99aac11339e297da186ec7153ca4ae9ab8cd Gecko: 6c98d100b4ca9f4b667955441cb10b19f8c8381f Version: 46.0a1 (2.6) Firmware Version: v18D User Agent: Mozilla/5.0 (Mobile; rv:46.0) Gecko/46.0 Firefox/46.0 First Broken Environmental Variables: Device: Flame 2.6 BuildID: 20151223233211 Gaia: 94cc99aac11339e297da186ec7153ca4ae9ab8cd Gecko: 0eed3c26935ae436ddc8ed094e8cff4c5a18b3b4 Version: 46.0a1 (2.6) Firmware Version: v18D User Agent: Mozilla/5.0 (Mobile; rv:46.0) Gecko/46.0 Firefox/46.0 Last Working gaia / First Broken gecko - This issue DOES occur with broken Gecko. Gaia: 94cc99aac11339e297da186ec7153ca4ae9ab8cd Gecko: 0eed3c26935ae436ddc8ed094e8cff4c5a18b3b4 Last Working gecko / First Broken gaia - This issue does NOT occur with with Broken Gaia. Gecko: 6c98d100b4ca9f4b667955441cb10b19f8c8381f Gaia: 94cc99aac11339e297da186ec7153ca4ae9ab8cd Mozilla Inbound Pushlog: http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=6c98d100b4ca9f4b667955441cb10b19f8c8381f&tochange=0eed3c26935ae436ddc8ed094e8cff4c5a18b3b4
Blocks: 1218629
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Sotaro, can you take a look at this please? This appears to have been caused by the landing for bug 1218629.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker) → needinfo?(sotaro.ikeda.g)
I am going to take a look. But I do not have a sim card that could be used on aries. Next week, I am going to visit Taipei office. I am going to borrow the sim card there next week.
The following code in AudioManager::VolumeStreamState::SetVolumeIndexToActiveDevices() causes the problem. During dialing, phone state was changed by calling setPhoneState(). It changeed audio out device from AUDIO_DEVICE_OUT_SPEAKER to DEVICE_OUT_EARPIECE. The following code update AUDIO_DEVICE_OUT_SPEAKER's volume to DEVICE_OUT_EARPIECE volume. https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/AudioManager.cpp#1373 if (device != AUDIO_DEVICE_OUT_SPEAKER && mStreamType == AUDIO_STREAM_NOTIFICATION) { // Rescaling of index is not necessary. rv = SetVolumeIndex(aIndex, AUDIO_DEVICE_OUT_SPEAKER); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } }
Flags: needinfo?(sotaro.ikeda.g)
Component: Gaia::System::Audio Mgmt → AudioChannel
Assignee: nobody → sotaro.ikeda.g
It seems better that AUDIO_DEVICE_OUT_SPEAKER and DEVICE_OUT_EARPIECE have same volume like before.
Removing the workaround could reduce volume control consistency. But it becomes same to android.
Attachment #8727701 - Flags: review?(alwu)
Comment on attachment 8727701 [details] [diff] [review] patch - Remove workaround of volume control Review of attachment 8727701 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/AudioManager.cpp @@ +1373,5 @@ > + return rv; > + } > + } else { > + rv = SetVolumeIndex(aIndex, device); > + } The solution is fine to me, but I think it's more clear if we wrap the these codes to another new function. Here we can just call SetVolumeIndex(), and then modify SetVolumeIndex() like following, > function SetVolumeIndex(aIndex, aDevice ..) { > SetVolumeToConsistentDeviceIfNeeded(aDevice); > // same as original > } > > function SetVolumeToConsistentDeviceIfNeeded(aDevice) { > // move your solution here > }
Attachment #8727701 - Flags: review?(alwu) → review+
Apply the comment. Carry "r=alwu".
Attachment #8727701 - Attachment is obsolete: true
Attachment #8728405 - Flags: review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: