multiband_drc: remove buffer_acquire from multiband_drc

remove buffer ops from multiband_drc module

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
This commit is contained in:
Tobiasz Dryjanski 2023-09-15 20:03:09 +02:00 committed by Kai Vehmanen
parent 989a13c94c
commit b0f4605d97
1 changed files with 6 additions and 14 deletions

View File

@ -458,7 +458,6 @@ static int multiband_drc_params(struct processing_module *mod)
struct sof_ipc_stream_params comp_params;
struct comp_dev *dev = mod->dev;
struct comp_buffer *sinkb;
struct comp_buffer *sink_c;
enum sof_ipc_frame valid_fmt, frame_fmt;
int i, ret;
@ -481,9 +480,8 @@ static int multiband_drc_params(struct processing_module *mod)
component_set_nearest_period_frames(dev, comp_params.rate);
sinkb = list_first_item(&dev->bsink_list, struct comp_buffer, source_list);
sink_c = buffer_acquire(sinkb);
ret = buffer_set_params(sink_c, &comp_params, true);
buffer_release(sink_c);
ret = buffer_set_params(sinkb, &comp_params, true);
return ret;
}
#endif /* CONFIG_IPC_MAJOR_4 */
@ -495,7 +493,6 @@ static int multiband_drc_prepare(struct processing_module *mod,
struct multiband_drc_comp_data *cd = module_get_private_data(mod);
struct comp_dev *dev = mod->dev;
struct comp_buffer *sourceb, *sinkb;
struct comp_buffer *source_c, *sink_c;
int channels;
int rate;
int ret = 0;
@ -512,17 +509,12 @@ static int multiband_drc_prepare(struct processing_module *mod,
sourceb = list_first_item(&dev->bsource_list, struct comp_buffer, sink_list);
sinkb = list_first_item(&dev->bsink_list, struct comp_buffer, source_list);
source_c = buffer_acquire(sourceb);
sink_c = buffer_acquire(sinkb);
multiband_drc_set_alignment(&source_c->stream, &sink_c->stream);
multiband_drc_set_alignment(&sourceb->stream, &sinkb->stream);
/* get source data format */
cd->source_format = audio_stream_get_frm_fmt(&source_c->stream);
channels = audio_stream_get_channels(&source_c->stream);
rate = audio_stream_get_rate(&source_c->stream);
buffer_release(sink_c);
buffer_release(source_c);
cd->source_format = audio_stream_get_frm_fmt(&sourceb->stream);
channels = audio_stream_get_channels(&sourceb->stream);
rate = audio_stream_get_rate(&sourceb->stream);
/* Initialize DRC */
comp_dbg(dev, "multiband_drc_prepare(), source_format=%d, sink_format=%d",