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

Commit db4ea93d authored by Robert Wu's avatar Robert Wu Committed by Mikhail Naganov
Browse files

AAudio: Support front wide channels

When channel masks were added to AAudio, front wide channels were not
yet supported by audio-hals-enum.h. With ag/15193294, we can actually
support 9.1.x configurations.

Bug: 289125033
Bug: 333541578
Test: OboeTester Test Output after increasing FCC_LIMIT
Test: atest AAudioTests
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:06047b9fa5638ed005a3dfdcd2bff4fadd6d89e1)
Merged-In: I6f88b74ee5f50b86088c6e1c4cca374cfe85e444
Change-Id: I6f88b74ee5f50b86088c6e1c4cca374cfe85e444
parent 0ca052b7
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -352,11 +352,10 @@ audio_channel_mask_t AAudioConvert_aaudioToAndroidChannelLayoutMask(
                return AUDIO_CHANNEL_OUT_7POINT1POINT2;
            case AAUDIO_CHANNEL_7POINT1POINT4:
                return AUDIO_CHANNEL_OUT_7POINT1POINT4;
            // TODO: add 9point1point4 and 9point1point6 when they are added in audio-hal-enums.h
            // case AAUDIO_CHANNEL_9POINT1POINT4:
            //     return AUDIO_CHANNEL_OUT_9POINT1POINT4;
            // case AAUDIO_CHANNEL_9POINT1POINT6:
            //     return AUDIO_CHANNEL_OUT_9POINT1POINT6;
            case AAUDIO_CHANNEL_9POINT1POINT4:
                return AUDIO_CHANNEL_OUT_9POINT1POINT4;
            case AAUDIO_CHANNEL_9POINT1POINT6:
                return AUDIO_CHANNEL_OUT_9POINT1POINT6;
            default:
                ALOGE("%s() %#x unrecognized", __func__, channelMask);
                return AUDIO_CHANNEL_INVALID;
@@ -434,11 +433,10 @@ aaudio_channel_mask_t AAudioConvert_androidToAAudioChannelLayoutMask(
                return AAUDIO_CHANNEL_7POINT1POINT2;
            case AUDIO_CHANNEL_OUT_7POINT1POINT4:
                return AAUDIO_CHANNEL_7POINT1POINT4;
            // TODO: add 9point1point4 and 9point1point6 when they are added in audio-hal-enums.h
            // case AUDIO_CHANNEL_OUT_9POINT1POINT4:
            //     return AAUDIO_CHANNEL_9POINT1POINT4;
            // case AUDIO_CHANNEL_OUT_9POINT1POINT6:
            //     return AAUDIO_CHANNEL_9POINT1POINT6;
            case AUDIO_CHANNEL_OUT_9POINT1POINT4:
                return AAUDIO_CHANNEL_9POINT1POINT4;
            case AUDIO_CHANNEL_OUT_9POINT1POINT6:
                return AAUDIO_CHANNEL_9POINT1POINT6;
            default:
                ALOGE("%s() %#x unrecognized", __func__, channelMask);
                return AAUDIO_CHANNEL_INVALID;