mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Biju <biju.das.au@gmail.com>
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH 6/7] ASoC: renesas: rz-ssi: Add support for 24 bits sample width
Date: Thu, 13 Nov 2025 05:56:21 +0000	[thread overview]
Message-ID: <877bvuwk57.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <20251112154115.1048298-7-biju.das.jz@bp.renesas.com>


Hi

> From: Biju Das <biju.das.jz@bp.renesas.com>
> 
> Add support for 24 bits sample format width for RZ/G2L SoCs.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
(snip)
>  	ssicr |= SSICR_CKDV(clk_ckdv);
> -	ssicr |= SSICR_DWL(1) | SSICR_SWL(3);
> +	switch (ssi->hw_params_cache.sample_width) {
> +	case 16:
> +		ssicr |= SSICR_DWL(1);
> +		break;
> +	case 24:
> +		ssicr |= SSICR_PDTA;
> +		ssicr |= SSICR_DWL(5);

nitpick
It can be 1 line ?

> @@ -662,8 +697,13 @@ static int rz_ssi_dma_slave_config(struct rz_ssi_priv *ssi,
>  	cfg.direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
>  	cfg.dst_addr = ssi->phys + SSIFTDR;
>  	cfg.src_addr = ssi->phys + SSIFRDR;
> -	cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
> -	cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
> +	if (ssi->hw_params_cache.sample_width == 24) {
> +		cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> +		cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> +	} else {
> +		cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
> +		cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
> +	}

You can reduce extra if check when 32 case ([7/7]) if it was

	if (xxx == 16) {
		...
	} else { // for 24, 32
		...
	}

Thank you for your help !!

Best regards
---
Kuninori Morimoto

  reply	other threads:[~2025-11-13  5:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 15:41 [PATCH 0/7] RZ/G2L SSI Improvements Biju
2025-11-12 15:41 ` [PATCH 1/7] ASoC: renesas: rz-ssi: Fix channel swap issue in full duplex mode Biju
2025-11-13  5:50   ` Kuninori Morimoto
2025-11-13  8:01     ` Biju Das
2025-11-12 15:41 ` [PATCH 2/7] ASoC: renesas: rz-ssi: Fix rz_ssi_priv::hw_params_cache::sample_width Biju
2025-11-13  5:51   ` Kuninori Morimoto
2025-11-12 15:41 ` [PATCH 3/7] ASoC: renesas: rz-ssi: Use dev variable in probe() Biju
2025-11-13  5:50   ` Kuninori Morimoto
2025-11-13  8:02     ` Biju Das
2025-11-13  8:47       ` Geert Uytterhoeven
2025-11-13 10:33         ` Biju Das
2025-11-12 15:41 ` [PATCH 4/7] ASoC: renesas: rz-ssi: Remove trailing comma in the terminator entry Biju
2025-11-13  5:51   ` Kuninori Morimoto
2025-11-12 15:41 ` [PATCH 5/7] ASoC: renesas: rz-ssi: Move DMA configuration Biju
2025-11-12 15:41 ` [PATCH 6/7] ASoC: renesas: rz-ssi: Add support for 24 bits sample width Biju
2025-11-13  5:56   ` Kuninori Morimoto [this message]
2025-11-13  8:04     ` Biju Das
2025-11-12 15:41 ` [PATCH 7/7] ASoC: renesas: rz-ssi: Add support for 32 " Biju
2025-11-12 16:25 ` [PATCH 0/7] RZ/G2L SSI Improvements Mark Brown
2025-11-13  5:49 ` Kuninori Morimoto
2025-11-13  7:58   ` Biju Das

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=877bvuwk57.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=tiwai@suse.com \
    /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

all inboxes | Powered by JetHome®