From 296fb13dd9b5e90d6a05cce897c3b1e7914a478a Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Fri, 1 May 2015 11:38:42 -0700 Subject: 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 --- services/audioflinger/Threads.h | 1 + 1 file changed, 1 insertion(+) (limited to 'services/audioflinger/Threads.h') 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 @@ protected: 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; -- cgit v1.1