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
2 changes: 1 addition & 1 deletion tools/testbench/include/testbench/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct testbench_prm {
struct tplg_pcm_info *pcm_info;
struct tb_config config[TB_MAX_CONFIG_COUNT];
int num_configs;
size_t period_size;
int period_frames;
struct tb_glb_state glb_ctx;
#endif
};
Expand Down
6 changes: 4 additions & 2 deletions tools/testbench/topology_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ int tb_match_audio_format(struct testbench_prm *tp, struct tplg_comp_info *comp_
struct ipc4_base_module_cfg *base_cfg = &comp_info->basecfg;
struct sof_ipc4_pin_format *fmt;
int config_valid_bits;
int sample_bytes;
int i;

switch (config->format) {
Expand Down Expand Up @@ -326,8 +327,9 @@ int tb_match_audio_format(struct testbench_prm *tp, struct tplg_comp_info *comp_
(fmt->audio_fmt.fmt_cfg & MASK(15, 8)) >> 8;
base_cfg->audio_fmt.s_type =
(fmt->audio_fmt.fmt_cfg & MASK(23, 16)) >> 16;
base_cfg->ibs = tp->period_size * 2;
base_cfg->obs = tp->period_size * 2;
sample_bytes = fmt->audio_fmt.bit_depth >> 3;
base_cfg->ibs = 2 * tp->period_frames * base_cfg->audio_fmt.channels_count * sample_bytes;
base_cfg->obs = base_cfg->ibs;

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/testbench/utils_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ int tb_setup(struct sof *sof, struct testbench_prm *tp)
tp->config[0].rate = tp->fs_in;
tp->config[0].channels = tp->channels_in;
tp->config[0].format = tp->frame_fmt;
tp->period_size = 2 * krate;
tp->period_frames = krate;

/* TODO: Need to set this later for larger topologies with multiple PCMs. The
* pipelines are determined based on just the PCM ID for the device that we
Expand Down