OSDN Git Service

handle in and out audio device connection separately
authorEric Laurent <elaurent@google.com>
Thu, 29 May 2014 23:14:44 +0000 (16:14 -0700)
committerEric Laurent <elaurent@google.com>
Thu, 29 May 2014 23:14:44 +0000 (16:14 -0700)
AudioService now indicates in and out device connection
separately in case of combined devices like wired headset
or BT SCO headset.

Change-Id: Id20e02bb351cc732ceddccf597742ced049671a8

audio/AudioPolicyManagerBase.cpp

index a12eeff..217b365 100644 (file)
@@ -184,15 +184,7 @@ status_t AudioPolicyManagerBase::setDeviceConnectionState(audio_devices_t device
                             0);
         }
 
-        if (device == AUDIO_DEVICE_OUT_WIRED_HEADSET) {
-            device = AUDIO_DEVICE_IN_WIRED_HEADSET;
-        } else if (device == AUDIO_DEVICE_OUT_BLUETOOTH_SCO ||
-                   device == AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET ||
-                   device == AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT) {
-            device = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET;
-        } else {
-            return NO_ERROR;
-        }
+        return NO_ERROR;
     }  // end if is output device
 
     // handle input devices