]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/device-ti-common-open.git/commitdiff
audio: policy: Add support for auxiliary input
authorMisael Lopez Cruz <misael.lopez@ti.com>
Mon, 27 Jan 2014 23:40:54 +0000 (17:40 -0600)
committerMisael Lopez Cruz <misael.lopez@ti.com>
Thu, 30 Jan 2014 23:05:50 +0000 (17:05 -0600)
Add support for auxiliary input source which is mapped to the
AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET device. This device must be
supported by the AudioHAL and declared as supported and present
in the audio_policy.conf.

Change-Id: Id2bdc9c9d4c7b6176bf4d1f17e8418a0e31bbdad
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
audio/policy/multizone/AudioPolicyManager.cpp

index 2f5d036888930c4ce52f5bf5eba86867cb2b4db4..4196171272bfe0b488c1f5efa2ddceee0cd1666c 100644 (file)
@@ -3108,6 +3108,11 @@ audio_devices_t AudioPolicyManager::getDeviceForInputSource(int inputSource)
             device = AUDIO_DEVICE_IN_REMOTE_SUBMIX;
         }
         break;
+    case AUDIO_SOURCE_AUXILIARY_INPUT:
+        if (mAvailableInputDevices & AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET) {
+            device = AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET;
+        }
+        break;
     default:
         ALOGW("getDeviceForInputSource() invalid input source %d", inputSource);
         break;