[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<TY3PR01MB11346A1636E5E6755AD94006986CDA@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Thu, 13 Nov 2025 10:35:15 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: geert <geert@...ux-m68k.org>, biju.das.au <biju.das.au@...il.com>
CC: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>, Kuninori
Morimoto <kuninori.morimoto.gx@...esas.com>, Liam Girdwood
<lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, Jaroslav Kysela
<perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
"linux-sound@...r.kernel.org" <linux-sound@...r.kernel.org>,
"linux-renesas-soc@...r.kernel.org" <linux-renesas-soc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Geert
Uytterhoeven <geert+renesas@...der.be>, "stable@...nel.org"
<stable@...nel.org>, Tony Tang <Tony.tang.ks@...esas.com>
Subject: RE: [PATCH v2 1/2] ASoC: renesas: rz-ssi: Fix channel swap issue in
full duplex mode
Hi Geert,
Thanks for the feedback.
> -----Original Message-----
> From: Geert Uytterhoeven <geert@...ux-m68k.org>
> Sent: 13 November 2025 08:51
> Subject: Re: [PATCH v2 1/2] ASoC: renesas: rz-ssi: Fix channel swap issue in full duplex mode
>
> Hi Biju,
>
> On Thu, 13 Nov 2025 at 09:25, Biju <biju.das.au@...il.com> wrote:
> > From: Biju Das <biju.das.jz@...renesas.com>
> >
> > The full duplex audio starts with half duplex mode and then switch to
> > full duplex mode (another FIFO reset) when both playback/capture
> > streams available leading to random audio left/right channel swap
> > issue. Fix this channel swap issue by detecting the full duplex
> > condition by populating struct dup variable in startup() callback and
> > synchronize starting both the play and capture at the same time in
> > rz_ssi_start().
> >
> > Cc: stable@...nel.org
> > Fixes: 4f8cd05a4305 ("ASoC: sh: rz-ssi: Add full duplex support")
> > Co-developed-by: Tony Tang <tony.tang.ks@...esas.com>
> > Signed-off-by: Tony Tang <tony.tang.ks@...esas.com>
> > Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
> > Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
>
> Thanks for your patch!
>
> > --- a/sound/soc/renesas/rz-ssi.c
> > +++ b/sound/soc/renesas/rz-ssi.c
> > @@ -374,12 +379,18 @@ static int rz_ssi_start(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm)
> > SSISR_RUIRQ), 0);
> >
> > strm->running = 1;
> > - if (is_full_duplex)
> > - ssicr |= SSICR_TEN | SSICR_REN;
> > - else
> > + if (is_full_duplex) {
> > + if (ssi->dup.one_stream_triggered) {
> > + ssicr |= SSICR_TEN | SSICR_REN;
> > + rz_ssi_reg_writel(ssi, SSICR, ssicr);
> > + ssi->dup.one_stream_triggered = false;
> > + } else {
> > + ssi->dup.one_stream_triggered = true;
> > + }
> > + } else {
> > ssicr |= is_play ? SSICR_TEN : SSICR_REN;
> > -
> > - rz_ssi_reg_writel(ssi, SSICR, ssicr);
> > + rz_ssi_reg_writel(ssi, SSICR, ssicr);
> > + }
>
> You can reduce indentation by restructuring the tests:
>
> if (!is_full_duplex) {
> ...
> } else if (ssi->dup.one_stream_triggered) {
> ...
> } else {
> ...
> }
Agreed, will update in next version.
Cheers,
Biju
Powered by blists - more mailing lists