diff options
author | chinyue <chinyue@chromium.org> | 2015-04-30 18:46:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-01 01:47:04 +0000 |
commit | f76f3405ad9bae1ef3725046169f7cc4e34a6dbb (patch) | |
tree | 84babd4eca6ae65d90ce4cf77dac3743790394b2 | |
parent | 07af333a0a2c0672bd8f4f6fb6601c36fb3c833f (diff) | |
download | chromium_src-f76f3405ad9bae1ef3725046169f7cc4e34a6dbb.zip chromium_src-f76f3405ad9bae1ef3725046169f7cc4e34a6dbb.tar.gz chromium_src-f76f3405ad9bae1ef3725046169f7cc4e34a6dbb.tar.bz2 |
Do not display CRAS loopback devices on UI.
Both POST_MIX and POST_DSP loopback devices are filtered out.
BUG=479848
Review URL: https://codereview.chromium.org/1116643005
Cr-Commit-Position: refs/heads/master@{#327863}
-rw-r--r-- | ash/system/chromeos/audio/audio_detailed_view.cc | 4 | ||||
-rw-r--r-- | chromeos/audio/audio_device.cc | 10 | ||||
-rw-r--r-- | chromeos/audio/audio_device.h | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/ash/system/chromeos/audio/audio_detailed_view.cc b/ash/system/chromeos/audio/audio_detailed_view.cc index 3b023d8..fa1438b 100644 --- a/ash/system/chromeos/audio/audio_detailed_view.cc +++ b/ash/system/chromeos/audio/audio_detailed_view.cc @@ -118,7 +118,9 @@ void AudioDetailedView::UpdateAudioDevices() { for (size_t i = 0; i < devices.size(); ++i) { // Don't display keyboard mic or aokr type. if (devices[i].type == chromeos::AUDIO_TYPE_KEYBOARD_MIC || - devices[i].type == chromeos::AUDIO_TYPE_AOKR) + devices[i].type == chromeos::AUDIO_TYPE_AOKR || + devices[i].type == chromeos::AUDIO_TYPE_POST_MIX_LOOPBACK || + devices[i].type == chromeos::AUDIO_TYPE_POST_DSP_LOOPBACK) continue; if (devices[i].is_input) input_devices_.push_back(devices[i]); diff --git a/chromeos/audio/audio_device.cc b/chromeos/audio/audio_device.cc index 4f4b18c..32012a1 100644 --- a/chromeos/audio/audio_device.cc +++ b/chromeos/audio/audio_device.cc @@ -29,6 +29,8 @@ uint8 GetDevicePriority(AudioDeviceType type) { return 1; case AUDIO_TYPE_KEYBOARD_MIC: case AUDIO_TYPE_AOKR: + case AUDIO_TYPE_POST_MIX_LOOPBACK: + case AUDIO_TYPE_POST_DSP_LOOPBACK: case AUDIO_TYPE_OTHER: default: return 0; @@ -58,6 +60,10 @@ std::string AudioDevice::GetTypeString(AudioDeviceType type) { return "KEYBOARD_MIC"; case AUDIO_TYPE_AOKR: return "AOKR"; + case AUDIO_TYPE_POST_MIX_LOOPBACK: + return "POST_MIX_LOOPBACK"; + case AUDIO_TYPE_POST_DSP_LOOPBACK: + return "POST_DSP_LOOPBACK"; case AUDIO_TYPE_OTHER: default: return "OTHER"; @@ -85,6 +91,10 @@ AudioDeviceType AudioDevice::GetAudioType( return AUDIO_TYPE_INTERNAL_SPEAKER; else if (node_type.find("AOKR") != std::string::npos) return AUDIO_TYPE_AOKR; + else if (node_type.find("POST_MIX_LOOPBACK") != std::string::npos) + return AUDIO_TYPE_POST_MIX_LOOPBACK; + else if (node_type.find("POST_DSP_LOOPBACK") != std::string::npos) + return AUDIO_TYPE_POST_DSP_LOOPBACK; else return AUDIO_TYPE_OTHER; } diff --git a/chromeos/audio/audio_device.h b/chromeos/audio/audio_device.h index 6ca1eb0..67dca1c 100644 --- a/chromeos/audio/audio_device.h +++ b/chromeos/audio/audio_device.h @@ -26,6 +26,8 @@ enum AudioDeviceType { AUDIO_TYPE_INTERNAL_MIC, AUDIO_TYPE_KEYBOARD_MIC, AUDIO_TYPE_AOKR, + AUDIO_TYPE_POST_MIX_LOOPBACK, + AUDIO_TYPE_POST_DSP_LOOPBACK, AUDIO_TYPE_OTHER, }; |