Built-in mic is not used when USB mic is disconnected

In some cases when the USB microphone is disconnected,
audio stack does not switch to the built-in microphone.
It gets stuck in a state where it still recognizes the
USB mic is still connected. Current device removal
implementation only considers USB output devices such
as headset. The same process should be used for input
USB devices (microphone).

Bug: 24932354
Change-Id: Ic2089ef5a9a318cb47336ade405f79eccd7129f8
Signed-off-by: Alejandro Ochoa <alejandro.ochoa@intel.com>
This commit is contained in:
Alejandro Ochoa
2015-10-30 20:05:00 -06:00
committed by Glenn Kasten
parent a61515720a
commit 46b434ff98

View File

@@ -439,7 +439,7 @@ public final class UsbAlsaManager {
UsbAudioDevice audioDevice = mAudioDevices.remove(usbDevice);
if (audioDevice != null) {
if (audioDevice.mHasPlayback || audioDevice.mHasPlayback) {
if (audioDevice.mHasPlayback || audioDevice.mHasCapture) {
notifyDeviceState(audioDevice, false);
// if there any external devices left, select one of them