linux/sound/soc/atmel
Codrin Ciubotariu 03667e3d4f
ASoC: atmel: mchp-i2s-mcc: Improve maxburst calculation for better performance
The period size represents the size of the DMA descriptor. To ensure all
DMA descriptors start from a well-aligned address, the period size must
be divided by (sample size * maxburst), not just by maxburst.
This adjustment allows for computing a higher maxburst value, thereby
increasing the performance of the DMA transfer.
Previously, snd_pcm_lib_period_bytes() returned 0 because the runtime HW
parameters are computed after the hw_params() callbacks are used.
To address this, we now use params_*() functions to compute the period
size accurately. This change optimizes the DMA transfer performance by
ensuring proper alignment and efficient use of maxburst values.

[andrei.simion@microchip.com: Reword commit message and commit title.
Add macros with values for maximum DMA chunk size allowed.
Add DMA_BURST_ALIGNED preprocessor function to check the alignment of the
DMA burst]

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Andrei Simion <andrei.simion@microchip.com>
Link: https://patch.msgid.link/20240905095633.113784-1-andrei.simion@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-09-05 12:31:16 +01:00
..
atmel_ssc_dai.c ASoC: atmel_ssc_dai: Remove the unneeded result variable 2022-08-23 13:04:51 +01:00
atmel_ssc_dai.h ASoC: atmel_ssc_dai: Remove wrong spinlock usage 2019-09-18 11:12:24 +01:00
atmel_wm8904.c ASoC: Explicitly include correct DT includes 2023-10-09 13:13:56 +01:00
atmel-classd.c ASoC: atmel: atmel-classd: Re-add dai_link->platform to fix card init 2024-06-06 14:04:00 +01:00
atmel-classd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-i2s.c ASoC: atmel: merge DAI call back functions into ops 2023-08-14 13:10:19 +01:00
atmel-pcm-dma.c ASoC: atmel: convert not to use asoc_xxx() 2023-09-25 14:16:27 +02:00
atmel-pcm-pdc.c ASoC: atmel: convert not to use asoc_xxx() 2023-09-25 14:16:27 +02:00
atmel-pcm.h ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register() 2019-06-28 15:08:38 +01:00
atmel-pdmic.c ASoC: atmel: convert not to use asoc_xxx() 2023-09-25 14:16:27 +02:00
atmel-pdmic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig ASoC: wm8731: Factor out the I2C and SPI bus code into separate modules 2022-04-04 08:39:32 +01:00
Makefile ASoC: atmel: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:15 +09:00
mchp-i2s-mcc.c ASoC: atmel: mchp-i2s-mcc: Improve maxburst calculation for better performance 2024-09-05 12:31:16 +01:00
mchp-pdmc.c ASoC: dmaengine: Drop unused iov_iter for process callback 2023-09-01 15:38:29 +02:00
mchp-spdifrx.c ASoC: atmel: merge DAI call back functions into ops 2023-08-14 13:10:19 +01:00
mchp-spdiftx.c ASoC: atmel: merge DAI call back functions into ops 2023-08-14 13:10:19 +01:00
mikroe-proto.c ASoC: atmel: use devm_snd_soc_register_card() 2024-01-22 00:06:03 +00:00
sam9g20_wm8731.c ASoC: atmel: convert not to use asoc_xxx() 2023-09-25 14:16:27 +02:00
sam9x5_wm8731.c ASoC: atmel: convert not to use asoc_xxx() 2023-09-25 14:16:27 +02:00
tse850-pcm5142.c ASoC: atmel: tse850-pcm5142: Remove unused of_gpio.h 2024-05-08 11:40:47 +09:00