audio: Make speaker swap on screen rotation optional

Change-Id: I73623629c4418bff8178793d856d8da98b694283
tirimbino
Andreas Schneider 8 years ago
parent cdad20da45
commit dc15cec22a
  1. 2
      audio/audio_hw.c
  2. 6
      audio/include/samsung_audio.h

@ -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);

@ -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

Loading…
Cancel
Save