Skip to content

Commit 87e797a

Browse files
committed
Add ring buffer implementation hint
1 parent a9b0238 commit 87e797a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

virtio-snd.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -772,18 +772,15 @@ static int virtio_snd_tx_desc_handler(virtio_snd_state_t *vsnd,
772772
goto early_continue;
773773
}
774774

775-
/*frame = (virtio_snd_pcm_frame_t *) malloc(sizeof(*frame));
776-
void *buf = (void *) (base + addr);
777-
frame->buf = (void *) malloc(sizeof(frame->buf) * len);
778-
memcpy(frame->buf, buf, len);
779-
queue_push(&frame->q, frame_q);*/
775+
/* TODO: ring buffer implementation here */
780776
ret_len += len;
781777

782778
early_continue:
783779
idx++;
784780
}
785781

786782
/* Tear down the descriptor list and free space. */
783+
/* TODO: remove this part as we are going to use ring buffer */
787784
idx = 0;
788785
virtq_desc_queue_node_t *tmp = NULL;
789786
queue_for_each_entry_safe(node, tmp, &q, q)

0 commit comments

Comments
 (0)