asoc: refine the probe for loopback devices

msm_pcm_loopback_probe should be conducted only for
normal loopback devices, not low-latency.

And such kcontrol should not be added twice.

Change-Id: Iaab631019b5b964473bfaebade0697eb7c4373e7
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
This commit is contained in:
Guodong Hu 2021-02-23 14:18:39 +08:00 committed by Gerrit - the friendly Code Review server
parent 258bb5db28
commit 0433734505

View File

@ -198,8 +198,8 @@ static struct snd_kcontrol_new msm_loopback_controls[] = {
static int msm_pcm_loopback_probe(struct snd_soc_component *component)
{
if (of_property_read_bool(component->dev->of_node,
"qcom,msm-pcm-loopback")) {
if (!of_property_read_bool(component->dev->of_node,
"qcom,msm-pcm-loopback-low-latency")) {
snd_soc_add_component_controls(component, msm_loopback_controls,
ARRAY_SIZE(msm_loopback_controls));
}