Commit 1ca683ce authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Zheng Zengkai
Browse files

ASoC: codecs: wcd934x: handle channel mappping list correctly

stable inclusion
from stable-v5.10.85
commit 1089dac26c6b4b833323ae6c0ceab29fb30ede72
bugzilla: 186032 https://gitee.com/openeuler/kernel/issues/I4QVI4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1089dac26c6b4b833323ae6c0ceab29fb30ede72



--------------------------------

commit 23ba2861 upstream.

Currently each channel is added as list to dai channel list, however
there is danger of adding same channel to multiple dai channel list
which endups corrupting the other list where its already added.

This patch ensures that the channel is actually free before adding to
the dai channel list and also ensures that the channel is on the list
before deleting it.

This check was missing previously, and we did not hit this issue as
we were testing very simple usecases with sequence of amixer commands.

Fixes: a70d9245 ("ASoC: wcd934x: add capture dapm widgets")
Fixes: dd9eb19b ("ASoC: wcd934x: add playback dapm widgets")
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20211130160507.22180-2-srinivas.kandagatla@linaro.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 1a59f6de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment