Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72ab5aef authored by Marc Kassis's avatar Marc Kassis
Browse files

Implement 6.1 audio channel mask

Test: atest android.media.audio.cts.AudioTrackTest android.media.audio.cts.AudioFormatTest
Bug: 234721217
Change-Id: Ifa814760cadfda6d84b352b6d8880810b3f9cca5
parent b91f96a9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -20057,6 +20057,7 @@ package android.media {
    field public static final int CHANNEL_OUT_5POINT1 = 252; // 0xfc
    field public static final int CHANNEL_OUT_5POINT1POINT2 = 3145980; // 0x3000fc
    field public static final int CHANNEL_OUT_5POINT1POINT4 = 737532; // 0xb40fc
    field public static final int CHANNEL_OUT_6POINT1 = 1276; // 0x4fc
    field @Deprecated public static final int CHANNEL_OUT_7POINT1 = 1020; // 0x3fc
    field public static final int CHANNEL_OUT_7POINT1POINT2 = 3152124; // 0x3018fc
    field public static final int CHANNEL_OUT_7POINT1POINT4 = 743676; // 0xb58fc
+3 −0
Original line number Diff line number Diff line
@@ -516,6 +516,9 @@ public final class AudioFormat implements Parcelable {
    /** Output channel mask for 5.1 */
    public static final int CHANNEL_OUT_5POINT1 = (CHANNEL_OUT_FRONT_LEFT | CHANNEL_OUT_FRONT_RIGHT |
            CHANNEL_OUT_FRONT_CENTER | CHANNEL_OUT_LOW_FREQUENCY | CHANNEL_OUT_BACK_LEFT | CHANNEL_OUT_BACK_RIGHT);
    /** Output channel mask for 6.1
     *  Same as 5.1 with the addition of the back center channel */
    public static final int CHANNEL_OUT_6POINT1 = (CHANNEL_OUT_5POINT1 | CHANNEL_OUT_BACK_CENTER);
    /** @hide */
    public static final int CHANNEL_OUT_5POINT1_SIDE = (CHANNEL_OUT_FRONT_LEFT | CHANNEL_OUT_FRONT_RIGHT |
            CHANNEL_OUT_FRONT_CENTER | CHANNEL_OUT_LOW_FREQUENCY |
+1 −7
Original line number Diff line number Diff line
@@ -355,13 +355,7 @@ public class AidlConversion {
                        case AudioChannelLayout.LAYOUT_5POINT1POINT4:
                            return AudioFormat.CHANNEL_OUT_5POINT1POINT4;
                        case AudioChannelLayout.LAYOUT_6POINT1:
                            return AudioFormat.CHANNEL_OUT_FRONT_LEFT
                                    | AudioFormat.CHANNEL_OUT_FRONT_RIGHT
                                    | AudioFormat.CHANNEL_OUT_FRONT_CENTER
                                    | AudioFormat.CHANNEL_OUT_LOW_FREQUENCY
                                    | AudioFormat.CHANNEL_OUT_BACK_LEFT
                                    | AudioFormat.CHANNEL_OUT_BACK_RIGHT
                                    | AudioFormat.CHANNEL_OUT_BACK_CENTER;
                            return AudioFormat.CHANNEL_OUT_6POINT1;
                        case AudioChannelLayout.LAYOUT_7POINT1:
                            return AudioFormat.CHANNEL_OUT_7POINT1_SURROUND;
                        case AudioChannelLayout.LAYOUT_7POINT1POINT2: