Lines Matching refs:write_index
325 static size_t write_index; /* Points to the oldest/uninitialized data */ variable
347 const bool overflowed = write_index < old_write_index; in stream_cb()
366 if (read_idx < write_index || (overflowed && read_idx < write_index)) { in stream_cb()
367 sh_stream->tx.left_read_idx = write_index; in stream_cb()
368 sh_stream->tx.right_read_idx = write_index; in stream_cb()
376 const size_t old_write_index = write_index; in usb_data_received_cb()
399 usb_in_left_ring_buffer[write_index + i] = pcm[j]; in usb_data_received_cb()
400 usb_in_right_ring_buffer[write_index + i] = pcm[j + 1]; in usb_data_received_cb()
403 write_index += USB_SAMPLE_CNT; in usb_data_received_cb()
405 if (write_index == USB_IN_RING_BUF_SIZE) { in usb_data_received_cb()
407 write_index = 0U; in usb_data_received_cb()
446 if (read_idx <= write_index) { in bap_usb_can_get_full_sdu()
447 buffer_cnt = write_index - read_idx; in bap_usb_can_get_full_sdu()
450 buffer_cnt = write_index + (USB_IN_RING_BUF_SIZE - read_idx); in bap_usb_can_get_full_sdu()