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

Commit 64b6cb2c authored by Andy Hung's avatar Andy Hung
Browse files

Allow creation of output endpoints with channel index masks

Bug: 21301523
Change-Id: I97e578f3da933f7086e4f431a199ed907f04cbc8
parent 467b6e15
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -356,6 +356,15 @@ private:
            // check that channelMask is the "canonical" one we expect for the channelCount.
            return channelMask == audio_channel_out_mask_from_count(channelCount);
            }
        case AUDIO_CHANNEL_REPRESENTATION_INDEX:
            if (kEnableExtendedChannels) {
                const uint32_t channelCount = audio_channel_count_from_out_mask(channelMask);
                if (channelCount >= FCC_2 // mono is not supported at this time
                        && channelCount <= AudioMixer::MAX_NUM_CHANNELS) {
                    return true;
                }
            }
            return false;
        default:
            return false;
        }