From 33fad99acfaffb775ce0792b06ba97bb6cacce1a Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Sun, 24 Jul 2011 16:31:03 -0700 Subject: [PATCH] Fix bug 4211099 channel constants and 7.1 mask Add definitions for the side and elevated channels. Ccorrect definition of 7.1 mask which uses the side channels rather than the front half-pan channels. Change-Id: I5b6f601f6404d782dc46ef47efac9cc8441fef90 --- include/system/audio.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/include/system/audio.h b/include/system/audio.h index 2e261cebe..f4aaa4f75 100644 --- a/include/system/audio.h +++ b/include/system/audio.h @@ -165,6 +165,15 @@ typedef enum { AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER = 0x100, AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 0x200, AUDIO_CHANNEL_OUT_BACK_CENTER = 0x400, + AUDIO_CHANNEL_OUT_SIDE_LEFT = 0x800, + AUDIO_CHANNEL_OUT_SIDE_RIGHT = 0x1000, + AUDIO_CHANNEL_OUT_TOP_CENTER = 0x2000, + AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT = 0x4000, + AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER = 0x8000, + AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT = 0x10000, + AUDIO_CHANNEL_OUT_TOP_BACK_LEFT = 0x20000, + AUDIO_CHANNEL_OUT_TOP_BACK_CENTER = 0x40000, + AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT = 0x80000, AUDIO_CHANNEL_OUT_MONO = AUDIO_CHANNEL_OUT_FRONT_LEFT, AUDIO_CHANNEL_OUT_STEREO = (AUDIO_CHANNEL_OUT_FRONT_LEFT | @@ -183,14 +192,15 @@ typedef enum { AUDIO_CHANNEL_OUT_LOW_FREQUENCY | AUDIO_CHANNEL_OUT_BACK_LEFT | AUDIO_CHANNEL_OUT_BACK_RIGHT), + // matches the correct AudioFormat.CHANNEL_OUT_7POINT1_SURROUND definition for 7.1 AUDIO_CHANNEL_OUT_7POINT1 = (AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_LOW_FREQUENCY | AUDIO_CHANNEL_OUT_BACK_LEFT | AUDIO_CHANNEL_OUT_BACK_RIGHT | - AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER | - AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER), + AUDIO_CHANNEL_OUT_SIDE_LEFT | + AUDIO_CHANNEL_OUT_SIDE_RIGHT), AUDIO_CHANNEL_OUT_ALL = (AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER | @@ -199,7 +209,16 @@ typedef enum { AUDIO_CHANNEL_OUT_BACK_RIGHT | AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER | AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER | - AUDIO_CHANNEL_OUT_BACK_CENTER), + AUDIO_CHANNEL_OUT_BACK_CENTER| + AUDIO_CHANNEL_OUT_SIDE_LEFT| + AUDIO_CHANNEL_OUT_SIDE_RIGHT| + AUDIO_CHANNEL_OUT_TOP_CENTER| + AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT| + AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER| + AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT| + AUDIO_CHANNEL_OUT_TOP_BACK_LEFT| + AUDIO_CHANNEL_OUT_TOP_BACK_CENTER| + AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT), /* input channels */ AUDIO_CHANNEL_IN_LEFT = 0x4,