New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 799623 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jul 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Extremely low audio quality during VOIP calls over Bluetooth (ChromeOS / Bluetooth / HFP)

Reported by jonathan...@gmail.com, Jan 5 2018

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 10176.22.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.41 Safari/537.36
Platform: 10176.22.0 (Official Build) beta-channel eve

Example URL:

Steps to reproduce the problem:
1. Connect Bluetooth headset to Chromebook 
2. Make sure you go to audio device and select the BT headset as an input source, so that audio will be recorded from the headset
3. Make a VoIP call using hangouts (web version or android app), skype, Vonage Business essentials etc..

What is the expected behavior?
That the other side will hear me clearly without too much distortion.

What went wrong?
The audio that is being captured by ChromeOS via a Bluetooth headset sounds very low quality, muffled and distorted resulting in muffled audio. This is only happening when using a BT headset. The internal mics work fine.

It sounds like either a very low quality / low bitrate is being used in Bluetooth HFP mode.

I have also tried 3 different headsets, the result is identical to all. They work fine with a Mac or my Pixel Phone.

Did this work before? No 

Is it a problem with Flash or HTML5? N/A

Does this work in other browsers? N/A

Chrome version: 64.0.3282.41  Channel: beta
OS Version: 10176.22.0
Flash Version: 

Contents of chrome://gpu:
 
Components: -Internals>Media OS>Systems>Bluetooth
Cc: mcchou@chromium.org wuchengli@chromium.org rjahagir@chromium.org josephsih@chromium.org pbath...@chromium.org
Owner: cychiang@chromium.org
Status: Assigned (was: Unconfirmed)
Jimmy or Wucheng, can you take a look? 
I'd like to add that i tested this on 3 different Chromebooks:

The Pixelbook
The Samsung Chromebook Pro
The Asus flip C101

The behavior is the same on all of them, so it's not model specific. It definitely sounds like either there is too much mic gain with using a BT headset in HFP mode causing the audio to sound distorted  or the codec / bitrate used is very low.

I also tested with 3 different headsets:

The Sennheiser HD1
Beats X
Plantronics Voyager Edge

Thank you for looking into this.

Cc: hychao@chromium.org
Owner: pbath...@chromium.org
Could pbathini please check whether this is a regression ?
We have not changed BT in CRAS for a while.
It's probably not a regression as this has been an issue for at least a couple of years since I purchased the pixel LS (2015). The recorded audio quality via Bluetooth headset was always very poor comparing to a smartphone or my MacBook.

Hopefully it's an easy fix.
Owner: cychiang@chromium.org
The sound quality for the Chromebooks in HFP / HSP profile is not as good as it in A2DP mode. This has been the way in the Chromebooks. It's not a new regression
Owner: hychao@chromium.org
Thank you.
I will let Hsinyu check if our implementation can be improved.
Thank you!
I certainly understand that audio quality under HFP profile is lower than A2DP due to latency requirements,however the audio quality recorded by ChromeOS from a BT Headset mic is far lower than other devices such as the Pixel phone or a Mackbook using HFP.
The audio received sounds fine and on par with other systems.

From how it sounds it looks like simply lowering the microphone over Bluetooth audio gain will solve most of the issue. Right now it sounds like the audio gain is way too high making the audio captured sound overblown and distorted.

If there is a way for me to change audio gain for the mic over BT using command line on another way, please let me know and i can test it myself.

Thanks again for looking into it.
 

Comment 9 Deleted

I wanted to post an update on this issue, hopefully someone is looking into this.
I noticed that as of ChromeOS beta 65, *sometimes*, randomly, the audio captured via a Bluetooth headset mic will sound OK. Not overpowered or distorted. 
This was not the case up to V64. It always sounded overpowered and distorted.

Other times it will still sound with way too much gain which causes the audio to be distorted. It's completely random now. I was not able to narrow it down to when it sounds fine. It seems completely random using the below apps.

I have tested this with various VOIP apps (hangouts web, Bria mobile, Vonage business and Rebtel).
Also the following headsets were used:

Beats X
Jabra Elite T65
Sennheiser HD1 
V-Moda Forza wireless

I think that by simply making sure the gain is lowered for BT mics it would solve the problem.
Is there any update on this issue?
After troubleshooting this issue further, it comes down to the mic gain being used for Bluetooth device. It is DOUBLE than what is being used for wired headsets and that's what is causing the issue. The gain needs to be lowered by half.

This is a ChromeOS bug and I hope it can be addressed?
Trying to see if this can be addressed or not as it is Still a bug in the OS and I have seen several issues opened about this on this bug tracker.

What's going on here is that ChromeOS randomly doubles the audio gain for Bluetooth headsets when the headset is connected to the device.
This happens randomly. Sometimes it is fixed by simply disconnecting and reconnecting the headset to the device, the mic gain would fall by half.

I tested this by downloading a sound meter from the play store, connected various Bluetooth headsets to the Pixelbook, made sure I selected the headset for both incoming and outgoing audio, opened the app and looked the db recorded.

Sometimes the app would show 55+db which is obviously crazy high. When that happens the captured audio was distorted to the receiving party.
Other times, when I connected the same headsets, the app would show 30db, which is normal and how it should be in quiet room.

Again, this happens randomly and resets upon headset reconnection. There is no way of knowing what db mode it would be unless you open the sound meter app and check every time a headset is connected to the pixelbook.

If there are any logs I can attach to show this, please let me know how and I'll gladly send some logs so it can finally be fixed. This is happening across ALL chromeOS devices I have. it is not PB specific.   
In addition to my last comment, here are two images showing this happening.
Same headset, same quiet room.
One time I connected the headset the db gain was around 30, the other time it was 55+!
ChromeOS randomly DOUBLES the headset gain for no reason when a the headset connects to the device.

App used: https://play.google.com/store/apps/details?id=kr.sira.sound


30db.png
68.1 KB View Download
55db.png
190 KB View Download
Status: Started (was: Assigned)
So I have tried Plantronics Voyager Edge and found no way I can adjust mic gain for audio input, by using the AT+VGM command spec'ed in HFP.

And then I realize it could be the software gain mechanism come into play.

The randomness you're seeing is probably because AVRCP connection is flaky, and our code confuses that with the state if software gain should be used for BT input.

Uploaded fix to totally turn off software gain on BT input:
https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/1140021

Thanks again for the report and detailed experiment!
Thank you!
Can you please let me know which OS version this fix would roll into so I can test? I am currently on beta channel 68.0.3440.59 Platform 10718.50.0 (Official Build) beta-channel eve 
Project Member

Comment 16 by bugdroid1@chromium.org, Jul 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/adhd/+/1ab7fdbd68c45ce29356bed1c5a04327e2bb12d0

commit 1ab7fdbd68c45ce29356bed1c5a04327e2bb12d0
Author: Hsin-Yu Chao <hychao@chromium.org>
Date: Tue Jul 17 16:08:09 2018

CRAS: bt_io - Don't use software gain for BT input

software_volume_needed flag is also used for input to decide if
software gain can be used. When BT headset does audio recording,
HFP is used and that's low quality audio.
Applying positive gain on low quality audio could make the
experience worse, so don't do that.

BUG= chromium:799623 
TEST=Execute 'cras_test_client --capture_file /tmp/1'
and then hit 'K'/'J'+'Enter' multiple times to change system
gain, verify that recorded volume doesn't chane.

Change-Id: I0922e7cad12abce520e57be386ce15f469f74d4e
Reviewed-on: https://chromium-review.googlesource.com/1140021
Commit-Ready: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/1ab7fdbd68c45ce29356bed1c5a04327e2bb12d0/cras/src/server/cras_bt_io.c

The fix just lands in R69-10886.0.0
I think we're going to have first R69 beta in the 1st week of August.
Thanks. This won't be on futue builds of R68 at all?
Cc: bhthompson@chromium.org
Components: OS>Kernel>Audio
Labels: Merge-Request-68 M-68
Per user request, requesting merge to R68.
Project Member

Comment 20 by sheriffbot@chromium.org, Jul 18

Labels: -Merge-Request-68 Hotlist-Merge-Review Merge-Review-68
This bug requires manual review: We are only 5 days from stable.
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), kariahda@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Review -Merge-Review-68 Merge-Approved-68
Project Member

Comment 22 by bugdroid1@chromium.org, Jul 19

Labels: merge-merged-release-R68-10718.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/adhd/+/78840946a0044f7b1b50f31d6eafbbda33ae25be

commit 78840946a0044f7b1b50f31d6eafbbda33ae25be
Author: Hsin-Yu Chao <hychao@chromium.org>
Date: Thu Jul 19 06:39:31 2018

CRAS: bt_io - Don't use software gain for BT input

software_volume_needed flag is also used for input to decide if
software gain can be used. When BT headset does audio recording,
HFP is used and that's low quality audio.
Applying positive gain on low quality audio could make the
experience worse, so don't do that.

BUG= chromium:799623 
TEST=Execute 'cras_test_client --capture_file /tmp/1'
and then hit 'K'/'J'+'Enter' multiple times to change system
gain, verify that recorded volume doesn't chane.

Change-Id: I0922e7cad12abce520e57be386ce15f469f74d4e
Reviewed-on: https://chromium-review.googlesource.com/1140021
Commit-Ready: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
(cherry picked from commit 1ab7fdbd68c45ce29356bed1c5a04327e2bb12d0)
Reviewed-on: https://chromium-review.googlesource.com/1142865
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>

[modify] https://crrev.com/78840946a0044f7b1b50f31d6eafbbda33ae25be/cras/src/server/cras_bt_io.c

Labels: -Merge-Approved-68 Merge-Merged
Status: Fixed (was: Started)
The fix should make it to image newer than R68-10718.58.0.

Jonathan:
I am marking this as fixed for now. Let me know if you still seeing problem on new images.
I can confirm the fix works and solved the issue with random mic gain on Bluetooth devices. Thank you very much for fixing this. Tested with multiple headsets and it's working 100% correctly now.

In the commit I read that you may consider re-enabling software gain when wideband audio is implemented.
I would advise against implementing any software gain for Bluetooth audio devices.
Since the connectivity between the computer and the headset is digital, the mic gain should be decided by the headset, not by the computer. If re-enabled, this will again result in distorted overblown audio capture.
Status: Verified (was: Fixed)
Hi Jonathan,
Thank you for the advice and I agree with that.
I will leave the SW gain as disabled, unless someone complains for that in future.

Sign in to add a comment