qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v10 09/11] virtio-sound: implement audio output (TX)


From: Manos Pitsidianakis
Subject: Re: [PATCH v10 09/11] virtio-sound: implement audio output (TX)
Date: Fri, 29 Sep 2023 21:59:53 +0300
User-agent: meli 0.8.2

On Fri, 29 Sep 2023 17:08, Emmanouil Pitsidianakis 
<manos.pitsidianakis@linaro.org> wrote:
Handle output IO messages in the transmit (TX) virtqueue.
[..]
+            if (!stream->active) {
+                /* Stream has stopped, so do not perform AUD_write. */
+                goto return_tx_buffer;
+            }
[..]
+return_tx_buffer:
+                    virtio_snd_pcm_status resp = { 0 };
+                    resp.status = cpu_to_le32(VIRTIO_SND_S_OK);


It seems I was too hasty to submit this patch. It does not build with clang on macos because it does not allow labels before declarations.

It needs the following changes to compile:

--- a/hw/virtio/virtio-snd.c
+++ b/hw/virtio/virtio-snd.c
@@ -1187,7 +1187,7 @@ static void virtio_snd_pcm_out_cb(void *data, int 
available)
                buffer->offset += size;
                available -= size;
                if (buffer->size < 1) {
-return_tx_buffer:
+return_tx_buffer:;
                    virtio_snd_pcm_status resp = { 0 };
                    resp.status = cpu_to_le32(VIRTIO_SND_S_OK);
                    resp.latency_bytes = 0;


--- a/hw/virtio/virtio-snd.c
+++ b/hw/virtio/virtio-snd.c
@@ -1251,7 +1251,7 @@ static void virtio_snd_pcm_in_cb(void *data, int 
available)
                buffer->size += size;
                available -= size;
                if (buffer->size >= stream->params.period_bytes) {
-return_rx_buffer:
+return_rx_buffer:;
                    resp.status = cpu_to_le32(VIRTIO_SND_S_OK);
                    resp.latency_bytes = 0;
                    /* Copy data -if any- to guest */


- Manos



reply via email to

[Prev in Thread] Current Thread [Next in Thread]