summaryrefslogtreecommitdiff
path: root/drivers/gpu/nova-core/fsp/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>2026-05-26 11:47:09 +0300
committerVinod Koul <vkoul@kernel.org>2026-06-04 20:58:34 +0530
commit9fcaec81ac56c9d2c5d779ffb5a76b622b4d0590 (patch)
tree1449b3bfaf66e76d050361e47ce42dfb9cd511d8 /drivers/gpu/nova-core/fsp/git@git.tavy.me:linux.git
parentb4d34819a53964648bc53cabaa3ba9890d4fdf9c (diff)
ASoC: renesas: rz-ssi: Use generic PCM dmaengine APIs
On Renesas RZ/G2L and RZ/G3S SoCs (where this was tested), captured audio files occasionally contained random spikes when viewed with a tool such as Audacity. These spikes were also audible as popping noises. Using cyclic DMA resolves this issue. The driver was reworked to use the existing support provided by the generic PCM dmaengine APIs. In addition to eliminating the random spikes, the following issues were addressed: - blank periods at the beginning of recorded files, which occurred intermittently, are no longer present - no overruns or underruns were observed when continuously recording short audio files (e.g. 5 seconds long) in a loop - concurrency issues in the SSI driver when enqueuing DMA requests were eliminated; previously, DMA requests could be prepared and submitted both from the DMA completion callback and the interrupt handler, which led to crashes after several hours of testing - the SSI driver logic is simplified - the number of generated interrupts is reduced by approximately 250% In the SSI platform driver probe function, the following changes were made: - the driver-specific DMA configuration was removed in favor of the generic PCM dmaengine APIs. As a result, explicit cleanup goto labels are no longer required and the driver remove callback was dropped, since resource management is now handled via devres helpers - special handling was added for IP variants operating in half-duplex mode, where the DMA channel name in the device tree is "rt"; this DMA channel name is taken into account and passed to the generic PCM dmaengine configuration data All code previously responsible for preparing and completing DMA transfers was removed, as this functionality is now handled entirely by the generic PCM dmaengine APIs. Since DMA channels must be paused and resumed during recovery paths (overruns and underruns reported by the hardware), the DMA channel references are stored in rz_ssi_hw_params(). The logic in rz_ssi_is_dma_enabled() was updated to reflect that the driver no longer manages DMA transfers directly. To avoid software reported underruns (e.g. when running aplay during consecutive suspend/resume cycles, or when the CPU is nearly 100% loaded), rz_ssi_pcm_hardware.buffer_bytes_max was increased to 192K. At the same time, rz_ssi_pcm_hardware.period_bytes_max was set to 48K to reduce interrupt overhead. Finally, rz_ssi_stream_is_play() was removed, as it had only a single remaining user after this rework, and its logic was inlined at the call site. Acked-by: Mark Brown <broonie@kernel.org> Tested-by: John Madieu <john.madieu.xa@bp.renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20260526084710.3491480-18-claudiu.beznea@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/gpu/nova-core/fsp/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions