diff options
author | Steve Kondik <steve@cyngn.com> | 2015-10-16 02:06:35 -0700 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2017-01-02 01:32:44 +0200 |
commit | 581eee4f2c75540ea7238e04bb66c12e64e53537 (patch) | |
tree | f843129b631bcb430593e5c787031cf71b3ea1f9 | |
parent | bb88abc3e9a9c2d03273832246460e87d860dc1f (diff) | |
download | android_system_media-581eee4f2c75540ea7238e04bb66c12e64e53537.tar.gz android_system_media-581eee4f2c75540ea7238e04bb66c12e64e53537.tar.bz2 android_system_media-581eee4f2c75540ea7238e04bb66c12e64e53537.zip |
audio: Add helper method for PCM offload formats
Change-Id: Ie00a65ad1449c1838fd4335b7083351c59240e9c
-rw-r--r-- | audio/include/system/audio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/audio/include/system/audio.h b/audio/include/system/audio.h index fa80a459..a5ed7748 100644 --- a/audio/include/system/audio.h +++ b/audio/include/system/audio.h @@ -1627,6 +1627,14 @@ static inline bool audio_has_proportional_frames(audio_format_t format) || mainFormat == AUDIO_FORMAT_IEC61937); } +static inline bool audio_is_offload_pcm(audio_format_t format) +{ +#ifdef QCOM_HARDWARE + return ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_PCM_OFFLOAD); +#endif + return false; +} + static inline size_t audio_bytes_per_sample(audio_format_t format) { size_t size = 0; |