[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_002E3C6C67928986481018466EEDF8D05706@qq.com>
Date: Fri, 8 Mar 2024 18:07:06 +0800
From: xuhanwu <2433926602@...com>
To: lgirdwood@...il.com,
broonie@...nel.org,
perex@...ex.cz,
tiwai@...e.com
Cc: linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org,
xu.hanwu@...lec.com
Subject: [PATCH] ASoC: soc-pcm: add the judgment of unsupported commands for the function soc_pcm_trigger
From: xuhanwu <xu.hanwu@...lec.com>
Function soc_pcm_trigger, if the parameter cmd does not support the need to return an error (-EINVAL).
Signed-off-by: xuhanwu <xu.hanwu@...lec.com>
---
sound/soc/soc-pcm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 77ee103b7..eba737729 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1173,6 +1173,9 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
if (r < 0)
break;
}
+ break;
+ default:
+ return -EINVAL;
}
/*
--
2.17.1
Powered by blists - more mailing lists