Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/include/sof/audio/audio_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,10 @@ static inline void audio_stream_invalidate(struct audio_stream *buffer, uint32_t
tail_size = bytes - head_size;
}

dcache_invalidate_region((__sparse_force void __sparse_cache *)buffer->r_ptr, head_size);
sys_cache_data_flush_range((__sparse_force void __sparse_cache *)buffer->r_ptr, head_size);
if (tail_size)
dcache_invalidate_region((__sparse_force void __sparse_cache *)buffer->addr,
tail_size);
sys_cache_data_flush_range((__sparse_force void __sparse_cache *)buffer->addr,
Comment on lines +736 to +738
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name is audio_stream_invalidate() but the implementation uses sys_cache_data_flush_range() instead of sys_cache_data_invd_range(). For cache invalidation, you should use sys_cache_data_invd_range() which invalidates cache lines without writing back dirty data, whereas flush_range() writes back and then invalidates.

Copilot uses AI. Check for mistakes.
tail_size);
}

/**
Expand Down
Loading