qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/display/xlnx_dp: update comments
@ 2023-09-07 20:34 Michael Tokarev
  2023-09-07 20:56 ` Michael Tokarev
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Tokarev @ 2023-09-07 20:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Peter Maydell, Michael Tokarev

From: Peter Maydell <peter.maydell@linaro.org>

Clarify somewhat misleading code comments.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 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);
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-08  9:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-07 20:34 [PATCH] hw/display/xlnx_dp: update comments Michael Tokarev
2023-09-07 20:56 ` Michael Tokarev
2023-09-08  7:35 ` Philippe Mathieu-Daudé
2023-09-08  9:44 ` Peter Maydell

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).