* [PATCH v2 00/25] ASoC: Fix constraint return value handling
@ 2026-10-15 1:42 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:42 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
Hi all,
snd_pcm_hw_constraint_minmax() and snd_pcm_hw_constraint_integer()
may return positive values on success. However, ASoC only marks the
DAI, link, or component as started or opened when the corresponding
callback returns 0.
This series fixes affected ASoC drivers to return 0 on success and
properly handle rollback paths.
Found by manual code inspection.
Compile-tested only.
Link v1:
https://lore.kernel.org/all/20261008103831.542533-1-phucduc.bui@gmail.com/
Changes in v2:
- Add Reviewed-by tags from Vijendar Mukunda and Chancel Liu.
- Remove redundant integer constraints already applied by
snd_dmaengine_pcm_open().
Best regards,
Phuc
bui duc phuc (25):
ASoC: amd: acp: Fix .close() being skipped on rollback
ASoC: amd: ps: Fix acp63_pdm_dma_close() being skipped on rollback
ASoC: amd: ps: Fix acp63_sdw_dma_close() being skipped on rollback
ASoC: amd: raven: Fix acp3x_dma_close() being skipped on rollback
ASoC: amd: renoir: Fix acp_pdm_dma_close() being skipped on rollback
ASoC: amd: vangogh: Fix acp5x_dma_close() being skipped on rollback
ASoC: amd: yc: Fix acp6x_pdm_dma_close() being skipped on rollback
ASoC: apple: mca: Ensure the DAI is marked as started on success
ASoC: atmel: atmel-pcm-pdc: Fix atmel_pcm_close() being skipped on
rollback
ASoC: codecs: cs42l42: Ensure the DAI is marked as started on success
ASoC: codecs: nau8325: Ensure the DAI is marked as started on success
ASoC: codecs: nau8540: Ensure the DAI is marked as started on success
ASoC: codecs: nau8821: Ensure the DAI is marked as started on success
ASoC: codecs: nau8824: Ensure the DAI is marked as started on success
ASoC: codecs: nau8825: Ensure the DAI is marked as started on success
ASoC: codecs: wm8580: Ensure the DAI is marked as started on success
ASoC: codecs: wm8782: Ensure the DAI is marked as started on success
ASoC: imx-pcm-rpmsg: Fix imx_rpmsg_pcm_close() being skipped on
rollback
ASoC: intel: atom: Fix .shutdown() being skipped on rollback
ASoC: renesas: fsi: Ensure the component is marked as opened on
success
ASoC: renesas: msiof: Remove redundant period constraint
ASoC: renesas: rz-ssi: Ensure the component is marked as opened on
success
ASoC: renesas: rz-ssi: Remove redundant component open callback
ASoC: rockchip: rk3399_gru_sound: Mark the link as started on success
ASoC: rockchip: rockchip_max98090: Mark the link as started on success
sound/soc/amd/acp/acp-platform.c | 7 ++++++-
sound/soc/amd/ps/ps-pdm-dma.c | 8 +++++++-
sound/soc/amd/ps/ps-sdw-dma.c | 8 +++++++-
sound/soc/amd/raven/acp3x-pcm-dma.c | 8 +++++++-
sound/soc/amd/renoir/acp3x-pdm-dma.c | 8 +++++++-
sound/soc/amd/vangogh/acp5x-pcm-dma.c | 8 +++++++-
sound/soc/amd/yc/acp6x-pdm-dma.c | 8 +++++++-
sound/soc/apple/mca.c | 16 +++++++++++++---
sound/soc/atmel/atmel-pcm-pdc.c | 7 +++++++
sound/soc/codecs/cs42l42.c | 16 +++++++++++++---
sound/soc/codecs/nau8325.c | 16 +++++++++++++---
sound/soc/codecs/nau8540.c | 16 +++++++++++++---
sound/soc/codecs/nau8821.c | 16 +++++++++++++---
sound/soc/codecs/nau8824.c | 16 +++++++++++++---
sound/soc/codecs/nau8825.c | 16 +++++++++++++---
sound/soc/codecs/wm8580.c | 15 +++++++++++++--
sound/soc/codecs/wm8782.c | 12 +++++++++++-
sound/soc/fsl/imx-pcm-rpmsg.c | 8 +++++++-
sound/soc/intel/atom/sst-mfld-platform-pcm.c | 7 ++++++-
sound/soc/renesas/fsi.c | 11 +++++++++--
sound/soc/renesas/rcar/msiof.c | 16 ++++++----------
sound/soc/renesas/rz-ssi.c | 19 +++++++++++--------
sound/soc/rockchip/rk3399_gru_sound.c | 14 ++++++++++++--
sound/soc/rockchip/rockchip_max98090.c | 15 +++++++++++++--
24 files changed, 234 insertions(+), 57 deletions(-)
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 54+ messages in thread* [PATCH v2 01/25] ASoC: amd: acp: Fix .close() being skipped on rollback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp_dma_open(). ASoC only marks the component as opened when
.open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 623621a9f9e1 ("ASoC: amd: Add common framework to support I2S on ACP SOC")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/acp/acp-platform.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c
index 6b1e18b31c1c..f2c8853775ad 100644
--- a/sound/soc/amd/acp/acp-platform.c
+++ b/sound/soc/amd/acp/acp-platform.c
@@ -248,7 +248,12 @@ 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);
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 01/25] ASoC: amd: acp: Fix .close() being skipped on rollback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp_dma_open(). ASoC only marks the component as opened when
.open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 623621a9f9e1 ("ASoC: amd: Add common framework to support I2S on ACP SOC")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/acp/acp-platform.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c
index 6b1e18b31c1c..f2c8853775ad 100644
--- a/sound/soc/amd/acp/acp-platform.c
+++ b/sound/soc/amd/acp/acp-platform.c
@@ -248,7 +248,12 @@ 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);
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 02/25] ASoC: amd: ps: Fix acp63_pdm_dma_close() being skipped on rollback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp63_pdm_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 5137305662ef ("ASoC: amd: add acp6.2 pdm driver dma ops")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/ps/ps-pdm-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c
index 04c014349347..12c341e89bce 100644
--- a/sound/soc/amd/ps/ps-pdm-dma.c
+++ b/sound/soc/amd/ps/ps-pdm-dma.c
@@ -211,7 +211,13 @@ static int acp63_pdm_dma_open(struct snd_soc_component *component,
pdm_data->acp63_base = adata->acp63_base;
runtime->private_data = pdm_data;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp63_pdm_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 02/25] ASoC: amd: ps: Fix acp63_pdm_dma_close() being skipped on rollback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp63_pdm_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 5137305662ef ("ASoC: amd: add acp6.2 pdm driver dma ops")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/ps/ps-pdm-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c
index 04c014349347..12c341e89bce 100644
--- a/sound/soc/amd/ps/ps-pdm-dma.c
+++ b/sound/soc/amd/ps/ps-pdm-dma.c
@@ -211,7 +211,13 @@ static int acp63_pdm_dma_open(struct snd_soc_component *component,
pdm_data->acp63_base = adata->acp63_base;
runtime->private_data = pdm_data;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp63_pdm_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 03/25] ASoC: amd: ps: Fix acp63_sdw_dma_close() being skipped on rollback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp63_sdw_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: f722917350ee ("ASoC: amd: ps: add SoundWire dma driver dma ops")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/ps/ps-sdw-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/ps/ps-sdw-dma.c b/sound/soc/amd/ps/ps-sdw-dma.c
index f27ebbd21379..c2640985f54c 100644
--- a/sound/soc/amd/ps/ps-sdw-dma.c
+++ b/sound/soc/amd/ps/ps-sdw-dma.c
@@ -337,7 +337,13 @@ 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;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp63_sdw_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 03/25] ASoC: amd: ps: Fix acp63_sdw_dma_close() being skipped on rollback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp63_sdw_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: f722917350ee ("ASoC: amd: ps: add SoundWire dma driver dma ops")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/ps/ps-sdw-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/ps/ps-sdw-dma.c b/sound/soc/amd/ps/ps-sdw-dma.c
index f27ebbd21379..c2640985f54c 100644
--- a/sound/soc/amd/ps/ps-sdw-dma.c
+++ b/sound/soc/amd/ps/ps-sdw-dma.c
@@ -337,7 +337,13 @@ 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;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp63_sdw_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 04/25] ASoC: amd: raven: Fix acp3x_dma_close() being skipped on rollback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp3x_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 703a6e22888b ("ASoC: amd: Enabling I2S instance in DMA and DAI")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 37ea5c572eb9..765057499021 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -237,7 +237,13 @@ static int acp3x_dma_open(struct snd_soc_component *component,
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 04/25] ASoC: amd: raven: Fix acp3x_dma_close() being skipped on rollback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp3x_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 703a6e22888b ("ASoC: amd: Enabling I2S instance in DMA and DAI")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 37ea5c572eb9..765057499021 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -237,7 +237,13 @@ static int acp3x_dma_open(struct snd_soc_component *component,
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 05/25] ASoC: amd: renoir: Fix acp_pdm_dma_close() being skipped on rollback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp_pdm_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 4a767b1d039a ("ASoC: amd: add acp3x pdm driver dma ops")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/renoir/acp3x-pdm-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c
index 3f59b753243d..89dc60849c06 100644
--- a/sound/soc/amd/renoir/acp3x-pdm-dma.c
+++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c
@@ -233,7 +233,13 @@ static int acp_pdm_dma_open(struct snd_soc_component *component,
pdm_data->acp_base = adata->acp_base;
runtime->private_data = pdm_data;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp_pdm_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 05/25] ASoC: amd: renoir: Fix acp_pdm_dma_close() being skipped on rollback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp_pdm_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 4a767b1d039a ("ASoC: amd: add acp3x pdm driver dma ops")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/renoir/acp3x-pdm-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c
index 3f59b753243d..89dc60849c06 100644
--- a/sound/soc/amd/renoir/acp3x-pdm-dma.c
+++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c
@@ -233,7 +233,13 @@ static int acp_pdm_dma_open(struct snd_soc_component *component,
pdm_data->acp_base = adata->acp_base;
runtime->private_data = pdm_data;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp_pdm_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 06/25] ASoC: amd: vangogh: Fix acp5x_dma_close() being skipped on rollback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp5x_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: cab396d8b22c ("ASoC: amd: add ACP5x pcm dma driver ops")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/vangogh/acp5x-pcm-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/vangogh/acp5x-pcm-dma.c b/sound/soc/amd/vangogh/acp5x-pcm-dma.c
index 831e30e9b042..72050fa2de80 100644
--- a/sound/soc/amd/vangogh/acp5x-pcm-dma.c
+++ b/sound/soc/amd/vangogh/acp5x-pcm-dma.c
@@ -231,7 +231,13 @@ static int acp5x_dma_open(struct snd_soc_component *component,
}
i2s_data->acp5x_base = adata->acp5x_base;
runtime->private_data = i2s_data;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp5x_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 06/25] ASoC: amd: vangogh: Fix acp5x_dma_close() being skipped on rollback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp5x_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: cab396d8b22c ("ASoC: amd: add ACP5x pcm dma driver ops")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/vangogh/acp5x-pcm-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/vangogh/acp5x-pcm-dma.c b/sound/soc/amd/vangogh/acp5x-pcm-dma.c
index 831e30e9b042..72050fa2de80 100644
--- a/sound/soc/amd/vangogh/acp5x-pcm-dma.c
+++ b/sound/soc/amd/vangogh/acp5x-pcm-dma.c
@@ -231,7 +231,13 @@ static int acp5x_dma_open(struct snd_soc_component *component,
}
i2s_data->acp5x_base = adata->acp5x_base;
runtime->private_data = i2s_data;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp5x_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 07/25] ASoC: amd: yc: Fix acp6x_pdm_dma_close() being skipped on rollback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp6x_pdm_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: ceb4fcc13ae5 ("ASoC: amd: add acp6x pdm driver dma ops")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/yc/acp6x-pdm-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/yc/acp6x-pdm-dma.c b/sound/soc/amd/yc/acp6x-pdm-dma.c
index 40c4d833f4ed..cba2509faaa1 100644
--- a/sound/soc/amd/yc/acp6x-pdm-dma.c
+++ b/sound/soc/amd/yc/acp6x-pdm-dma.c
@@ -209,7 +209,13 @@ static int acp6x_pdm_dma_open(struct snd_soc_component *component,
pdm_data->acp6x_base = adata->acp6x_base;
runtime->private_data = pdm_data;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp6x_pdm_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 07/25] ASoC: amd: yc: Fix acp6x_pdm_dma_close() being skipped on rollback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from acp6x_pdm_dma_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: ceb4fcc13ae5 ("ASoC: amd: add acp6x pdm driver dma ops")
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/yc/acp6x-pdm-dma.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/yc/acp6x-pdm-dma.c b/sound/soc/amd/yc/acp6x-pdm-dma.c
index 40c4d833f4ed..cba2509faaa1 100644
--- a/sound/soc/amd/yc/acp6x-pdm-dma.c
+++ b/sound/soc/amd/yc/acp6x-pdm-dma.c
@@ -209,7 +209,13 @@ static int acp6x_pdm_dma_open(struct snd_soc_component *component,
pdm_data->acp6x_base = adata->acp6x_base;
runtime->private_data = pdm_data;
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int acp6x_pdm_dma_hw_params(struct snd_soc_component *component,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 08/25] ASoC: apple: mca: Ensure the DAI is marked as started on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from mca_fe_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as mca_fe_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/apple/mca.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/apple/mca.c b/sound/soc/apple/mca.c
index be702b2942a5..26022a42a95e 100644
--- a/sound/soc/apple/mca.c
+++ b/sound/soc/apple/mca.c
@@ -516,6 +516,7 @@ static int mca_fe_startup(struct snd_pcm_substream *substream,
{
struct mca_cluster *cl = mca_dai_to_cluster(dai);
unsigned int mask, nchannels;
+ int ret;
if (cl->tdm_slots) {
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
@@ -528,9 +529,18 @@ static int mca_fe_startup(struct snd_pcm_substream *substream,
nchannels = 2;
}
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_CHANNELS,
- 1, nchannels);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_CHANNELS,
+ 1, nchannels);
+ 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;
}
static int mca_fe_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 08/25] ASoC: apple: mca: Ensure the DAI is marked as started on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from mca_fe_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as mca_fe_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/apple/mca.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/apple/mca.c b/sound/soc/apple/mca.c
index be702b2942a5..26022a42a95e 100644
--- a/sound/soc/apple/mca.c
+++ b/sound/soc/apple/mca.c
@@ -516,6 +516,7 @@ static int mca_fe_startup(struct snd_pcm_substream *substream,
{
struct mca_cluster *cl = mca_dai_to_cluster(dai);
unsigned int mask, nchannels;
+ int ret;
if (cl->tdm_slots) {
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
@@ -528,9 +529,18 @@ static int mca_fe_startup(struct snd_pcm_substream *substream,
nchannels = 2;
}
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_CHANNELS,
- 1, nchannels);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_CHANNELS,
+ 1, nchannels);
+ 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;
}
static int mca_fe_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 09/25] ASoC: atmel: atmel-pcm-pdc: Fix atmel_pcm_close() being skipped on rollback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from atmel_pcm_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 92dfa6198623 ("ASoC: atmel-pcm: split into two file")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/atmel/atmel-pcm-pdc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/atmel/atmel-pcm-pdc.c b/sound/soc/atmel/atmel-pcm-pdc.c
index 374f93fa6e0b..4cedf2ad934d 100644
--- a/sound/soc/atmel/atmel-pcm-pdc.c
+++ b/sound/soc/atmel/atmel-pcm-pdc.c
@@ -295,6 +295,13 @@ 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:
return ret;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 09/25] ASoC: atmel: atmel-pcm-pdc: Fix atmel_pcm_close() being skipped on rollback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from atmel_pcm_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 92dfa6198623 ("ASoC: atmel-pcm: split into two file")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/atmel/atmel-pcm-pdc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/atmel/atmel-pcm-pdc.c b/sound/soc/atmel/atmel-pcm-pdc.c
index 374f93fa6e0b..4cedf2ad934d 100644
--- a/sound/soc/atmel/atmel-pcm-pdc.c
+++ b/sound/soc/atmel/atmel-pcm-pdc.c
@@ -295,6 +295,13 @@ 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:
return ret;
}
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 10/25] ASoC: codecs: cs42l42: Ensure the DAI is marked as started on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from cs42l42_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as cs42l42_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/cs42l42.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index b5d69d5516a6..18d6cb9bfa2c 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -890,6 +890,7 @@ static int cs42l42_dai_startup(struct snd_pcm_substream *substream, struct snd_s
{
struct snd_soc_component *component = dai->component;
struct cs42l42_private *cs42l42 = snd_soc_component_get_drvdata(component);
+ int ret;
/*
* Sample rates < 44.1 kHz would produce an out-of-range SCLK with
@@ -900,9 +901,18 @@ static int cs42l42_dai_startup(struct snd_pcm_substream *substream, struct snd_s
return 0;
/* Machine driver has not set a SCLK, limit bottom end to 44.1 kHz */
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 44100, 96000);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 44100, 96000);
+ 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;
}
static int cs42l42_pcm_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 10/25] ASoC: codecs: cs42l42: Ensure the DAI is marked as started on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from cs42l42_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as cs42l42_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/cs42l42.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index b5d69d5516a6..18d6cb9bfa2c 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -890,6 +890,7 @@ static int cs42l42_dai_startup(struct snd_pcm_substream *substream, struct snd_s
{
struct snd_soc_component *component = dai->component;
struct cs42l42_private *cs42l42 = snd_soc_component_get_drvdata(component);
+ int ret;
/*
* Sample rates < 44.1 kHz would produce an out-of-range SCLK with
@@ -900,9 +901,18 @@ static int cs42l42_dai_startup(struct snd_pcm_substream *substream, struct snd_s
return 0;
/* Machine driver has not set a SCLK, limit bottom end to 44.1 kHz */
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 44100, 96000);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 44100, 96000);
+ 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;
}
static int cs42l42_pcm_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 11/25] ASoC: codecs: nau8325: Ensure the DAI is marked as started on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from nau8325_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as nau8325_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/nau8325.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8325.c b/sound/soc/codecs/nau8325.c
index 2c95ed00a681..5ccf4c110567 100644
--- a/sound/soc/codecs/nau8325.c
+++ b/sound/soc/codecs/nau8325.c
@@ -489,14 +489,24 @@ static int nau8325_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct nau8325 *nau8325 = snd_soc_component_get_drvdata(component);
const struct nau8325_osr_attr *osr;
+ int ret;
osr = nau8325_get_osr(nau8325);
if (!osr || !osr->osr)
return -EINVAL;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 0, CLK_DA_AD_MAX / osr->osr);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 0, CLK_DA_AD_MAX / osr->osr);
+ 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;
}
static int nau8325_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 11/25] ASoC: codecs: nau8325: Ensure the DAI is marked as started on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from nau8325_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as nau8325_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/nau8325.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8325.c b/sound/soc/codecs/nau8325.c
index 2c95ed00a681..5ccf4c110567 100644
--- a/sound/soc/codecs/nau8325.c
+++ b/sound/soc/codecs/nau8325.c
@@ -489,14 +489,24 @@ static int nau8325_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct nau8325 *nau8325 = snd_soc_component_get_drvdata(component);
const struct nau8325_osr_attr *osr;
+ int ret;
osr = nau8325_get_osr(nau8325);
if (!osr || !osr->osr)
return -EINVAL;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 0, CLK_DA_AD_MAX / osr->osr);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 0, CLK_DA_AD_MAX / osr->osr);
+ 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;
}
static int nau8325_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 12/25] ASoC: codecs: nau8540: Ensure the DAI is marked as started on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from nau8540_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as nau8540_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/nau8540.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c
index d4211a76b096..09e7f31a904d 100644
--- a/sound/soc/codecs/nau8540.c
+++ b/sound/soc/codecs/nau8540.c
@@ -419,14 +419,24 @@ static int nau8540_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct nau8540 *nau8540 = snd_soc_component_get_drvdata(component);
const struct nau8540_osr_attr *osr;
+ int ret;
osr = nau8540_get_osr(nau8540);
if (!osr || !osr->osr)
return -EINVAL;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 0, CLK_ADC_MAX / osr->osr);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 0, CLK_ADC_MAX / osr->osr);
+ 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;
}
static int nau8540_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 12/25] ASoC: codecs: nau8540: Ensure the DAI is marked as started on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from nau8540_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as nau8540_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/nau8540.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c
index d4211a76b096..09e7f31a904d 100644
--- a/sound/soc/codecs/nau8540.c
+++ b/sound/soc/codecs/nau8540.c
@@ -419,14 +419,24 @@ static int nau8540_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct nau8540 *nau8540 = snd_soc_component_get_drvdata(component);
const struct nau8540_osr_attr *osr;
+ int ret;
osr = nau8540_get_osr(nau8540);
if (!osr || !osr->osr)
return -EINVAL;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 0, CLK_ADC_MAX / osr->osr);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 0, CLK_ADC_MAX / osr->osr);
+ 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;
}
static int nau8540_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 13/25] ASoC: codecs: nau8821: Ensure the DAI is marked as started on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from nau8821_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as nau8821_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/nau8821.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c
index ecadbaee1037..7b88ee3159d1 100644
--- a/sound/soc/codecs/nau8821.c
+++ b/sound/soc/codecs/nau8821.c
@@ -829,14 +829,24 @@ static int nau8821_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct nau8821 *nau8821 = snd_soc_component_get_drvdata(component);
const struct nau8821_osr_attr *osr;
+ int ret;
osr = nau8821_get_osr(nau8821, substream->stream);
if (!osr || !osr->osr)
return -EINVAL;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 0, CLK_DA_AD_MAX / osr->osr);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 0, CLK_DA_AD_MAX / osr->osr);
+ 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;
}
static int nau8821_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 13/25] ASoC: codecs: nau8821: Ensure the DAI is marked as started on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from nau8821_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as nau8821_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/nau8821.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c
index ecadbaee1037..7b88ee3159d1 100644
--- a/sound/soc/codecs/nau8821.c
+++ b/sound/soc/codecs/nau8821.c
@@ -829,14 +829,24 @@ static int nau8821_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct nau8821 *nau8821 = snd_soc_component_get_drvdata(component);
const struct nau8821_osr_attr *osr;
+ int ret;
osr = nau8821_get_osr(nau8821, substream->stream);
if (!osr || !osr->osr)
return -EINVAL;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 0, CLK_DA_AD_MAX / osr->osr);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 0, CLK_DA_AD_MAX / osr->osr);
+ 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;
}
static int nau8821_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 14/25] ASoC: codecs: nau8824: Ensure the DAI is marked as started on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from nau8824_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as nau8824_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/nau8824.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c
index 853eb9472af9..046cce9192b7 100644
--- a/sound/soc/codecs/nau8824.c
+++ b/sound/soc/codecs/nau8824.c
@@ -1061,14 +1061,24 @@ static int nau8824_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct nau8824 *nau8824 = snd_soc_component_get_drvdata(component);
const struct nau8824_osr_attr *osr;
+ int ret;
osr = nau8824_get_osr(nau8824, substream->stream);
if (!osr || !osr->osr)
return -EINVAL;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 0, CLK_DA_AD_MAX / osr->osr);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 0, CLK_DA_AD_MAX / osr->osr);
+ 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;
}
static int nau8824_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 14/25] ASoC: codecs: nau8824: Ensure the DAI is marked as started on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from nau8824_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as nau8824_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/nau8824.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c
index 853eb9472af9..046cce9192b7 100644
--- a/sound/soc/codecs/nau8824.c
+++ b/sound/soc/codecs/nau8824.c
@@ -1061,14 +1061,24 @@ static int nau8824_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct nau8824 *nau8824 = snd_soc_component_get_drvdata(component);
const struct nau8824_osr_attr *osr;
+ int ret;
osr = nau8824_get_osr(nau8824, substream->stream);
if (!osr || !osr->osr)
return -EINVAL;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 0, CLK_DA_AD_MAX / osr->osr);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 0, CLK_DA_AD_MAX / osr->osr);
+ 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;
}
static int nau8824_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 15/25] ASoC: codecs: nau8825: Ensure the DAI is marked as started on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from nau8825_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as nau8825_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/nau8825.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
index 63d927f31409..af2a49c893d3 100644
--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -1261,14 +1261,24 @@ static int nau8825_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component);
const struct nau8825_osr_attr *osr;
+ int ret;
osr = nau8825_get_osr(nau8825, substream->stream);
if (!osr || !osr->osr)
return -EINVAL;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 0, CLK_DA_AD_MAX / osr->osr);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 0, CLK_DA_AD_MAX / osr->osr);
+ 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;
}
static int nau8825_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 15/25] ASoC: codecs: nau8825: Ensure the DAI is marked as started on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from nau8825_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as nau8825_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/nau8825.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
index 63d927f31409..af2a49c893d3 100644
--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -1261,14 +1261,24 @@ static int nau8825_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_component *component = dai->component;
struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component);
const struct nau8825_osr_attr *osr;
+ int ret;
osr = nau8825_get_osr(nau8825, substream->stream);
if (!osr || !osr->osr)
return -EINVAL;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_RATE,
- 0, CLK_DA_AD_MAX / osr->osr);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ 0, CLK_DA_AD_MAX / osr->osr);
+ 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;
}
static int nau8825_hw_params(struct snd_pcm_substream *substream,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 16/25] ASoC: codecs: wm8580: Ensure the DAI is marked as started on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from wm8580_playback_startup(). ASoC only marks the DAI as started
when .startup() returns 0.
This currently has no functional impact, as wm8580_dai_ops_playback
has no .shutdown() callback. Still, return 0 explicitly on success
to match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/wm8580.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 9bc5d1e795dc..cee80da8f753 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -852,9 +852,20 @@ static int wm8580_playback_startup(struct snd_pcm_substream *substream,
{
struct snd_soc_component *component = dai->component;
struct wm8580_priv *wm8580 = snd_soc_component_get_drvdata(component);
+ int ret;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_CHANNELS, 1, wm8580->drvdata->num_dacs * 2);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_CHANNELS, 1,
+ wm8580->drvdata->num_dacs * 2);
+ 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;
}
#define WM8580_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 16/25] ASoC: codecs: wm8580: Ensure the DAI is marked as started on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from wm8580_playback_startup(). ASoC only marks the DAI as started
when .startup() returns 0.
This currently has no functional impact, as wm8580_dai_ops_playback
has no .shutdown() callback. Still, return 0 explicitly on success
to match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/wm8580.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 9bc5d1e795dc..cee80da8f753 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -852,9 +852,20 @@ static int wm8580_playback_startup(struct snd_pcm_substream *substream,
{
struct snd_soc_component *component = dai->component;
struct wm8580_priv *wm8580 = snd_soc_component_get_drvdata(component);
+ int ret;
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_CHANNELS, 1, wm8580->drvdata->num_dacs * 2);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_CHANNELS, 1,
+ wm8580->drvdata->num_dacs * 2);
+ 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;
}
#define WM8580_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 17/25] ASoC: codecs: wm8782: Ensure the DAI is marked as started on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from wm8782_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as wm8782_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/wm8782.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c
index 3a2acdfa9b85..cbf0c823c022 100644
--- a/sound/soc/codecs/wm8782.c
+++ b/sound/soc/codecs/wm8782.c
@@ -39,9 +39,19 @@ static int wm8782_dai_startup(struct snd_pcm_substream *sub, struct snd_soc_dai
struct snd_pcm_runtime *runtime = sub->runtime;
struct wm8782_priv *priv =
snd_soc_component_get_drvdata(dai->component);
+ int ret;
- return snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE,
+ ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE,
8000, priv->max_rate);
+ 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;
}
static const struct snd_soc_dapm_widget wm8782_dapm_widgets[] = {
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 17/25] ASoC: codecs: wm8782: Ensure the DAI is marked as started on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from wm8782_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
This currently has no functional impact, as wm8782_dai_ops has no
.shutdown() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the DAI is correctly marked as
started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/wm8782.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c
index 3a2acdfa9b85..cbf0c823c022 100644
--- a/sound/soc/codecs/wm8782.c
+++ b/sound/soc/codecs/wm8782.c
@@ -39,9 +39,19 @@ static int wm8782_dai_startup(struct snd_pcm_substream *sub, struct snd_soc_dai
struct snd_pcm_runtime *runtime = sub->runtime;
struct wm8782_priv *priv =
snd_soc_component_get_drvdata(dai->component);
+ int ret;
- return snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE,
+ ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE,
8000, priv->max_rate);
+ 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;
}
static const struct snd_soc_dapm_widget wm8782_dapm_widgets[] = {
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 18/25] ASoC: imx-pcm-rpmsg: Fix imx_rpmsg_pcm_close() being skipped on rollback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc, Chancel Liu
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from imx_rpmsg_pcm_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 3c00eceb2a53 ("ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg")
Reviewed-by: Chancel Liu <chancel.liu@gmail.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/fsl/imx-pcm-rpmsg.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c
index 7086fb7fc1eb..85b7c929a28a 100644
--- a/sound/soc/fsl/imx-pcm-rpmsg.c
+++ b/sound/soc/fsl/imx-pcm-rpmsg.c
@@ -269,7 +269,13 @@ 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);
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int imx_rpmsg_pcm_close(struct snd_soc_component *component,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 18/25] ASoC: imx-pcm-rpmsg: Fix imx_rpmsg_pcm_close() being skipped on rollback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Chancel Liu,
Hemanth Selam, linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from imx_rpmsg_pcm_open(). ASoC only marks the component as opened
when .open() returns 0, so .close() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 3c00eceb2a53 ("ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg")
Reviewed-by: Chancel Liu <chancel.liu@gmail.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/fsl/imx-pcm-rpmsg.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c
index 7086fb7fc1eb..85b7c929a28a 100644
--- a/sound/soc/fsl/imx-pcm-rpmsg.c
+++ b/sound/soc/fsl/imx-pcm-rpmsg.c
@@ -269,7 +269,13 @@ 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);
- 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 .close() is not skipped on rollback.
+ */
+ return 0;
}
static int imx_rpmsg_pcm_close(struct snd_soc_component *component,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 19/25] ASoC: intel: atom: Fix .shutdown() being skipped on rollback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from sst_media_open(). ASoC only marks the DAI as started when
.startup() returns 0, so .shutdown() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 4889a8a73f65 ("ASoC: intel: atom: Use __free(kfree) for stream pointer")
Fixes: 6cc0f4e63994 ("ASoC: Intel: mfld_pcm: move stream handling to dai_ops")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/intel/atom/sst-mfld-platform-pcm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index a4c8cbfba096..58681e007abf 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -341,7 +341,12 @@ static int sst_media_open(struct snd_pcm_substream *substream,
stream = NULL;
- return ret_val;
+ /*
+ * 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;
}
static void sst_media_close(struct snd_pcm_substream *substream,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 19/25] ASoC: intel: atom: Fix .shutdown() being skipped on rollback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from sst_media_open(). ASoC only marks the DAI as started when
.startup() returns 0, so .shutdown() can be skipped on rollback.
Return 0 explicitly on success.
Fixes: 4889a8a73f65 ("ASoC: intel: atom: Use __free(kfree) for stream pointer")
Fixes: 6cc0f4e63994 ("ASoC: Intel: mfld_pcm: move stream handling to dai_ops")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/intel/atom/sst-mfld-platform-pcm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index a4c8cbfba096..58681e007abf 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -341,7 +341,12 @@ static int sst_media_open(struct snd_pcm_substream *substream,
stream = NULL;
- return ret_val;
+ /*
+ * 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;
}
static void sst_media_close(struct snd_pcm_substream *substream,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 20/25] ASoC: renesas: fsi: Ensure the component is marked as opened on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from fsi_pcm_open(). ASoC only marks the component as opened when
.open() returns 0.
This currently has no functional impact, as fsi_soc_component has no
.close() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the component is correctly marked
as opened.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/renesas/fsi.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sound/soc/renesas/fsi.c b/sound/soc/renesas/fsi.c
index 23b7e63596d3..74e2ea002fbb 100644
--- a/sound/soc/renesas/fsi.c
+++ b/sound/soc/renesas/fsi.c
@@ -1811,14 +1811,21 @@ static int fsi_pcm_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
- int ret = 0;
+ int ret;
snd_soc_set_runtime_hwparams(substream, &fsi_pcm_hardware);
ret = snd_pcm_hw_constraint_integer(runtime,
SNDRV_PCM_HW_PARAM_PERIODS);
+ if (ret < 0)
+ return ret;
- 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;
}
static snd_pcm_uframes_t fsi_pointer(struct snd_soc_component *component,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 20/25] ASoC: renesas: fsi: Ensure the component is marked as opened on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from fsi_pcm_open(). ASoC only marks the component as opened when
.open() returns 0.
This currently has no functional impact, as fsi_soc_component has no
.close() callback. Still, return 0 explicitly on success to
match what ASoC expects and ensure the component is correctly marked
as opened.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/renesas/fsi.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sound/soc/renesas/fsi.c b/sound/soc/renesas/fsi.c
index 23b7e63596d3..74e2ea002fbb 100644
--- a/sound/soc/renesas/fsi.c
+++ b/sound/soc/renesas/fsi.c
@@ -1811,14 +1811,21 @@ static int fsi_pcm_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
- int ret = 0;
+ int ret;
snd_soc_set_runtime_hwparams(substream, &fsi_pcm_hardware);
ret = snd_pcm_hw_constraint_integer(runtime,
SNDRV_PCM_HW_PARAM_PERIODS);
+ if (ret < 0)
+ return ret;
- 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;
}
static snd_pcm_uframes_t fsi_pointer(struct snd_soc_component *component,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread* Re: [PATCH v2 20/25] ASoC: renesas: fsi: Ensure the component is marked as opened on success
2026-10-15 1:43 ` phucduc.bui
@ 2026-10-15 3:55 ` Kuninori Morimoto
-1 siblings, 0 replies; 54+ messages in thread
From: Kuninori Morimoto @ 2026-10-15 3:55 UTC (permalink / raw)
To: phucduc.bui
Cc: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Geert Uytterhoeven,
Magnus Damm, Biju Das, Lad Prabhakar, Heiko Stuebner, Kees Cook,
Syed Saba Kareem, wangdicheng, Chris Bainbridge, Linus Walleij,
Charles Keepax, Neo Chang, Krzysztof Kozlowski, u.kleine-koenig,
Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel
Hi
> snd_pcm_hw_constraint_integer() may return 1, which is then returned
> from fsi_pcm_open(). ASoC only marks the component as opened when
> .open() returns 0.
>
> This currently has no functional impact, as fsi_soc_component has no
> .close() callback. Still, return 0 explicitly on success to
> match what ASoC expects and ensure the component is correctly marked
> as opened.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thank you for your help !!
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [PATCH v2 20/25] ASoC: renesas: fsi: Ensure the component is marked as opened on success
@ 2026-10-15 3:55 ` Kuninori Morimoto
0 siblings, 0 replies; 54+ messages in thread
From: Kuninori Morimoto @ 2026-10-15 3:55 UTC (permalink / raw)
To: phucduc.bui
Cc: imx, Alexandre Belloni, Heiko Stuebner, Bard Liao, Xiubo Li,
Venkata Prasad Potturu, Frank Li, Cezary Rojewski,
Zain Aboobacker, Nicolas Ferre, Bjorn Helgaas, Pengpeng Hou,
Bo Shen, Claudiu Beznea, Neo Chang, Fabio Estevam,
Pierre-Louis Bossart, Geert Uytterhoeven, Chris Bainbridge,
Shengjiu Wang, Takashi Iwai, Magnus Damm, Vinod Koul, Kees Cook,
Vijendar Mukunda, povik+lin, linux-rockchip, Charles Keepax,
Sascha Hauer, Lad Prabhakar, linux-sound, Nicolin Chen,
Richard Fitzgerald, Mark Brown, wangdicheng, Syed Saba Kareem,
Biju Das, Jaroslav Kysela, Peter Ujfalusi, Sang-Heon Jeon,
linux-arm-kernel, Krzysztof Kozlowski, Kai Vehmanen, patches,
Linus Walleij, linuxppc-dev, Liam Girdwood, linux-kernel,
linux-renesas-soc, Md Shofiqul Islam, asahi,
Pengutronix Kernel Team, Andrei Simion, u.kleine-koenig,
David Rhodes, Hemanth Selam
Hi
> snd_pcm_hw_constraint_integer() may return 1, which is then returned
> from fsi_pcm_open(). ASoC only marks the component as opened when
> .open() returns 0.
>
> This currently has no functional impact, as fsi_soc_component has no
> .close() callback. Still, return 0 explicitly on success to
> match what ASoC expects and ensure the component is correctly marked
> as opened.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH v2 21/25] ASoC: renesas: msiof: Remove redundant period constraint
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
Changes in v2:
- Remove redundant integer constraints already applied by
snd_dmaengine_pcm_open().
sound/soc/renesas/rcar/msiof.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/sound/soc/renesas/rcar/msiof.c b/sound/soc/renesas/rcar/msiof.c
index 128543fc4fc9..11a6f22ec0ad 100644
--- a/sound/soc/renesas/rcar/msiof.c
+++ b/sound/soc/renesas/rcar/msiof.c
@@ -419,18 +419,14 @@ 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)
+ if (ret < 0) {
dma_release_channel(chan);
+ return ret;
+ }
- return ret;
+ snd_soc_set_runtime_hwparams(substream, &msiof_pcm_hardware);
+
+ return 0;
}
static int msiof_close(struct snd_soc_component *component,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 21/25] ASoC: renesas: msiof: Remove redundant period constraint
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
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.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
Changes in v2:
- Remove redundant integer constraints already applied by
snd_dmaengine_pcm_open().
sound/soc/renesas/rcar/msiof.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/sound/soc/renesas/rcar/msiof.c b/sound/soc/renesas/rcar/msiof.c
index 128543fc4fc9..11a6f22ec0ad 100644
--- a/sound/soc/renesas/rcar/msiof.c
+++ b/sound/soc/renesas/rcar/msiof.c
@@ -419,18 +419,14 @@ 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)
+ if (ret < 0) {
dma_release_channel(chan);
+ return ret;
+ }
- return ret;
+ snd_soc_set_runtime_hwparams(substream, &msiof_pcm_hardware);
+
+ return 0;
}
static int msiof_close(struct snd_soc_component *component,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread* Re: [PATCH v2 21/25] ASoC: renesas: msiof: Remove redundant period constraint
2026-10-15 1:43 ` phucduc.bui
@ 2026-10-15 3:56 ` Kuninori Morimoto
-1 siblings, 0 replies; 54+ messages in thread
From: Kuninori Morimoto @ 2026-10-15 3:56 UTC (permalink / raw)
To: phucduc.bui
Cc: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Geert Uytterhoeven,
Magnus Damm, Biju Das, Lad Prabhakar, Heiko Stuebner, Kees Cook,
Syed Saba Kareem, wangdicheng, Chris Bainbridge, Linus Walleij,
Charles Keepax, Neo Chang, Krzysztof Kozlowski, u.kleine-koenig,
Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel
Hi
> 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.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thank you for your help !!
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [PATCH v2 21/25] ASoC: renesas: msiof: Remove redundant period constraint
@ 2026-10-15 3:56 ` Kuninori Morimoto
0 siblings, 0 replies; 54+ messages in thread
From: Kuninori Morimoto @ 2026-10-15 3:56 UTC (permalink / raw)
To: phucduc.bui
Cc: imx, Alexandre Belloni, Heiko Stuebner, Bard Liao, Xiubo Li,
Venkata Prasad Potturu, Frank Li, Cezary Rojewski,
Zain Aboobacker, Nicolas Ferre, Bjorn Helgaas, Pengpeng Hou,
Bo Shen, Claudiu Beznea, Neo Chang, Fabio Estevam,
Pierre-Louis Bossart, Geert Uytterhoeven, Chris Bainbridge,
Shengjiu Wang, Takashi Iwai, Magnus Damm, Vinod Koul, Kees Cook,
Vijendar Mukunda, povik+lin, linux-rockchip, Charles Keepax,
Sascha Hauer, Lad Prabhakar, linux-sound, Nicolin Chen,
Richard Fitzgerald, Mark Brown, wangdicheng, Syed Saba Kareem,
Biju Das, Jaroslav Kysela, Peter Ujfalusi, Sang-Heon Jeon,
linux-arm-kernel, Krzysztof Kozlowski, Kai Vehmanen, patches,
Linus Walleij, linuxppc-dev, Liam Girdwood, linux-kernel,
linux-renesas-soc, Md Shofiqul Islam, asahi,
Pengutronix Kernel Team, Andrei Simion, u.kleine-koenig,
David Rhodes, Hemanth Selam
Hi
> 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.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 54+ messages in thread
* [PATCH v2 22/25] ASoC: renesas: rz-ssi: Ensure the component is marked as opened on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from rz_ssi_pcm_open_pio(). ASoC only marks the component as opened when
.open() returns 0.
This currently has no functional impact, as the component driver has no
.close() callback. Still, return 0 explicitly on success to match what
ASoC expects and ensure the component is correctly marked as opened.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/renesas/rz-ssi.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c
index b1587f499cb8..5f4a53886541 100644
--- a/sound/soc/renesas/rz-ssi.c
+++ b/sound/soc/renesas/rz-ssi.c
@@ -937,10 +937,21 @@ static const struct snd_pcm_hardware rz_ssi_pcm_hardware = {
static int rz_ssi_pcm_open_pio(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ int ret;
+
snd_soc_set_runtime_hwparams(substream, &rz_ssi_pcm_hardware);
- return snd_pcm_hw_constraint_integer(substream->runtime,
+ ret = snd_pcm_hw_constraint_integer(substream->runtime,
SNDRV_PCM_HW_PARAM_PERIODS);
+ 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;
}
static int rz_ssi_pcm_open_dma(struct snd_soc_component *component,
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 22/25] ASoC: renesas: rz-ssi: Ensure the component is marked as opened on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_integer() may return 1, which is then returned
from rz_ssi_pcm_open_pio(). ASoC only marks the component as opened when
.open() returns 0.
This currently has no functional impact, as the component driver has no
.close() callback. Still, return 0 explicitly on success to match what
ASoC expects and ensure the component is correctly marked as opened.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/renesas/rz-ssi.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c
index b1587f499cb8..5f4a53886541 100644
--- a/sound/soc/renesas/rz-ssi.c
+++ b/sound/soc/renesas/rz-ssi.c
@@ -937,10 +937,21 @@ static const struct snd_pcm_hardware rz_ssi_pcm_hardware = {
static int rz_ssi_pcm_open_pio(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ int ret;
+
snd_soc_set_runtime_hwparams(substream, &rz_ssi_pcm_hardware);
- return snd_pcm_hw_constraint_integer(substream->runtime,
+ ret = snd_pcm_hw_constraint_integer(substream->runtime,
SNDRV_PCM_HW_PARAM_PERIODS);
+ 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;
}
static int rz_ssi_pcm_open_dma(struct snd_soc_component *component,
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 23/25] ASoC: renesas: rz-ssi: Remove redundant component open callback
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/renesas/rz-ssi.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c
index 5f4a53886541..9a0781bb072d 100644
--- a/sound/soc/renesas/rz-ssi.c
+++ b/sound/soc/renesas/rz-ssi.c
@@ -954,13 +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)
-{
- return snd_pcm_hw_constraint_integer(substream->runtime,
- SNDRV_PCM_HW_PARAM_PERIODS);
-}
-
static snd_pcm_uframes_t rz_ssi_pcm_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
@@ -1011,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,
};
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 23/25] ASoC: renesas: rz-ssi: Remove redundant component open callback
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
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.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/renesas/rz-ssi.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/sound/soc/renesas/rz-ssi.c b/sound/soc/renesas/rz-ssi.c
index 5f4a53886541..9a0781bb072d 100644
--- a/sound/soc/renesas/rz-ssi.c
+++ b/sound/soc/renesas/rz-ssi.c
@@ -954,13 +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)
-{
- return snd_pcm_hw_constraint_integer(substream->runtime,
- SNDRV_PCM_HW_PARAM_PERIODS);
-}
-
static snd_pcm_uframes_t rz_ssi_pcm_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
@@ -1011,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,
};
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread
* [PATCH v2 24/25] ASoC: rockchip: rk3399_gru_sound: Mark the link as started on success
2026-10-15 1:42 ` phucduc.bui
@ 2026-10-15 1:43 ` phucduc.bui
-1 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: Kees Cook, Syed Saba Kareem, wangdicheng, Chris Bainbridge,
Linus Walleij, Charles Keepax, Neo Chang, Krzysztof Kozlowski,
u.kleine-koenig, Pengpeng Hou, Cristian Ciocaltea, Hemanth Selam,
Md Shofiqul Islam, Bjorn Helgaas, Zain Aboobacker, Sang-Heon Jeon,
Bo Shen, Vinod Koul, linux-sound, asahi, linux-arm-kernel,
patches, linuxppc-dev, imx, linux-rockchip, linux-renesas-soc,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from rockchip_sound_startup(). ASoC only marks the DAI link as started
when .startup() returns 0.
This currently has no functional impact, as there is no .shutdown()
callback in the relevant snd_soc_ops. Still, return 0 explicitly on
success to match what ASoC expects and ensure the DAI link is correctly
marked as started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rk3399_gru_sound.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c
index 04e7bed8275d..d4a0daabfb42 100644
--- a/sound/soc/rockchip/rk3399_gru_sound.c
+++ b/sound/soc/rockchip/rk3399_gru_sound.c
@@ -258,10 +258,20 @@ static int rockchip_sound_dmic_hw_params(struct snd_pcm_substream *substream,
static int rockchip_sound_startup(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
+ int ret;
runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
- return snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE,
- 8000, 96000);
+ ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE,
+ 8000, 96000);
+ 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;
}
static const struct snd_soc_ops rockchip_sound_max98357a_ops = {
--
2.43.0
^ permalink raw reply related [flat|nested] 54+ messages in thread* [PATCH v2 24/25] ASoC: rockchip: rk3399_gru_sound: Mark the link as started on success
@ 2026-10-15 1:43 ` phucduc.bui
0 siblings, 0 replies; 54+ messages in thread
From: phucduc.bui @ 2026-10-15 1:43 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, povik+lin,
Claudiu Beznea, Andrei Simion, Nicolas Ferre, Alexandre Belloni,
David Rhodes, Richard Fitzgerald, Shengjiu Wang, Xiubo Li,
Fabio Estevam, Nicolin Chen, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Cezary Rojewski, Peter Ujfalusi,
Bard Liao, Kai Vehmanen, Pierre-Louis Bossart, Kuninori Morimoto,
Geert Uytterhoeven, Magnus Damm, Biju Das, Lad Prabhakar,
Heiko Stuebner
Cc: imx, wangdicheng, Kees Cook, Sang-Heon Jeon, Pengpeng Hou,
Bo Shen, Neo Chang, linux-rockchip, bui duc phuc,
Chris Bainbridge, Charles Keepax, linux-sound, u.kleine-koenig,
Zain Aboobacker, Bjorn Helgaas, Md Shofiqul Islam,
linux-arm-kernel, Krzysztof Kozlowski, patches, Linus Walleij,
linux-kernel, linux-renesas-soc, Vinod Koul, asahi, Hemanth Selam,
linuxppc-dev, Syed Saba Kareem
From: bui duc phuc <phucduc.bui@gmail.com>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from rockchip_sound_startup(). ASoC only marks the DAI link as started
when .startup() returns 0.
This currently has no functional impact, as there is no .shutdown()
callback in the relevant snd_soc_ops. Still, return 0 explicitly on
success to match what ASoC expects and ensure the DAI link is correctly
marked as started.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rk3399_gru_sound.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c
index 04e7bed8275d..d4a0daabfb42 100644
--- a/sound/soc/rockchip/rk3399_gru_sound.c
+++ b/sound/soc/rockchip/rk3399_gru_sound.c
@@ -258,10 +258,20 @@ static int rockchip_sound_dmic_hw_params(struct snd_pcm_substream *substream,
static int rockchip_sound_startup(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
+ int ret;
runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
- return snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE,
- 8000, 96000);
+ ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE,
+ 8000, 96000);
+ 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;
}
static const struct snd_soc_ops rockchip_sound_max98357a_ops = {
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 54+ messages in thread