samples: i2s_codec: Fix i2s API misuse
Replace i2s_write invocation with i2s_buf_write invocation for test sine
wave playback.
When CONFIG_USE_DMIC=n, this sample attempts to play back a test sine
wave encoded in sine.h. As the i2s_write treats the given buffer as a
memory slab, it overwrites parts of it, resulting in data corruption and
improper playback. i2s_buf_write accepts a buffer existing outside the
playback queue (heap).
Manually tested on mimxrt595_evk/mimxrt595s/cm33 where it was first
observed.
Signed-off-by:
Vit Stanicek <vit.stanicek@nxp.com>
Loading
Please sign in to comment