Closed Bug 1525198 Opened 7 years ago Closed 5 years ago

Fennec Volume is lower than with focus

Categories

(Firefox for Android Graveyard :: Audio/Video, defect, P2)

Firefox 67
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: csheany, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Android 7.1.1; Tablet; rv:67.0) Gecko/67.0 Firefox/67.0

Steps to reproduce:

  1. Play a YouTube video
  2. Play a YouTube video in Focus with WebView

Actual results:

Fennec is noticeably quieter

Expected results:

To be determined

Summary: Fennec Volume → Fennec Volume is lower than with focus

John could you please try to reproduce this?

Flags: needinfo?(jolin)

(In reply to Nils Ohlmeier [:drno] from comment #1)

John could you please try to reproduce this?

Yes, I can reproduce it on my Pixel 3 using the speaker.

However, the volume difference is much less noticeable when using earbuds. csheany, could you please help confirm if this is also the case on your tablet? Thanks a lot!

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jolin) → needinfo?(csheany)
Priority: -- → P2

I should have clarified that this was using the speaker not headphones.

Flags: needinfo?(csheany)

No sure if this is the cause, but the log dumped using adb logcat | grep -i audio when playing YT video shows the following differences:

Fennec:
...
2-07 10:46:36.403 799 14706 D audio_hw_primary: enable_audio_route: usecase(24) apply and update mixer path: spkr-vi-record vi-feedback
02-07 10:46:36.403 799 14706 D audio_route: Apply path: spkr-vi-record vi-feedback
...
02-07 10:46:36.438 799 14706 D audio_hw_primary: enable_audio_route: usecase(5) apply and update mixer path: audio-ull-playback speaker
02-07 10:46:36.438 799 14706 D audio_route: Apply path: audio-ull-playback speaker
...

Focus:
...
02-07 10:48:30.416 799 30986 D audio_hw_primary: enable_audio_route: usecase(24) apply and update mixer path: spkr-vi-record vi-feedback
02-07 10:48:30.416 799 30986 D audio_route: Apply path: spkr-vi-record vi-feedback
...
02-07 10:48:30.481 799 30986 D audio_hw_primary: enable_audio_route: usecase(0) apply and update mixer path: deep-buffer-playback speaker
02-07 10:48:30.481 799 30986 D audio_route: Apply path: deep-buffer-playback speaker
...

See Also: → 1517764

Alex would you mind taking a look?

Flags: needinfo?(achronop)

I guess the same difference exist by testing Focus with WebView vs Focus with GeckoView (if you wonder how to switch type focus:test in the address bar).

I am testing between those two and my perception is that GeckoView is louder that WebView. In any case there is a noticeable difference.

I see in [1] we do some calibration on the volume before we set it. On the other hand chromium does not apply any processing [2].

Paul, since you are working on Android these days and you have all the environment set can you hammer a little the processing we do in order to make it sound closer to WebView?

[1] https://searchfox.org/mozilla-central/rev/2f1020dc4176d38dd5f3d0496f3c46849862ee0b/media/libcubeb/src/cubeb_opensl.c
[2] https://cs.chromium.org/chromium/src/media/audio/android/opensles_output.cc?l=223&rcl=1faee4813e3b412f00dc2639a07167158bccd26d

Flags: needinfo?(achronop) → needinfo?(padenot)

Thank you for your response.

Maybe it is our varying perceptions that has led to the conflicting results with Bug 1517764.

I'm sure the processing is for a reason but to me it seems Gecko's default volume needs to be increased while maintaing scale without clipping.

FWIW, the difference is more noticeable with the devices volume at half as opposed to all the way up.

I had the volume on 60% and the difference was noticeable enough. Could you please verify that you get the same results if you test between Focus with GeckoView and Focus with WebView.

Excpect that you are hearing the contrary.

It just seemed like a relevant factor.

I filed based on my experience with...

Fennec vs Focus with WebView (Samsung Galaxy Tab A)

Reference Browser vs Focus with Webview (Samsung J7)

First thing I tried was to comment the code because of this, but it didn't make a difference. My code is just converting linear values in [0; 1] to millibels, this is what the docs says we should do.

Maybe my patches in bug 1531833 will change things, I don't know.

Flags: needinfo?(padenot)

Would you mind elaborating?

We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.