libeffects: Added code to update sourceFormat field properly for MC input

Added code to update SourceFormat field properly for MC input in CS and EQ
modules.

Test: lvmtest
Bug: 127583584
Change-Id: If5aa175e2557f64f04cb1f2de5a5822ecb553f2e
gugelfrei
Saketh Sathuvalli 5 years ago committed by Andy Hung
parent b893fcd997
commit 0fb19c0e4a

@ -793,6 +793,15 @@ LVM_ReturnStatus_en LVM_ApplyNewSettings(LVM_Handle_t hInstance)
{
EQNB_Params.SourceFormat = LVEQNB_STEREO;
}
#ifdef SUPPORT_MC
/* Note: Currently SourceFormat field of EQNB is not been
* used by the module.
*/
else if (LocalParams.SourceFormat == LVM_MULTICHANNEL)
{
EQNB_Params.SourceFormat = LVEQNB_MULTICHANNEL;
}
#endif
else
{
EQNB_Params.SourceFormat = LVEQNB_MONOINSTEREO; /* Force to Mono-in-Stereo mode */
@ -862,7 +871,16 @@ LVM_ReturnStatus_en LVM_ApplyNewSettings(LVM_Handle_t hInstance)
CS_Params.SpeakerType = LVCS_HEADPHONES;
}
#ifdef SUPPORT_MC
/* Concert sound module processes only the left and right channels
* data. So the Source Format is set to LVCS_STEREO for multichannel
* input also.
*/
if (LocalParams.SourceFormat == LVM_STEREO ||
LocalParams.SourceFormat == LVM_MULTICHANNEL)
#else
if (LocalParams.SourceFormat == LVM_STEREO) /* Mono format not supported */
#endif
{
CS_Params.SourceFormat = LVCS_STEREO;
}

@ -184,6 +184,9 @@ typedef enum
{
LVEQNB_STEREO = 0,
LVEQNB_MONOINSTEREO = 1,
#ifdef SUPPORT_MC
LVEQNB_MULTICHANNEL = 2,
#endif
LVEQNB_SOURCE_MAX = LVM_MAXINT_32
} LVEQNB_SourceFormat_en;

Loading…
Cancel
Save