Merge branch 'for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
authorMark Brown <broonie@kernel.org>
Tue, 10 Dec 2019 13:27:14 +0000 (13:27 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 10 Dec 2019 13:27:14 +0000 (13:27 +0000)
1  2 
include/sound/soc.h
sound/soc/codecs/max98090.c
sound/soc/codecs/max98090.h
sound/soc/codecs/rt5682.c
sound/soc/codecs/wm8904.c
sound/soc/intel/boards/bytcr_rt5640.c
sound/soc/soc-core.c
sound/soc/soc-pcm.c
sound/soc/soc-topology.c
sound/soc/sof/intel/byt.c
sound/soc/sof/topology.c

Simple merge
@@@ -2305,17 -2114,29 +2305,31 @@@ static void max98090_pll_work(struct ma
  
        dev_info_ratelimited(component->dev, "PLL unlocked\n");
  
+       /*
+        * As the datasheet suggested, the maximum PLL lock time should be
+        * 7 msec.  The workaround resets the codec softly by toggling SHDN
+        * off and on if PLL failed to lock for 10 msec.  Notably, there is
+        * no suggested hold time for SHDN off.
+        */
        /* Toggle shutdown OFF then ON */
 +      mutex_lock(&component->card->dapm_mutex);
        snd_soc_component_update_bits(component, M98090_REG_DEVICE_SHUTDOWN,
                            M98090_SHDNN_MASK, 0);
-       msleep(10);
        snd_soc_component_update_bits(component, M98090_REG_DEVICE_SHUTDOWN,
                            M98090_SHDNN_MASK, M98090_SHDNN_MASK);
 +      mutex_unlock(&component->card->dapm_mutex);
  
-       /* Give PLL time to lock */
-       msleep(10);
+       for (i = 0; i < 10; ++i) {
+               /* Give PLL time to lock */
+               usleep_range(1000, 1200);
+               /* Check lock status */
+               pll = snd_soc_component_read32(
+                               component, M98090_REG_DEVICE_STATUS);
+               if (!(pll & M98090_ULK_MASK))
+                       break;
+       }
  }
  
  static void max98090_jack_work(struct work_struct *work)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1935,11 -1933,13 +1935,13 @@@ static int soc_tplg_fe_link_create(stru
        ret = soc_tplg_dai_link_load(tplg, link, NULL);
        if (ret < 0) {
                dev_err(tplg->comp->dev, "ASoC: FE link loading failed\n");
-               kfree(link->name);
-               kfree(link->stream_name);
-               kfree(link->cpus->dai_name);
-               kfree(link);
-               return ret;
+               goto err;
+       }
 -      ret = snd_soc_add_dai_link(tplg->comp->card, link);
++      ret = snd_soc_add_pcm_runtime(tplg->comp->card, link);
+       if (ret < 0) {
+               dev_err(tplg->comp->dev, "ASoC: adding FE link failed\n");
+               goto err;
        }
  
        link->dobj.index = tplg->index;
Simple merge
Simple merge