Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Maxim Kochetkov and committed by
Mark Brown
6f80197f a42e988b

-6
-6
sound/soc/dwc/dwc-i2s.c
··· 593 593 u32 comp1 = i2s_read_reg(dev->i2s_base, I2S_COMP_PARAM_1); 594 594 u32 comp2 = i2s_read_reg(dev->i2s_base, I2S_COMP_PARAM_2); 595 595 u32 fifo_depth = 1 << (1 + COMP1_FIFO_DEPTH_GLOBAL(comp1)); 596 - u32 idx = COMP1_APB_DATA_WIDTH(comp1); 597 596 u32 idx2; 598 597 int ret; 599 - 600 - if (WARN_ON(idx >= ARRAY_SIZE(bus_widths))) 601 - return -EINVAL; 602 598 603 599 ret = dw_configure_dai(dev, dw_i2s_dai, SNDRV_PCM_RATE_8000_192000); 604 600 if (ret < 0) ··· 605 609 606 610 dev->capability |= DWC_I2S_PLAY; 607 611 dev->play_dma_data.dt.addr = res->start + I2S_TXDMA; 608 - dev->play_dma_data.dt.addr_width = bus_widths[idx]; 609 612 dev->play_dma_data.dt.fifo_size = fifo_depth * 610 613 (fifo_width[idx2]) >> 8; 611 614 dev->play_dma_data.dt.maxburst = 16; ··· 614 619 615 620 dev->capability |= DWC_I2S_RECORD; 616 621 dev->capture_dma_data.dt.addr = res->start + I2S_RXDMA; 617 - dev->capture_dma_data.dt.addr_width = bus_widths[idx]; 618 622 dev->capture_dma_data.dt.fifo_size = fifo_depth * 619 623 (fifo_width[idx2] >> 8); 620 624 dev->capture_dma_data.dt.maxburst = 16;