Skip to content

Commit

Permalink
buffer: remove buffer_acquire from buffer.h
Browse files Browse the repository at this point in the history
remove buffer ops from buffer.h

this is a continuation of changes
from commit 4a03699

Signed-off-by: Tobiasz Dryjanski <[email protected]>
  • Loading branch information
tobonex committed Sep 19, 2023
1 parent f042122 commit ea3d998
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/include/sof/audio/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit ea3d998

Please sign in to comment.