From patchwork Tue Jun 18 15:59:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805241 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274589wrx; Tue, 18 Jun 2024 09:08:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXMROMj2bI6pAFyp03KCwUNfbJOmYBLPgfskk+Q+A7TRihOE6Z9BwDq8/rk7J+0Ngx1i4VymKZR3d2FSVUAfX5F X-Google-Smtp-Source: AGHT+IHfXW9KXmE6yjPd9ixM3MCuGQ+3Ii0vq3Ak7pFns/rdP4QQHn1Kc4cByhZnavZ/S0s3hajY X-Received: by 2002:a05:622a:4ce:b0:440:f5d7:f475 with SMTP id d75a77b69052e-444a79e1f98mr2167771cf.39.1718726938168; Tue, 18 Jun 2024 09:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726938; cv=none; d=google.com; s=arc-20160816; b=HbcKv/AtVxd5GBmALOg+/8tpWkJ5zFH0dSgS1Ovv3LYN+n1t6TD/lkOuyp+EwhQrb1 hbu9VoMibHh/ShZrPmA/bpKTO1QSbQqqfOdvKGDarjONUP4tzhRUotHlSoBt6A/1Nl47 k2iuN16xuQAkWdjYwQoFMruoeZUudwqOMaePb7oBt0lw6qec34ntLGfIAtWngR20gJIm Tg3VfLumJ7635SvEaGPFP94+R4UqqQriIBQHcPIiwc41IOC3JX+2gHfZ5ZWnccUSOFXH 2KM3pzWCbEk27qNccbzsTKWLh4gWOLkO4Jq9EtHjd5nQmp1ET8X+boPqu7eDTcd4JGco +vmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oLAsEZ1WvZS0nMNIQBNTpRKUp/i555alHafKiDl+nF8=; fh=RgtV0+nsBGO1lyAzgRSV43uIRHDswO2Q2EZUsQp2nts=; b=u3kqtoSqvA94UC1y3fXyaB+FguxhsJToD5J58wK/rAAOXtpYc8SWyo5+2D6E+YD3K5 ai090vTYg/76R+1Ks602DGlpgIO+BjEINhGJ0vLgUmgia6YXlYYxq1qNPSid2CVWiWFc OWuyvdr16QiOwPVPOg2YYYMNjtLhPv3ggPqAT6VpQWQh+28+0cLWFjIG2pirunaI59j1 /ksWZE7uSFuWIox6/zUdvj5DaFXVYS7mlFPa7N61Gc42g8yNjWSfJGsv+N3NjSdCZKIW 9mGjkdVpPu+f2ann08u4uosErNpKwoPwkmL5NRfKjl1NenIKniIHKwtVPGLrouZsRon8 GXHQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LAU50MYf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-441f2fb9d76si123773531cf.420.2024.06.18.09.08.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LAU50MYf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJbIb-00077C-Ao; Tue, 18 Jun 2024 12:03:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJbIZ-00072s-9D for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:07 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbIX-00077Z-LQ for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:06 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a6efacd25ecso350258366b.1 for ; Tue, 18 Jun 2024 09:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726584; x=1719331384; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oLAsEZ1WvZS0nMNIQBNTpRKUp/i555alHafKiDl+nF8=; b=LAU50MYf3XGGj339E4iXSrWXXpdCejEOlUAitjnh2pv+3RgekTuyKnC9OmvyOm0+xC 3mlooR6sd+HgbbQh8gKZve7MbXTf/0n6MqxiM6/eluPpuNwHbDVoubO7+A4fO7O3CoQs +GvTPu4d1meWefqgJ5oN4aFI530j/eFiQ37d2GPOarvMBJ4ZSrFh58hBmI/baM1llpnb 2b8XRHg25w/rHCM6hSTfmH+pw1QMal+PFGNw2K5yXAXUse2BySjrIgJYC4VRLe4f/yqk boJgCyftTWCyE1Flq/tBBSdx2uqXsfm9uVeAxtqcOdTpOdHqdYfMEKTnW4QnWN8HT8fH RY2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726584; x=1719331384; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oLAsEZ1WvZS0nMNIQBNTpRKUp/i555alHafKiDl+nF8=; b=h1eEaR0Y/7uZrsH6nL7tYBC4CK614ZHdGA4q9e4tae/bwe/wo0ctHrI86HkNE4Z4la DmVu/+z3VMBC9DW77URMe0epKNfA/Nb+npGcfTS/3/wfoNp7tKoNS/e94E5mYJq0K8KN sqrOMTB/woM6TqfJiJY8Ze7DAAPJzpNK/YMs+/QF0N1ctkA7WW2ZIyUuozZ8tS/qC0Rr dhF1+v3U6nPQT+nLGHJ2IZtiYpaQvKTaoksly+V1iFZplaXvOwAq95q3BoLOhb6WbroF IVl5IBTn61kzAWfIfeygCGE/owFI6FrvUePw5n316j2Oxaqa8tOboEsfvMrgryVtR/Be DB0g== X-Gm-Message-State: AOJu0Yxwhl3Gmtz3X+n/0k9bOw4MRxci9nC1cmlAQmwM7DcDtIlSAQMy hvkPBv2OZjcVGEZRKiGVEvUaYsa2Osw32oiffA77jqf0g1crd5CnFagNW66Ec0IgQftnzRLpfr3 8 X-Received: by 2002:a50:aa8a:0:b0:57c:6d89:eaef with SMTP id 4fb4d7f45d1cf-57cbd68dbe7mr8665503a12.18.1718726583755; Tue, 18 Jun 2024 09:03:03 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f8176eea5sm288091766b.88.2024.06.18.09.03.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-stable@nongnu.org, "Michael S . Tsirkin" Subject: [PULL 24/76] hw/audio/virtio-snd: Always use little endian audio format Date: Tue, 18 Jun 2024 17:59:46 +0200 Message-ID: <20240618160039.36108-25-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Reviewed-by: Michael S. Tsirkin Message-Id: <20240422211830.25606-1-philmd@linaro.org> --- hw/audio/virtio-snd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 7d09800d1f..5993f4f040 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -401,7 +401,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. */ } /*