Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dummy smart_amp: copy input_pins and output_pin separately #7588

Merged
merged 1 commit into from
May 16, 2023
Merged
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
10 changes: 6 additions & 4 deletions src/samples/audio/smart_amp_test_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ static int smart_amp_init(struct processing_module *mod)
struct smart_amp_data *sad;
struct comp_dev *dev = mod->dev;
struct module_data *mod_data = &mod->priv;
int bs;
const size_t in_size = sizeof(struct ipc4_input_pin_format) * SMART_AMP_NUM_IN_PINS;
const size_t out_size = sizeof(struct ipc4_output_pin_format) * SMART_AMP_NUM_OUT_PINS;
int ret;
const struct ipc4_base_module_extended_cfg *base_cfg = mod_data->cfg.init_data;

Expand All @@ -70,9 +71,10 @@ static int smart_amp_init(struct processing_module *mod)
}

/* Copy the pin formats */
bs = sizeof(sad->ipc4_cfg.input_pins) + sizeof(sad->ipc4_cfg.output_pin);
memcpy_s(sad->ipc4_cfg.input_pins, bs,
base_cfg->base_cfg_ext.pin_formats, bs);
memcpy_s(sad->ipc4_cfg.input_pins, in_size,
base_cfg->base_cfg_ext.pin_formats, in_size);
memcpy_s(&sad->ipc4_cfg.output_pin, out_size,
&base_cfg->base_cfg_ext.pin_formats[in_size], out_size);
andrula-song marked this conversation as resolved.
Show resolved Hide resolved

mod->simple_copy = true;

Expand Down