From: phucduc.bui@gmail.com
To: Maxim Kochetkov <fido_max@inbox.ru>,
Andrew Jackson <Andrew.Jackson@arm.com>,
Mark Brown <broonie@kernel.org>,
Xingyu Wu <xingyu.wu@starfivetech.com>
Cc: Tim Bird <tim.bird@sony.com>,
Yuri Zaporozhets <yuriz@vodafonemail.de>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH v2 4/6] ASoC: dwc: Fix DMA fifo_size calculation
Date: Tue, 10 Nov 2026 16:55:23 +0700 [thread overview]
Message-ID: <20261110095525.504660-5-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20261110095525.504660-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
fifo_size should be the FIFO size in bytes (depth * width / 8), but
the code shifts by 8 instead of 3. For capture the parentheses also
make it always 0.
Use depth * width / 8 for both directions.
Fixes: 52ea7c0543f8 ("ASoC: dwc: i2s: Add StarFive JH7110 SoC support")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/dwc/dwc-i2s.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c
index c5773f191db7..b0d3413c27d2 100644
--- a/sound/soc/dwc/dwc-i2s.c
+++ b/sound/soc/dwc/dwc-i2s.c
@@ -664,14 +664,14 @@ static int dw_configure_dai_by_pd(struct dw_i2s_dev *dev,
idx2 = COMP1_TX_WORDSIZE_0(comp1);
dev->play_dma_data.dt.addr = res->start + I2S_TXDMA;
dev->play_dma_data.dt.fifo_size = dev->fifo_th * 2 *
- (fifo_width[idx2]) >> 8;
+ fifo_width[idx2] / 8;
dev->play_dma_data.dt.maxburst = 16;
}
if (COMP1_RX_ENABLED(comp1)) {
idx2 = COMP2_RX_WORDSIZE_0(comp2);
dev->capture_dma_data.dt.addr = res->start + I2S_RXDMA;
dev->capture_dma_data.dt.fifo_size = dev->fifo_th * 2 *
- (fifo_width[idx2] >> 8);
+ fifo_width[idx2] / 8;
dev->capture_dma_data.dt.maxburst = 16;
}
} else {
@@ -711,7 +711,7 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
dev->capability |= DWC_I2S_PLAY;
dev->play_dma_data.dt.addr = res->start + I2S_TXDMA;
dev->play_dma_data.dt.fifo_size = fifo_depth *
- (fifo_width[idx2]) >> 8;
+ fifo_width[idx2] / 8;
dev->play_dma_data.dt.maxburst = 16;
}
if (COMP1_RX_ENABLED(comp1)) {
@@ -720,7 +720,7 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
dev->capability |= DWC_I2S_RECORD;
dev->capture_dma_data.dt.addr = res->start + I2S_RXDMA;
dev->capture_dma_data.dt.fifo_size = fifo_depth *
- (fifo_width[idx2] >> 8);
+ fifo_width[idx2] / 8;
dev->capture_dma_data.dt.maxburst = 16;
}
--
2.43.0
next prev parent reply other threads:[~2026-11-10 9:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 9:55 [PATCH v2 0/6] ASoC: dwc: Fix several issues in the I2S driver phucduc.bui
2026-11-10 9:55 ` [PATCH v2 1/6] ASoC: dwc: Fix bit clock rate in TDM mode phucduc.bui
2026-11-10 9:55 ` [PATCH v2 2/6] ASoC: dwc: Fix error handling in dw_i2s_set_fmt() phucduc.bui
2026-11-10 9:55 ` [PATCH v2 3/6] ASoC: dwc: Fix channels_max derived from COMP_PARAM_1 phucduc.bui
2026-11-10 9:55 ` phucduc.bui [this message]
2026-11-10 10:02 ` [PATCH v2 4/6] ASoC: dwc: Fix DMA fifo_size calculation sashiko-bot
2026-11-11 1:49 ` Bui Duc Phuc
2026-11-10 9:55 ` [PATCH v2 5/6] ASoC: dwc: Propagate optional IRQ lookup errors phucduc.bui
2026-11-10 10:06 ` sashiko-bot
2026-11-11 1:45 ` Bui Duc Phuc
2026-11-10 9:55 ` [PATCH v2 6/6] ASoC: dwc: Remove redundant error messages phucduc.bui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261110095525.504660-5-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=Andrew.Jackson@arm.com \
--cc=broonie@kernel.org \
--cc=fido_max@inbox.ru \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tim.bird@sony.com \
--cc=tiwai@suse.com \
--cc=xingyu.wu@starfivetech.com \
--cc=yuriz@vodafonemail.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.