From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,
qemu-stable@nongnu.org
Subject: Re: [PATCH v4] hw/audio/virtio-snd: Always use little endian audio format
Date: Sun, 2 Jun 2024 09:39:44 -0400 [thread overview]
Message-ID: <20240602093933-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20240422211830.25606-1-philmd@linaro.org>
On Mon, Apr 22, 2024 at 11:18:30PM +0200, Philippe Mathieu-Daudé wrote:
> The VIRTIO Sound Device conforms with the Virtio spec v1.2,
> thus only use little endianness.
>
> Remove the suspicious target_words_bigendian() noticed during
> code review.
>
> Cc: qemu-stable@nongnu.org
> Fixes: eb9ad377bb ("virtio-sound: handle control messages and streams")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> Supersedes: <20240422142056.3023-1-philmd@linaro.org>
> v4: always LE (MST)
> ---
> hw/audio/virtio-snd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c
> index c80b58bf5d..ba4fff7302 100644
> --- a/hw/audio/virtio-snd.c
> +++ b/hw/audio/virtio-snd.c
> @@ -24,7 +24,6 @@
> #include "trace.h"
> #include "qapi/error.h"
> #include "hw/audio/virtio-snd.h"
> -#include "hw/core/cpu.h"
>
> #define VIRTIO_SOUND_VM_VERSION 1
> #define VIRTIO_SOUND_JACK_DEFAULT 0
> @@ -401,7 +400,7 @@ static void virtio_snd_get_qemu_audsettings(audsettings *as,
> as->nchannels = MIN(AUDIO_MAX_CHANNELS, params->channels);
> as->fmt = virtio_snd_get_qemu_format(params->format);
> as->freq = virtio_snd_get_qemu_freq(params->rate);
> - as->endianness = target_words_bigendian() ? 1 : 0;
> + as->endianness = 0; /* Conforming to VIRTIO 1.0: always little endian. */
> }
>
> /*
> --
> 2.41.0
next prev parent reply other threads:[~2024-06-02 13:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 21:18 [PATCH v4] hw/audio/virtio-snd: Always use little endian audio format Philippe Mathieu-Daudé
2024-06-02 13:39 ` Michael S. Tsirkin [this message]
2024-06-11 7:15 ` Michael Tokarev
2024-06-11 12:17 ` Philippe Mathieu-Daudé
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=20240602093933-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=kraxel@redhat.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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).