Index: linux-2.6.15-rc2/include/sound/soc.h
===================================================================
--- linux-2.6.15-rc2.orig/include/sound/soc.h	2005-12-04 00:39:48.000000000 +0000
+++ linux-2.6.15-rc2/include/sound/soc.h	2005-12-04 15:55:34.000000000 +0000
@@ -304,8 +304,6 @@
 	int (*pcm_new)(snd_card_t *, struct snd_soc_pcm_codec *, snd_pcm_t *);
 	void (*pcm_free)(snd_pcm_t *);
 	snd_pcm_ops_t *pcm_ops;
-	
-	struct snd_soc_pcm_interface* iface[];
 };
 
 /* SoC machine configuration */
Index: linux-2.6.15-rc2/sound/soc/codecs/wm8731.c
===================================================================
--- linux-2.6.15-rc2.orig/sound/soc/codecs/wm8731.c	2005-12-04 12:04:35.000000000 +0000
+++ linux-2.6.15-rc2/sound/soc/codecs/wm8731.c	2005-12-04 16:38:53.000000000 +0000
@@ -116,7 +116,7 @@
 	u16 *cache = codec->reg_cache;
 	if (reg == WM8731_RESET) 
 		return 0;
-	if (reg > WM8731_CACHEREGNUM)
+	if (reg >= WM8731_CACHEREGNUM)
 		return -1;
 	return cache[reg];
 }
@@ -128,7 +128,7 @@
 	u16 reg, unsigned int value)
 {
 	u16 *cache = codec->reg_cache;
-	if (reg > WM8731_CACHEREGNUM)
+	if (reg >= WM8731_CACHEREGNUM)
 		return;
 	cache[reg] = value;
 }
@@ -140,6 +140,8 @@
 	unsigned int value)
 {
 	u8 data[2];
+
+	printk("Reg Write: %x, %x\n",reg,value);
 	
 	/* data is 
 	 *   D15..D9 WM8753 register offset
@@ -340,9 +342,6 @@
 			break;
 	}
 	
-	if (wm8731_write(codec, WM8731_ACTIVE, 0x00) != 0)
-		return -EIO;
-
 	/* set rate */
 	wm8731_write(codec, WM8731_SRATE, pcm_c->hw_runtime.priv1);
 	wm8731_write(codec, WM8731_IFACE, iface);
@@ -371,7 +370,7 @@
 			wm8731_write(codec, WM8731_PWR, 0xffff);
 			break;
 	}
-
+	codec->dpm_state = event;
 	return 0;
 }
 
@@ -418,6 +417,16 @@
 {
 	struct snd_soc_platdev_data *devdata = platform_get_drvdata(pdev);
 	struct snd_soc_codec* codec = devdata->codec;
+	int i;
+	u8 data[2];
+	u16 *cache = codec->reg_cache;
+
+	/* Sync reg_cache with the hardware */
+	for (i = 0; i < WM8731_CACHEREGNUM; i++) {
+		data[0] = (i << 1) | ((cache[i] >> 8) & 0x0001);
+		data[1] = cache[i] & 0x00ff;
+		codec->hw_write(codec->control_data, data, 2);
+	}
 
 	wm8731_dpm_event(codec, SNDRV_CTL_POWER_D3hot);
 	return 0;
@@ -469,6 +478,10 @@
 	wm8731_add_widgets(codec);
 	snd_soc_register_card(codec);
 
+	/* wait for caps to finish charging - liam make this timer in the core */
+	ssleep(1);
+	wm8731_dpm_event(codec, SNDRV_CTL_POWER_D3hot);
+
 	return 0;
 }
 
Index: linux-2.6.15-rc2/sound/soc/pxa/pxa2xx-i2s.c
===================================================================
--- linux-2.6.15-rc2.orig/sound/soc/pxa/pxa2xx-i2s.c	2005-12-02 23:43:48.000000000 +0000
+++ linux-2.6.15-rc2/sound/soc/pxa/pxa2xx-i2s.c	2005-12-04 16:48:04.000000000 +0000
@@ -256,18 +256,15 @@
 		return 0;
 		
 	/* restore registers and enable link*/
-	pxa_gpio_mode(gpio_bus[pxa_i2s.master].rx);
-	pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx);
-	pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm);
-	pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk);
 	pxa_set_cken(CKEN8_I2S, 1);
 	pxa_i2s_wait();
-	
+
 	SACR0 = pxa_i2s.sacr0;
 	SACR1 = pxa_i2s.sacr1;
 	SAIMR = pxa_i2s.saimr;
 	SADIV = pxa_i2s.sadiv;
 	SACR0 |= SACR0_ENB;
+
 	return 0;
 }
 
Index: linux-2.6.15-rc2/sound/soc/pxa/pxa2xx-pcm.c
===================================================================
--- linux-2.6.15-rc2.orig/sound/soc/pxa/pxa2xx-pcm.c	2005-12-02 23:42:45.000000000 +0000
+++ linux-2.6.15-rc2/sound/soc/pxa/pxa2xx-pcm.c	2005-12-04 15:54:33.000000000 +0000
@@ -386,25 +386,11 @@
 
 struct snd_soc_platform pxa2xx_soc_platform = {
 	.name		= "pxa2xx-audio",
-//	.bus		= &platform_bus_type,
 	.pcm_ops 	= &pxa2xx_pcm_ops,
 	.pcm_new	= pxa2xx_pcm_new,
 	.pcm_free	= pxa2xx_pcm_free_dma_buffers,
 	.suspend	= pxa2xx_pcm_suspend,
 	.resume		= pxa2xx_pcm_resume,
-	.iface = {
-#ifdef CONFIG_SND_PXA2xx_SOC_AC97
-		&pxa_ac97_interface,
-#endif
-#ifdef CONFIG_SND_PXA2xx_SOC_I2S
-		&pxa_i2s_interface,
-#endif
-#ifdef CONFIG_SND_PXA2xx_SOC_SSP
-		&pxa_ssp_interface[0],
-		&pxa_ssp_interface[1],
-		&pxa_ssp_interface[2],
-#endif
-		NULL,},
 };
 
 EXPORT_SYMBOL_GPL(pxa2xx_soc_platform);
Index: linux-2.6.15-rc2/sound/soc/soc-core.c
===================================================================
--- linux-2.6.15-rc2.orig/sound/soc/soc-core.c	2005-12-04 00:39:48.000000000 +0000
+++ linux-2.6.15-rc2/sound/soc/soc-core.c	2005-12-04 16:49:01.000000000 +0000
@@ -469,11 +469,12 @@
 	struct snd_soc_codec_device* codec_dev = devdata->codec_dev;
 	int i;
 	
-	for (i = 0; platform->iface[i] != NULL; i++) {
+	for(i = 0; i < machine->nconfigs; i++) {
+		struct snd_soc_pcm_interface  *iface = machine->config[i].iface;
 		if (platform->suspend)
-			platform->suspend(pdev, platform->iface[i]);
-		if (platform->iface[i]->suspend)
-			platform->iface[i]->suspend(pdev, platform->iface[i]);
+			platform->suspend(pdev, iface);
+		if (iface->suspend)
+			iface->suspend(pdev, iface);
 	}
 
 	if (codec_dev->suspend)
@@ -499,11 +500,12 @@
 	if (codec_dev->resume)
 		codec_dev->resume(pdev);
 		
-	for (i = 0; platform->iface[i] != NULL; i++) {
-		if(platform->iface[i]->resume)
-			platform->iface[i]->resume(pdev, platform->iface[i]);
-		if(platform->resume)
-			platform->resume(pdev, platform->iface[i]);
+	for(i = 0; i < machine->nconfigs; i++) {
+		struct snd_soc_pcm_interface  *iface = machine->config[i].iface;
+		if (iface->resume)
+			iface->resume(pdev, iface);
+		if (platform->resume)
+			platform->resume(pdev, iface);
 	}
 
 	return 0;
@@ -531,18 +533,19 @@
 	if (platform->probe && ((ret = platform->probe(pdev)) < 0))
 		goto platform_err;
 
-	for (i = 0; platform->iface[i] != NULL; i++) {
-		if(platform->iface[i]->probe && 
-			((ret = platform->iface[i]->probe(pdev)) < 0))
-				goto iface_err;
+	for (i = 0; i < machine->nconfigs; i++) {
+		struct snd_soc_pcm_interface  *iface = machine->config[i].iface;
+		if (iface->probe && ((ret = iface->probe(pdev)) < 0))
+			goto iface_err;
 	}
 
 	return 0;
 
 iface_err:
-	for (; i > 0; --i){
-		if(platform->iface[i]->remove) 
-			platform->iface[i]->remove(pdev);
+	for (; i > 0; --i) {
+		struct snd_soc_pcm_interface  *iface = machine->config[i].iface;
+		if (iface->remove)
+			iface->remove(pdev);
 	}
 	
 	if (platform->remove)
@@ -565,9 +568,10 @@
 	struct snd_soc_platform *platform = devdata->platform;
 	struct snd_soc_codec_device* codec_dev = devdata->codec_dev;
 
-	for (i = 0; platform->iface[i] != NULL; i++) {
-		if(platform->iface[i]->remove)
-			platform->iface[i]->remove(pdev);
+	for (i = 0; i < machine->nconfigs; i++) {
+		struct snd_soc_pcm_interface  *iface = machine->config[i].iface;
+		if (iface->remove)
+			iface->remove(pdev);
 	}
 
 	if (platform->remove)
