---
 sound/soc/codecs/wm8731.c |    4 +++-
 sound/soc/pxa/poodle.c    |   23 +++++++++++------------
 sound/soc/soc-dapm.c      |   10 +++++-----
 3 files changed, 19 insertions(+), 18 deletions(-)

Index: linux-2.6.17/sound/soc/pxa/poodle.c
===================================================================
--- linux-2.6.17.orig/sound/soc/pxa/poodle.c	2006-08-24 22:31:55.000000000 +0100
+++ linux-2.6.17/sound/soc/pxa/poodle.c	2006-08-24 23:46:39.000000000 +0100
@@ -35,10 +35,10 @@
 #include "../codecs/wm8731.h"
 #include "pxa2xx-pcm.h"
 
-#define POODLE_HP        0
-#define POODLE_HP_OFF    1
-#define POODLE_SPK_ON    0
-#define POODLE_SPK_OFF   1
+#define POODLE_HP        1
+#define POODLE_HP_OFF    0
+#define POODLE_SPK_ON    1
+#define POODLE_SPK_OFF   0
 
  /* audio clock in Hz - rounded from 12.235MHz */
 #define POODLE_AUDIO_CLOCK 12288000
@@ -64,7 +64,7 @@ static void poodle_ext_control(struct sn
 
 	if (poodle_spk_func == POODLE_SPK_ON)
 		spk = 1;
-printk("p ext ctrl jackf %d spkf %d spk %d\n", poodle_jack_func, poodle_spk_func, spk);
+
 	/* set the enpoints to their new connetion states */
 	snd_soc_dapm_set_endpoint(codec, "Ext Spk", spk);
 
@@ -76,7 +76,7 @@ static int poodle_startup(struct snd_pcm
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->socdev->codec;
-printk("p startup\n");
+
 	/* check the jack status at stream startup */
 	poodle_ext_control(codec);
 	return 0;
@@ -87,7 +87,7 @@ static int poodle_shutdown(struct snd_pc
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->socdev->codec;
-printk("shutdown hp unmute\n");
+
 	/* set = unmute headphone */
 	locomo_gpio_write2(&poodle_locomo_device, POODLE_LOCOMO_GPIO_MUTE_L, 1);
 	locomo_gpio_write2(&poodle_locomo_device, POODLE_LOCOMO_GPIO_MUTE_R, 1);
@@ -111,7 +111,7 @@ static int poodle_set_jack(struct snd_kc
 {
 	struct snd_soc_codec *codec =  snd_kcontrol_chip(kcontrol);
 	poodle_jack_func = ucontrol->value.integer.value[0];
-printk("p set jack %d\n", poodle_jack_func);
+
 	poodle_ext_control(codec);
 	return 0;
 }
@@ -128,14 +128,13 @@ static int poodle_set_spk(struct snd_kco
 {
 	struct snd_soc_codec *codec =  snd_kcontrol_chip(kcontrol);
 	poodle_spk_func = ucontrol->value.integer.value[0];
-printk("p set spk %d\n", poodle_spk_func);
+
 	poodle_ext_control(codec);
 	return 0;
 }
 
 static int poodle_amp_event(struct snd_soc_dapm_widget *w, int event)
 {
-printk("p amp event	%d\n",SND_SOC_DAPM_EVENT_ON(event));
 	if (SND_SOC_DAPM_EVENT_ON(event))
 		locomo_gpio_write2(&poodle_locomo_device, POODLE_LOCOMO_GPIO_AMP_ON, 0);
 	else
@@ -164,8 +163,8 @@ static const char* audio_map[][3] = {
 	{NULL, NULL, NULL},
 };
 
-static const char *jack_function[] = {"Headphone", "Off"};
-static const char *spk_function[] = {"On", "Off"};
+static const char *jack_function[] = {"Off", "Headphone"};
+static const char *spk_function[] = {"Off", "On"};
 static const struct soc_enum poodle_enum[] = {
 	SOC_ENUM_SINGLE_EXT(2, jack_function),
 	SOC_ENUM_SINGLE_EXT(2, spk_function),
Index: linux-2.6.17/sound/soc/soc-dapm.c
===================================================================
--- linux-2.6.17.orig/sound/soc/soc-dapm.c	2006-08-24 22:31:55.000000000 +0100
+++ linux-2.6.17/sound/soc/soc-dapm.c	2006-08-24 23:47:50.000000000 +0100
@@ -485,8 +485,8 @@ int dapm_power_widgets(struct snd_soc_co
 		{
 			w = list_entry(l, struct snd_soc_dapm_widget, list);
 
-			if(seq && seq[i] && w->id != seq[i])
-				continue;
+//			if(seq && seq[i] && w->id != seq[i])
+//				continue;
 
 			if(w->id == snd_soc_dapm_mute)
 				continue;
@@ -579,7 +579,7 @@ static void dbg_dump_dapm(struct snd_soc
 	list_for_each(l, &codec->dapm_widgets)
 	{
 		w = list_entry(l, struct snd_soc_dapm_widget, list);
-		if (w->name && w->reg > 0 &&
+		if (w->name && 
 			w->id != snd_soc_dapm_input && w->id != snd_soc_dapm_output) {
 				in = is_connected_input_ep(w);
 				dapm_clear_walk(w->codec);
@@ -593,14 +593,14 @@ static void dbg_dump_dapm(struct snd_soc
 					p = list_entry(lp, struct snd_soc_dapm_path, list_sink);
 					if (p->connect)
 						printk(" in  %s %s\n", p->name ? p->name : "static",
-							p->in->name);
+							p->source->name);
 				}
 				list_for_each(lp, &w->sinks)
 				{
 					p = list_entry(lp, struct snd_soc_dapm_path, list_source);
 					if (p->connect)
 						printk(" out %s %s\n", p->name ? p->name : "static",
-							p->out->name);
+							p->sink->name);
 				}
 
 		}
Index: linux-2.6.17/sound/soc/codecs/wm8731.c
===================================================================
--- linux-2.6.17.orig/sound/soc/codecs/wm8731.c	2006-08-24 23:38:35.000000000 +0100
+++ linux-2.6.17/sound/soc/codecs/wm8731.c	2006-08-24 23:38:59.000000000 +0100
@@ -466,8 +466,10 @@ static void wm8731_shutdown(struct snd_p
 	struct snd_soc_codec *codec = socdev->codec;
 
 	/* deactivate */
-	if(!codec->active)
+	if(!codec->active) {
+		udelay(50);
 		wm8731_write(codec, WM8731_ACTIVE, 0x0);
+	}
 }
 
 static int wm8731_mute(struct snd_soc_codec *codec,
