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

volume: fix wrong volume ramp being chosen #9062

Merged
merged 1 commit into from
Apr 22, 2024
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
5 changes: 2 additions & 3 deletions src/audio/volume/volume_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ static int volume_set_volume(struct processing_module *mod, const uint8_t *data,
return -EINVAL;
}

init_ramp(cd, cdata.curve_duration, cdata.target_volume);
channels_count = mod->priv.cfg.base_cfg.audio_fmt.channels_count;
if (channels_count > SOF_IPC_MAX_CHANNELS) {
comp_err(dev, "Invalid channels count %u", channels_count);
Expand All @@ -229,7 +228,7 @@ static int volume_set_volume(struct processing_module *mod, const uint8_t *data,
set_volume_ipc4(cd, i, cdata.target_volume,
cdata.curve_type,
cdata.curve_duration);

init_ramp(cd, cdata.curve_duration, cdata.target_volume);
volume_set_chan(mod, i, cd->tvolume[i], true);
}
}
Expand All @@ -241,7 +240,7 @@ static int volume_set_volume(struct processing_module *mod, const uint8_t *data,
cdata.target_volume,
cdata.curve_type,
cdata.curve_duration);

init_ramp(cd, cdata.curve_duration, cdata.target_volume);
volume_set_chan(mod, cdata.channel_id,
cd->tvolume[cdata.channel_id], true);
}
Expand Down