New issue
Advanced search Search tips

Issue 872192 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Coral board: After plug and unplug Headphone, the Hangouts call voice output becomes low by internal microphone.

Project Member Reported by yuhsuan@chromium.org, Aug 8

Issue description

After plug and unplug Headphone, the Hangouts call voice output becomes low by internal microphone.

What steps will reproduce the problem?
1. Download Google Hangouts from Web Store.
2. Open Hangouts call and connected to another Hangouts call account.
3. Check internal microphone output is normal.
4. Plug in Headphone, check the external microphone output is normal.
5. Unplug Headphone, check the internal microphone output is normal or not.

What is the expected output?
The Hangouts call voice output is normal by internal microphone after plug and unplug Headphone.

How frequently does this problem reproduce?
Always


 
This issue happens on all coral boards.

This is because the gain between internal mic and headset mic has large difference.

headset mic: always stay at 0dB. This is because there is no volume control for external mic.
The gain is actually quite large. I can clearly hear what is recorded.

Internal mic: There is no volume control as well,  so we add MaxSoftwareGain "2000" to apply -50dB~ 20 dB software gain. The default gain is 20dB.
At 20 dB, the gain is much smaller than headset mic, but seems okay.

When WebRTC uses headset mic, automatic gain control (AGC) works, and it thinks 0dB is large enough. So it set system gain to 0dB.
When user unplugs headset, or select internal mic, WebRTC is not aware of that, and it keeps using 0dB, so the gain is too small.
This difference is too large such that AGC can not understand it needs to set the gain back to 20dB.
One possible solution is add new MinSoftwareGain flag.

Currently, we only have MaxSoftwareGain and it is set to 20 dB.
The MinSoftwareGain is -50 dB by default.
If we add a flag MinSoftwareGain and set it to 20dB as well, we can fix the software gain such that it always apply 20 dB on internal mic.
Status: Assigned (was: Untriaged)
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 10

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

commit faa1b2bd0fbe6348cd7353c5af0393ae354acdda
Author: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Date: Fri Aug 10 15:31:32 2018

CRAS: cras_alsa_ucm - Support setting MinSoftwareGain value in UCM

Now we can set MinSoftwareGain after MaxSoftwareGain is set. It is used
to limit the range of software gain.

When WebRTC uses headset mic, automatic gain control (AGC) may change
the system gain. After removing headset mic, AGC can not understand and
set it back if there is a large difference between internal mic and
headset mic. If we keep software gain of internal mic always at the
same value, we can solve this problem.

BUG= chromium:872192 
TEST=Succussly set MinSoftwareGain on Coral board.

Change-Id: I0a6af2be7e544fd243670a8b6a06c2da6d23187f
Reviewed-on: https://chromium-review.googlesource.com/1167010
Commit-Ready: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/faa1b2bd0fbe6348cd7353c5af0393ae354acdda/cras/src/tests/alsa_io_unittest.cc
[modify] https://crrev.com/faa1b2bd0fbe6348cd7353c5af0393ae354acdda/cras/src/tests/alsa_ucm_unittest.cc
[modify] https://crrev.com/faa1b2bd0fbe6348cd7353c5af0393ae354acdda/cras/src/server/cras_iodev.h
[modify] https://crrev.com/faa1b2bd0fbe6348cd7353c5af0393ae354acdda/cras/src/server/cras_alsa_ucm.c
[modify] https://crrev.com/faa1b2bd0fbe6348cd7353c5af0393ae354acdda/cras/src/server/cras_alsa_io.c
[modify] https://crrev.com/faa1b2bd0fbe6348cd7353c5af0393ae354acdda/cras/src/server/cras_alsa_ucm.h

Comment 5 Deleted

Now we can set MinSoftwareGain value in UCM config to have the fixed capture volume.

Sign in to add a comment