Message ID | 20230613191552.724748-1-fido_max@inbox.ru |
---|---|
State | Accepted |
Commit | 6f80197f40515853814d0f22e5209d53f899ab91 |
Headers | show |
Series | [1/1] ASoC: dwc: don't assign addr_width for dt configs | expand |
On Tue, 13 Jun 2023 22:15:51 +0300, Maxim Kochetkov wrote: > For proper DMA operation addr_width must corresponds with audio format > (S16, S24, S32, etc). Proper bus width calculations is performed by > snd_hwparams_to_dma_slave_config(). So drop wrong addr_width asignment > for dt configs and let snd_hwparams_to_dma_slave_config() do the job. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: dwc: don't assign addr_width for dt configs commit: 6f80197f40515853814d0f22e5209d53f899ab91 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c index 9e7065dd854c..21398ee924e4 100644 --- a/sound/soc/dwc/dwc-i2s.c +++ b/sound/soc/dwc/dwc-i2s.c @@ -558,13 +558,9 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev, u32 comp1 = i2s_read_reg(dev->i2s_base, I2S_COMP_PARAM_1); u32 comp2 = i2s_read_reg(dev->i2s_base, I2S_COMP_PARAM_2); u32 fifo_depth = 1 << (1 + COMP1_FIFO_DEPTH_GLOBAL(comp1)); - u32 idx = COMP1_APB_DATA_WIDTH(comp1); u32 idx2; int ret; - if (WARN_ON(idx >= ARRAY_SIZE(bus_widths))) - return -EINVAL; - ret = dw_configure_dai(dev, dw_i2s_dai, SNDRV_PCM_RATE_8000_192000); if (ret < 0) return ret; @@ -574,7 +570,6 @@ 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.addr_width = bus_widths[idx]; dev->play_dma_data.dt.fifo_size = fifo_depth * (fifo_width[idx2]) >> 8; dev->play_dma_data.dt.maxburst = 16; @@ -584,7 +579,6 @@ 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.addr_width = bus_widths[idx]; dev->capture_dma_data.dt.fifo_size = fifo_depth * (fifo_width[idx2] >> 8); dev->capture_dma_data.dt.maxburst = 16;
For proper DMA operation addr_width must corresponds with audio format (S16, S24, S32, etc). Proper bus width calculations is performed by snd_hwparams_to_dma_slave_config(). So drop wrong addr_width asignment for dt configs and let snd_hwparams_to_dma_slave_config() do the job. Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru> --- sound/soc/dwc/dwc-i2s.c | 6 ------ 1 file changed, 6 deletions(-)