ASoC: Intel: Skylake: Fix to remove be copier widget power check
authorJeeja KP <jeeja.kp@intel.com>
Tue, 27 Oct 2015 00:22:54 +0000 (09:22 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 16 Nov 2015 10:08:09 +0000 (10:08 +0000)
ASoC core already checks if BE is active. If BE is active,
hw_params callback is ignored.
This patch removes the redundant check in driver for copier
widget power check in update be hw_params.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c

index 2f263ddd696deb3ac560b5da0c612554c32cdb93..7311cd317d872f8795c2ae7db41d04b499f9f402 100644 (file)
@@ -950,18 +950,13 @@ static int skl_tplg_be_set_src_pipe_params(struct snd_soc_dai *dai,
                if (p->connect && is_skl_dsp_widget_type(p->source) &&
                                                p->source->priv) {
 
-                       if (!p->source->power) {
-                               ret = skl_tplg_be_fill_pipe_params(
-                                               dai, p->source->priv,
-                                               params);
-                               if (ret < 0)
-                                       return ret;
-                       } else {
-                               return -EBUSY;
-                       }
+                       ret = skl_tplg_be_fill_pipe_params(dai,
+                                               p->source->priv, params);
+                       if (ret < 0)
+                               return ret;
                } else {
-                       ret = skl_tplg_be_set_src_pipe_params(
-                                               dai, p->source, params);
+                       ret = skl_tplg_be_set_src_pipe_params(dai,
+                                               p->source, params);
                        if (ret < 0)
                                return ret;
                }
@@ -980,15 +975,10 @@ static int skl_tplg_be_set_sink_pipe_params(struct snd_soc_dai *dai,
                if (p->connect && is_skl_dsp_widget_type(p->sink) &&
                                                p->sink->priv) {
 
-                       if (!p->sink->power) {
-                               ret = skl_tplg_be_fill_pipe_params(
-                                               dai, p->sink->priv, params);
-                               if (ret < 0)
-                                       return ret;
-                       } else {
-                               return -EBUSY;
-                       }
-
+                       ret = skl_tplg_be_fill_pipe_params(dai,
+                                               p->sink->priv, params);
+                       if (ret < 0)
+                               return ret;
                } else {
                        ret = skl_tplg_be_set_sink_pipe_params(
                                                dai, p->sink, params);