Test: Cmocka: Set component type to SOF_COMP_MODULE_ADAPTER by singalsu · Pull Request #9529 · thesofproject/sof · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/audio/mux/mux.c
1 change: 1 addition & 0 deletions src/audio/mux/mux.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ struct comp_data {
struct mux_look_up lookup[MUX_MAX_STREAMS];
struct mux_look_up active_lookup;
struct comp_data_blob_handler *model_handler;
enum sof_comp_type comp_type;
struct sof_mux_config config; /* Keep last due to flexible array member in end */
};

Expand Down
6 changes: 3 additions & 3 deletions src/audio/mux/mux_ipc3.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static int mux_set_values(struct processing_module *mod)
}
}

if (dev->ipc_config.type == SOF_COMP_MUX) {
if (cd->comp_type == SOF_COMP_MUX) {
if (mux_mix_check(cfg))
comp_err(dev, "mux_set_values(): mux component is not able to mix channels");
}
Expand All @@ -81,13 +81,13 @@ static int mux_set_values(struct processing_module *mod)

cd->config.num_streams = cfg->num_streams;

if (dev->ipc_config.type == SOF_COMP_MUX)
if (cd->comp_type == SOF_COMP_MUX)
mux_prepare_look_up_table(mod);
else
demux_prepare_look_up_table(mod);

if (dev->state > COMP_STATE_INIT) {
if (dev->ipc_config.type == SOF_COMP_MUX)
if (cd->comp_type == SOF_COMP_MUX)
cd->mux = mux_get_processing_function(mod);
else
cd->demux = demux_get_processing_function(mod);
Expand Down
1 change: 0 additions & 1 deletion src/audio/mux/mux_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ static int build_config(struct processing_module *mod)
int mask = 1;
int i;

dev->ipc_config.type = SOF_COMP_MUX;
cd->config.num_streams = MUX_MAX_STREAMS;

/* clear masks */
Expand Down
2 changes: 1 addition & 1 deletion test/cmocka/src/audio/eq_fir/eq_fir_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static struct sof_ipc_comp_process *create_eq_fir_comp_ipc(struct test_data *td)
memcpy_s(ipc + 1, SOF_UUID_SIZE, &uuid, SOF_UUID_SIZE);
eq = (struct sof_eq_fir_config *)((char *)(ipc + 1) + SOF_UUID_SIZE);
ipc->comp.hdr.size = ipc_size + SOF_UUID_SIZE;
ipc->comp.type = SOF_COMP_EQ_FIR;
ipc->comp.type = SOF_COMP_MODULE_ADAPTER;
ipc->config.hdr.size = sizeof(struct sof_ipc_comp_config);
ipc->size = blob->size;
ipc->comp.ext_data_length = SOF_UUID_SIZE;
Expand Down
2 changes: 1 addition & 1 deletion test/cmocka/src/audio/eq_iir/eq_iir_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static struct sof_ipc_comp_process *create_eq_iir_comp_ipc(struct test_data *td)
memcpy_s(ipc + 1, SOF_UUID_SIZE, &uuid, SOF_UUID_SIZE);
eq = (struct sof_eq_iir_config *)((char *)(ipc + 1) + SOF_UUID_SIZE);
ipc->comp.hdr.size = ipc_size + SOF_UUID_SIZE;
ipc->comp.type = SOF_COMP_EQ_IIR;
ipc->comp.type = SOF_COMP_MODULE_ADAPTER;
ipc->config.hdr.size = sizeof(struct sof_ipc_comp_config);
ipc->size = blob->size;
ipc->comp.ext_data_length = SOF_UUID_SIZE;
Expand Down
2 changes: 1 addition & 1 deletion test/cmocka/src/audio/mux/demux_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static struct sof_ipc_comp_process *create_demux_comp_ipc(struct test_data *td)
memcpy_s(ipc + 1, SOF_UUID_SIZE, &uuid, SOF_UUID_SIZE);
mux = (struct sof_mux_config *)((char *)(ipc + 1) + SOF_UUID_SIZE);
ipc->comp.hdr.size = ipc_size + SOF_UUID_SIZE;
ipc->comp.type = SOF_COMP_DEMUX;
ipc->comp.type = SOF_COMP_MODULE_ADAPTER;
ipc->config.hdr.size = sizeof(struct sof_ipc_comp_config);
ipc->size = mux_size;
ipc->comp.ext_data_length = SOF_UUID_SIZE;
Expand Down
2 changes: 1 addition & 1 deletion test/cmocka/src/audio/mux/mux_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static struct sof_ipc_comp_process *create_mux_comp_ipc(struct test_data *td)
memcpy_s(ipc + 1, SOF_UUID_SIZE, &uuid, SOF_UUID_SIZE);
mux = (struct sof_mux_config *)((char *)(ipc + 1) + SOF_UUID_SIZE);
ipc->comp.hdr.size = ipc_size + SOF_UUID_SIZE;
ipc->comp.type = SOF_COMP_MUX;
ipc->comp.type = SOF_COMP_MODULE_ADAPTER;
ipc->config.hdr.size = sizeof(struct sof_ipc_comp_config);
ipc->size = mux_size;
ipc->comp.ext_data_length = SOF_UUID_SIZE;
Expand Down
2 changes: 1 addition & 1 deletion test/cmocka/src/audio/mux/mux_get_processing_function.c