CIP-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@nabladev.com>
To: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Cc: nobuhiro.iwamatsu.x90@mail.toshiba, pavel@nabladev.com,
	cip-dev@lists.cip-project.org
Subject: Re: [PATCH 5.10.y-cip 09/11] ASoC: renesas: rz-ssi: Use generic PCM dmaengine APIs
Date: Wed, 2 Dec 2026 14:22:04 +0100	[thread overview]
Message-ID: <axAbfIAsUIBjy2RM@duo.ucw.cz> (raw)
In-Reply-To: <20261126152553.1298561-10-claudiu.beznea@tuxon.dev>

[-- Attachment #1: Type: text/plain, Size: 1624 bytes --]

Hi!

> 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:

...
> - the number of generated interrupts is reduced by approximately 250%

I don't think you can reduce anything by 250%.

> +++ b/sound/soc/sh/rz-ssi.c
> @@ -642,19 +621,41 @@ static irqreturn_t rz_ssi_interrupt(int irq, void *data)
>  			rz_ssi_stop(ssi, strm_playback);
>  		}
>  
> +		if (!rz_ssi_is_stream_running(&ssi->playback) &&
> +		    !rz_ssi_is_stream_running(&ssi->capture) &&
> +		    rz_ssi_is_dma_enabled(ssi) && is_stopped) {
> +			if (ssi->playback.substream &&
> +			    ssi->dmas[SNDRV_PCM_STREAM_PLAYBACK])
> +				dmaengine_pause(ssi->dmas[SNDRV_PCM_STREAM_PLAYBACK]);
> +			if (ssi->capture.substream &&
> +			    ssi->dmas[SNDRV_PCM_STREAM_CAPTURE] &&
> +			    /* Avoid calling pause twice in case of half duplex. */
> +			    ssi->dmas[SNDRV_PCM_STREAM_PLAYBACK] !=
> +			    ssi->dmas[SNDRV_PCM_STREAM_CAPTURE])
> +				dmaengine_pause(ssi->dmas[SNDRV_PCM_STREAM_CAPTURE]);
> +		}

You are hitting line length limits here; it would be better to push it
into helper function to reduce indentation level, and to place "!=" at
beggining of next line so it is clear what is going on.

Best regards,
								Pavel

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2026-12-02 13:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 15:25 [PATCH 5.10.y-cip 00/11] Renesas: Backport audio and serial support Claudiu Beznea
2026-11-26 15:25 ` [PATCH 5.10.y-cip 01/11] ASoC: renesas: rz-ssi: Add a check for negative sample_space Claudiu Beznea
2026-11-26 15:25 ` [PATCH 5.10.y-cip 02/11] ASoC: renesas: rz-ssi: Use guard() for spin locks Claudiu Beznea
2026-11-26 15:25 ` [PATCH 5.10.y-cip 03/11] ASoC: renesas: rz-ssi: Simplify the logic in rz_ssi_stream_is_play() Claudiu Beznea
2026-11-26 15:25 ` [PATCH 5.10.y-cip 04/11] ASoC: renesas: rz-ssi: Drop unnecessary if condition Claudiu Beznea
2026-11-26 15:25 ` [PATCH 5.10.y-cip 05/11] ASoC: renesas: rz-ssi: Drop the & operator in front of function name Claudiu Beznea
2026-11-26 15:25 ` [PATCH 5.10.y-cip 06/11] ASoC: renesas: rz-ssi: Drop goto label Claudiu Beznea
2026-11-26 15:25 ` [PATCH 5.10.y-cip 07/11] ASoC: renesas: rz-ssi: Fix playback and capture Claudiu Beznea
2026-11-26 15:25 ` [PATCH 5.10.y-cip 08/11] ASoC: renesas: rz-ssi: Add pause support Claudiu Beznea
2026-11-26 15:25 ` [PATCH 5.10.y-cip 09/11] ASoC: renesas: rz-ssi: Use generic PCM dmaengine APIs Claudiu Beznea
2026-12-02 13:22   ` Pavel Machek [this message]
2026-11-26 15:25 ` [PATCH 5.10.y-cip 10/11] dmaengine: sh: rz-dmac: Set the Link End (LE) bit on the last descriptor Claudiu Beznea
2026-11-26 15:25 ` [PATCH 5.10.y-cip 11/11] arm64: dts: renesas: r9a07g044: Add DMA properties to serial nodes Claudiu Beznea
2026-12-01 22:23 ` [PATCH 5.10.y-cip 00/11] Renesas: Backport audio and serial support Pavel Machek
2026-12-02 13:23 ` Pavel Machek

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=axAbfIAsUIBjy2RM@duo.ucw.cz \
    --to=pavel@nabladev.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=nobuhiro.iwamatsu.x90@mail.toshiba \
    /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