From nobody Mon Feb 9 07:36:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=t-online.de Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1751916694154453.50611147911445; Mon, 7 Jul 2025 12:31:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uYrYN-0005e0-Jz; Mon, 07 Jul 2025 15:31:03 -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 1uYrXd-0005Nx-CS for qemu-devel@nongnu.org; Mon, 07 Jul 2025 15:30:22 -0400 Received: from mailout07.t-online.de ([194.25.134.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uYrXa-0005Nx-Jr for qemu-devel@nongnu.org; Mon, 07 Jul 2025 15:30:16 -0400 Received: from fwd75.aul.t-online.de (fwd75.aul.t-online.de [10.223.144.101]) by mailout07.t-online.de (Postfix) with SMTP id 4D07FE368; Mon, 7 Jul 2025 21:30:10 +0200 (CEST) Received: from linpower.localnet ([93.236.150.188]) by fwd75.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1uYrXV-3wDd2H0; Mon, 7 Jul 2025 21:30:09 +0200 Received: by linpower.localnet (Postfix, from userid 1000) id 7DDDF200361; Mon, 7 Jul 2025 21:30:09 +0200 (CEST) From: =?UTF-8?q?Volker=20R=C3=BCmelin?= To: Gerd Hoffmann Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-devel@nongnu.org Subject: [PATCH 1/3] hw/audio/sb16: introduce DMA helper functions Date: Mon, 7 Jul 2025 21:30:07 +0200 Message-ID: <20250707193009.12901-1-vr_qemu@t-online.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <48576e83-54ba-4ebd-8a3e-6b8306655483@t-online.de> References: <48576e83-54ba-4ebd-8a3e-6b8306655483@t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TOI-EXPURGATEID: 150726::1751916609-5D7F84D5-16BDC014/0/0 CLEAN NORMAL X-TOI-MSGID: 0a6436af-4c1c-4d1d-9060-dd868c3af84c Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=194.25.134.83; envelope-from=volker.ruemelin@t-online.de; helo=mailout07.t-online.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1751916696658116600 Introduce the hold_DREQ() and release_DREQ() functions to ease the review of the next patch. Signed-off-by: Volker R=C3=BCmelin Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/audio/sb16.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index bac64118fe..5c51940596 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -154,6 +154,22 @@ static int irq_of_magic (int magic) } } =20 +static void hold_DREQ(SB16State *s, int nchan) +{ + IsaDma *isa_dma =3D nchan =3D=3D s->dma ? s->isa_dma : s->isa_hdma; + IsaDmaClass *k =3D ISADMA_GET_CLASS(isa_dma); + + k->hold_DREQ(isa_dma, nchan); +} + +static void release_DREQ(SB16State *s, int nchan) +{ + IsaDma *isa_dma =3D nchan =3D=3D s->dma ? s->isa_dma : s->isa_hdma; + IsaDmaClass *k =3D ISADMA_GET_CLASS(isa_dma); + + k->release_DREQ(isa_dma, nchan); +} + #if 0 static void log_dsp (SB16State *dsp) { @@ -177,19 +193,18 @@ static void speaker (SB16State *s, int on) =20 static void control (SB16State *s, int hold) { - int dma =3D s->use_hdma ? s->hdma : s->dma; - IsaDma *isa_dma =3D s->use_hdma ? s->isa_hdma : s->isa_dma; - IsaDmaClass *k =3D ISADMA_GET_CLASS(isa_dma); + int nchan =3D s->use_hdma ? s->hdma : s->dma; + s->dma_running =3D hold; =20 - ldebug ("hold %d high %d dma %d\n", hold, s->use_hdma, dma); + ldebug("hold %d high %d nchan %d\n", hold, s->use_hdma, nchan); =20 if (hold) { - k->hold_DREQ(isa_dma, dma); + hold_DREQ(s, nchan); AUD_set_active_out (s->voice, 1); } else { - k->release_DREQ(isa_dma, dma); + release_DREQ(s, nchan); AUD_set_active_out (s->voice, 0); } } --=20 2.43.0 From nobody Mon Feb 9 07:36:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=t-online.de Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1751916684296331.0210922622141; Mon, 7 Jul 2025 12:31:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uYrYR-0005of-L8; Mon, 07 Jul 2025 15:31:07 -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 1uYrXf-0005OW-ET for qemu-devel@nongnu.org; Mon, 07 Jul 2025 15:30:23 -0400 Received: from mailout01.t-online.de ([194.25.134.80]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uYrXd-0005PK-3Z for qemu-devel@nongnu.org; Mon, 07 Jul 2025 15:30:18 -0400 Received: from fwd81.aul.t-online.de (fwd81.aul.t-online.de [10.223.144.107]) by mailout01.t-online.de (Postfix) with SMTP id 0F4081CA8C; Mon, 7 Jul 2025 21:30:13 +0200 (CEST) Received: from linpower.localnet ([93.236.150.188]) by fwd81.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1uYrXY-1BvgEj0; Mon, 7 Jul 2025 21:30:12 +0200 Received: by linpower.localnet (Postfix, from userid 1000) id 8030F20040B; Mon, 7 Jul 2025 21:30:09 +0200 (CEST) From: =?UTF-8?q?Volker=20R=C3=BCmelin?= To: Gerd Hoffmann Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-devel@nongnu.org Subject: [PATCH 2/3] hw/audio/sb16: improve DMA handling Date: Mon, 7 Jul 2025 21:30:08 +0200 Message-ID: <20250707193009.12901-2-vr_qemu@t-online.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <48576e83-54ba-4ebd-8a3e-6b8306655483@t-online.de> References: <48576e83-54ba-4ebd-8a3e-6b8306655483@t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TOI-EXPURGATEID: 150726::1751916612-EFFFD5F1-D533DC14/0/0 CLEAN NORMAL X-TOI-MSGID: 7b5c8950-1d0c-413c-9aae-24cb0873ddbd Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=194.25.134.80; envelope-from=volker.ruemelin@t-online.de; helo=mailout01.t-online.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1751916686466116600 The Soundblaster 16 audio device is strange and works differently compared to the other audio frontends. For audio playback, a BH routine copies the audio samples from the DMA buffer to the audio backend. The BH routine then immediately reschedules itself. As far fewer samples are required from the backend than the BH routine can supply, this means that most of the BH routine calls don't copy any audio samples. The buffers of the audio backend are simply full. This is a very inefficient design. Use the DREQ signal of the ISA DMA controller to throttle the audio stream. The callback routine of the audio subsystem raises the DREQ signal as soon as new samples are needed and also starts the DMA callback routine. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/469 Signed-off-by: Volker R=C3=BCmelin --- hw/audio/sb16.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index 5c51940596..714144eb61 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -200,7 +200,9 @@ static void control (SB16State *s, int hold) ldebug("hold %d high %d nchan %d\n", hold, s->use_hdma, nchan); =20 if (hold) { - hold_DREQ(s, nchan); + if (!s->voice) { + hold_DREQ(s, nchan); + } AUD_set_active_out (s->voice, 1); } else { @@ -890,6 +892,8 @@ static void legacy_reset (SB16State *s) s->fmt_bits =3D 8; s->fmt_stereo =3D 0; =20 + s->audio_free =3D 0; + as.freq =3D s->freq; as.nchannels =3D 1; as.fmt =3D AUDIO_FORMAT_U8; @@ -1243,8 +1247,12 @@ static int SB_read_DMA (void *opaque, int nchan, int= dma_pos, int dma_len) } =20 if (s->voice) { + if (!dma_len) { + return dma_pos; + } free =3D s->audio_free & ~s->align; - if ((free <=3D 0) || !dma_len) { + if (free <=3D 0) { + release_DREQ(s, nchan); return dma_pos; } } @@ -1269,6 +1277,7 @@ static int SB_read_DMA (void *opaque, int nchan, int = dma_pos, int dma_len) written =3D write_audio (s, nchan, dma_pos, dma_len, copy); dma_pos =3D (dma_pos + written) % dma_len; s->left_till_irq -=3D written; + s->audio_free -=3D written; =20 if (s->left_till_irq <=3D 0) { s->mixer_regs[0x82] |=3D (nchan & 4) ? 2 : 1; @@ -1289,13 +1298,23 @@ static int SB_read_DMA (void *opaque, int nchan, in= t dma_pos, int dma_len) s->left_till_irq =3D s->block_size + s->left_till_irq; } =20 + if (s->voice) { + free =3D s->audio_free & ~s->align; + if (free <=3D 0) { + release_DREQ(s, nchan); + } + } return dma_pos; } =20 static void SB_audio_callback (void *opaque, int free) { SB16State *s =3D opaque; + int nchan =3D s->use_hdma ? s->hdma : s->dma; + s->audio_free =3D free; + /* run the DMA engine to call SB_read_DMA immediately */ + hold_DREQ(s, nchan); } =20 static int sb16_post_load (void *opaque, int version_id) --=20 2.43.0 From nobody Mon Feb 9 07:36:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=t-online.de Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1751916676526450.2333938147642; Mon, 7 Jul 2025 12:31:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uYrYM-0005aZ-Fd; Mon, 07 Jul 2025 15:31:03 -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 1uYrXe-0005OH-SX for qemu-devel@nongnu.org; Mon, 07 Jul 2025 15:30:20 -0400 Received: from mailout04.t-online.de ([194.25.134.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uYrXd-0005Pe-3l for qemu-devel@nongnu.org; Mon, 07 Jul 2025 15:30:18 -0400 Received: from fwd82.aul.t-online.de (fwd82.aul.t-online.de [10.223.144.108]) by mailout04.t-online.de (Postfix) with SMTP id C7431ECBA; Mon, 7 Jul 2025 21:30:14 +0200 (CEST) Received: from linpower.localnet ([93.236.150.188]) by fwd82.t-online.de with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted) esmtp id 1uYrXa-0vf2qP0; Mon, 7 Jul 2025 21:30:14 +0200 Received: by linpower.localnet (Postfix, from userid 1000) id 82BBD200533; Mon, 7 Jul 2025 21:30:09 +0200 (CEST) From: =?UTF-8?q?Volker=20R=C3=BCmelin?= To: Gerd Hoffmann Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-devel@nongnu.org Subject: [PATCH 3/3] hw/audio/sb16: block structure coding style fixes Date: Mon, 7 Jul 2025 21:30:09 +0200 Message-ID: <20250707193009.12901-3-vr_qemu@t-online.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <48576e83-54ba-4ebd-8a3e-6b8306655483@t-online.de> References: <48576e83-54ba-4ebd-8a3e-6b8306655483@t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TOI-EXPURGATEID: 150726::1751916614-20FF74EA-E0FE7B8F/0/0 CLEAN NORMAL X-TOI-MSGID: 94f399f1-db02-4b3f-873e-4b2af447559a Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=194.25.134.18; envelope-from=volker.ruemelin@t-online.de; helo=mailout04.t-online.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1751916678811116600 Change the block structure according to the QEMU Coding Style documentation. Signed-off-by: Volker R=C3=BCmelin Reviewed-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/audio/sb16.c | 57 +++++++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 37 deletions(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index 714144eb61..e23d86674e 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -204,8 +204,7 @@ static void control (SB16State *s, int hold) hold_DREQ(s, nchan); } AUD_set_active_out (s->voice, 1); - } - else { + } else { release_DREQ(s, nchan); AUD_set_active_out (s->voice, 0); } @@ -271,10 +270,10 @@ static void dma_cmd8 (SB16State *s, int mask, int dma= _len) s->fmt_signed =3D 0; s->fmt_stereo =3D (s->mixer_regs[0x0e] & 2) !=3D 0; if (-1 =3D=3D s->time_const) { - if (s->freq <=3D 0) + if (s->freq <=3D 0) { s->freq =3D 11025; - } - else { + } + } else { int tmp =3D (256 - s->time_const); s->freq =3D (1000000 + (tmp / 2)) / tmp; } @@ -282,8 +281,7 @@ static void dma_cmd8 (SB16State *s, int mask, int dma_l= en) =20 if (dma_len !=3D -1) { s->block_size =3D dma_len << s->fmt_stereo; - } - else { + } else { /* This is apparently the only way to make both Act1/PL and SecondReality/FC work =20 @@ -362,16 +360,13 @@ static void dma_cmd (SB16State *s, uint8_t cmd, uint8= _t d0, int dma_len) if (16 =3D=3D s->fmt_bits) { if (s->fmt_signed) { s->fmt =3D AUDIO_FORMAT_S16; - } - else { + } else { s->fmt =3D AUDIO_FORMAT_U16; } - } - else { + } else { if (s->fmt_signed) { s->fmt =3D AUDIO_FORMAT_S8; - } - else { + } else { s->fmt =3D AUDIO_FORMAT_U8; } } @@ -422,8 +417,7 @@ static inline uint8_t dsp_get_data (SB16State *s) { if (s->in_index) { return s->in2_data[--s->in_index]; - } - else { + } else { dolog ("buffer underflow\n"); return 0; } @@ -447,8 +441,7 @@ static void command (SB16State *s, uint8_t cmd) qemu_log_mask(LOG_GUEST_ERROR, "%#x wrong bits\n", cmd); } s->needed_bytes =3D 3; - } - else { + } else { s->needed_bytes =3D 0; =20 switch (cmd) { @@ -674,8 +667,7 @@ static void command (SB16State *s, uint8_t cmd) exit: if (!s->needed_bytes) { s->cmd =3D -1; - } - else { + } else { s->cmd =3D cmd; } return; @@ -715,14 +707,12 @@ static void complete (SB16State *s) if (s->cmd & 8) { dolog ("ADC params cmd =3D %#x d0 =3D %d, d1 =3D %d, d2 =3D %d= \n", s->cmd, d0, d1, d2); - } - else { + } else { ldebug ("cmd =3D %#x d0 =3D %d, d1 =3D %d, d2 =3D %d\n", s->cmd, d0, d1, d2); dma_cmd (s, s->cmd, d0, d1 + (d2 << 8)); } - } - else { + } else { switch (s->cmd) { case 0x04: s->csp_mode =3D dsp_get_data (s); @@ -747,8 +737,7 @@ static void complete (SB16State *s) ldebug ("0x83[%d] <- %#x\n", s->csp_reg83r, d0); s->csp_reg83[s->csp_reg83r % 4] =3D d0; s->csp_reg83r +=3D 1; - } - else { + } else { s->csp_regs[d1] =3D d0; } break; @@ -763,8 +752,7 @@ static void complete (SB16State *s) s->csp_reg83[s->csp_reg83w % 4]); dsp_out_data (s, s->csp_reg83[s->csp_reg83w % 4]); s->csp_reg83w +=3D 1; - } - else { + } else { dsp_out_data (s, s->csp_regs[d0]); } break; @@ -819,8 +807,7 @@ static void complete (SB16State *s) ticks =3D muldiv64(bytes, NANOSECONDS_PER_SECOND, freq); if (ticks < NANOSECONDS_PER_SECOND / 1024) { qemu_irq_raise (s->pic); - } - else { + } else { if (s->aux_ts) { timer_mod ( s->aux_ts, @@ -992,12 +979,10 @@ static void dsp_write(void *opaque, uint32_t nport, u= int32_t val) log_dsp (s); } #endif - } - else { + } else { if (s->in_index =3D=3D sizeof (s->in2_data)) { dolog ("in data overrun\n"); - } - else { + } else { s->in2_data[s->in_index++] =3D val; if (s->in_index =3D=3D s->needed_bytes) { s->needed_bytes =3D 0; @@ -1032,8 +1017,7 @@ static uint32_t dsp_read(void *opaque, uint32_t nport) if (s->out_data_len) { retval =3D s->out_data[--s->out_data_len]; s->last_read_byte =3D retval; - } - else { + } else { if (s->cmd !=3D -1) { dolog ("empty output buffer for command %#x\n", s->cmd); @@ -1255,8 +1239,7 @@ static int SB_read_DMA (void *opaque, int nchan, int = dma_pos, int dma_len) release_DREQ(s, nchan); return dma_pos; } - } - else { + } else { free =3D dma_len; } =20 --=20 2.43.0