diff options
author | Eric Laurent <elaurent@google.com> | 2014-08-01 14:48:35 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-08-06 00:38:23 +0000 |
commit | 93c3d41bdb15e39dac0faea9c5b60f1637cd477c (patch) | |
tree | a0d739ad732f10bc9d4548923c78c590841b14da /include | |
parent | 92ce4715315bddd158c7d4028556632f0547e3b9 (diff) | |
download | frameworks_av-93c3d41bdb15e39dac0faea9c5b60f1637cd477c.zip frameworks_av-93c3d41bdb15e39dac0faea9c5b60f1637cd477c.tar.gz frameworks_av-93c3d41bdb15e39dac0faea9c5b60f1637cd477c.tar.bz2 |
AudioSystem: add API to query audio HW sync source
Add a method to query from the audio HAL the HW sync
source used for a given audio session.
Modify audio policy to select a direct output with HW sync
when requested.
Bug: 16132368.
Change-Id: I03038f9188f2d389f8a5fd76a671854013a4513e
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioSystem.h | 5 | ||||
-rw-r--r-- | include/media/IAudioFlinger.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index f22792f..dd63a23 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -149,6 +149,11 @@ public: static void acquireAudioSessionId(int audioSession, pid_t pid); static void releaseAudioSessionId(int audioSession, pid_t pid); + // Get the HW synchronization source used for an audio session. + // Return a valid source or AUDIO_HW_SYNC_INVALID if an error occurs + // or no HW sync source is used. + static audio_hw_sync_t getAudioHwSyncForSession(audio_session_t sessionId); + // types of io configuration change events received with ioConfigChanged() enum io_config_event { OUTPUT_OPENED, diff --git a/include/media/IAudioFlinger.h b/include/media/IAudioFlinger.h index 82ec09c..31a14f0 100644 --- a/include/media/IAudioFlinger.h +++ b/include/media/IAudioFlinger.h @@ -235,6 +235,8 @@ public: /* Set audio port configuration */ virtual status_t setAudioPortConfig(const struct audio_port_config *config) = 0; + /* Get the HW synchronization source used for an audio session */ + virtual audio_hw_sync_t getAudioHwSyncForSession(audio_session_t sessionId) = 0; }; |