summaryrefslogtreecommitdiffstats
path: root/libs/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2009-09-15 07:10:12 -0700
committerEric Laurent <elaurent@google.com>2009-09-15 07:10:12 -0700
commitb3687ae925280a7addfaa0b724218bf8db197725 (patch)
tree025c297f138df00c11e1bd7474242def1cc06891 /libs/audioflinger/AudioFlinger.h
parentf5733b2938151fda955f01d9dc3ad15f7292604d (diff)
downloadframeworks_native-b3687ae925280a7addfaa0b724218bf8db197725.zip
frameworks_native-b3687ae925280a7addfaa0b724218bf8db197725.tar.gz
frameworks_native-b3687ae925280a7addfaa0b724218bf8db197725.tar.bz2
Fix issue 2118464: cannot play ring tones and notifications after disconnecting BT headset while in call.
The problem comes from the fact that when the duplicated output is closed after BT headset disconnection, the OUTPUT_CLOSED notification is not sent to AudioSystem. Then the mapping between notification stream and duplicated output cached in AudioSystem is not cleared and next time a notification is played, the duplicated output is selected and the createTrack() request is refused by AudioFlinger as the selected output doesn't exist. The notification is ignored by AudioFlinger because when it is sent by the terminating playback thread, the thread has already been removed from the playback thread list. The fix consists in sending the notification in closeOutput() and not when exiting the playback thread. The same fix is applied to record threads.
Diffstat (limited to 'libs/audioflinger/AudioFlinger.h')
-rw-r--r--libs/audioflinger/AudioFlinger.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/audioflinger/AudioFlinger.h b/libs/audioflinger/AudioFlinger.h
index 65c148e..7a6641f 100644
--- a/libs/audioflinger/AudioFlinger.h
+++ b/libs/audioflinger/AudioFlinger.h
@@ -616,7 +616,7 @@ private:
MixerThread *checkMixerThread_l(int output) const;
RecordThread *checkRecordThread_l(int input) const;
float streamVolumeInternal(int stream) const { return mStreamTypes[stream].volume; }
- void audioConfigChanged(int event, const sp<ThreadBase>& thread, void *param2);
+ void audioConfigChanged_l(int event, const sp<ThreadBase>& thread, void *param2);
friend class AudioBuffer;