Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / sound / soc / codecs / wm8994.c
index cdfbfb6..e84a117 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
+#include <linux/slab.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
@@ -1710,6 +1711,8 @@ static int wm8994_write(struct snd_soc_codec *codec, unsigned int reg,
        if (!wm8994_volatile(reg))
                wm8994->reg_cache[reg] = value;
 
+       dev_dbg(codec->dev, "0x%x = 0x%x\n", reg, value);
+
        return wm8994_reg_write(codec->control_data, reg, value);
 }
 
@@ -1769,6 +1772,11 @@ static int configure_aif_clock(struct snd_soc_codec *codec, int aif)
                dev_dbg(codec->dev, "Dividing AIF%d clock to %dHz\n",
                        aif + 1, rate);
        }
+
+       if (rate && rate < 3000000)
+               dev_warn(codec->dev, "AIF%dCLK is %dHz, should be >=3MHz for optimal performance\n",
+                        aif + 1, rate);
+
        wm8994->aifclk[aif] = rate;
 
        snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1 + offset,
@@ -3541,6 +3549,9 @@ static int wm8994_resume(struct platform_device *pdev)
        wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
        for (i = 0; i < ARRAY_SIZE(wm8994->fll); i++) {
+               if (!wm8994->fll_suspend[i].out)
+                       continue;
+
                ret = wm8994_set_fll(&codec->dai[0], i + 1,
                                     wm8994->fll_suspend[i].src,
                                     wm8994->fll_suspend[i].in,