From: Valerio Setti <vsetti@baylibre.com>
To: sashiko-reviews@lists.linux.dev
Cc: linux-amlogic@lists.infradead.org, neil.armstrong@linaro.org
Subject: Re: [PATCH 1/4] ASoC: meson: gx: add gx-formatter and gx-interface
Date: Wed, 20 May 2026 18:05:18 +0200 [thread overview]
Message-ID: <a2306afb-eacf-4132-9cd2-ef1bde8cd0a3@baylibre.com> (raw)
In-Reply-To: <20260515153651.965F8C2BCB7@smtp.kernel.org>
>
>> +int gx_stream_start(struct gx_stream *ts)
>> +{
>> + struct gx_formatter *formatter;
>> + int ret = 0;
>> +
>> + mutex_lock(&ts->lock);
>> +
>> + /* Start all the formatters attached to the stream */
>> + list_for_each_entry(formatter, &ts->formatter_list, list) {
>> + ret = gx_formatter_enable(formatter);
>> + if (ret) {
>> + pr_err("failed to start tdm stream\n");
>> + goto out;
>
> Do we need to disable the formatters that were already successfully enabled
> in previous iterations of this loop before returning?
>
> The ALSA core does not automatically invoke the STOP trigger when a START
> trigger fails. Returning an error here without rolling back the earlier
> formatters could leave the hardware clocks and registers permanently enabled,
> resulting in leaked resources.
>
I don't mind adding this check, but I have a question for reviewers for
sake of knowledge.
I just checked and it seemes to me that actually when
"soc_pcm_trigger()" fails to SNDRV_PCM_TRIGGER_START it rolls back to
SNDRV_PCM_TRIGGER_STOP. Sure I'm missing something that Sashiko found,
but I cannot figure out what. Any help on this?
--
Valerio
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-05-21 15:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 15:10 [PATCH 0/4] ASoC: meson: aiu: align I2S design to the AXG one Valerio Setti
2026-05-15 15:10 ` [PATCH 1/4] ASoC: meson: gx: add gx-formatter and gx-interface Valerio Setti
2026-05-15 15:36 ` sashiko-bot
2026-05-20 16:05 ` Valerio Setti [this message]
2026-05-15 15:10 ` [PATCH 2/4] ASoC: meson: aiu-encoder-i2s: use gx_iface and gx_stream structures Valerio Setti
2026-05-15 16:10 ` sashiko-bot
2026-05-21 14:59 ` Valerio Setti
2026-05-15 15:10 ` [PATCH 3/4] ASoC: meson: aiu: introduce I2S output formatter Valerio Setti
2026-05-15 15:10 ` [PATCH 4/4] ASoC: meson: aiu: use aiu-formatter-i2s to format I2S output data Valerio Setti
2026-05-15 17:40 ` sashiko-bot
2026-05-21 23:15 ` Mark Brown
2026-05-22 16:24 ` Valerio Setti
2026-05-28 15:01 ` Valerio Setti
2026-05-28 15:53 ` Mark Brown
2026-06-10 13:27 ` Jerome Brunet
2026-05-21 11:36 ` [PATCH 0/4] ASoC: meson: aiu: align I2S design to the AXG one Mark Brown
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=a2306afb-eacf-4132-9cd2-ef1bde8cd0a3@baylibre.com \
--to=vsetti@baylibre.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