diff --git a/src/include/sof/audio/buffer.h b/src/include/sof/audio/buffer.h index c461d19c6977..874b9fa7e979 100644 --- a/src/include/sof/audio/buffer.h +++ b/src/include/sof/audio/buffer.h @@ -208,13 +208,15 @@ int buffer_set_params(struct comp_buffer *buffer, bool buffer_params_match(struct comp_buffer *buffer, struct sof_ipc_stream_params *params, uint32_t flag); -static inline void buffer_stream_invalidate(struct comp_buffer *buffer, uint32_t bytes) +static inline void buffer_stream_invalidate(struct comp_buffer *buffer, + uint32_t bytes) { if (buffer->is_shared) audio_stream_invalidate(&buffer->stream, bytes); } -static inline void buffer_stream_writeback(struct comp_buffer *buffer, uint32_t bytes) +static inline void buffer_stream_writeback(struct comp_buffer *buffer, + uint32_t bytes) { if (buffer->is_shared) audio_stream_writeback(&buffer->stream, bytes); @@ -249,10 +251,8 @@ void buffer_detach(struct comp_buffer *buffer, struct list_item *head, int dir); static inline struct comp_dev *buffer_get_comp(struct comp_buffer *buffer, int dir) { - struct comp_buffer *buffer_c = buffer_acquire(buffer); - struct comp_dev *comp = dir == PPL_DIR_DOWNSTREAM ? buffer_c->sink : - buffer_c->source; - buffer_release(buffer_c); + struct comp_dev *comp = dir == PPL_DIR_DOWNSTREAM ? buffer->sink : + buffer->source; return comp; }