summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2017-01-20 10:14:23 +0100
committerAndreas Schneider <asn@cryptomilk.org>2017-01-20 10:36:34 +0100
commit53a686c8205ae77111c1666730d8b6fc2ead42b9 (patch)
tree10f2818cfb356559540f48e9961e118337123fbf
parentee21158912a5d7db9b30c84936a6112db6fb7612 (diff)
downloadandroid_device_samsung_sltexx-53a686c8205ae77111c1666730d8b6fc2ead42b9.tar.gz
android_device_samsung_sltexx-53a686c8205ae77111c1666730d8b6fc2ead42b9.tar.xz
android_device_samsung_sltexx-53a686c8205ae77111c1666730d8b6fc2ead42b9.zip
audio: Fix routing issues
Maybe we need to check other dapm sources too. This is the way to get my dapm to shut down.
-rw-r--r--hal/audio/audio_hw.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/hal/audio/audio_hw.c b/hal/audio/audio_hw.c
index 883e1c1..8bb1d31 100644
--- a/hal/audio/audio_hw.c
+++ b/hal/audio/audio_hw.c
@@ -696,21 +696,23 @@ static void select_devices(struct audio_device *adev)
/*
* Disable the output and input device
*/
- if (adev->active_output.route != NULL) {
- disable_audio_route(adev, adev->active_output.route);
- }
if (adev->active_output.device != NULL) {
disable_audio_device(adev, adev->active_output.device);
output_device_off(adev->active_output.dev_id);
}
-
- if (adev->active_input.route != NULL) {
- disable_audio_route(adev, adev->active_input.route);
+ if (adev->active_output.route != NULL) {
+ disable_audio_route(adev, adev->active_output.route);
+ usleep(5);
}
+
if (adev->active_input.device != NULL) {
disable_audio_device(adev, adev->active_input.device);
input_devices_off();
}
+ if (adev->active_input.route != NULL) {
+ disable_audio_route(adev, adev->active_input.route);
+ usleep(5);
+ }
/*
* Already tell the modem that we are in a call. This should make it