diff --git a/src/audio/dcblock/dcblock.c b/src/audio/dcblock/dcblock.c index cc5024156eaa..8e52820341ba 100644 --- a/src/audio/dcblock/dcblock.c +++ b/src/audio/dcblock/dcblock.c @@ -221,7 +221,6 @@ static inline void dcblock_set_frame_alignment(struct audio_stream *source, static void dcblock_params(struct processing_module *mod) { struct sof_ipc_stream_params *params = mod->stream_params; - struct comp_buffer *sink_c, *source_c; struct comp_buffer *sinkb, *sourceb; struct comp_dev *dev = mod->dev; @@ -231,14 +230,10 @@ static void dcblock_params(struct processing_module *mod) component_set_nearest_period_frames(dev, params->rate); sinkb = list_first_item(&dev->bsink_list, struct comp_buffer, source_list); - sink_c = buffer_acquire(sinkb); - ipc4_update_buffer_format(sink_c, &mod->priv.cfg.base_cfg.audio_fmt); - buffer_release(sink_c); + ipc4_update_buffer_format(sinkb, &mod->priv.cfg.base_cfg.audio_fmt); sourceb = list_first_item(&dev->bsource_list, struct comp_buffer, sink_list); - source_c = buffer_acquire(sourceb); - ipc4_update_buffer_format(source_c, &mod->priv.cfg.base_cfg.audio_fmt); - buffer_release(source_c); + ipc4_update_buffer_format(sourceb, &mod->priv.cfg.base_cfg.audio_fmt); } #endif /* CONFIG_IPC_MAJOR_4 */ @@ -253,7 +248,6 @@ static int dcblock_prepare(struct processing_module *mod, { struct comp_data *cd = module_get_private_data(mod); struct comp_buffer *sourceb, *sinkb; - struct comp_buffer *source_c, *sink_c; struct comp_dev *dev = mod->dev; comp_info(dev, "dcblock_prepare()"); @@ -266,18 +260,13 @@ static int dcblock_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); - /* get source data format */ - cd->source_format = audio_stream_get_frm_fmt(&source_c->stream); + cd->source_format = audio_stream_get_frm_fmt(&sourceb->stream); /* get sink data format and period bytes */ - cd->sink_format = audio_stream_get_frm_fmt(&sink_c->stream); + cd->sink_format = audio_stream_get_frm_fmt(&sinkb->stream); - dcblock_set_frame_alignment(&source_c->stream, &sink_c->stream); - buffer_release(sink_c); - buffer_release(source_c); + dcblock_set_frame_alignment(&sourceb->stream, &sinkb->stream); dcblock_init_state(cd); cd->dcblock_func = dcblock_find_func(cd->source_format);