ASoC: Intel: Skylake: Add dai load ops for dais from topology
authorGuneshwor Singh <guneshwor.o.singh@intel.com>
Mon, 9 Oct 2017 05:50:31 +0000 (11:20 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 13 Oct 2017 19:25:20 +0000 (20:25 +0100)
Since FE dais can come from topology, add dai_load ops
for the dais from topology.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-pcm.c
sound/soc/intel/skylake/skl-topology.c
sound/soc/intel/skylake/skl-topology.h

index 9ca69b1fc12807080f85050588f4a121a1c3e70d..4380e40c6af085d6f05c833707e64dfe6d7ed7e3 100644 (file)
@@ -977,6 +977,14 @@ static struct snd_soc_dai_driver skl_platform_dai[] = {
 },
 };
 
+int skl_dai_load(struct snd_soc_component *cmp,
+                struct snd_soc_dai_driver *pcm_dai)
+{
+       pcm_dai->ops = &skl_pcm_dai_ops;
+
+       return 0;
+}
+
 static int skl_platform_open(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
index 22f768ca3c73be752b208ac52b06ed52be53bada..ff4f53cdc0a1a5389f0099215e801363d66927c5 100644 (file)
@@ -3331,6 +3331,7 @@ static struct snd_soc_tplg_ops skl_tplg_ops  = {
        .io_ops = skl_tplg_kcontrol_ops,
        .io_ops_count = ARRAY_SIZE(skl_tplg_kcontrol_ops),
        .manifest = skl_manifest_load,
+       .dai_load = skl_dai_load,
 };
 
 /*
index e11cc1fc0e43550c7bdd569a0f3a64003acc756b..d116599bfdd705369c634f0d0c1c2a88b065d140 100644 (file)
@@ -501,4 +501,7 @@ int skl_pcm_host_dma_prepare(struct device *dev,
                        struct skl_pipe_params *params);
 int skl_pcm_link_dma_prepare(struct device *dev,
                        struct skl_pipe_params *params);
+
+int skl_dai_load(struct snd_soc_component *cmp,
+                struct snd_soc_dai_driver *pcm_dai);
 #endif