Closed Bug 1059698 Opened 6 years ago Closed 6 years ago

[OPEN 2_1.3]The streaming video volume in headset is too low


(Firefox OS Graveyard :: Gaia::Video, defect)

Not set


(b2g-v2.1 affected)

2.1 S8 (7Nov)
Tracking Status
b2g-v2.1 --- affected


(Reporter: chen.cong, Assigned: scheng)




(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36

Steps to reproduce:

1) Play Youtube video with headset;
2) Play Youtube video with speaker;
3) Play local video on the phone with headset;

Actual results:

1) When play Youtube video with headset, the volume is too low to hear.
2) When play Youtube video with speaker, the volume is normal.  It is OK.
3) When play local video with headset, the volume is normal. It is OK.

Expected results:

1) When play Youtube video with headset, the volume should be normal.
hum....didn't see other ODM complained about streaming volume...So how about Open C? Also has low volume?

Flags: needinfo?(chen.cong)
hi vance,

The Openc C has the same issue. The volume of stream video with headset is lower than the local video when user add it to max volume value.
Flags: needinfo?(chen.cong)
I did the dumpsys and found stream volume's maximum value is 0.06 (Normally, it should be 1).
Identify the browser open audio track as system type to play the video. 

Refer to AudioPolicyManagerBase.cpp: computeVolume function and it contains some logic to reduce the headset volume and avoid hurt people ear on streamType equal "system".
So that cause the different behavior between headset and speaker.
Hi Lin and Vance,

Would you please give me some advices to modify this issue?
This issue causes the user to return the phone.

Flags: needinfo?(vchen)
Attached patch bug-1059698.patch (obsolete) — Splinter Review
Map "Normal" audio channel type to "music" stream type.
Duplicate of this bug: 1062554
Comment on attachment 8484863 [details] [diff] [review]

Hi, Baku

We try to map "Normal" audio channel type to "music" stream type instead of "System" stream type. Because a headset is connected, AudioPolicyManagerBase apply the certain rules[1] to decrease volume [2]. 

This causes that there are different volume between speaker & headset for "Normal" channel type(i.e. "system" stream type).

Attachment #8484863 - Flags: review?(amarchesini)
Comment on attachment 8484863 [details] [diff] [review]

Review of attachment 8484863 [details] [diff] [review]:

scheng, I don't know the implication of this choice.
You know this code more than me to say if changing this setting is fine.
If you say that is ok, and you have check any possible regression, to me is ok.
Plus, I cannot give you r+ because I'm not a peer of cubeb or media in general.
Attachment #8484863 - Flags: review?(amarchesini)
Attachment #8484863 - Flags: review?(kinetik)
Hi, Matthew

Could you help to review this patch?
Comment on attachment 8484863 [details] [diff] [review]

Review of attachment 8484863 [details] [diff] [review]:

::: content/media/CubebUtils.cpp
@@ -150,5 @@
>  /*static*/ cubeb_stream_type CubebUtils::ConvertChannelToCubebType(dom::AudioChannel aChannel)
>  {
>    switch(aChannel) {
>      case dom::AudioChannel::Normal:

Put a /* FALLTHROUGH */ comment here, or just change the return type to TYPE_MUSIC.
Attachment #8484863 - Flags: review?(kinetik) → review+
1. add "/* FALLTHROUGH */ comment" to the patch
2. add reviewer as kinetik

And wait for TPBL result :
Attachment #8484863 - Attachment is obsolete: true
Assignee: nobody → scheng
Duplicate of this bug: 1014467
Keywords: checkin-needed
Also happens in music streaming apps (grooveshark, for ex).
QA Whiteboard: [QAnalyst-Triage?]
Ever confirmed: true
Flags: needinfo?(dharris)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(dharris)
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S8 (7Nov)
You need to log in before you can comment on or make changes to this bug.