OSDN Git Service

audio: fix crashes upon USB device connection
authorEric Laurent <elaurent@google.com>
Tue, 5 Aug 2014 03:36:31 +0000 (20:36 -0700)
committerEric Laurent <elaurent@google.com>
Wed, 6 Aug 2014 00:16:32 +0000 (17:16 -0700)
commitcf817a2330936947df94c11859f48771f5596a59
treec9c386dabb997f20b2f1046b6087b26e71b66ed9
parente46711343b43786c049a007369a72c1c78e6c5db
audio: fix crashes upon USB device connection

- Audio policy:
Replace unknown device assertion by debug log in setDeviceConnectionState().
It is possible that some kernels indicate connection of a legacy device type
when a USB audio device is connected.
We should just ignore this device.

- Audio flinger:
Make sure FastMixer thread is idle before exiting the normal mixer thread and
closing the output stream.

Change-Id: Ia10a20176a60a8aa56765538093a555fc998508a
services/audioflinger/Threads.cpp
services/audiopolicy/AudioPolicyManager.cpp