aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r--sound/soc/tegra/Makefile2
-rw-r--r--sound/soc/tegra/tegra_alc5632.c37
-rw-r--r--sound/soc/tegra/tegra_max98090.c17
-rw-r--r--sound/soc/tegra/tegra_rt5640.c17
-rw-r--r--sound/soc/tegra/tegra_rt5677.c37
-rw-r--r--sound/soc/tegra/tegra_sgtl5000.c37
-rw-r--r--sound/soc/tegra/tegra_wm8753.c17
-rw-r--r--sound/soc/tegra/tegra_wm8903.c17
-rw-r--r--sound/soc/tegra/tegra_wm9712.c14
-rw-r--r--sound/soc/tegra/trimslice.c19
10 files changed, 129 insertions, 85 deletions
diff --git a/sound/soc/tegra/Makefile b/sound/soc/tegra/Makefile
index 2329b72c93e3..c84f183919f2 100644
--- a/sound/soc/tegra/Makefile
+++ b/sound/soc/tegra/Makefile
@@ -37,4 +37,4 @@ obj-$(CONFIG_SND_SOC_TEGRA_WM9712) += snd-soc-tegra-wm9712.o
obj-$(CONFIG_SND_SOC_TEGRA_TRIMSLICE) += snd-soc-tegra-trimslice.o
obj-$(CONFIG_SND_SOC_TEGRA_ALC5632) += snd-soc-tegra-alc5632.o
obj-$(CONFIG_SND_SOC_TEGRA_MAX98090) += snd-soc-tegra-max98090.o
-obj-$(CONFIG_SND_SOC_TEGRA_SGTL5000) += snd-soc-tegra-sgtl5000.o \ No newline at end of file
+obj-$(CONFIG_SND_SOC_TEGRA_SGTL5000) += snd-soc-tegra-sgtl5000.o
diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c
index ca42d8d20690..9e8b1497efd3 100644
--- a/sound/soc/tegra/tegra_alc5632.c
+++ b/sound/soc/tegra/tegra_alc5632.c
@@ -121,15 +121,20 @@ static int tegra_alc5632_asoc_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
+SND_SOC_DAILINK_DEFS(pcm,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "alc5632-hifi")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
static struct snd_soc_dai_link tegra_alc5632_dai = {
.name = "ALC5632",
.stream_name = "ALC5632 PCM",
- .codec_dai_name = "alc5632-hifi",
.init = tegra_alc5632_asoc_init,
.ops = &tegra_alc5632_asoc_ops,
.dai_fmt = SND_SOC_DAIFMT_I2S
| SND_SOC_DAIFMT_NB_NF
| SND_SOC_DAIFMT_CBS_CFS,
+ SND_SOC_DAILINK_REG(pcm),
};
static struct snd_soc_card snd_soc_tegra_alc5632 = {
@@ -171,26 +176,26 @@ static int tegra_alc5632_probe(struct platform_device *pdev)
if (ret)
goto err;
- tegra_alc5632_dai.codec_of_node = of_parse_phandle(
+ tegra_alc5632_dai.codecs->of_node = of_parse_phandle(
pdev->dev.of_node, "nvidia,audio-codec", 0);
- if (!tegra_alc5632_dai.codec_of_node) {
+ if (!tegra_alc5632_dai.codecs->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,audio-codec' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_alc5632_dai.cpu_of_node = of_parse_phandle(np,
+ tegra_alc5632_dai.cpus->of_node = of_parse_phandle(np,
"nvidia,i2s-controller", 0);
- if (!tegra_alc5632_dai.cpu_of_node) {
+ if (!tegra_alc5632_dai.cpus->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,i2s-controller' missing or invalid\n");
ret = -EINVAL;
goto err_put_codec_of_node;
}
- tegra_alc5632_dai.platform_of_node = tegra_alc5632_dai.cpu_of_node;
+ tegra_alc5632_dai.platforms->of_node = tegra_alc5632_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&alc5632->util_data, &pdev->dev);
if (ret)
@@ -208,12 +213,12 @@ static int tegra_alc5632_probe(struct platform_device *pdev)
err_fini_utils:
tegra_asoc_utils_fini(&alc5632->util_data);
err_put_cpu_of_node:
- of_node_put(tegra_alc5632_dai.cpu_of_node);
- tegra_alc5632_dai.cpu_of_node = NULL;
- tegra_alc5632_dai.platform_of_node = NULL;
+ of_node_put(tegra_alc5632_dai.cpus->of_node);
+ tegra_alc5632_dai.cpus->of_node = NULL;
+ tegra_alc5632_dai.platforms->of_node = NULL;
err_put_codec_of_node:
- of_node_put(tegra_alc5632_dai.codec_of_node);
- tegra_alc5632_dai.codec_of_node = NULL;
+ of_node_put(tegra_alc5632_dai.codecs->of_node);
+ tegra_alc5632_dai.codecs->of_node = NULL;
err:
return ret;
}
@@ -227,11 +232,11 @@ static int tegra_alc5632_remove(struct platform_device *pdev)
tegra_asoc_utils_fini(&machine->util_data);
- of_node_put(tegra_alc5632_dai.cpu_of_node);
- tegra_alc5632_dai.cpu_of_node = NULL;
- tegra_alc5632_dai.platform_of_node = NULL;
- of_node_put(tegra_alc5632_dai.codec_of_node);
- tegra_alc5632_dai.codec_of_node = NULL;
+ of_node_put(tegra_alc5632_dai.cpus->of_node);
+ tegra_alc5632_dai.cpus->of_node = NULL;
+ tegra_alc5632_dai.platforms->of_node = NULL;
+ of_node_put(tegra_alc5632_dai.codecs->of_node);
+ tegra_alc5632_dai.codecs->of_node = NULL;
return 0;
}
diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c
index c17105b8d7da..4954a33ff46b 100644
--- a/sound/soc/tegra/tegra_max98090.c
+++ b/sound/soc/tegra/tegra_max98090.c
@@ -165,14 +165,19 @@ static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
+SND_SOC_DAILINK_DEFS(pcm,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
static struct snd_soc_dai_link tegra_max98090_dai = {
.name = "max98090",
.stream_name = "max98090 PCM",
- .codec_dai_name = "HiFi",
.init = tegra_max98090_asoc_init,
.ops = &tegra_max98090_ops,
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
+ SND_SOC_DAILINK_REG(pcm),
};
static struct snd_soc_card snd_soc_tegra_max98090 = {
@@ -219,25 +224,25 @@ static int tegra_max98090_probe(struct platform_device *pdev)
if (ret)
goto err;
- tegra_max98090_dai.codec_of_node = of_parse_phandle(np,
+ tegra_max98090_dai.codecs->of_node = of_parse_phandle(np,
"nvidia,audio-codec", 0);
- if (!tegra_max98090_dai.codec_of_node) {
+ if (!tegra_max98090_dai.codecs->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,audio-codec' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_max98090_dai.cpu_of_node = of_parse_phandle(np,
+ tegra_max98090_dai.cpus->of_node = of_parse_phandle(np,
"nvidia,i2s-controller", 0);
- if (!tegra_max98090_dai.cpu_of_node) {
+ if (!tegra_max98090_dai.cpus->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,i2s-controller' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_max98090_dai.platform_of_node = tegra_max98090_dai.cpu_of_node;
+ tegra_max98090_dai.platforms->of_node = tegra_max98090_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
if (ret)
diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c
index dc6fbf7b4d11..d46915a3ec4c 100644
--- a/sound/soc/tegra/tegra_rt5640.c
+++ b/sound/soc/tegra/tegra_rt5640.c
@@ -115,14 +115,19 @@ static int tegra_rt5640_asoc_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
+SND_SOC_DAILINK_DEFS(aif1,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5640-aif1")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
static struct snd_soc_dai_link tegra_rt5640_dai = {
.name = "RT5640",
.stream_name = "RT5640 PCM",
- .codec_dai_name = "rt5640-aif1",
.init = tegra_rt5640_asoc_init,
.ops = &tegra_rt5640_ops,
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
+ SND_SOC_DAILINK_REG(aif1),
};
static struct snd_soc_card snd_soc_tegra_rt5640 = {
@@ -165,25 +170,25 @@ static int tegra_rt5640_probe(struct platform_device *pdev)
if (ret)
goto err;
- tegra_rt5640_dai.codec_of_node = of_parse_phandle(np,
+ tegra_rt5640_dai.codecs->of_node = of_parse_phandle(np,
"nvidia,audio-codec", 0);
- if (!tegra_rt5640_dai.codec_of_node) {
+ if (!tegra_rt5640_dai.codecs->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,audio-codec' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_rt5640_dai.cpu_of_node = of_parse_phandle(np,
+ tegra_rt5640_dai.cpus->of_node = of_parse_phandle(np,
"nvidia,i2s-controller", 0);
- if (!tegra_rt5640_dai.cpu_of_node) {
+ if (!tegra_rt5640_dai.cpus->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,i2s-controller' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_rt5640_dai.platform_of_node = tegra_rt5640_dai.cpu_of_node;
+ tegra_rt5640_dai.platforms->of_node = tegra_rt5640_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
if (ret)
diff --git a/sound/soc/tegra/tegra_rt5677.c b/sound/soc/tegra/tegra_rt5677.c
index 39fe7e324e8b..81cb6cc6236e 100644
--- a/sound/soc/tegra/tegra_rt5677.c
+++ b/sound/soc/tegra/tegra_rt5677.c
@@ -158,14 +158,19 @@ static int tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
+SND_SOC_DAILINK_DEFS(pcm,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5677-aif1")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
static struct snd_soc_dai_link tegra_rt5677_dai = {
.name = "RT5677",
.stream_name = "RT5677 PCM",
- .codec_dai_name = "rt5677-aif1",
.init = tegra_rt5677_asoc_init,
.ops = &tegra_rt5677_ops,
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
+ SND_SOC_DAILINK_REG(pcm),
};
static struct snd_soc_card snd_soc_tegra_rt5677 = {
@@ -238,24 +243,24 @@ static int tegra_rt5677_probe(struct platform_device *pdev)
if (ret)
goto err;
- tegra_rt5677_dai.codec_of_node = of_parse_phandle(np,
+ tegra_rt5677_dai.codecs->of_node = of_parse_phandle(np,
"nvidia,audio-codec", 0);
- if (!tegra_rt5677_dai.codec_of_node) {
+ if (!tegra_rt5677_dai.codecs->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,audio-codec' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_rt5677_dai.cpu_of_node = of_parse_phandle(np,
+ tegra_rt5677_dai.cpus->of_node = of_parse_phandle(np,
"nvidia,i2s-controller", 0);
- if (!tegra_rt5677_dai.cpu_of_node) {
+ if (!tegra_rt5677_dai.cpus->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,i2s-controller' missing or invalid\n");
ret = -EINVAL;
goto err_put_codec_of_node;
}
- tegra_rt5677_dai.platform_of_node = tegra_rt5677_dai.cpu_of_node;
+ tegra_rt5677_dai.platforms->of_node = tegra_rt5677_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
if (ret)
@@ -273,12 +278,12 @@ static int tegra_rt5677_probe(struct platform_device *pdev)
err_fini_utils:
tegra_asoc_utils_fini(&machine->util_data);
err_put_cpu_of_node:
- of_node_put(tegra_rt5677_dai.cpu_of_node);
- tegra_rt5677_dai.cpu_of_node = NULL;
- tegra_rt5677_dai.platform_of_node = NULL;
+ of_node_put(tegra_rt5677_dai.cpus->of_node);
+ tegra_rt5677_dai.cpus->of_node = NULL;
+ tegra_rt5677_dai.platforms->of_node = NULL;
err_put_codec_of_node:
- of_node_put(tegra_rt5677_dai.codec_of_node);
- tegra_rt5677_dai.codec_of_node = NULL;
+ of_node_put(tegra_rt5677_dai.codecs->of_node);
+ tegra_rt5677_dai.codecs->of_node = NULL;
err:
return ret;
}
@@ -292,11 +297,11 @@ static int tegra_rt5677_remove(struct platform_device *pdev)
tegra_asoc_utils_fini(&machine->util_data);
- tegra_rt5677_dai.platform_of_node = NULL;
- of_node_put(tegra_rt5677_dai.codec_of_node);
- tegra_rt5677_dai.codec_of_node = NULL;
- of_node_put(tegra_rt5677_dai.cpu_of_node);
- tegra_rt5677_dai.cpu_of_node = NULL;
+ tegra_rt5677_dai.platforms->of_node = NULL;
+ of_node_put(tegra_rt5677_dai.codecs->of_node);
+ tegra_rt5677_dai.codecs->of_node = NULL;
+ of_node_put(tegra_rt5677_dai.cpus->of_node);
+ tegra_rt5677_dai.cpus->of_node = NULL;
return 0;
}
diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c
index c42ddfb14b64..e13b81d29cf3 100644
--- a/sound/soc/tegra/tegra_sgtl5000.c
+++ b/sound/soc/tegra/tegra_sgtl5000.c
@@ -81,13 +81,18 @@ static const struct snd_soc_dapm_widget tegra_sgtl5000_dapm_widgets[] = {
SND_SOC_DAPM_MIC("Mic Jack", NULL),
};
+SND_SOC_DAILINK_DEFS(hifi,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
static struct snd_soc_dai_link tegra_sgtl5000_dai = {
.name = "sgtl5000",
.stream_name = "HiFi",
- .codec_dai_name = "sgtl5000",
.ops = &tegra_sgtl5000_ops,
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
+ SND_SOC_DAILINK_REG(hifi),
};
static struct snd_soc_card snd_soc_tegra_sgtl5000 = {
@@ -123,25 +128,25 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
if (ret)
goto err;
- tegra_sgtl5000_dai.codec_of_node = of_parse_phandle(np,
+ tegra_sgtl5000_dai.codecs->of_node = of_parse_phandle(np,
"nvidia,audio-codec", 0);
- if (!tegra_sgtl5000_dai.codec_of_node) {
+ if (!tegra_sgtl5000_dai.codecs->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,audio-codec' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_sgtl5000_dai.cpu_of_node = of_parse_phandle(np,
+ tegra_sgtl5000_dai.cpus->of_node = of_parse_phandle(np,
"nvidia,i2s-controller", 0);
- if (!tegra_sgtl5000_dai.cpu_of_node) {
+ if (!tegra_sgtl5000_dai.cpus->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,i2s-controller' missing/invalid\n");
ret = -EINVAL;
goto err_put_codec_of_node;
}
- tegra_sgtl5000_dai.platform_of_node = tegra_sgtl5000_dai.cpu_of_node;
+ tegra_sgtl5000_dai.platforms->of_node = tegra_sgtl5000_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
if (ret)
@@ -159,12 +164,12 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
err_fini_utils:
tegra_asoc_utils_fini(&machine->util_data);
err_put_cpu_of_node:
- of_node_put(tegra_sgtl5000_dai.cpu_of_node);
- tegra_sgtl5000_dai.cpu_of_node = NULL;
- tegra_sgtl5000_dai.platform_of_node = NULL;
+ of_node_put(tegra_sgtl5000_dai.cpus->of_node);
+ tegra_sgtl5000_dai.cpus->of_node = NULL;
+ tegra_sgtl5000_dai.platforms->of_node = NULL;
err_put_codec_of_node:
- of_node_put(tegra_sgtl5000_dai.codec_of_node);
- tegra_sgtl5000_dai.codec_of_node = NULL;
+ of_node_put(tegra_sgtl5000_dai.codecs->of_node);
+ tegra_sgtl5000_dai.codecs->of_node = NULL;
err:
return ret;
}
@@ -179,11 +184,11 @@ static int tegra_sgtl5000_driver_remove(struct platform_device *pdev)
tegra_asoc_utils_fini(&machine->util_data);
- of_node_put(tegra_sgtl5000_dai.cpu_of_node);
- tegra_sgtl5000_dai.cpu_of_node = NULL;
- tegra_sgtl5000_dai.platform_of_node = NULL;
- of_node_put(tegra_sgtl5000_dai.codec_of_node);
- tegra_sgtl5000_dai.codec_of_node = NULL;
+ of_node_put(tegra_sgtl5000_dai.cpus->of_node);
+ tegra_sgtl5000_dai.cpus->of_node = NULL;
+ tegra_sgtl5000_dai.platforms->of_node = NULL;
+ of_node_put(tegra_sgtl5000_dai.codecs->of_node);
+ tegra_sgtl5000_dai.codecs->of_node = NULL;
return ret;
}
diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c
index 241215318f7b..f6dd790dad71 100644
--- a/sound/soc/tegra/tegra_wm8753.c
+++ b/sound/soc/tegra/tegra_wm8753.c
@@ -84,14 +84,19 @@ static const struct snd_soc_dapm_widget tegra_wm8753_dapm_widgets[] = {
SND_SOC_DAPM_MIC("Mic Jack", NULL),
};
+SND_SOC_DAILINK_DEFS(pcm,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8753-hifi")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
static struct snd_soc_dai_link tegra_wm8753_dai = {
.name = "WM8753",
.stream_name = "WM8753 PCM",
- .codec_dai_name = "wm8753-hifi",
.ops = &tegra_wm8753_ops,
.dai_fmt = SND_SOC_DAIFMT_I2S |
SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
+ SND_SOC_DAILINK_REG(pcm),
};
static struct snd_soc_card snd_soc_tegra_wm8753 = {
@@ -128,25 +133,25 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev)
if (ret)
goto err;
- tegra_wm8753_dai.codec_of_node = of_parse_phandle(np,
+ tegra_wm8753_dai.codecs->of_node = of_parse_phandle(np,
"nvidia,audio-codec", 0);
- if (!tegra_wm8753_dai.codec_of_node) {
+ if (!tegra_wm8753_dai.codecs->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,audio-codec' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_wm8753_dai.cpu_of_node = of_parse_phandle(np,
+ tegra_wm8753_dai.cpus->of_node = of_parse_phandle(np,
"nvidia,i2s-controller", 0);
- if (!tegra_wm8753_dai.cpu_of_node) {
+ if (!tegra_wm8753_dai.cpus->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,i2s-controller' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_wm8753_dai.platform_of_node = tegra_wm8753_dai.cpu_of_node;
+ tegra_wm8753_dai.platforms->of_node = tegra_wm8753_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
if (ret)
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index 4c94c39f14d6..6211dfda2195 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -195,15 +195,20 @@ static int tegra_wm8903_remove(struct snd_soc_card *card)
return 0;
}
+SND_SOC_DAILINK_DEFS(hifi,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8903-hifi")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
static struct snd_soc_dai_link tegra_wm8903_dai = {
.name = "WM8903",
.stream_name = "WM8903 PCM",
- .codec_dai_name = "wm8903-hifi",
.init = tegra_wm8903_init,
.ops = &tegra_wm8903_ops,
.dai_fmt = SND_SOC_DAIFMT_I2S |
SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
+ SND_SOC_DAILINK_REG(hifi),
};
static struct snd_soc_card snd_soc_tegra_wm8903 = {
@@ -302,25 +307,25 @@ static int tegra_wm8903_driver_probe(struct platform_device *pdev)
if (ret)
goto err;
- tegra_wm8903_dai.codec_of_node = of_parse_phandle(np,
+ tegra_wm8903_dai.codecs->of_node = of_parse_phandle(np,
"nvidia,audio-codec", 0);
- if (!tegra_wm8903_dai.codec_of_node) {
+ if (!tegra_wm8903_dai.codecs->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,audio-codec' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_wm8903_dai.cpu_of_node = of_parse_phandle(np,
+ tegra_wm8903_dai.cpus->of_node = of_parse_phandle(np,
"nvidia,i2s-controller", 0);
- if (!tegra_wm8903_dai.cpu_of_node) {
+ if (!tegra_wm8903_dai.cpus->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,i2s-controller' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- tegra_wm8903_dai.platform_of_node = tegra_wm8903_dai.cpu_of_node;
+ tegra_wm8903_dai.platforms->of_node = tegra_wm8903_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
if (ret)
diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c
index 63b49a033535..b85bd9f89073 100644
--- a/sound/soc/tegra/tegra_wm9712.c
+++ b/sound/soc/tegra/tegra_wm9712.c
@@ -40,12 +40,16 @@ static int tegra_wm9712_init(struct snd_soc_pcm_runtime *rtd)
return snd_soc_dapm_force_enable_pin(&rtd->card->dapm, "Mic Bias");
}
+SND_SOC_DAILINK_DEFS(hifi,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-hifi")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
static struct snd_soc_dai_link tegra_wm9712_dai = {
.name = "AC97 HiFi",
.stream_name = "AC97 HiFi",
- .codec_dai_name = "wm9712-hifi",
- .codec_name = "wm9712-codec",
.init = tegra_wm9712_init,
+ SND_SOC_DAILINK_REG(hifi),
};
static struct snd_soc_card snd_soc_tegra_wm9712 = {
@@ -92,16 +96,16 @@ static int tegra_wm9712_driver_probe(struct platform_device *pdev)
if (ret)
goto codec_unregister;
- tegra_wm9712_dai.cpu_of_node = of_parse_phandle(np,
+ tegra_wm9712_dai.cpus->of_node = of_parse_phandle(np,
"nvidia,ac97-controller", 0);
- if (!tegra_wm9712_dai.cpu_of_node) {
+ if (!tegra_wm9712_dai.cpus->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,ac97-controller' missing or invalid\n");
ret = -EINVAL;
goto codec_unregister;
}
- tegra_wm9712_dai.platform_of_node = tegra_wm9712_dai.cpu_of_node;
+ tegra_wm9712_dai.platforms->of_node = tegra_wm9712_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
if (ret)
diff --git a/sound/soc/tegra/trimslice.c b/sound/soc/tegra/trimslice.c
index 47ed87d5fdd9..3f67ddd13674 100644
--- a/sound/soc/tegra/trimslice.c
+++ b/sound/soc/tegra/trimslice.c
@@ -77,14 +77,19 @@ static const struct snd_soc_dapm_route trimslice_audio_map[] = {
{"RLINEIN", NULL, "Line In"},
};
+SND_SOC_DAILINK_DEFS(single_dsp,
+ DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic23-hifi")),
+ DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
static struct snd_soc_dai_link trimslice_tlv320aic23_dai = {
.name = "TLV320AIC23",
.stream_name = "AIC23",
- .codec_dai_name = "tlv320aic23-hifi",
.ops = &trimslice_asoc_ops,
.dai_fmt = SND_SOC_DAIFMT_I2S |
SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
+ SND_SOC_DAILINK_REG(single_dsp),
};
static struct snd_soc_card snd_soc_trimslice = {
@@ -115,26 +120,26 @@ static int tegra_snd_trimslice_probe(struct platform_device *pdev)
card->dev = &pdev->dev;
snd_soc_card_set_drvdata(card, trimslice);
- trimslice_tlv320aic23_dai.codec_of_node = of_parse_phandle(np,
+ trimslice_tlv320aic23_dai.codecs->of_node = of_parse_phandle(np,
"nvidia,audio-codec", 0);
- if (!trimslice_tlv320aic23_dai.codec_of_node) {
+ if (!trimslice_tlv320aic23_dai.codecs->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,audio-codec' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- trimslice_tlv320aic23_dai.cpu_of_node = of_parse_phandle(np,
+ trimslice_tlv320aic23_dai.cpus->of_node = of_parse_phandle(np,
"nvidia,i2s-controller", 0);
- if (!trimslice_tlv320aic23_dai.cpu_of_node) {
+ if (!trimslice_tlv320aic23_dai.cpus->of_node) {
dev_err(&pdev->dev,
"Property 'nvidia,i2s-controller' missing or invalid\n");
ret = -EINVAL;
goto err;
}
- trimslice_tlv320aic23_dai.platform_of_node =
- trimslice_tlv320aic23_dai.cpu_of_node;
+ trimslice_tlv320aic23_dai.platforms->of_node =
+ trimslice_tlv320aic23_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&trimslice->util_data, &pdev->dev);
if (ret)