module_adapter:dts: required code update for DTS library v1.0.7

1. Remove totalBufferLengthInBytes as it's handled by SDK internally now.
2. Add debug log to print config size

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
This commit is contained in:
Joe.Cheng 2022-11-17 14:13:18 +08:00 committed by Liam Girdwood
parent a26f83c52f
commit 33cd4ce23f
3 changed files with 11 additions and 4 deletions

View File

@ -131,8 +131,6 @@ static int dts_effect_populate_buffer_configuration(struct comp_dev *dev,
buffer_config->sampleRate = rate;
buffer_config->numChannels = channels;
buffer_config->periodInFrames = dev->frames;
/* totalBufferLengthInBytes will be populated in dtsSofInterfacePrepare */
buffer_config->totalBufferLengthInBytes = 0;
comp_dbg(dev, "dts_effect_populate_buffer_configuration() done");
@ -350,6 +348,9 @@ static int dts_codec_apply_config(struct processing_module *mod)
/* Calculate size of param->data */
param_data_size = param->size - param_header_size;
comp_dbg(dev, "dts_codec_apply_config() id %d size %d",
param->id, param_data_size);
if (param_data_size) {
dts_result = dtsSofInterfaceApplyConfig(codec->private, param->id,
param->data, param_data_size);

View File

@ -33,6 +33,11 @@ extern "C" {
typedef struct DtsSofInterfaceInst DtsSofInterfaceInst;
typedef enum {
// Supported parameter ids
DTS_SOF_INTERFACE_PARAMETER_ID_SINGLE_CONFIGURATION = 1,
} DtsSofInterfaceParameterId;
typedef enum
{
DTS_SOF_INTERFACE_BUFFER_LAYOUT_INTERLEAVED = 0,
@ -54,7 +59,6 @@ typedef struct DtsSofInterfaceBufferConfiguration
unsigned int sampleRate;
unsigned int numChannels;
unsigned int periodInFrames;
unsigned int totalBufferLengthInBytes;
} DtsSofInterfaceBufferConfiguration;
typedef void* (*DtsSofInterfaceAllocateMemory)(
@ -88,7 +92,7 @@ DtsSofInterfaceResult DTS_SOF_INTERFACE_API dtsSofInterfaceProcess(
DtsSofInterfaceResult DTS_SOF_INTERFACE_API dtsSofInterfaceApplyConfig(
DtsSofInterfaceInst* pInst,
int parameterId,
void* pData,
const void *pData,
unsigned int dataSize) DTS_SOF_INTERFACE_NOEXCEPT;
DtsSofInterfaceResult DTS_SOF_INTERFACE_API dtsSofInterfaceReset(

View File

@ -24,6 +24,8 @@ typedef enum DtsSofInterfaceResult
DTS_SOF_INTERFACE_RESULT_ERROR_INVALID_PARAMETER_SYSTEM_FORMAT = -1001006,
DTS_SOF_INTERFACE_RESULT_ERROR_INVALID_PARAMETER_SYSTEM_SAMPLE_RATE = -1001007,
DTS_SOF_INTERFACE_RESULT_ERROR_INCORRECT_LIFETIME_STATE = -1001008,
DTS_SOF_INTERFACE_RESULT_ERROR_INVALID_PARAMETER_ID = -1001009,
DTS_SOF_INTERFACE_RESULT_ERROR_INVALID_CONFIGURATION_DATA = -1001010,
} DtsSofInterfaceResult;