Merge branch 'timers-ptp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / sound / soc / blackfin / bf5xx-ad1836.c
index 83012da9dfc24969c14d01de5ccd1e0bc047cbd7..ea4951cf5526d5871af7441430d583d81fd3749c 100644 (file)
 #include <asm/portmux.h>
 
 #include "../codecs/ad1836.h"
-#include "bf5xx-sport.h"
 
 #include "bf5xx-tdm-pcm.h"
 #include "bf5xx-tdm.h"
 
 static struct snd_soc_card bf5xx_ad1836;
 
-static int bf5xx_ad1836_startup(struct snd_pcm_substream *substream)
-{
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-
-       snd_soc_dai_set_drvdata(cpu_dai, sport_handle);
-       return 0;
-}
-
 static int bf5xx_ad1836_hw_params(struct snd_pcm_substream *substream,
        struct snd_pcm_hw_params *params)
 {
@@ -75,23 +65,33 @@ static int bf5xx_ad1836_hw_params(struct snd_pcm_substream *substream,
 }
 
 static struct snd_soc_ops bf5xx_ad1836_ops = {
-       .startup = bf5xx_ad1836_startup,
        .hw_params = bf5xx_ad1836_hw_params,
 };
 
-static struct snd_soc_dai_link bf5xx_ad1836_dai = {
-       .name = "ad1836",
-       .stream_name = "AD1836",
-       .cpu_dai_name = "bf5xx-tdm",
-       .codec_dai_name = "ad1836-hifi",
-       .platform_name = "bf5xx-tdm-pcm-audio",
-       .codec_name = "ad1836-codec.0",
-       .ops = &bf5xx_ad1836_ops,
+static struct snd_soc_dai_link bf5xx_ad1836_dai[] = {
+       {
+               .name = "ad1836",
+               .stream_name = "AD1836",
+               .cpu_dai_name = "bfin-tdm.0",
+               .codec_dai_name = "ad1836-hifi",
+               .platform_name = "bfin-tdm-pcm-audio",
+               .codec_name = "ad1836.0",
+               .ops = &bf5xx_ad1836_ops,
+       },
+       {
+               .name = "ad1836",
+               .stream_name = "AD1836",
+               .cpu_dai_name = "bfin-tdm.1",
+               .codec_dai_name = "ad1836-hifi",
+               .platform_name = "bfin-tdm-pcm-audio",
+               .codec_name = "ad1836.0",
+               .ops = &bf5xx_ad1836_ops,
+       },
 };
 
 static struct snd_soc_card bf5xx_ad1836 = {
-       .name = "bf5xx_ad1836",
-       .dai_link = &bf5xx_ad1836_dai,
+       .name = "bfin-ad1836",
+       .dai_link = &bf5xx_ad1836_dai[CONFIG_SND_BF5XX_SPORT_NUM],
        .num_links = 1,
 };