summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2017-01-30 22:36:25 +0100
committerAndreas Schneider <asn@cryptomilk.org>2017-02-02 12:39:54 +0100
commitdc15cec22a74aaa1a3bcd58534d5b2310a4250d7 (patch)
tree9efd92659116cb25dc96a7062ab7120c958c7773 /audio
parentcdad20da45269c9c5d7308f7d63de1350e04d94d (diff)
downloadhardware_samsung-dc15cec22a74aaa1a3bcd58534d5b2310a4250d7.tar.gz
hardware_samsung-dc15cec22a74aaa1a3bcd58534d5b2310a4250d7.tar.bz2
hardware_samsung-dc15cec22a74aaa1a3bcd58534d5b2310a4250d7.zip
audio: Make speaker swap on screen rotation optional
Change-Id: I73623629c4418bff8178793d856d8da98b694283
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c2
-rw-r--r--audio/include/samsung_audio.h6
2 files changed, 8 insertions, 0 deletions
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 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
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 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
}
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