Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: chromeos/audio/audio_device.cc

Issue 1116643005: Do not display CRAS loopback devices on UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/audio/audio_device.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/audio/audio_device.cc
diff --git a/chromeos/audio/audio_device.cc b/chromeos/audio/audio_device.cc
index 4f4b18cc7326b1b1c99c98e4ea353c6b89cd80cb..32012a12aa5166341069b88ee3e0efaece5a77f4 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;
}
« no previous file with comments | « chromeos/audio/audio_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698