Skip to content
Open
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
5 changes: 5 additions & 0 deletions tools/testbench/topology_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,11 @@ static int tb_kcontrol_cb_new(struct snd_soc_tplg_ctl_hdr *tplg_ctl,
strncpy(ctl->name, tplg_ctl->name, TB_MAX_CTL_NAME_CHARS);

/* populate the volume table */
if (tplg_mixer->max >= TB_MAX_VOLUME_SIZE) {
fprintf(stderr, "Error: mixer max %u exceeds volume table size %d\n",
tplg_mixer->max, TB_MAX_VOLUME_SIZE);
return -EINVAL;
}
for (i = 0; i < tplg_mixer->max + 1 ; i++) {
uint32_t val = vol_compute_gain(i, scale);

Expand Down
Loading