diff options
author | Eric Laurent <elaurent@google.com> | 2014-08-04 20:36:31 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-08-05 17:16:32 -0700 |
commit | cf817a2330936947df94c11859f48771f5596a59 (patch) | |
tree | c9c386dabb997f20b2f1046b6087b26e71b66ed9 /services/audioflinger/Threads.cpp | |
parent | e46711343b43786c049a007369a72c1c78e6c5db (diff) | |
download | frameworks_av-cf817a2330936947df94c11859f48771f5596a59.zip frameworks_av-cf817a2330936947df94c11859f48771f5596a59.tar.gz frameworks_av-cf817a2330936947df94c11859f48771f5596a59.tar.bz2 |
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
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r-- | services/audioflinger/Threads.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 2e2f533..2f65370 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -2639,12 +2639,9 @@ bool AudioFlinger::PlaybackThread::threadLoop() threadLoop_exit(); - // for DuplicatingThread, standby mode is handled by the outputTracks, otherwise ... - if (mType == MIXER || mType == DIRECT || mType == OFFLOAD) { - // put output stream into standby mode - if (!mStandby) { - mOutput->stream->common.standby(&mOutput->stream->common); - } + if (!mStandby) { + threadLoop_standby(); + mStandby = true; } releaseWakeLock(); |