[PATCH 1/4] ASoC: qcom: sc8280xp: tolerate -ENOTSUPP from codec set_sysclk

Srinivas Kandagatla <[email protected]>
Newsgroups org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound
Message-ID <[email protected]>
Not all codecs implement the set_sysclk operation. When the board
enables codec_sysclk_set, snd_soc_dai_set_sysclk() on the codec DAI
can return -ENOTSUPP, which currently aborts hw_params and breaks
playback/capture on such boards even though the missing clock setup
is harmless.

Ignore -ENOTSUPP for the codec set_sysclk call.

Fixes: 766f3f79c312 ("ASoC: qcom: sc8280xp: enhance machine driver for board-specific config")
Signed-off-by: Srinivas Kandagatla <[email protected]>
---
 sound/soc/qcom/sc8280xp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
index a9304784d41e..ce2b0633688c 100644
--- a/sound/soc/qcom/sc8280xp.c
+++ b/sound/soc/qcom/sc8280xp.c
@@ -202,7 +202,7 @@ static int sc8280xp_snd_hw_params(struct snd_pcm_substream *substream,
 			ret = snd_soc_dai_set_sysclk(codec_dai,
 						     0, mclk_freq,
 						     SND_SOC_CLOCK_IN);
-			if (ret)
+			if (ret && ret != -ENOTSUPP)
 				return ret;
 		}
 		break;
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.