From patchwork Thu Sep 7 20:34:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 720634 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp437646wrp; Thu, 7 Sep 2023 13:36:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH7RDt+yFpKrZgHx6400gxtVa6XocaF7acQ31bMx6jqm4GHXbL3wPbDN5JXIJLbOEQuyihI X-Received: by 2002:ac8:5d86:0:b0:412:7b6:54ad with SMTP id d6-20020ac85d86000000b0041207b654admr516733qtx.38.1694118969977; Thu, 07 Sep 2023 13:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694118969; cv=none; d=google.com; s=arc-20160816; b=WMTmYcHZORcAFEPXcWumrawS6IuLVDRJrzBVAEaDDvfy64eoPw/jAYHWcnQSadND4p AnT4U8rsDMr4G0uRs1pjymg9cHXG5fP5/R/K+F6iRkpW5M2HyLkaKJagBiPeEbE1BUCb aGjwx5m+ubJM4/7F52H/xBa4wEVuXaJzg6VNidbXPydeom5UjRjelWouvAOjl+DW23FU hUP/kWchst3Rp+IRjx2FwbgLHjGZD17I2w4lhdtJLc9N//y6oRRXzWuwhw7vjENqP8bp K5CkT68rFSXJBU3Gi1LXlDI5YD6i44EG21WS7MA6kTy6VAbOSilOmHdAYCI+1UvoK5Mi BK4Q== 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:message-id:date:subject:cc:to:from; bh=BW5Sm5VOFFY6YC4rdEica+hq7JCgWkOgG6dafeZbbZk=; fh=AYMN1lRW6wq8CtEOFmsfJCTvhOkAO/sBXQuckqMjsyE=; b=VB+B8djiVx3pLfATLpnTormESWL3iy0xKqB+9qghotDH4X3CMmDnBFgIkF6W5gLxsT hsQj0pqKVO2kXfE+0eo8JJH6u5zrc8RWIJcb5ROlhvgBXTxTe16wzIwb6iY+qKh1o67Y nnt8ILSPkc49Gt8goj3tsYtwJJOwkDaRSO9a/L7Q0y7L6eNT6vWzfrjtN5Pyb2yRHDGd Pkmw3PPgA1wG1bKot2b/ioJSGQM+6gvQXLVPe6H45mNrU1AfxCX7GqqtnleAACXHTUbu sOWNVNBIDQqzumAoxN44cOTGc8XZsnqz4j1bPlwmzKZznY7cRQteqHlOJAkTVPxzPn14 ViHQ== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l20-20020a05622a051400b003ff1fe3856dsi271502qtx.138.2023.09.07.13.36.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 13:36:09 -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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeLif-0008MB-9z; Thu, 07 Sep 2023 16:35:17 -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 1qeLid-0008Lv-E1; Thu, 07 Sep 2023 16:35:15 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeLiU-0002ab-BN; Thu, 07 Sep 2023 16:35:08 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 439521FE32; Thu, 7 Sep 2023 23:35:49 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 51E5E26703; Thu, 7 Sep 2023 23:35:01 +0300 (MSK) Received: (nullmailer pid 257860 invoked by uid 1000); Thu, 07 Sep 2023 20:35:01 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Subject: [PATCH] hw/display/xlnx_dp: update comments Date: Thu, 7 Sep 2023 23:34:40 +0300 Message-Id: <20230907203440.257845-1-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 From: Peter Maydell Clarify somewhat misleading code comments. Signed-off-by: Michael Tokarev Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- hw/display/xlnx_dp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) Peter, this is the result of your suggestions in this area. Since it's entirely your wording, can I specify your authorship too? diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c index 822355ecc6..300daf9d9b 100644 --- a/hw/display/xlnx_dp.c +++ b/hw/display/xlnx_dp.c @@ -1,4 +1,4 @@ -/* +?* * Xilinx Display Port * * Copyright (C) 2015 : GreenSocs Ltd @@ -380,13 +380,16 @@ static inline void xlnx_dp_audio_mix_buffer(XlnxDPState *s) static void xlnx_dp_audio_callback(void *opaque, int avail) { /* - * Get some data from the DPDMA and compute these data. - * Then wait for QEMU's audio subsystem to call this callback. + * Get the individual left and right audio streams from the DPDMA, + * and fill the output buffer with the combined stereo audio data + * adjusted by the volume controls. + * QEMU's audio subsystem will call this callback repeatedly; + * we return the data from the output buffer until it is emptied, + * and then we will read data from the DPDMA again. */ XlnxDPState *s = XLNX_DP(opaque); size_t written = 0; - /* If there are already some data don't get more data. */ if (s->byte_left == 0) { s->audio_data_available[0] = xlnx_dpdma_start_operation(s->dpdma, 4, true);