codec_adapter: rename struct codec_param to module_param

Rename codec_param to module_params. No functional change.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
Ranjani Sridharan 2022-01-07 15:51:08 -08:00 committed by Daniel Baluta
parent 60288c4051
commit 0485e5dbad
5 changed files with 14 additions and 14 deletions

View File

@ -178,7 +178,7 @@ static int apply_config(struct comp_dev *dev, enum module_cfg_type type)
int size;
struct module_config *cfg;
void *data;
struct codec_param *param;
struct module_param *param;
struct module_data *codec = comp_get_codec(dev);
struct cadence_codec_data *cd = codec->private;

View File

@ -245,7 +245,7 @@ int dts_codec_apply_config(struct comp_dev *dev)
int ret = 0;
struct module_data *codec = comp_get_codec(dev);
struct module_config *config;
struct codec_param *param;
struct module_param *param;
uint32_t config_header_size;
uint32_t config_data_size;
uint32_t param_header_size;
@ -278,10 +278,10 @@ int dts_codec_apply_config(struct comp_dev *dev)
return -EINVAL;
}
/* Allow for multiple codec_params to be packed into the data pointed to by config
/* Allow for multiple module_params to be packed into the data pointed to by config
*/
for (i = 0; i < config_data_size; param_number++) {
param = (struct codec_param *)((char *)config->data + i);
param = (struct module_param *)((char *)config->data + i);
param_header_size = sizeof(param->id) + sizeof(param->size);
/* If param->size is less than param_header_size, then this param is not valid */
@ -308,7 +308,7 @@ int dts_codec_apply_config(struct comp_dev *dev)
}
}
/* Advance to the next codec_param */
/* Advance to the next module_param */
i += param->size;
}

View File

@ -512,7 +512,7 @@ static int waves_effect_config(struct comp_dev *dev, enum module_cfg_type type)
{
struct module_config *cfg;
struct module_data *codec = comp_get_codec(dev);
struct codec_param *param;
struct module_param *param;
uint32_t index;
uint32_t param_number = 0;
int ret = 0;
@ -536,13 +536,13 @@ static int waves_effect_config(struct comp_dev *dev, enum module_cfg_type type)
return -EINVAL;
}
/* incoming data in cfg->data is arranged according to struct codec_param
* there migh be more than one struct codec_param inside cfg->data, glued back to back
/* incoming data in cfg->data is arranged according to struct module_param
* there migh be more than one struct module_param inside cfg->data, glued back to back
*/
for (index = 0; index < cfg->size && (!ret); param_number++) {
uint32_t param_data_size;
param = (struct codec_param *)((char *)cfg->data + index);
param = (struct module_param *)((char *)cfg->data + index);
param_data_size = param->size - sizeof(param->size) - sizeof(param->id);
comp_info(dev, "waves_codec_configure() param num %d id %d size %d",

View File

@ -108,7 +108,7 @@ int validate_setup_config(struct ca_config *cfg)
* The setup config comprises of two parts - one contains essential data
* for the initialization of codec_adapter and follows struct ca_config.
* Second contains codec specific data needed to setup the codec itself.
* The latter is send in a TLV format organized by struct codec_param.
* The latter is send in a TLV format organized by struct module_param.
*
* \return integer representing either:
* 0 -> success

View File

@ -64,7 +64,7 @@ UT_STATIC void sys_comp_codec_##adapter_init(void) \
DECLARE_MODULE(sys_comp_codec_##adapter_init)
/*****************************************************************************/
/* Codec generic data types */
/* Module generic data types */
/*****************************************************************************/
/**
* \struct module_interface
@ -142,14 +142,14 @@ struct ca_config {
};
/**
* \struct codec_param
* \brief Codec TLV parameters container - used for both config types.
* \struct module_param
* \brief Module TLV parameters container - used for both config types.
* For example if one want to set the sample_rate to 16 [kHz] and this
* parameter was assigned to id 0x01, its max size is four bytes then the
* configuration filed should look like this (note little-endian format):
* 0x01 0x00 0x00 0x00, 0x0C 0x00 0x00 0x00, 0x10 0x00 0x00 0x00.
*/
struct codec_param {
struct module_param {
/**
* Specifies the unique id of a parameter. For example the parameter
* sample_rate may have an id of 0x01.