Implement audio device callback
Add class AudioSystem::AudioDeviceCallback notifying
AudioSystem clients upon device selection change on a given
input or output thread.
Maintain a list of installed callback per I/O handle in AudioSystem
and call registered callbacks when an OPEN of CONFIG_CHANGED event
is received on IAudioFlingerClient::ioConfigChanged().
Add methods to AudioTrack and AudioRecord to add and remove device
change callbacks.
Add methods to AudioTrack and AudioRecord to query currently selected
device.
ioConfigChanged() events now convey the audio patch describing
the input or output thread routing.
Fix AudioRecord failure to start when invalidation is
handled by start().
Change-Id: I9e938adf025fa712337c63b1e02a8c18f2a20d39
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index 8167bd1..0a5597f 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -426,6 +426,7 @@
bool mStandby; // Whether thread is currently in standby.
audio_devices_t mOutDevice; // output device
audio_devices_t mInDevice; // input device
+ struct audio_patch mPatch;
audio_source_t mAudioSource;
const audio_io_handle_t mId;