mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: sashiko-reviews@lists.linux.dev
Cc: linux-amlogic@lists.infradead.org, neil.armstrong@linaro.org
Subject: Re: [PATCH] ASoC: meson: aiu: fifo-spdif: soft reset the S/PDIF datapath on start/stop
Date: Fri, 26 Jun 2026 22:47:43 +0200	[thread overview]
Message-ID: <CAFBinCA8bCvJ92refztTgZsA_PXCUi852B-3a5ytY4LSAncivQ@mail.gmail.com> (raw)
In-Reply-To: <20260626081559.6EDE41F000E9@smtp.kernel.org>

[ ... ]
>
> > @@ -68,12 +69,16 @@ static int fifo_spdif_trigger(struct snd_pcm_substream *substream, int cmd,
> >       case SNDRV_PCM_TRIGGER_START:
> >       case SNDRV_PCM_TRIGGER_RESUME:
> >       case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
> > +             snd_soc_component_write(component, AIU_RST_SOFT,
> > +                                     AIU_RST_SOFT_958_FAST);
> [Severity: High]
> Does this introduce a race condition on start? In fifo_spdif_trigger(),
> aiu_fifo_trigger() is called before the switch statement, which starts the
> upstream DMA engine before we issue the downstream S/PDIF fast domain soft
> reset.
>
> Could this discard audio frames fetched by the DMA into the FIFO before the
> reset, causing left/right channel swapping and audio artifacts?
I don't think so. The sequence introduced by Christian matches the
vendor driver (see my other email with review notes).

> Additionally, the ALSA PCM trigger callback executes in atomic context with
> the stream spinlock held. Is it safe to call snd_soc_component_write() here?
My understanding is that ALSA uses mutex instead of spinlocks, meaning
this comment is incorrect.

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2026-06-26 20:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26  8:04 Christian Hewitt
2026-06-26  8:09 ` Christian Hewitt
2026-06-26  8:15 ` sashiko-bot
2026-06-26 20:47   ` Martin Blumenstingl [this message]
2026-06-26 20:41 ` Martin Blumenstingl
2026-06-29 12:04   ` Jerome Brunet
2026-06-29 14:47     ` Christian Hewitt

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=CAFBinCA8bCvJ92refztTgZsA_PXCUi852B-3a5ytY4LSAncivQ@mail.gmail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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