Index: chromeos/audio/audio_device.cc |
diff --git a/chromeos/audio/audio_device.cc b/chromeos/audio/audio_device.cc |
index 32012a12aa5166341069b88ee3e0efaece5a77f4..fd6ae45e42d878958b8a746ee7f6c90bcf6cf119 100644 |
--- a/chromeos/audio/audio_device.cc |
+++ b/chromeos/audio/audio_device.cc |
@@ -15,7 +15,12 @@ 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 GetDevicePriority(AudioDeviceType type) { |
+uint8 GetDevicePriority(AudioDeviceType type, bool is_input) { |
+ // Lower the priority of bluetooth mic to prevent unexpected bad eperience |
+ // to user because of bluetooth audio profile switching. Make priority to |
+ // zero so this mic will never be automatically chosen. |
+ if (type == AUDIO_TYPE_BLUETOOTH && is_input) |
+ return 0; |
switch (type) { |
case AUDIO_TYPE_HEADPHONE: |
case AUDIO_TYPE_MIC: |
@@ -118,7 +123,7 @@ AudioDevice::AudioDevice(const AudioNode& node) { |
else |
display_name = node.device_name; |
device_name = node.device_name; |
- priority = GetDevicePriority(type); |
+ priority = GetDevicePriority(type, node.is_input); |
active = node.active; |
plugged_time = node.plugged_time; |
} |