Skip to contentSkip to conversation

ASoC: Address remaining PCM constraint issues

PATCH In review [email protected] 5 participants 18 messages Oct 16 – Oct 20

Subsystems (15)
lore
Share & tools
lore
#0 lore raw

cover ASoC: Address remaining PCM constraint issues

From: bui duc phuc <[email protected]>

Hi all,

Since v1 has already been applied, this series provides incremental changes to address the remaining items from v2:
- Add comments explaining why .open() and .startup() must return 0 on success to prevent the issue from being reintroduced.
- Add Reviewed-by tags from Vijendar Mukunda and Chancel Liu, and Acked-by tags from Morimoto-san and Cezary.
- Remove redundant integer constraints already applied by snd_dmaengine_pcm_open().

Link v1:
https://lore.kernel.org/all/[email protected]/
Link v2:
https://lore.kernel.org/all/[email protected]/

Compile-tested only.

Best regards,
Phuc

bui duc phuc (11):
ASoC: amd: Explain component open return value handling
ASoC: apple: Explain DAI startup return value handling
ASoC: atmel: Explain component open return value handling
ASoC: codecs: Explain DAI startup return value handling
ASoC: imx-pcm-rpmsg: Explain component open return value handling
ASoC: intel: atom: Explain DAI startup return value handling
ASoC: renesas: msiof: Explain component open return value handling
ASoC: renesas: msiof: Remove redundant period constraint
ASoC: renesas: rz-ssi: Explain component open return value handling
ASoC: renesas: rz-ssi: Remove redundant component open callback
ASoC: rockchip: Explain DAI link startup return value handling

 sound/soc/amd/acp/acp-platform.c             |  5 +++++
 sound/soc/amd/ps/ps-pdm-dma.c                |  6 ++++++
 sound/soc/amd/ps/ps-sdw-dma.c                |  6 ++++++
 sound/soc/amd/raven/acp3x-pcm-dma.c          |  6 ++++++
 sound/soc/amd/renoir/acp3x-pdm-dma.c         |  6 ++++++
 sound/soc/amd/vangogh/acp5x-pcm-dma.c        |  6 ++++++
 sound/soc/amd/yc/acp6x-pdm-dma.c             |  6 ++++++
 sound/soc/apple/mca.c                        |  5 +++++
 sound/soc/atmel/atmel-pcm-pdc.c              |  5 +++++
 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 +++++
 sound/soc/fsl/imx-pcm-rpmsg.c                |  6 ++++++
 sound/soc/intel/atom/sst-mfld-platform-pcm.c |  5 +++++
 sound/soc/renesas/fsi.c                      |  5 +++++
 sound/soc/renesas/rcar/msiof.c               | 10 ++--------
 sound/soc/renesas/rz-ssi.c                   | 19 +++++--------------
 sound/soc/rockchip/rk3399_gru_sound.c        |  5 +++++
 sound/soc/rockchip/rockchip_max98090.c       |  5 +++++
 24 files changed, 124 insertions(+), 22 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/11 ASoC: amd: Explain component open return value handling

From: bui duc phuc <[email protected]>

Add comments explaining why the .open() callbacks must return 0 on success to ensure proper rollback handling and prevent future changes from reintroducing the issue.

---
 sound/soc/amd/acp/acp-platform.c      | 5 +++++
 sound/soc/amd/ps/ps-pdm-dma.c         | 6 ++++++
 sound/soc/amd/ps/ps-sdw-dma.c         | 6 ++++++
 sound/soc/amd/raven/acp3x-pcm-dma.c   | 6 ++++++
 sound/soc/amd/renoir/acp3x-pdm-dma.c  | 6 ++++++
 sound/soc/amd/vangogh/acp5x-pcm-dma.c | 6 ++++++
 sound/soc/amd/yc/acp6x-pdm-dma.c      | 6 ++++++
 7 files changed, 41 insertions(+)
sound/soc/amd/acp/acp-platform.c +5 -0
index ba6dfe8fb6b7..f2c8853775ad 100644
@@ -248,6 +248,11 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_subs
 	list_add_tail(&stream->list, &chip->stream_list);
 	spin_unlock_irq(&chip->acp_lock);
 
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure .close() is not skipped on rollback.
+	 */
 	return 0;
 }
 
sound/soc/amd/ps/ps-pdm-dma.c +6 -0
index 28e0686e9373..12c341e89bce 100644
@@ -211,6 +211,12 @@ static int acp63_pdm_dma_open(struct snd_soc_component *component,
 
 	pdm_data->acp63_base = adata->acp63_base;
 	runtime->private_data = pdm_data;
+
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure .close() is not skipped on rollback.
+	 */
 	return 0;
 }
 
sound/soc/amd/ps/ps-sdw-dma.c +6 -0
index 553fe11a2e50..c2640985f54c 100644
@@ -337,6 +337,12 @@ static int acp63_sdw_dma_open(struct snd_soc_component *component,
 	stream->stream_id = cpu_dai->id;
 	stream->instance = amd_manager->instance;
 	runtime->private_data = stream;
+
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure .close() is not skipped on rollback.
+	 */
 	return 0;
 }
 
sound/soc/amd/raven/acp3x-pcm-dma.c +6 -0
index 072f3dc35d40..765057499021 100644
@@ -237,6 +237,12 @@ static int acp3x_dma_open(struct snd_soc_component *component,
 
 	i2s_data->acp3x_base = adata->acp3x_base;
 	runtime->private_data = i2s_data;
+
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure .close() is not skipped on rollback.
+	 */
 	return 0;
 }
 
sound/soc/amd/renoir/acp3x-pdm-dma.c +6 -0
index c0481a9ba858..89dc60849c06 100644
@@ -233,6 +233,12 @@ static int acp_pdm_dma_open(struct snd_soc_component *component,
 
 	pdm_data->acp_base = adata->acp_base;
 	runtime->private_data = pdm_data;
+
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure .close() is not skipped on rollback.
+	 */
 	return 0;
 }
 
sound/soc/amd/vangogh/acp5x-pcm-dma.c +6 -0
index 33d59d992ee0..72050fa2de80 100644
@@ -231,6 +231,12 @@ static int acp5x_dma_open(struct snd_soc_component *component,
 	}
 	i2s_data->acp5x_base = adata->acp5x_base;
 	runtime->private_data = i2s_data;
+
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure .close() is not skipped on rollback.
+	 */
 	return 0;
 }
 
sound/soc/amd/yc/acp6x-pdm-dma.c +6 -0
index afa9f66533e3..cba2509faaa1 100644
@@ -209,6 +209,12 @@ static int acp6x_pdm_dma_open(struct snd_soc_component *component,
 
 	pdm_data->acp6x_base = adata->acp6x_base;
 	runtime->private_data = pdm_data;
+
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure .close() is not skipped on rollback.
+	 */
 	return 0;
 }
 
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/11 ASoC: apple: Explain DAI startup return value handling

In reply to [email protected]

From: bui duc phuc <[email protected]>

Add a comment explaining why .startup() must return 0 on success to ensure the DAI is correctly marked as started and prevent future changes from reintroducing the issue.

---
 sound/soc/apple/mca.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/soc/apple/mca.c +5 -0
index 3585432ad49b..26022a42a95e 100644
@@ -535,6 +535,11 @@ static int mca_fe_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;
 }
 
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/11 ASoC: atmel: Explain component open return value handling

In reply to [email protected]

From: bui duc phuc <[email protected]>

Add a comment explaining why .open() must return 0 on success to ensure proper rollback handling and prevent future changes from reintroducing the issue.

---
 sound/soc/atmel/atmel-pcm-pdc.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/soc/atmel/atmel-pcm-pdc.c +5 -0
index 552bfa30d4ba..4cedf2ad934d 100644
@@ -295,6 +295,11 @@ static int atmel_pcm_open(struct snd_soc_component *component,
 	}
 	runtime->private_data = prtd;
 
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure .close() is not skipped on rollback.
+	 */
 	return 0;
 
  out:
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/11 ASoC: codecs: Explain DAI startup return value handling

In reply to [email protected]

From: bui duc phuc <[email protected]>

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.

---
 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(+)
sound/soc/codecs/cs42l42.c +5 -0
index f6e4bf6206b7..18d6cb9bfa2c 100644
@@ -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;
 }
 
sound/soc/codecs/nau8325.c +5 -0
index 0902a7d7730d..5ccf4c110567 100644
@@ -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;
 }
 
sound/soc/codecs/nau8540.c +5 -0
index 9484388ab262..09e7f31a904d 100644
@@ -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;
 }
 
sound/soc/codecs/nau8821.c +5 -0
index 935df063822c..7b88ee3159d1 100644
@@ -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;
 }
 
sound/soc/codecs/nau8824.c +5 -0
index c89889aa420e..046cce9192b7 100644
@@ -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;
 }
 
sound/soc/codecs/nau8825.c +5 -0
index 10bbfbb460b1..af2a49c893d3 100644
@@ -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;
 }
 
sound/soc/codecs/wm8580.c +5 -0
index 5343d445c322..cee80da8f753 100644
@@ -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;
 }
 
sound/soc/codecs/wm8782.c +5 -0
index 767251ac4f89..cbf0c823c022 100644
@@ -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;
 }
 
Signature · 1 line
2.43.0
Reviewed-by on v1 4/11
#5 lore raw

Re: [PATCH 04/11] ASoC: codecs: Explain DAI startup return value handling

Quoted 8 lines · On Fri, Oct 16, 2026 at 11:09:39AM +0700, [email protected] wrote:

From: bui duc phuc <[email protected]>

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.

---

Thanks,
Charles

#6 lore raw

PATCH 5/11 ASoC: imx-pcm-rpmsg: Explain component open return value handling

In reply to [email protected]

From: bui duc phuc <[email protected]>

Add a comment explaining why .open() must return 0 on success to ensure proper rollback handling and prevent future changes from reintroducing the issue.

---
 sound/soc/fsl/imx-pcm-rpmsg.c | 6 ++++++
 1 file changed, 6 insertions(+)
sound/soc/fsl/imx-pcm-rpmsg.c +6 -0
index 30e75fee5175..85b7c929a28a 100644
@@ -269,6 +269,12 @@ static int imx_rpmsg_pcm_open(struct snd_soc_component *component,
 	info->stream_timer[substream->stream].substream = substream;
 	timer_setup(&info->stream_timer[substream->stream].timer,
 		    imx_rpmsg_timer_callback, 0);
+
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure .close() is not skipped on rollback.
+	 */
 	return 0;
 }
 
Signature · 1 line
2.43.0
#7 lore raw

PATCH 6/11 ASoC: intel: atom: Explain DAI startup return value handling

In reply to [email protected]

From: bui duc phuc <[email protected]>

Add a comment explaining why .startup() must return 0 on success to ensure proper rollback handling and prevent future changes from reintroducing the issue.

---
 sound/soc/intel/atom/sst-mfld-platform-pcm.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/soc/intel/atom/sst-mfld-platform-pcm.c +5 -0
index db1fb3b26909..58681e007abf 100644
@@ -341,6 +341,11 @@ static int sst_media_open(struct snd_pcm_substream *substream,
 
 	stream = NULL;
 
+	/*
+	 * ASoC only marks the DAI as started when .startup() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure .shutdown() is not skipped on rollback.
+	 */
 	return 0;
 }
 
Signature · 1 line
2.43.0
#8 lore raw

PATCH 7/11 ASoC: renesas: msiof: Explain component open return value handling

In reply to [email protected]

From: bui duc phuc <[email protected]>

Add a comment explaining why .open() must return 0 on success to ensure the component is correctly marked as opened and prevent future changes from reintroducing the issue.

---
 sound/soc/renesas/fsi.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/soc/renesas/fsi.c +5 -0
index 88618e4b052d..74e2ea002fbb 100644
@@ -1820,6 +1820,11 @@ static int fsi_pcm_open(struct snd_soc_component *component,
 	if (ret < 0)
 		return ret;
 
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure the component is correctly marked as opened.
+	 */
 	return 0;
 }
 
Signature · 1 line
2.43.0
#9 lore raw

Re: [PATCH 07/11] ASoC: renesas: msiof: Explain component open return value handling

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] asoc: commit message references msiof but patch modifies fsi --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] asoc: commit message references msiof but patch modifies fsi
--

commit 1519b8d2e5e1f740b8b8e2dcb2ad6f3443c0c1db
Author: bui duc phuc <[email protected]>

ASoC: renesas: msiof: Explain component open return value handling

This commit adds a comment explaining why the open callback must return 0 on success to ensure the component is correctly marked as opened.

Quoted 1 line

ASoC: renesas: msiof: Explain component open return value handling

[Severity: Low]
This isn't a bug, but the commit subject and message explicitly reference the msiof driver, while the patch actually modifies fsi_pcm_open() in the fsi driver.

Should the commit subject and message be updated to accurately reflect the fsi driver instead of msiof?

Quoted 15 lines
sound/soc/renesas/fsi.c +5 -0
index 88618e4b052d8..74e2ea002fbb1 100644
@@ -1820,6 +1820,11 @@ static int fsi_pcm_open(struct snd_soc_component *component,
 	if (ret < 0)
 		return ret;
 
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure the component is correctly marked as opened.
+	 */
 	return 0;
 }
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
#10 lore raw

PATCH 8/11 ASoC: renesas: msiof: Remove redundant period constraint

In reply to [email protected]

From: bui duc phuc <[email protected]>

snd_pcm_hw_constraint_integer() is already called by snd_dmaengine_pcm_open(). Calling it again in msiof_open() is unnecessary, as the constraint is already applied and the second call returns 0.

Remove the redundant constraint call.

---
 sound/soc/renesas/rcar/msiof.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
sound/soc/renesas/rcar/msiof.c +2 -8
index 9fead9a22cdc..11a6f22ec0ad 100644
@@ -419,19 +419,13 @@ static int msiof_open(struct snd_soc_component *component,
 		return PTR_ERR(chan);
 
 	ret = snd_dmaengine_pcm_open(substream, chan);
-	if (ret < 0)
-		goto open_err_dma;
-
-	snd_soc_set_runtime_hwparams(substream, &msiof_pcm_hardware);
-
-	ret = snd_pcm_hw_constraint_integer(substream->runtime, SNDRV_PCM_HW_PARAM_PERIODS);
-
-open_err_dma:
 	if (ret < 0) {
 		dma_release_channel(chan);
 		return ret;
 	}
 
+	snd_soc_set_runtime_hwparams(substream, &msiof_pcm_hardware);
+
 	return 0;
 }
 
Signature · 1 line
2.43.0
#11 lore raw

PATCH 9/11 ASoC: renesas: rz-ssi: Explain component open return value handling

In reply to [email protected]

From: bui duc phuc <[email protected]>

Add a comment explaining why .open() must return 0 on success to ensure the component is correctly marked as opened and prevent future changes from reintroducing the issue.

---
 sound/soc/renesas/rz-ssi.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/soc/renesas/rz-ssi.c +5 -0
index 2e297f721bb6..9f36fe2c16d2 100644
@@ -946,6 +946,11 @@ static int rz_ssi_pcm_open_pio(struct snd_soc_component *component,
 	if (ret < 0)
 		return ret;
 
+	/*
+	 * ASoC only marks the component as opened when .open() returns 0.
+	 * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+	 * return 0 to ensure the component is correctly marked as opened.
+	 */
 	return 0;
 }
 
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 9/11
#12 lore raw

Re: [PATCH 09/11] ASoC: renesas: rz-ssi: Explain component open return value handling

Quoted 7 lines · On 10/16/26 07:09, [email protected] wrote:

From: bui duc phuc<[email protected]>

Add a comment explaining why .open() must return 0 on success to ensure the component is correctly marked as opened and prevent future changes from reintroducing the issue.

FTR:

#13 lore raw

PATCH 10/11 ASoC: renesas: rz-ssi: Remove redundant component open callback

In reply to [email protected]

From: bui duc phuc <[email protected]>

In DMA mode, the generic dmaengine PCM component already applies the integer PERIODS constraint in snd_dmaengine_pcm_open().

Since rz_ssi_pcm_open_dma() only applies this constraint, remove the redundant component .open callback.

---
 sound/soc/renesas/rz-ssi.c | 14 --------------
 1 file changed, 14 deletions(-)
sound/soc/renesas/rz-ssi.c +0 -14
index 9f36fe2c16d2..9a0781bb072d 100644
@@ -954,19 +954,6 @@ static int rz_ssi_pcm_open_pio(struct snd_soc_component *component,
 	return 0;
 }
 
-static int rz_ssi_pcm_open_dma(struct snd_soc_component *component,
-			       struct snd_pcm_substream *substream)
-{
-	int ret;
-
-	ret = snd_pcm_hw_constraint_integer(substream->runtime,
-					    SNDRV_PCM_HW_PARAM_PERIODS);
-	if (ret < 0)
-		return ret;
-
-	return 0;
-}
-
 static snd_pcm_uframes_t rz_ssi_pcm_pointer(struct snd_soc_component *component,
 					    struct snd_pcm_substream *substream)
 {
@@ -1017,7 +1004,6 @@ static const struct snd_soc_component_driver rz_ssi_soc_component_pio = {
 
 static const struct snd_soc_component_driver rz_ssi_soc_component_dma = {
 	.name			= "rz-ssi",
-	.open			= rz_ssi_pcm_open_dma,
 	.legacy_dai_naming	= 1,
 };
 
Signature · 1 line
2.43.0
maintainer Reviewed-by Tested-by on v1 10/11
#14 lore raw

Re: [PATCH 10/11] ASoC: renesas: rz-ssi: Remove redundant component open callback

Quoted 9 lines · On 10/16/26 07:09, [email protected] wrote:

From: bui duc phuc<[email protected]>

In DMA mode, the generic dmaengine PCM component already applies the integer PERIODS constraint in snd_dmaengine_pcm_open().

Since rz_ssi_pcm_open_dma() only applies this constraint, remove the redundant component .open callback.

FTR:

#15 lore raw

Re: [PATCH 10/11] ASoC: renesas: rz-ssi: Remove redundant component open callback

Hi Claudiu,

Quoted 6 lines
Quoted 6 lines

In DMA mode, the generic dmaengine PCM component already applies the integer PERIODS constraint in snd_dmaengine_pcm_open().

Since rz_ssi_pcm_open_dma() only applies this constraint, remove the redundant component .open callback.

Quoted 7 lines
Quoted 1 line

FTR:

Thanks for reviewing and testing!

Best regards,
Phuc

#16 lore raw

PATCH 11/11 ASoC: rockchip: Explain DAI link startup return value handling

In reply to [email protected]

From: bui duc phuc <[email protected]>

Add comments explaining why the .startup() callbacks must return 0 on success to ensure the DAI link is correctly marked as started and prevent future changes from reintroducing the issue.

---
 sound/soc/rockchip/rk3399_gru_sound.c  | 5 +++++
 sound/soc/rockchip/rockchip_max98090.c | 5 +++++
 2 files changed, 10 insertions(+)
sound/soc/rockchip/rk3399_gru_sound.c +5 -0
index 0ec80a4b8c59..d4a0daabfb42 100644
@@ -266,6 +266,11 @@ static int rockchip_sound_startup(struct snd_pcm_substream *substream)
 	if (ret < 0)
 		return ret;
 
+	/*
+	 * ASoC only marks the DAI link as started when .startup() returns 0.
+	 * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
+	 * return 0 to ensure the DAI link is correctly marked as started.
+	 */
 	return 0;
 }
 
sound/soc/rockchip/rockchip_max98090.c +5 -0
index d54c36682415..de392b420ebd 100644
@@ -202,6 +202,11 @@ static int rk_aif1_startup(struct snd_pcm_substream *substream)
 	if (ret < 0)
 		return ret;
 
+	/*
+	 * ASoC only marks the DAI link as started when .startup() returns 0.
+	 * Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
+	 * return 0 to ensure the DAI link is correctly marked as started.
+	 */
 	return 0;
 }
 
Signature · 1 line
2.43.0
maintainer
#17 lore raw
In reply to [email protected]
Quoted 15 lines · On Fri, 16 Oct 2026 11:09:35 +0700, [email protected] wrote:

ASoC: Address remaining PCM constraint issues

From: bui duc phuc <[email protected]>

Hi all,

Since v1 has already been applied, this series provides incremental changes to address the remaining items from v2:
- Add comments explaining why .open() and .startup() must return 0 on success to prevent the issue from being reintroduced.
- Add Reviewed-by tags from Vijendar Mukunda and Chancel Liu, and Acked-by tags from Morimoto-san and Cezary.
- Remove redundant integer constraints already applied by snd_dmaengine_pcm_open().

Quoted 1 line

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4

Thanks!

[01/11] ASoC: amd: Explain component open return value handling

        https://git.kernel.org/broonie/sound/c/1ba2cb30eeab
[02/11] ASoC: apple: Explain DAI startup return value handling
        https://git.kernel.org/broonie/sound/c/ec2e1434c7f7
[03/11] ASoC: atmel: Explain component open return value handling
        https://git.kernel.org/broonie/sound/c/1554ce7a5d99
[04/11] ASoC: codecs: Explain DAI startup return value handling
        https://git.kernel.org/broonie/sound/c/a6b1f3ccca48
[05/11] ASoC: imx-pcm-rpmsg: Explain component open return value handling
        https://git.kernel.org/broonie/sound/c/f3e3dbbbbfd6
[06/11] ASoC: intel: atom: Explain DAI startup return value handling
        https://git.kernel.org/broonie/sound/c/2f8d93394b7f
[07/11] ASoC: renesas: msiof: Explain component open return value handling
        https://git.kernel.org/broonie/sound/c/394f91bd0f7a
[08/11] ASoC: renesas: msiof: Remove redundant period constraint
        https://git.kernel.org/broonie/sound/c/d2f4c848d010
[09/11] ASoC: renesas: rz-ssi: Explain component open return value handling
        https://git.kernel.org/broonie/sound/c/65850cb2f9ce
[10/11] ASoC: renesas: rz-ssi: Remove redundant component open callback
        https://git.kernel.org/broonie/sound/c/a0b64de6ea7e
[11/11] ASoC: rockchip: Explain DAI link startup return value handling
        https://git.kernel.org/broonie/sound/c/48ed45aa30ce

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark