summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiabin <jiabin@google.com>2022-09-15 17:52:23 +0000
committerJiabin Huang <jiabin@google.com>2022-11-18 16:09:16 +0000
commit2c622db9e4242462e951d0261f5a06a355b53959 (patch)
tree206766a25b7c51016432c45ff9354a186526eca3
parent3664fa125791584e5bbc88fe548b08dab49244dd (diff)
downloadmedia-2c622db9e4242462e951d0261f5a06a355b53959.tar.gz
Add function to get index mask from output channel mask.
Bug: 245793724 Test: atest AudioPlaybackCaptureTest Change-Id: Ibda02dfd23461efc2d3d58c655e4140e2046f270 Merged-In: Ibda02dfd23461efc2d3d58c655e4140e2046f270
-rw-r--r--audio/include/system/audio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/audio/include/system/audio.h b/audio/include/system/audio.h
index 70e4241a..f359600d 100644
--- a/audio/include/system/audio.h
+++ b/audio/include/system/audio.h
@@ -1724,6 +1724,12 @@ static inline audio_channel_mask_t audio_channel_mask_out_to_in(audio_channel_ma
}
}
+static inline audio_channel_mask_t audio_channel_mask_out_to_in_index_mask(audio_channel_mask_t out)
+{
+ return audio_channel_mask_for_index_assignment_from_count(
+ audio_channel_count_from_out_mask(out));
+}
+
static inline bool audio_channel_position_mask_is_out_canonical(audio_channel_mask_t channelMask)
{
if (audio_channel_mask_get_representation(channelMask)