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

Commit 953c4bd5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "lvm wrapper: Set SourceFormat as per number of channels"

parents a667efe6 86f5ec9e
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")