|
10 | 10 | #include <sample_usbd.h>
|
11 | 11 | #include "feedback.h"
|
12 | 12 |
|
13 |
| -#include <zephyr/cache.h> |
14 | 13 | #include <zephyr/device.h>
|
15 | 14 | #include <zephyr/usb/usbd.h>
|
16 | 15 | #include <zephyr/usb/class/usbd_uac2.h>
|
@@ -164,7 +163,6 @@ static void uac2_data_recv_cb(const struct device *dev, uint8_t terminal,
|
164 | 163 | size = SAMPLES_PER_SOF * BYTES_PER_SLOT;
|
165 | 164 | }
|
166 | 165 | memset(buf, 0, size);
|
167 |
| - sys_cache_data_flush_range(buf, size); |
168 | 166 | }
|
169 | 167 |
|
170 | 168 | LOG_DBG("Received %d data to input terminal %d", size, terminal);
|
@@ -259,7 +257,6 @@ static void process_mic_data(const struct device *dev, struct usb_i2s_ctx *ctx)
|
259 | 257 | /* No data available, I2S will restart soon */
|
260 | 258 | return;
|
261 | 259 | }
|
262 |
| - sys_cache_data_invd_range(rx_block, num_bytes); |
263 | 260 |
|
264 | 261 | /* I2S operates on 2 channels (stereo) */
|
265 | 262 | rx_samples = num_bytes / (BYTES_PER_SAMPLE * 2);
|
@@ -314,7 +311,6 @@ static void process_mic_data(const struct device *dev, struct usb_i2s_ctx *ctx)
|
314 | 311 | ctx->pending_mic_samples = mic_samples;
|
315 | 312 | return;
|
316 | 313 | }
|
317 |
| - sys_cache_data_invd_range(rx_block, num_bytes); |
318 | 314 |
|
319 | 315 | src = rx_block;
|
320 | 316 | rx_samples = num_bytes / (BYTES_PER_SAMPLE * 2);
|
@@ -424,7 +420,6 @@ static void process_mic_data(const struct device *dev, struct usb_i2s_ctx *ctx)
|
424 | 420 | }
|
425 | 421 |
|
426 | 422 | /* Finally send the microphone samples to host */
|
427 |
| - sys_cache_data_flush_range(mic_buf, mic_samples * BYTES_PER_SAMPLE); |
428 | 423 | if (usbd_uac2_send(dev, MICROPHONE_IN_TERMINAL_ID,
|
429 | 424 | mic_buf, mic_samples * BYTES_PER_SAMPLE) < 0) {
|
430 | 425 | k_mem_slab_free(&i2s_rx_slab, mic_buf);
|
|
0 commit comments