diff --git a/src/audio/rtnr/rtnr.c b/src/audio/rtnr/rtnr.c index 270559b07..c726c9e64 100644 --- a/src/audio/rtnr/rtnr.c +++ b/src/audio/rtnr/rtnr.c @@ -832,7 +832,7 @@ static int rtnr_copy(struct comp_dev *dev) comp_dbg(dev, "rtnr_copy() passthrough"); /* Get source, sink, number of frames etc. to process. */ - comp_get_copy_limits_with_lock(source, sink, &cl); + comp_get_copy_limits(source, sink, &cl); buffer_stream_invalidate(source, cl.source_bytes); diff --git a/src/include/sof/audio/component.h b/src/include/sof/audio/component.h index 01f004ab9..3920e9d2d 100644 --- a/src/include/sof/audio/component.h +++ b/src/include/sof/audio/component.h @@ -669,9 +669,7 @@ static inline struct comp_dev *comp_alloc(const struct comp_driver *drv, /* * Use uncached address everywhere to access components to rule out - * multi-core failures. In the future we might decide to switch over to - * the latest coherence API for performance. In that case components - * will be acquired for cached access and released afterwards. + * multi-core failures. TODO: verify if cached alias may be used in some cases */ dev = rzalloc(SOF_MEM_ZONE_RUNTIME_SHARED, 0, SOF_MEM_CAPS_RAM, bytes); if (!dev) @@ -886,55 +884,6 @@ void comp_get_copy_limits_frame_aligned(const struct comp_buffer *source, const struct comp_buffer *sink, struct comp_copy_limits *cl); -/** - * Version of comp_get_copy_limits that locks both buffers to guarantee - * consistent state readings. - * - * @param[in] source Source buffer. - * @param[in] sink Sink buffer - * @param[out] cl Current copy limits. - */ -static inline -void comp_get_copy_limits_with_lock(struct comp_buffer *source, - struct comp_buffer *sink, - struct comp_copy_limits *cl) -{ - struct comp_buffer *source_c, *sink_c; - - source_c = buffer_acquire(source); - sink_c = buffer_acquire(sink); - - comp_get_copy_limits(source_c, sink_c, cl); - - buffer_release(sink_c); - buffer_release(source_c); -} - -/** - * Version of comp_get_copy_limits_with_lock_frame_aligned that locks both - * buffers to guarantee consistent state readings and the frames aligned with - * the requirement. - * - * @param[in] source Buffer of source. - * @param[in] sink Buffer of sink - * @param[out] cl Current copy limits. - */ -static inline -void comp_get_copy_limits_with_lock_frame_aligned(struct comp_buffer *source, - struct comp_buffer *sink, - struct comp_copy_limits *cl) -{ - struct comp_buffer *source_c, *sink_c; - - source_c = buffer_acquire(source); - sink_c = buffer_acquire(sink); - - comp_get_copy_limits_frame_aligned(source_c, sink_c, cl); - - buffer_release(sink_c); - buffer_release(source_c); -} - /** * Get component state. *