audio: Make speaker swap on screen rotation optional
Change-Id: I73623629c4418bff8178793d856d8da98b694283
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 7d6a193..cd47e14 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -3767,6 +3767,7 @@
adev->bluetooth_nrec = false;
}
+#if SWAP_SPEAKER_ON_SCREEN_ROTATION
ret = str_parms_get_int(parms, "rotation", &val);
if (ret >= 0) {
bool reverse_speakers = false;
@@ -3800,6 +3801,7 @@
}
pthread_mutex_unlock(&adev->lock);
}
+#endif /* SWAP_SPEAKER_ON_SCREEN_ROTATION */
str_parms_destroy(parms);
diff --git a/audio/include/samsung_audio.h b/audio/include/samsung_audio.h
index 6aaf4df..46fe989 100644
--- a/audio/include/samsung_audio.h
+++ b/audio/include/samsung_audio.h
@@ -44,5 +44,11 @@
#define SOUND_CAPTURE_HOTWORD_DEVICE 0
*/
+/*
+ * If the device has stereo speakers and the speakers are arranged on
+ * different sides of the device you can activate this feature by
+ * setting it to 1.
+ */
+#define SWAP_SPEAKER_ON_SCREEN_ROTATION 0
#endif // SAMSUNG_AUDIO_H