Message ID | 20241108104958.2931943-7-claudiu.beznea.uj@bp.renesas.com |
---|---|
State | New |
Headers | show |
Series | Add audio support for the Renesas RZ/G3S SoC | expand |
> -----Original Message----- > From: Claudiu <claudiu.beznea@tuxon.dev> > Sent: 08 November 2024 10:50 > To: geert+renesas@glider.be; mturquette@baylibre.com; sboyd@kernel.org; robh@kernel.org; > krzk+dt@kernel.org; conor+dt@kernel.org; Biju Das <biju.das.jz@bp.renesas.com>; Prabhakar Mahadev Lad > <prabhakar.mahadev-lad.rj@bp.renesas.com>; lgirdwood@gmail.com; broonie@kernel.org; > magnus.damm@gmail.com; linus.walleij@linaro.org; perex@perex.cz; tiwai@suse.com; > p.zabel@pengutronix.de > Cc: linux-renesas-soc@vger.kernel.org; linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux- > kernel@vger.kernel.org; linux-sound@vger.kernel.org; linux-gpio@vger.kernel.org; Claudiu.Beznea > <claudiu.beznea@tuxon.dev>; Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>; stable@vger.kernel.org > Subject: [PATCH v2 06/25] ASoC: sh: rz-ssi: Terminate all the DMA transactions > > From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > > In case of full duplex the 1st closed stream doesn't benefit from the dmaengine_terminate_async(). > Call it after the companion stream is closed. > > Fixes: 26ac471c5354 ("ASoC: sh: rz-ssi: Add SSI DMAC support") Maybe add fixes tag for full duplex case as the separation of Playback/ Capture is introduced in that patch. > Cc: stable@vger.kernel.org > Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Cheers, Biju > --- > > Changes in v2: > - none > > sound/soc/renesas/rz-ssi.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 6efd017aaa7f..2d8721156099 > 100644 > --- a/sound/soc/renesas/rz-ssi.c > +++ b/sound/soc/renesas/rz-ssi.c > @@ -415,8 +415,12 @@ static int rz_ssi_stop(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm) > rz_ssi_reg_mask_setl(ssi, SSICR, SSICR_TEN | SSICR_REN, 0); > > /* Cancel all remaining DMA transactions */ > - if (rz_ssi_is_dma_enabled(ssi)) > - dmaengine_terminate_async(strm->dma_ch); > + if (rz_ssi_is_dma_enabled(ssi)) { > + if (ssi->playback.dma_ch) > + dmaengine_terminate_async(ssi->playback.dma_ch); > + if (ssi->capture.dma_ch) > + dmaengine_terminate_async(ssi->capture.dma_ch); > + } > > rz_ssi_set_idle(ssi); > > -- > 2.39.2
Hi Claudiu > From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > > In case of full duplex the 1st closed stream doesn't benefit from the > dmaengine_terminate_async(). Call it after the companion stream is > closed. > > Fixes: 26ac471c5354 ("ASoC: sh: rz-ssi: Add SSI DMAC support") > Cc: stable@vger.kernel.org > Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> (snip) > sound/soc/renesas/rz-ssi.c | 8 ++++++-- We are now using "renesas" dir, so, you want to use "ASoC: renesas:" instead of "ASoC: sh:" in Subject ? Thank you for your help !! Best regards --- Kuninori Morimoto
Hi, Biju, On 10.11.2024 10:37, Biju Das wrote: > > >> -----Original Message----- >> From: Claudiu <claudiu.beznea@tuxon.dev> >> Sent: 08 November 2024 10:50 >> To: geert+renesas@glider.be; mturquette@baylibre.com; sboyd@kernel.org; robh@kernel.org; >> krzk+dt@kernel.org; conor+dt@kernel.org; Biju Das <biju.das.jz@bp.renesas.com>; Prabhakar Mahadev Lad >> <prabhakar.mahadev-lad.rj@bp.renesas.com>; lgirdwood@gmail.com; broonie@kernel.org; >> magnus.damm@gmail.com; linus.walleij@linaro.org; perex@perex.cz; tiwai@suse.com; >> p.zabel@pengutronix.de >> Cc: linux-renesas-soc@vger.kernel.org; linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux- >> kernel@vger.kernel.org; linux-sound@vger.kernel.org; linux-gpio@vger.kernel.org; Claudiu.Beznea >> <claudiu.beznea@tuxon.dev>; Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>; stable@vger.kernel.org >> Subject: [PATCH v2 06/25] ASoC: sh: rz-ssi: Terminate all the DMA transactions >> >> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> >> >> In case of full duplex the 1st closed stream doesn't benefit from the dmaengine_terminate_async(). >> Call it after the companion stream is closed. >> >> Fixes: 26ac471c5354 ("ASoC: sh: rz-ssi: Add SSI DMAC support") > > Maybe add fixes tag for full duplex case as the separation of > Playback/ Capture is introduced in that patch. OK > >> Cc: stable@vger.kernel.org >> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > > Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> > > Cheers, > Biju > >> --- >> >> Changes in v2: >> - none >> >> sound/soc/renesas/rz-ssi.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 6efd017aaa7f..2d8721156099 >> 100644 >> --- a/sound/soc/renesas/rz-ssi.c >> +++ b/sound/soc/renesas/rz-ssi.c >> @@ -415,8 +415,12 @@ static int rz_ssi_stop(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm) >> rz_ssi_reg_mask_setl(ssi, SSICR, SSICR_TEN | SSICR_REN, 0); >> >> /* Cancel all remaining DMA transactions */ >> - if (rz_ssi_is_dma_enabled(ssi)) >> - dmaengine_terminate_async(strm->dma_ch); >> + if (rz_ssi_is_dma_enabled(ssi)) { >> + if (ssi->playback.dma_ch) >> + dmaengine_terminate_async(ssi->playback.dma_ch); >> + if (ssi->capture.dma_ch) >> + dmaengine_terminate_async(ssi->capture.dma_ch); >> + } >> >> rz_ssi_set_idle(ssi); >> >> -- >> 2.39.2 >
Hi, Kuninori, On 11.11.2024 02:45, Kuninori Morimoto wrote: > > Hi Claudiu > >> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> >> >> In case of full duplex the 1st closed stream doesn't benefit from the >> dmaengine_terminate_async(). Call it after the companion stream is >> closed. >> >> Fixes: 26ac471c5354 ("ASoC: sh: rz-ssi: Add SSI DMAC support") >> Cc: stable@vger.kernel.org >> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> > (snip) >> sound/soc/renesas/rz-ssi.c | 8 ++++++-- > > We are now using "renesas" dir, so, you want to use "ASoC: renesas:" > instead of "ASoC: sh:" in Subject ? You're right! I'll update it. Thank you, Claudiu Beznea > > > Thank you for your help !! > > Best regards > --- > Kuninori Morimoto
diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c index 6efd017aaa7f..2d8721156099 100644 --- a/sound/soc/renesas/rz-ssi.c +++ b/sound/soc/renesas/rz-ssi.c @@ -415,8 +415,12 @@ static int rz_ssi_stop(struct rz_ssi_priv *ssi, struct rz_ssi_stream *strm) rz_ssi_reg_mask_setl(ssi, SSICR, SSICR_TEN | SSICR_REN, 0); /* Cancel all remaining DMA transactions */ - if (rz_ssi_is_dma_enabled(ssi)) - dmaengine_terminate_async(strm->dma_ch); + if (rz_ssi_is_dma_enabled(ssi)) { + if (ssi->playback.dma_ch) + dmaengine_terminate_async(ssi->playback.dma_ch); + if (ssi->capture.dma_ch) + dmaengine_terminate_async(ssi->capture.dma_ch); + } rz_ssi_set_idle(ssi);