From patchwork Fri Sep 8 09:55:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 720798 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp673423wrp; Fri, 8 Sep 2023 02:59:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvmPJ00NLIcFH/cAOr9qTydG0OfZQ/MewAoMxpBWjqmgjLxJXkgCytlFNpQiN+3FP3hS30 X-Received: by 2002:ac8:588c:0:b0:410:87bf:9226 with SMTP id t12-20020ac8588c000000b0041087bf9226mr2524919qta.13.1694167191468; Fri, 08 Sep 2023 02:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694167191; cv=none; d=google.com; s=arc-20160816; b=o2QT1EPUikVmU2WDKrcqwkMye1O9M7sLLibmhy6p2Mi7h6fpGUO9VX0k9p5/FCr69t CWueeXpPEQyxHb7P8Unwf9W+k1XtE0syRI4KHFBOc8EdpVHBB+AkRKq70PzmFB3xcmDw sUnirku1demcnRn5qJOJhrAA4ao1vya7toS8ib5CHCBYL76TZnT86ot1inz29vUAkvWH R925LSRgg9iU0Grr8jSNKbfygJhJm9SyvTVQLfPkwfXtbgOjb4YuYVggWJqxfaNKpFs1 oFyIY2BnkaEYRxmeiy3vKCVhpmvi0WO0dkENk3DiMDTvjT2q8ryUaRiUWE0Ff+jL4HzD GuVg== 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; bh=VTxHteMp+Ze9ebRW61OqIIyp+9O55WDGXcNSIQdgA88=; fh=AWrbViR0hPCHbbxYLREXIW0tBDBZ8z7iu8vPqtTDa/A=; b=g4iAwcSggL+LCrXF6ZIZm2JDll1jB+85pwdnqULkhRXJUlxY/nxpwa5KOG1GLyYP7w iV0hqzfGHWyHlSF9b3MSAaSdyusw9pqD3iuX2G1+uf9vaoXkSNW3jH5PJspxS3hXiT42 OhpJ6eYS+d8o9hv80hB0D2oHZx1uN0hR/KslKhuYaUozZW4cmzvNvKdHryY9aogdWgWI oizMqeP6epJdtCPcGkMxS2ZvJKCmQ8HGusp7dKK1c8y3Q4kVzTumpT1rkdbsQ0lrTPSG MZ8yI8HgBjnohQWCYLM7k2ZyRG1b+61iU61yjMF2aWg6deFLgkcE1s4UGmAAxY0G5Xuq RvuA== 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 o11-20020a05622a008b00b00410a28bece4si1018575qtw.350.2023.09.08.02.59.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Sep 2023 02:59:51 -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 1qeYEX-00009s-38; Fri, 08 Sep 2023 05:57:01 -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 1qeYEV-0008Vw-8r; Fri, 08 Sep 2023 05:56:59 -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 1qeYET-0006ta-0B; Fri, 08 Sep 2023 05:56:59 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id A071F200D5; Fri, 8 Sep 2023 12:56:47 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 94B1A2691B; Fri, 8 Sep 2023 12:55:58 +0300 (MSK) Received: (nullmailer pid 275979 invoked by uid 1000); Fri, 08 Sep 2023 09:55:56 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 13/23] hw/display/xlnx_dp: update comments Date: Fri, 8 Sep 2023 12:55:10 +0300 Message-Id: <20230908095520.275866-14-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230908095520.275866-1-mjt@tls.msk.ru> References: <20230908095520.275866-1-mjt@tls.msk.ru> 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: Peter Maydell Reviewed-by: Michael Tokarev Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Michael Tokarev --- hw/display/xlnx_dp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c index 822355ecc6..43c7dd8e9c 100644 --- a/hw/display/xlnx_dp.c +++ b/hw/display/xlnx_dp.c @@ -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);