From fa90e84ed0cb2abdc0e0873a06d10ccf2b3c34f6 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Fri, 17 Oct 2014 18:12:31 -0700 Subject: audioflinger: new HW A/V sync ID allocation flow The HW A/V sync ID is now allocated by the audio HAL before the output stream is created by a call to global get_parameters() with key AUDIO_PARAMETER_HW_AV_SYNC. When the AudioTrack is created, the HW A/V sync ID is communicated to the output stream by stream set_parameters() with key AUDIO_PARAMETER_STREAM_HW_AV_SYNC. Bug: 17112525. Change-Id: Ia8bc6f3bf9f358aa89f3f56ac554e893a19811ad --- services/audioflinger/AudioFlinger.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'services/audioflinger/AudioFlinger.h') diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index 1003017..4fb372d 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -733,6 +733,8 @@ private: // Effect chains without a valid thread DefaultKeyedVector< audio_session_t , sp > mOrphanEffectChains; + // list of sessions for which a valid HW A/V sync ID was retrieved from the HAL + DefaultKeyedVector< audio_session_t , audio_hw_sync_t >mHwAvSyncIds; private: sp registerPid(pid_t pid); // always returns non-0 @@ -741,6 +743,7 @@ private: void closeOutputInternal_l(sp thread); status_t closeInput_nonvirtual(audio_io_handle_t input); void closeInputInternal_l(sp thread); + void setAudioHwSyncForSession_l(PlaybackThread *thread, audio_session_t sessionId); #ifdef TEE_SINK // all record threads serially share a common tee sink, which is re-created on format change -- cgit v1.1