Chromium Code Reviews| Index: chromeos/audio/cras_audio_handler.cc |
| diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc |
| index 8ee6009f35c69e6ee1ec3070716b5bf75654fd30..3ce04ad7bea07b74e9fa9eef28d436a7227dcf28 100644 |
| --- a/chromeos/audio/cras_audio_handler.cc |
| +++ b/chromeos/audio/cras_audio_handler.cc |
| @@ -10,6 +10,7 @@ |
| #include "base/bind.h" |
| #include "base/bind_helpers.h" |
| #include "base/logging.h" |
| +#include "base/sys_info.h" |
|
aluebs-chromium
2015/08/28 19:14:29
Does this need to be guarded by #if defined(OS_CHR
ajm
2015/08/28 23:38:31
See below.
|
| #include "chromeos/audio/audio_devices_pref_handler.h" |
| #include "chromeos/audio/audio_devices_pref_handler_stub.h" |
| #include "chromeos/dbus/dbus_thread_manager.h" |
| @@ -864,6 +865,22 @@ void CrasAudioHandler::UpdateDevicesAndSwitchActive( |
| size_t new_input_device_size = 0; |
| for (size_t i = 0; i < nodes.size(); ++i) { |
| AudioDevice device(nodes[i]); |
| + |
| + // TODO(ajm): This is a temporary proof-of-concept hack. These values should |
|
Henrik Grunell
2015/08/27 08:38:18
Do you intend to fix the todo before landing?
ajm
2015/08/28 07:36:13
I wasn't going to, but it looks like Hsin-yu might
Henrik Grunell
2015/08/28 15:04:34
Acknowledged.
|
| + // come from the cras configs for each board. |
| + if (device.type == AUDIO_TYPE_INTERNAL_MIC) { |
| + const std::string& board = base::SysInfo::GetLsbReleaseBoard(); |
|
aluebs-chromium
2015/08/28 19:14:30
Does this need to be guarded by #if defined(OS_CHR
ajm
2015/08/28 23:38:31
This should only run on ChromeOS so I don't think
aluebs-chromium
2015/08/29 00:00:26
Great! :)
|
| + if (board.find("nyan_kitty") != std::string::npos) { |
| + device.mic_positions = "-0.03 0 0 0.03 0 0"; |
| + } else if (board.find("peach_pi") != std::string::npos) { |
| + device.mic_positions = "-0.025 0 0 0.025 0 0"; |
| + } else if (board.find("samus") != std::string::npos) { |
| + device.mic_positions = "-0.032 0 0 0.032 0 0"; |
| + } else if (board.find("swanky") != std::string::npos) { |
| + device.mic_positions = "-0.026 0 0 0.026 0 0"; |
| + } |
| + } |
| + |
| audio_devices_[device.id] = device; |
| if (!has_alternative_input_ && |