From 1579201024f787800c58ba21301571c1e746f0b1 Mon Sep 17 00:00:00 2001 From: Pavan Chikkala Date: Mon, 28 Oct 2013 19:16:18 +0530 Subject: [PATCH] audio: Fix submix output device check. -AUDIO_DEVICE_IN_FM_RX is incorrectly matched with AUDIO_DEVICE_OUT_REMOTE_SUBMIX because method audio_is_remote_submix_device is not checking for AUDIO_DEVICE_BIT_IN. -Fix is to add AUDIO_DEVICE_BIT_IN while doing the check for AUDIO_DEVICE_OUT_REMOTE_SUBMIX. CRs-Fixed: 566837 Change-Id: I47ca3bd151da848a444d4bcf83a56e866f20d4f7 (cherry picked from commit f8573b76d6c03e1a9eff34e093056a810f898509) (cherry picked from commit ae982a488c68e0cd06622e7ee7a31fddb1f4d131) --- include/system/audio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/system/audio.h b/include/system/audio.h index 04238df8..5cfaabbc 100755 --- a/include/system/audio.h +++ b/include/system/audio.h @@ -637,7 +637,7 @@ static inline bool audio_is_usb_device(audio_devices_t device) static inline bool audio_is_remote_submix_device(audio_devices_t device) { - if ((device & AUDIO_DEVICE_OUT_REMOTE_SUBMIX) == AUDIO_DEVICE_OUT_REMOTE_SUBMIX + if ((device & AUDIO_DEVICE_BIT_IN | device & AUDIO_DEVICE_OUT_REMOTE_SUBMIX) == AUDIO_DEVICE_OUT_REMOTE_SUBMIX || (device & AUDIO_DEVICE_IN_REMOTE_SUBMIX) == AUDIO_DEVICE_IN_REMOTE_SUBMIX) return true; else