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

Unified Diff: chromeos/audio/cras_audio_handler.cc

Issue 620673002: Flip the left/right speaker when the device is in yoga mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change internal speaker channel mode OnDisplayAdded. Created 6 years, 3 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
Index: chromeos/audio/cras_audio_handler.cc
diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc
index c6453118b4c393381d38ddf2489b37e0845530f4..d3d0d90f29bbbceb055ae2d151755953385bb761 100644
--- a/chromeos/audio/cras_audio_handler.cc
+++ b/chromeos/audio/cras_audio_handler.cc
@@ -253,6 +253,19 @@ void CrasAudioHandler::RemoveAllActiveNodes() {
}
}
+void CrasAudioHandler::SwapInternalSpeakerLeftRightChannel(bool swap) {
+ for (AudioDeviceMap::const_iterator it = audio_devices_.begin();
+ it != audio_devices_.end();
+ ++it) {
+ const AudioDevice& device = it->second;
+ if (!device.is_input && device.type == AUDIO_TYPE_INTERNAL_SPEAKER) {
+ chromeos::DBusThreadManager::Get()->GetCrasAudioClient()->SwapLeftRight(
+ device.id, swap);
+ break;
+ }
+ }
+}
+
bool CrasAudioHandler::has_alternative_input() const {
return has_alternative_input_;
}

Powered by Google App Engine
This is Rietveld 408576698