From: phucduc.bui@gmail.com
To: Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
povik+lin@cutebit.org, Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Andrei Simion <andrei.simion@microchip.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
David Rhodes <david.rhodes@cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Shengjiu Wang <shengjiu.wang@gmail.com>,
Xiubo Li <Xiubo.Lee@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
Nicolin Chen <nicoleotsuka@gmail.com>,
Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Cezary Rojewski <cezary.rojewski@intel.com>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Biju Das <biju.das.jz@bp.renesas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Heiko Stuebner <heiko@sntech.de>
Cc: Kees Cook <kees@kernel.org>,
Syed Saba Kareem <syed.sabakareem@amd.com>,
wangdicheng <wangdicheng@kylinos.cn>,
Chris Bainbridge <chris.bainbridge@gmail.com>,
Linus Walleij <linusw@kernel.org>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Neo Chang <YLCHANG2@nuvoton.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
u.kleine-koenig@baylibre.com, Pengpeng Hou <pengpeng@iscas.ac.cn>,
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
Hemanth Selam <hemanth.selam@gmail.com>,
Md Shofiqul Islam <shofiqtest@gmail.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Zain Aboobacker <zainaboobacker33@gmail.com>,
Sang-Heon Jeon <ekffu200098@gmail.com>,
Bo Shen <voice.shen@atmel.com>, Vinod Koul <vkoul@kernel.org>,
linux-sound@vger.kernel.org, asahi@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
patches@opensource.cirrus.com, linuxppc-dev@lists.ozlabs.org,
imx@lists.linux.dev, linux-rockchip@lists.infradead.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 04/11] ASoC: codecs: Explain DAI startup return value handling
Date: Fri, 16 Oct 2026 11:09:39 +0700 [thread overview]
Message-ID: <20261016040946.521195-5-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20261016040946.521195-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
Add comments explaining why the .startup() callbacks must return
0 on success to ensure the DAI is correctly marked as started
and prevent future changes from reintroducing the issue.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/cs42l42.c | 5 +++++
sound/soc/codecs/nau8325.c | 5 +++++
sound/soc/codecs/nau8540.c | 5 +++++
sound/soc/codecs/nau8821.c | 5 +++++
sound/soc/codecs/nau8824.c | 5 +++++
sound/soc/codecs/nau8825.c | 5 +++++
sound/soc/codecs/wm8580.c | 5 +++++
sound/soc/codecs/wm8782.c | 5 +++++
8 files changed, 40 insertions(+)
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index f6e4bf6206b7..18d6cb9bfa2c 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -907,6 +907,11 @@ static int cs42l42_dai_startup(struct snd_pcm_substream *substream, struct snd_s
if (ret < 0)
return ret;
+ /*
+ * ASoC only marks the DAI as started when .startup() returns 0.
+ * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
+ * return 0 to ensure the DAI is correctly marked as started.
+ */
return 0;
}
diff --git a/sound/soc/codecs/nau8325.c b/sound/soc/codecs/nau8325.c
index 0902a7d7730d..5ccf4c110567 100644
--- a/sound/soc/codecs/nau8325.c
+++ b/sound/soc/codecs/nau8325.c
@@ -501,6 +501,11 @@ static int nau8325_dai_startup(struct snd_pcm_substream *substream,
if (ret < 0)
return ret;
+ /*
+ * ASoC only marks the DAI as started when .startup() returns 0.
+ * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
+ * return 0 to ensure the DAI is correctly marked as started.
+ */
return 0;
}
diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c
index 9484388ab262..09e7f31a904d 100644
--- a/sound/soc/codecs/nau8540.c
+++ b/sound/soc/codecs/nau8540.c
@@ -431,6 +431,11 @@ static int nau8540_dai_startup(struct snd_pcm_substream *substream,
if (ret < 0)
return ret;
+ /*
+ * ASoC only marks the DAI as started when .startup() returns 0.
+ * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
+ * return 0 to ensure the DAI is correctly marked as started.
+ */
return 0;
}
diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c
index 935df063822c..7b88ee3159d1 100644
--- a/sound/soc/codecs/nau8821.c
+++ b/sound/soc/codecs/nau8821.c
@@ -841,6 +841,11 @@ static int nau8821_dai_startup(struct snd_pcm_substream *substream,
if (ret < 0)
return ret;
+ /*
+ * ASoC only marks the DAI as started when .startup() returns 0.
+ * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
+ * return 0 to ensure the DAI is correctly marked as started.
+ */
return 0;
}
diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c
index c89889aa420e..046cce9192b7 100644
--- a/sound/soc/codecs/nau8824.c
+++ b/sound/soc/codecs/nau8824.c
@@ -1073,6 +1073,11 @@ static int nau8824_dai_startup(struct snd_pcm_substream *substream,
if (ret < 0)
return ret;
+ /*
+ * ASoC only marks the DAI as started when .startup() returns 0.
+ * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
+ * return 0 to ensure the DAI is correctly marked as started.
+ */
return 0;
}
diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
index 10bbfbb460b1..af2a49c893d3 100644
--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -1273,6 +1273,11 @@ static int nau8825_dai_startup(struct snd_pcm_substream *substream,
if (ret < 0)
return ret;
+ /*
+ * ASoC only marks the DAI as started when .startup() returns 0.
+ * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
+ * return 0 to ensure the DAI is correctly marked as started.
+ */
return 0;
}
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 5343d445c322..cee80da8f753 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -860,6 +860,11 @@ static int wm8580_playback_startup(struct snd_pcm_substream *substream,
if (ret < 0)
return ret;
+ /*
+ * ASoC only marks the DAI as started when .startup() returns 0.
+ * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
+ * return 0 to ensure the DAI is correctly marked as started.
+ */
return 0;
}
diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c
index 767251ac4f89..cbf0c823c022 100644
--- a/sound/soc/codecs/wm8782.c
+++ b/sound/soc/codecs/wm8782.c
@@ -46,6 +46,11 @@ static int wm8782_dai_startup(struct snd_pcm_substream *sub, struct snd_soc_dai
if (ret < 0)
return ret;
+ /*
+ * ASoC only marks the DAI as started when .startup() returns 0.
+ * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
+ * return 0 to ensure the DAI is correctly marked as started.
+ */
return 0;
}
--
2.43.0
next prev parent reply other threads:[~2026-10-16 4:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 4:09 [PATCH 00/11] ASoC: Address remaining PCM constraint issues phucduc.bui
2026-10-16 4:09 ` [PATCH 01/11] ASoC: amd: Explain component open return value handling phucduc.bui
2026-10-16 4:09 ` [PATCH 02/11] ASoC: apple: Explain DAI startup " phucduc.bui
2026-10-16 4:09 ` [PATCH 03/11] ASoC: atmel: Explain component open " phucduc.bui
2026-10-16 4:09 ` phucduc.bui [this message]
2026-10-16 9:19 ` [PATCH 04/11] ASoC: codecs: Explain DAI startup " Charles Keepax
2026-10-16 4:09 ` [PATCH 05/11] ASoC: imx-pcm-rpmsg: Explain component open " phucduc.bui
2026-10-16 4:09 ` [PATCH 06/11] ASoC: intel: atom: Explain DAI startup " phucduc.bui
2026-10-16 4:09 ` [PATCH 07/11] ASoC: renesas: msiof: Explain component open " phucduc.bui
2026-10-16 4:17 ` sashiko-bot
2026-10-16 4:09 ` [PATCH 08/11] ASoC: renesas: msiof: Remove redundant period constraint phucduc.bui
2026-10-16 4:09 ` [PATCH 09/11] ASoC: renesas: rz-ssi: Explain component open return value handling phucduc.bui
2026-10-16 4:09 ` [PATCH 10/11] ASoC: renesas: rz-ssi: Remove redundant component open callback phucduc.bui
2026-10-16 4:09 ` [PATCH 11/11] ASoC: rockchip: Explain DAI link startup return value handling phucduc.bui
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=20261016040946.521195-5-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=Frank.Li@nxp.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=Xiubo.Lee@gmail.com \
--cc=YLCHANG2@nuvoton.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrei.simion@microchip.com \
--cc=asahi@lists.linux.dev \
--cc=bhelgaas@google.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=chris.bainbridge@gmail.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=cristian.ciocaltea@collabora.com \
--cc=david.rhodes@cirrus.com \
--cc=ekffu200098@gmail.com \
--cc=festevam@gmail.com \
--cc=geert+renesas@glider.be \
--cc=heiko@sntech.de \
--cc=hemanth.selam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kai.vehmanen@linux.intel.com \
--cc=kees@kernel.org \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=magnus.damm@gmail.com \
--cc=nicolas.ferre@microchip.com \
--cc=nicoleotsuka@gmail.com \
--cc=patches@opensource.cirrus.com \
--cc=pengpeng@iscas.ac.cn \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=povik+lin@cutebit.org \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=rf@opensource.cirrus.com \
--cc=s.hauer@pengutronix.de \
--cc=shengjiu.wang@gmail.com \
--cc=shofiqtest@gmail.com \
--cc=syed.sabakareem@amd.com \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=venkataprasad.potturu@amd.com \
--cc=vkoul@kernel.org \
--cc=voice.shen@atmel.com \
--cc=wangdicheng@kylinos.cn \
--cc=yung-chuan.liao@linux.intel.com \
--cc=zainaboobacker33@gmail.com \
/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