aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra/tegra_wm8753.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/tegra/tegra_wm8753.c')
-rw-r--r--sound/soc/tegra/tegra_wm8753.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c
index 23a810e3bacc..f6dd790dad71 100644
--- a/sound/soc/tegra/tegra_wm8753.c
+++ b/sound/soc/tegra/tegra_wm8753.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* tegra_wm8753.c - Tegra machine ASoC driver for boards using WM8753 codec.
*
@@ -11,21 +12,6 @@
* Copyright 2007 Wolfson Microelectronics PLC.
* Author: Graeme Gregory
* graeme.gregory@wolfsonmicro.com or linux@wolfsonmicro.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- *
*/
#include <linux/module.h>
@@ -98,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 = {
@@ -142,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)