Skip to content

Commit 6f80197

Browse files
fidomaxbroonie
authored andcommitted
ASoC: dwc: don't assign addr_width for dt configs
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> Link: https://lore.kernel.org/r/20230613191552.724748-1-fido_max@inbox.ru Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent a42e988 commit 6f80197

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

sound/soc/dwc/dwc-i2s.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -593,13 +593,9 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
593593
u32 comp1 = i2s_read_reg(dev->i2s_base, I2S_COMP_PARAM_1);
594594
u32 comp2 = i2s_read_reg(dev->i2s_base, I2S_COMP_PARAM_2);
595595
u32 fifo_depth = 1 << (1 + COMP1_FIFO_DEPTH_GLOBAL(comp1));
596-
u32 idx = COMP1_APB_DATA_WIDTH(comp1);
597596
u32 idx2;
598597
int ret;
599598

600-
if (WARN_ON(idx >= ARRAY_SIZE(bus_widths)))
601-
return -EINVAL;
602-
603599
ret = dw_configure_dai(dev, dw_i2s_dai, SNDRV_PCM_RATE_8000_192000);
604600
if (ret < 0)
605601
return ret;
@@ -609,7 +605,6 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
609605

610606
dev->capability |= DWC_I2S_PLAY;
611607
dev->play_dma_data.dt.addr = res->start + I2S_TXDMA;
612-
dev->play_dma_data.dt.addr_width = bus_widths[idx];
613608
dev->play_dma_data.dt.fifo_size = fifo_depth *
614609
(fifo_width[idx2]) >> 8;
615610
dev->play_dma_data.dt.maxburst = 16;
@@ -619,7 +614,6 @@ static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
619614

620615
dev->capability |= DWC_I2S_RECORD;
621616
dev->capture_dma_data.dt.addr = res->start + I2S_RXDMA;
622-
dev->capture_dma_data.dt.addr_width = bus_widths[idx];
623617
dev->capture_dma_data.dt.fifo_size = fifo_depth *
624618
(fifo_width[idx2] >> 8);
625619
dev->capture_dma_data.dt.maxburst = 16;

0 commit comments

Comments
 (0)