From: phucduc.bui@gmail.com
To: Mark Brown <broonie@kernel.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Trevor Wu <trevor.wu@mediatek.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
cassiogabrielcontato@gmail.com, Haotian Zhang <vulab@iscas.ac.cn>,
Christian Marangi <ansuelsmth@gmail.com>,
Cezary Rojewski <cezary.rojewski@intel.com>,
Cyril Chao <Cyril.Chao@mediatek.com>, Tuo Li <islituo@gmail.com>,
Rosen Penev <rosenp@gmail.com>,
Garlic Tseng <garlic.tseng@mediatek.com>,
Alexandre Mergnat <amergnat@baylibre.com>,
Dan Carpenter <error27@gmail.com>,
linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH v2 3/4] ASoC: mediatek: mt8189: Handle constraint return value in FE startup
Date: Wed, 7 Oct 2026 18:08:57 +0700 [thread overview]
Message-ID: <20261007110858.509341-4-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20261007110858.509341-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from mt8189_fe_startup(). ASoC only treats 0 as success when marking
the DAI as started, so .shutdown() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 7eb153585598 ("ASoC: mediatek: mt8189: add platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/mediatek/mt8189/mt8189-afe-pcm.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sound/soc/mediatek/mt8189/mt8189-afe-pcm.c b/sound/soc/mediatek/mt8189/mt8189-afe-pcm.c
index c0f340a6cc09..eefa96b701a5 100644
--- a/sound/soc/mediatek/mt8189/mt8189-afe-pcm.c
+++ b/sound/soc/mediatek/mt8189/mt8189-afe-pcm.c
@@ -155,8 +155,10 @@ static int mt8189_fe_startup(struct snd_pcm_substream *substream,
ret = snd_pcm_hw_constraint_integer(runtime,
SNDRV_PCM_HW_PARAM_PERIODS);
- if (ret < 0)
+ if (ret < 0) {
dev_warn(afe->dev, "snd_pcm_hw_constraint_integer failed\n");
+ return ret;
+ }
/* dynamic allocate irq to memif */
if (memif->irq_usage < 0) {
@@ -168,11 +170,11 @@ static int mt8189_fe_startup(struct snd_pcm_substream *substream,
} else {
dev_err(afe->dev, "%s() error: no more asys irq\n",
__func__);
- ret = -EBUSY;
+ return -EBUSY;
}
}
- return ret;
+ return 0;
}
static void mt8189_fe_shutdown(struct snd_pcm_substream *substream,
--
2.43.0
next prev parent reply other threads:[~2026-10-07 11:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 11:08 [PATCH v2 0/4] ASoC: mediatek: Handle constraint return value in FE startup phucduc.bui
2026-10-07 11:08 ` [PATCH v2 1/4] ASoC: mediatek: common: " phucduc.bui
2026-10-07 11:08 ` [PATCH v2 2/4] ASoC: mediatek: mt8188: " phucduc.bui
2026-10-07 11:08 ` phucduc.bui [this message]
2026-10-07 11:08 ` [PATCH v2 4/4] ASoC: mediatek: mt8365: " phucduc.bui
2026-10-07 14:03 ` [PATCH v2 0/4] ASoC: mediatek: " Cezary Rojewski
2026-10-08 10:49 ` Bui Duc Phuc
2026-10-07 16:19 ` 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=20261007110858.509341-4-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=Cyril.Chao@mediatek.com \
--cc=amergnat@baylibre.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=ansuelsmth@gmail.com \
--cc=broonie@kernel.org \
--cc=cassiogabrielcontato@gmail.com \
--cc=cezary.rojewski@intel.com \
--cc=error27@gmail.com \
--cc=garlic.tseng@mediatek.com \
--cc=islituo@gmail.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=rosenp@gmail.com \
--cc=tiwai@suse.com \
--cc=trevor.wu@mediatek.com \
--cc=vulab@iscas.ac.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.