From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: vkoul@kernel.org, biju.das.jz@bp.renesas.com,
prabhakar.mahadev-lad.rj@bp.renesas.com, lgirdwood@gmail.com,
broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
p.zabel@pengutronix.de, fabrizio.castro.jz@renesas.com,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH 6/7] ASoC: renesas: rz-ssi: Use generic PCM dmaengine APIs
Date: Mon, 26 Jan 2026 16:46:16 +0200 [thread overview]
Message-ID: <74692e8a-220f-4248-9481-81bb331597f1@tuxon.dev> (raw)
In-Reply-To: <CAMuHMdWhY7nNanQ=h8HGrWyDfpCSL33QFJorhLCgnKASbmHiYw@mail.gmail.com>
Hi, Geert,
On 1/26/26 16:26, Geert Uytterhoeven wrote:
> Hi Claudiu,
>
> On Mon, 26 Jan 2026 at 11:32, Claudiu <claudiu.beznea@tuxon.dev> wrote:
>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>
>> On Renesas RZ/G2L and RZ/G3S SoCs (where this was tested), captured audio
>> files occasionally contained random spikes when viewed with a profiling
>> 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) 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), 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.
>>
>> 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.
>>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Thanks for your patch!
>
>> --- a/sound/soc/renesas/rz-ssi.c
>> +++ b/sound/soc/renesas/rz-ssi.c
>
>> @@ -1116,15 +936,19 @@ static struct snd_soc_dai_driver rz_ssi_soc_dai[] = {
>> static const struct snd_soc_component_driver rz_ssi_soc_component = {
>> .name = "rz-ssi",
>> .open = rz_ssi_pcm_open,
>> - .pointer = rz_ssi_pcm_pointer,
>> - .pcm_construct = rz_ssi_pcm_new,
>> .legacy_dai_naming = 1,
>> };
>>
>> +static struct snd_dmaengine_pcm_config rz_ssi_dmaegine_pcm_conf = {
>> + .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config,
>
> This fails to link if CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM is not
> enabled (e.g. renesas_defconfig):
>
> aarch64-linux-gnu-ld: sound/soc/renesas/rz-ssi.o: in function
> `rz_ssi_probe':
> rz-ssi.c:(.text+0x538): undefined reference to
> `devm_snd_dmaengine_pcm_register'
> aarch64-linux-gnu-ld: sound/soc/renesas/rz-ssi.o:(.data+0xc8):
> undefined reference to `snd_dmaengine_pcm_prepare_slave_config'
>
> Adding a select like this white-space damaged snippet:
>
> --- a/sound/soc/renesas/Kconfig
> +++ b/sound/soc/renesas/Kconfig
> @@ -56,6 +56,7 @@ config SND_SOC_MSIOF
> config SND_SOC_RZ
> tristate "RZ/G2L series SSIF-2 support"
> depends on ARCH_RZG2L || COMPILE_TEST
> + select SND_SOC_GENERIC_DMAENGINE_PCM
> help
> This option enables RZ/G2L SSIF-2 sound support.
>
> would fix the build.
Thank you for reporting and proposing a fix. I'll take care of it in v2.
Claudiu
next prev parent reply other threads:[~2026-01-26 14:46 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 10:31 [PATCH 0/7] Renesas: dmaengine and ASoC fixes Claudiu
2026-01-26 10:31 ` [PATCH 1/7] dmaengine: sh: rz-dmac: Add enable status bit Claudiu
2026-01-26 10:31 ` [PATCH 2/7] dmaengine: sh: rz-dmac: Add pause " Claudiu
2026-01-26 10:31 ` [PATCH 3/7] dmaengine: sh: rz-dmac: Drop the update of CHCTRL_SETEN in channel->chctrl APIs Claudiu
2026-01-26 10:31 ` [PATCH 4/7] dmaengine: sh: rz-dmac: Add cyclic DMA support Claudiu
2026-01-26 10:31 ` [PATCH 5/7] dmaengine: sh: rz-dmac: Add suspend to RAM support Claudiu
2026-01-26 11:03 ` Biju Das
2026-01-26 12:04 ` Claudiu Beznea
2026-01-26 12:10 ` Biju Das
2026-01-26 12:39 ` Claudiu Beznea
2026-01-26 12:51 ` Biju Das
2026-01-26 13:06 ` Biju Das
2026-01-26 13:07 ` Claudiu Beznea
2026-01-26 13:12 ` Biju Das
2026-01-26 15:28 ` Biju Das
2026-02-05 13:00 ` Claudiu Beznea
2026-02-05 13:30 ` Biju Das
2026-02-05 13:33 ` Geert Uytterhoeven
2026-02-05 14:06 ` Biju Das
2026-02-05 17:20 ` Claudiu Beznea
2026-02-05 17:41 ` Biju Das
2026-02-06 7:25 ` Biju Das
2026-02-06 9:58 ` Claudiu Beznea
2026-02-06 10:08 ` Biju Das
2026-03-12 10:07 ` Biju Das
2026-03-12 12:26 ` Tommaso Merciai
2026-03-16 14:02 ` claudiu beznea
2026-01-26 10:31 ` [PATCH 6/7] ASoC: renesas: rz-ssi: Use generic PCM dmaengine APIs Claudiu
2026-01-26 14:26 ` Geert Uytterhoeven
2026-01-26 14:46 ` Claudiu Beznea [this message]
2026-01-26 10:31 ` [PATCH 7/7] dmaengine: sh: rz-dmac: Set the Link End (LE) bit on the last descriptor Claudiu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=74692e8a-220f-4248-9481-81bb331597f1@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=biju.das.jz@bp.renesas.com \
--cc=broonie@kernel.org \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=dmaengine@vger.kernel.org \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert@linux-m68k.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=perex@perex.cz \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox