aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2023-08-24 13:26:01 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2023-09-08 13:08:52 +0300
commitd864cf25924c3b39141574b9f78c2a923b7b8d87 (patch)
tree374b7c6979dd9cdba566bd52bc1e8872e6b71393 /hw
parent3202d8e4047d5f4def96b5404633307c86e8db95 (diff)
downloadqemu-d864cf25924c3b39141574b9f78c2a923b7b8d87.zip
qemu-d864cf25924c3b39141574b9f78c2a923b7b8d87.tar.gz
qemu-d864cf25924c3b39141574b9f78c2a923b7b8d87.tar.bz2
hw/display/xlnx_dp: update comments
Clarify somewhat misleading code comments. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw')
-rw-r--r--hw/display/xlnx_dp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
index 822355e..43c7dd8 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);