[PATCH 24/24] ASoC: rockchip: rockchip_max98090: Mark the link as started on success
From: phucduc . bui
Date: Thu Oct 08 2026 - 06:48:02 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from rk_aif1_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@xxxxxxxxx>
---
sound/soc/rockchip/rockchip_max98090.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_max98090.c b/sound/soc/rockchip/rockchip_max98090.c
index 426506a8e18e..d54c36682415 100644
--- a/sound/soc/rockchip/rockchip_max98090.c
+++ b/sound/soc/rockchip/rockchip_max98090.c
@@ -191,12 +191,18 @@ static int rk_aif1_hw_params(struct snd_pcm_substream *substream,
static int rk_aif1_startup(struct snd_pcm_substream *substream)
{
+ int ret;
/*
* Set period size to 240 because pl330 has issue
* dealing with larger period in stress testing.
*/
- return snd_pcm_hw_constraint_minmax(substream->runtime,
- SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 240, 240);
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
+ SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
+ 240, 240);
+ if (ret < 0)
+ return ret;
+
+ return 0;
}
static const struct snd_soc_ops rk_aif1_ops = {
--
2.43.0