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

Commit 3c81e3a0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "lvm wrapper: Set SourceFormat as per number of channels" am: 953c4bd5 am: 74ba7b84

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1613061

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie5e8a9862a64d3df3b9cbe479e1d5416571e919e
parents 699a3958 74ba7b84
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -982,6 +982,16 @@ int Effect_setConfig(EffectContext* pContext, effect_config_t* pConfig) {
        ActiveParams.NrChannels = NrChannels;
        ActiveParams.ChMask = pConfig->inputCfg.channels;

        if (NrChannels == 1) {
            ActiveParams.SourceFormat = LVM_MONO;
        } else if (NrChannels == 2) {
            ActiveParams.SourceFormat = LVM_STEREO;
        } else if (NrChannels > 2 && NrChannels <= LVM_MAX_CHANNELS) {
            ActiveParams.SourceFormat = LVM_MULTICHANNEL;
        } else {
            return -EINVAL;
        }

        LvmStatus = LVM_SetControlParameters(pContext->pBundledContext->hInstance, &ActiveParams);

        LVM_ERROR_CHECK(LvmStatus, "LVM_SetControlParameters", "Effect_setConfig")