Skip to content

Commit 8dfb2c8

Browse files
lyakhlgirdwood
authored andcommitted
mixin-mixout: fix address space mismatch
Fix address space conflicts caused by bf7aa04 ("mixout: Convert component to use the module adapter") Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 2f6a6bb commit 8dfb2c8

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/audio/mixin_mixout/mixin_mixout.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,16 @@ static int mixout_process(struct processing_module *mod,
517517
*/
518518
for (i = 0; i < num_input_buffers; i++) {
519519
const struct audio_stream __sparse_cache *source_stream;
520-
struct comp_buffer *unused_in_between_buf;
520+
struct comp_buffer __sparse_cache *unused_in_between_buf;
521521
struct comp_dev *source;
522522
int source_index;
523523

524524
source_stream = mod->input_buffers[i].data;
525-
unused_in_between_buf = container_of(source_stream, struct comp_buffer, stream);
525+
unused_in_between_buf = attr_container_of(source_stream,
526+
struct comp_buffer __sparse_cache,
527+
stream, __sparse_cache);
526528

527-
source = buffer_get_comp(unused_in_between_buf, PPL_DIR_UPSTREAM);
529+
source = unused_in_between_buf->source;
528530

529531
source_index = find_module_source_index(mod_source_info, source);
530532
/* this shouldn't happen but skip even if it does and move to the next source */
@@ -538,16 +540,17 @@ static int mixout_process(struct processing_module *mod,
538540
if (frames_to_produce > 0 && frames_to_produce < INT32_MAX) {
539541
for (i = 0; i < num_input_buffers; i++) {
540542
const struct audio_stream __sparse_cache *source_stream;
541-
struct comp_buffer *unused_in_between_buf;
543+
struct comp_buffer __sparse_cache *unused_in_between_buf;
542544
struct comp_dev *source;
543545
int source_index;
544546
uint32_t pending_frames;
545547

546548
source_stream = mod->input_buffers[i].data;
547-
unused_in_between_buf = container_of(source_stream, struct comp_buffer,
548-
stream);
549+
unused_in_between_buf = attr_container_of(source_stream,
550+
struct comp_buffer __sparse_cache,
551+
stream, __sparse_cache);
549552

550-
source = buffer_get_comp(unused_in_between_buf, PPL_DIR_UPSTREAM);
553+
source = unused_in_between_buf->source;
551554

552555
source_index = find_module_source_index(mod_source_info, source);
553556
if (source_index < 0)

0 commit comments

Comments
 (0)