Skip to content
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
12 changes: 5 additions & 7 deletions src/audio/volume.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,8 @@ static void volume_free(struct comp_dev *dev)
*/
static int volume_params(struct comp_dev *dev)
{
struct comp_data *cd = comp_get_drvdata(dev);

trace_volume("volume_params()");

/* rewrite params format for all downstream */
dev->params.frame_fmt = cd->sink_format;

return 0;
}

Expand Down Expand Up @@ -551,8 +546,11 @@ static int volume_prepare(struct comp_dev *dev)
comp_set_period_bytes(sinkb->sink, dev->frames, &cd->sink_format,
&sink_period_bytes);

/* rewrite params format for all downstream */
dev->params.frame_fmt = cd->sink_format;
/* Rewrite params format for this component to match the host side. */
if (dev->params.direction == SOF_IPC_STREAM_PLAYBACK)
dev->params.frame_fmt = cd->source_format;
else
dev->params.frame_fmt = cd->sink_format;
Comment thread
ranj063 marked this conversation as resolved.
Resolved

/* set downstream buffer size */
ret = buffer_set_size(sinkb, sink_period_bytes * config->periods_sink);
Expand Down