From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,
qemu-devel@nongnu.org
Cc: "Igor Skalkin" <Igor.Skalkin@opensynergy.com>,
"Anton Yakovlev" <Anton.Yakovlev@opensynergy.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Marc-Andr é Lureau" <marcandre.lureau@redhat.com>,
"Volker R ü melin" <vr_qemu@t-online.de>, "Kő vá gó ,
Zoltá n" <DirtY.iCE.hu@gmail.com>,
"Alex Benn é e" <alex.bennee@linaro.org>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>
Subject: Re: [PATCH v10 09/11] virtio-sound: implement audio output (TX)
Date: Tue, 3 Oct 2023 16:27:59 +0200 [thread overview]
Message-ID: <12d588b8-a276-4de9-cce1-82b473494c25@linaro.org> (raw)
In-Reply-To: <1rgxd.z1377ck6xsdb@linaro.org>
Hi Manos,
On 29/9/23 20:59, Manos Pitsidianakis wrote:
> 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;
Extract a tiny return_tx_buffer() function, which you can then
call in the 2 different places.
next prev parent reply other threads:[~2023-10-03 14:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-29 14:08 [PATCH v10 00/11] Add VIRTIO sound card Emmanouil Pitsidianakis
2023-09-29 14:08 ` [PATCH v10 01/11] Add virtio-sound device stub Emmanouil Pitsidianakis
2023-10-03 14:13 ` Michael S. Tsirkin
2023-10-03 14:34 ` Alex Bennée
2023-10-03 14:45 ` Michael S. Tsirkin
2023-10-03 15:26 ` Alex Bennée
2023-09-29 14:08 ` [PATCH v10 02/11] Add virtio-sound-pci device Emmanouil Pitsidianakis
2023-09-29 14:08 ` [PATCH v10 03/11] virtio-sound: handle control messages and streams Emmanouil Pitsidianakis
2023-09-29 14:08 ` [PATCH v10 04/11] virtio-sound: handle VIRTIO_SND_R_PCM_INFO request Emmanouil Pitsidianakis
2023-09-29 14:08 ` [PATCH v10 05/11] virtio-sound: handle VIRTIO_SND_R_PCM_{START,STOP} Emmanouil Pitsidianakis
2023-09-29 14:08 ` [PATCH v10 06/11] virtio-sound: handle VIRTIO_SND_R_PCM_SET_PARAMS Emmanouil Pitsidianakis
2023-09-29 14:08 ` [PATCH v10 07/11] virtio-sound: handle VIRTIO_SND_R_PCM_PREPARE Emmanouil Pitsidianakis
2023-09-29 14:08 ` [PATCH v10 08/11] virtio-sound: handle VIRTIO_SND_R_PCM_RELEASE Emmanouil Pitsidianakis
2023-09-29 14:08 ` [PATCH v10 09/11] virtio-sound: implement audio output (TX) Emmanouil Pitsidianakis
2023-09-29 18:59 ` Manos Pitsidianakis
2023-10-03 14:27 ` Philippe Mathieu-Daudé [this message]
2023-09-29 14:08 ` [PATCH v10 10/11] virtio-sound: implement audio capture (RX) Emmanouil Pitsidianakis
2023-09-29 14:08 ` [PATCH v10 11/11] docs/system: add basic virtio-snd documentation Emmanouil Pitsidianakis
2023-10-03 14:10 ` [PATCH v10 00/11] Add VIRTIO sound card Michael S. Tsirkin
2023-10-03 16:09 ` Manos Pitsidianakis
2023-10-03 17:10 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12d588b8-a276-4de9-cce1-82b473494c25@linaro.org \
--to=philmd@linaro.org \
--cc=Anton.Yakovlev@opensynergy.com \
--cc=DirtY.iCE.hu@gmail.com \
--cc=Igor.Skalkin@opensynergy.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=eduardo@habkost.net \
--cc=kraxel@redhat.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vr_qemu@t-online.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).