mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-17 07:48:30 +07:00
ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails
88pm860x does not support slave mode, so it returns -EINVAL for PM860X_CLK_DIR_IN. Current code changes pm860x->dir setting before return error, so it has impact on the logic of pm860x_pcm_set_dai_fmt. This patch adds comment for the reason to return -EINVAL for PM860X_CLK_DIR_IN, and avoid changing pm860x->dir setting if pm860x_set_dai_sysclk fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d770e558e2
commit
93ec3a1ad5
@ -1028,10 +1028,8 @@ static int pm860x_set_dai_sysclk(struct snd_soc_dai *codec_dai,
|
||||
|
||||
if (dir == PM860X_CLK_DIR_OUT)
|
||||
pm860x->dir = PM860X_CLK_DIR_OUT;
|
||||
else {
|
||||
pm860x->dir = PM860X_CLK_DIR_IN;
|
||||
else /* Slave mode is not supported */
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user