Merge tag 'v4.0-rc3' into asoc-rt5670
authorMark Brown <broonie@kernel.org>
Tue, 10 Mar 2015 10:37:02 +0000 (10:37 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 10 Mar 2015 10:37:02 +0000 (10:37 +0000)
Linux 4.0-rc3

Conflicts:
sound/soc/codecs/rt5670.c

sound/soc/codecs/rt5670.c
sound/soc/codecs/rt5670.h

index fd10261..1a6a9c4 100644 (file)
@@ -516,12 +516,10 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w,
 static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source,
                         struct snd_soc_dapm_widget *sink)
 {
-       struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm);
-       unsigned int val;
+       struct snd_soc_codec *codec = source->codec;
+       struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec);
 
-       val = snd_soc_read(codec, RT5670_GLB_CLK);
-       val &= RT5670_SCLK_SRC_MASK;
-       if (val == RT5670_SCLK_SRC_PLL1)
+       if (rt5670->sysclk_src == RT5670_SCLK_S_PLL1)
                return 1;
        else
                return 0;
@@ -2271,16 +2269,6 @@ static int rt5670_set_dai_sysclk(struct snd_soc_dai *dai,
        struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec);
        unsigned int reg_val = 0;
 
-       if (freq == rt5670->sysclk && clk_id == rt5670->sysclk_src)
-               return 0;
-
-       if (rt5670->pdata.jd_mode) {
-               if (clk_id == RT5670_SCLK_S_PLL1)
-                       snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1");
-               else
-                       snd_soc_dapm_disable_pin(&codec->dapm, "PLL1");
-               snd_soc_dapm_sync(&codec->dapm);
-       }
        switch (clk_id) {
        case RT5670_SCLK_S_MCLK:
                reg_val |= RT5670_SCLK_SRC_MCLK;
@@ -2298,7 +2286,8 @@ static int rt5670_set_dai_sysclk(struct snd_soc_dai *dai,
        snd_soc_update_bits(codec, RT5670_GLB_CLK,
                RT5670_SCLK_SRC_MASK, reg_val);
        rt5670->sysclk = freq;
-       rt5670->sysclk_src = clk_id;
+       if (clk_id != RT5670_SCLK_S_RCCLK)
+               rt5670->sysclk_src = clk_id;
 
        dev_dbg(dai->dev, "Sysclk is %dHz and clock id is %d\n", freq, clk_id);
 
index 21f8e18..0a67adb 100644 (file)
@@ -1950,17 +1950,20 @@ enum {
 };
 
 enum {
+       RT5670_DMIC1_DISABLED,
        RT5670_DMIC_DATA_GPIO6,
        RT5670_DMIC_DATA_IN2P,
        RT5670_DMIC_DATA_GPIO7,
 };
 
 enum {
+       RT5670_DMIC2_DISABLED,
        RT5670_DMIC_DATA_GPIO8,
        RT5670_DMIC_DATA_IN3N,
 };
 
 enum {
+       RT5670_DMIC3_DISABLED,
        RT5670_DMIC_DATA_GPIO9,
        RT5670_DMIC_DATA_GPIO10,
        RT5670_DMIC_DATA_GPIO5,