Commit 21620925 authored by Hsin-Yu Chao's avatar Hsin-Yu Chao Committed by Commit Bot

Lower the priority of Bluetooth mic even in wideband

Bug: b/156333981
Change-Id: Ieec9421a98119684f3ad901b16c1ad8dbe8998ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2196082Reviewed-by: default avatarJenny Zhang <jennyz@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772093}
parent f1658ec8
......@@ -18,11 +18,19 @@ namespace {
// Get the priority for a particular device type. The priority returned
// will be between 0 to 3, the higher number meaning a higher priority.
uint8_t GetDevicePriority(AudioDeviceType type, bool is_input) {
// Lower the priority of bluetooth wide band mic. Although the quality is
// better than narrow band(AUDIO_TYPE_BLUETOOTH_NB_MIC), we still want
// to avoid auto-selecting Bluetooth mic when there is another audio input
// option.
if (type == AUDIO_TYPE_BLUETOOTH && is_input)
return 0;
switch (type) {
case AUDIO_TYPE_HEADPHONE:
case AUDIO_TYPE_LINEOUT:
case AUDIO_TYPE_MIC:
case AUDIO_TYPE_USB:
// This is for bluetooth output node. Bluetooth inputs(wide band and narrow
// band mic) are handled separately.
case AUDIO_TYPE_BLUETOOTH:
return 3;
case AUDIO_TYPE_HDMI:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment