ASoC: fix checking for external widgets bug
authorRongrong Cao <rrcao@ambarella.com>
Fri, 10 Jul 2009 19:13:30 +0000 (20:13 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 13 Jul 2009 22:01:29 +0000 (23:01 +0100)
In SOC DAPM layer of SOUND subsystem, when add signal route (in the
function snd_soc_dapm_add_route() ), the original code has wrong logic
when dapm layer check each widget whether an external one.

Signed-off-by: Rongrong Cao <rrcao@ambarella.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-dapm.c

index a40594f5ad6693cad1900c75e00446e39cf8f126..c68c204a48ad9e5c57f2294d2bd2163a5cbb2a7c 100644 (file)
@@ -1293,8 +1293,8 @@ static int snd_soc_dapm_add_route(struct snd_soc_codec *codec,
        if (wsink->id == snd_soc_dapm_input) {
                if (wsource->id == snd_soc_dapm_micbias ||
                        wsource->id == snd_soc_dapm_mic ||
-                       wsink->id == snd_soc_dapm_line ||
-                       wsink->id == snd_soc_dapm_output)
+                       wsource->id == snd_soc_dapm_line ||
+                       wsource->id == snd_soc_dapm_output)
                        wsink->ext = 1;
        }
        if (wsource->id == snd_soc_dapm_output) {