Skip to content

Commit 0e0bb53

Browse files
committed
audio: eq_iir: ipc3: fix pointer double advance in s32 pass functions
Commit 1061bcd ("audio: eq_iir: switch to source/sink processing API") changed the circular buffer wrap in eq_iir_s32_s16_pass() and eq_iir_s32_s24_pass() to use "x + n" and "y + n". These functions already advance x and y in the copy loop, so the pointers were moved forward twice per chunk, skipping input and writing output to the wrong location. Wrap the already advanced pointers, as was done before the conversion. Fixes: 1061bcd ("audio: eq_iir: switch to source/sink processing API") Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 18c17e1 commit 0e0bb53

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/audio/eq_iir/eq_iir_ipc3.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ static void eq_iir_s32_s16_pass(struct processing_module *mod,
151151
y++;
152152
}
153153
remaining_samples -= n;
154-
x = source_cir_buf_wrap(x + n, source->buf_start, source->buf_end);
155-
y = cir_buf_wrap(y + n, sink->buf_start, sink->buf_end);
154+
x = source_cir_buf_wrap(x, source->buf_start, source->buf_end);
155+
y = cir_buf_wrap(y, sink->buf_start, sink->buf_end);
156156
}
157157
}
158158
#endif /* CONFIG_FORMAT_S16LE && CONFIG_FORMAT_S32LE */
@@ -181,8 +181,8 @@ static void eq_iir_s32_s24_pass(struct processing_module *mod,
181181
y++;
182182
}
183183
remaining_samples -= n;
184-
x = source_cir_buf_wrap(x + n, source->buf_start, source->buf_end);
185-
y = cir_buf_wrap(y + n, sink->buf_start, sink->buf_end);
184+
x = source_cir_buf_wrap(x, source->buf_start, source->buf_end);
185+
y = cir_buf_wrap(y, sink->buf_start, sink->buf_end);
186186
}
187187
}
188188
#endif /* CONFIG_FORMAT_S24LE && CONFIG_FORMAT_S32LE */

0 commit comments

Comments
 (0)