[PATCH for-2.6.32] sound dapm: fix checking for external widgets bug

From: Rongrong Cao
Date: Wed Jul 08 2009 - 02:12:09 EST


From: Rongrong Cao rrcao@xxxxxxxxxxxxx

This patch is based on for-2.6.32
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.

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

--- for-2.6.32/sound/soc/soc-dapm.c.orig 2009-07-08 13:33:41.000000000 +0800
+++ for-2.6.32/sound/soc/soc-dapm.c 2009-07-08 13:34:50.000000000 +0800
@@ -1290,8 +1290,8 @@ static int snd_soc_dapm_add_route(struct
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) {

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

Signed-off-by: Rongrong Cao <rrcao@xxxxxxxxxxxxx>


********************
Best regards!
Allen (Rongrong) Cao
Ambarella Shanghai Ltd.
Tel:   (86-21) 50942311
Fax:  (86-21) 50942321



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/