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

Unified Diff: chromeos/audio/audio_device.cc

Issue 795393002: [Hotword] Implement IsHotwordHardwareAvailable() using device types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix failures due to double init of cras audio handler Created 6 years 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 a3abba035ed54118b9611760155de726a7c567b6..4f4b18cc7326b1b1c99c98e4ea353c6b89cd80cb 100644
--- a/chromeos/audio/audio_device.cc
+++ b/chromeos/audio/audio_device.cc
@@ -28,6 +28,7 @@ uint8 GetDevicePriority(AudioDeviceType type) {
case AUDIO_TYPE_INTERNAL_MIC:
return 1;
case AUDIO_TYPE_KEYBOARD_MIC:
+ case AUDIO_TYPE_AOKR:
case AUDIO_TYPE_OTHER:
default:
return 0;
@@ -55,6 +56,8 @@ std::string AudioDevice::GetTypeString(AudioDeviceType type) {
return "INTERNAL_MIC";
case AUDIO_TYPE_KEYBOARD_MIC:
return "KEYBOARD_MIC";
+ case AUDIO_TYPE_AOKR:
+ return "AOKR";
case AUDIO_TYPE_OTHER:
default:
return "OTHER";
@@ -80,6 +83,8 @@ AudioDeviceType AudioDevice::GetAudioType(
return AUDIO_TYPE_HDMI;
else if (node_type.find("INTERNAL_SPEAKER") != std::string::npos)
return AUDIO_TYPE_INTERNAL_SPEAKER;
+ else if (node_type.find("AOKR") != std::string::npos)
+ return AUDIO_TYPE_AOKR;
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