From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH v2 112/146] ASoC: tegra: tegra_wm9712: use modern dai_link style Date: 06 Jun 2019 13:19:05 +0900 Message-ID: <87y32ffjgx.wl-kuninori.morimoto.gx@renesas.com> References: <87h893mkvi.wl-kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id B551FF8994D for ; Thu, 6 Jun 2019 06:19:06 +0200 (CEST) In-Reply-To: <87h893mkvi.wl-kuninori.morimoto.gx@renesas.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" To: Mark Brown Cc: Linux-ALSA List-Id: alsa-devel@alsa-project.org From: Kuninori Morimoto ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto --- sound/soc/tegra/tegra_wm9712.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c index 63b49a0..b85bd9f 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) -- 2.7.4