From 72e3f39146fce4686bd96f11057c051bea376dfb Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Wed, 20 May 2015 14:43:50 -0700 Subject: audio flinger: do not call JAVA services until system is ready Wait for system ready indication form AudioService before enabling calls to scheduling service or power manager. Bug: 11520969. Change-Id: I221927394f4a08fd86c9d457e55dd0e07949f0cf --- include/media/AudioSystem.h | 3 +++ include/media/IAudioFlinger.h | 3 +++ 2 files changed, 6 insertions(+) (limited to 'include/media') diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 3241e9c..26cffa6 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -158,6 +158,9 @@ public: // or no HW sync source is used. static audio_hw_sync_t getAudioHwSyncForSession(audio_session_t sessionId); + // Indicate JAVA services are ready (scheduling, power management ...) + static status_t systemReady(); + // Events used to synchronize actions between audio sessions. // For instance SYNC_EVENT_PRESENTATION_COMPLETE can be used to delay recording start until // playback is complete on another audio session. diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index 3f7fd09..5051aff 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -243,6 +243,9 @@ public: /* Get the HW synchronization source used for an audio session */ virtual audio_hw_sync_t getAudioHwSyncForSession(audio_session_t sessionId) = 0; + + /* Indicate JAVA services are ready (scheduling, power management ...) */ + virtual status_t systemReady() = 0; }; -- cgit v1.1