From patchwork Mon Apr 8 02:32:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10888745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 273D3922 for ; Mon, 8 Apr 2019 02:35:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B3CE28617 for ; Mon, 8 Apr 2019 02:35:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F41812861C; Mon, 8 Apr 2019 02:35:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4721828617 for ; Mon, 8 Apr 2019 02:35:48 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8BC6C15EE; Mon, 8 Apr 2019 04:34:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8BC6C15EE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1554690946; bh=PEEsEqivNBiJM3telM+7+qQwUlCo7SpDF0XADOx0ULg=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WoaTd2zmY068j+by6gv8HeHPA75G+yMaEWsPD4quejIJxYM9O8DAHpPuMyQqPUyma EHM5/+TNa5GTyqeQWXHFse+L6ZzmaBqvUDahZfA7D/s9rhdXDKRB3SL7C06xorR6P3 AdgCvf0htPt146d6hkaWCXH7HMtEtk6/YfYag2No= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8BC5CF8972F; Mon, 8 Apr 2019 04:32:09 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 536B5F8972C; Mon, 8 Apr 2019 04:32:06 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id CC3CDF89725 for ; Mon, 8 Apr 2019 04:32:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CC3CDF89725 Date: 08 Apr 2019 11:32:00 +0900 X-IronPort-AV: E=Sophos;i="5.60,323,1549897200"; d="scan'208";a="12353960" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 08 Apr 2019 11:32:00 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 589554001DA2; Mon, 8 Apr 2019 11:32:00 +0900 (JST) Message-ID: <87sgut44u5.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.5 Mule/6.0 To: Mark Brown In-Reply-To: <87zhp144vs.wl-kuninori.morimoto.gx@renesas.com> References: <87zhp144vs.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 5/7][RFC] ASoC: samsung: smdk_wm8994: use modern dai_link style X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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/samsung/smdk_wm8994.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c index ff57b19..f090a08 100644 --- a/sound/soc/samsung/smdk_wm8994.c +++ b/sound/soc/samsung/smdk_wm8994.c @@ -107,28 +107,32 @@ static int smdk_wm8994_init_paiftx(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAI_LINK_CCP(aif1, + SND_SOC_DAI_LINK(SDL_CPU("samsung-i2s.0")), + SND_SOC_DAI_LINK(SDL_CODEC("wm8994-codec", "wm8994-aif1")), + SND_SOC_DAI_LINK(SDL_PLATFORM("samsung-i2s.0"))); + +SND_SOC_DAI_LINK_CCP(fifo_tx, + SND_SOC_DAI_LINK(SDL_CPU("samsung-i2s-sec")), + SND_SOC_DAI_LINK(SDL_CODEC("wm8994-codec", "wm8994-aif1")), + SND_SOC_DAI_LINK(SDL_PLATFORM("samsung-i2s-sec"))); + static struct snd_soc_dai_link smdk_dai[] = { { /* Primary DAI i/f */ .name = "WM8994 AIF1", .stream_name = "Pri_Dai", - .cpu_dai_name = "samsung-i2s.0", - .codec_dai_name = "wm8994-aif1", - .platform_name = "samsung-i2s.0", - .codec_name = "wm8994-codec", .init = smdk_wm8994_init_paiftx, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &smdk_ops, + SND_SOC_LINK_CCP(aif1), }, { /* Sec_Fifo Playback i/f */ .name = "Sec_FIFO TX", .stream_name = "Sec_Dai", - .cpu_dai_name = "samsung-i2s-sec", - .codec_dai_name = "wm8994-aif1", - .platform_name = "samsung-i2s-sec", - .codec_name = "wm8994-codec", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &smdk_ops, + SND_SOC_LINK_CCP(fifo_tx), }, }; @@ -160,17 +164,17 @@ static int smdk_audio_probe(struct platform_device *pdev) return -ENOMEM; if (np) { - smdk_dai[0].cpu_dai_name = NULL; - smdk_dai[0].cpu_of_node = of_parse_phandle(np, + smdk_dai[0].cpus->dai_name = NULL; + smdk_dai[0].cpus->of_node = of_parse_phandle(np, "samsung,i2s-controller", 0); - if (!smdk_dai[0].cpu_of_node) { + if (!smdk_dai[0].cpus->of_node) { dev_err(&pdev->dev, "Property 'samsung,i2s-controller' missing or invalid\n"); ret = -EINVAL; } - smdk_dai[0].platform_name = NULL; - smdk_dai[0].platform_of_node = smdk_dai[0].cpu_of_node; + smdk_dai[0].platforms->name = NULL; + smdk_dai[0].platforms->of_node = smdk_dai[0].cpus->of_node; } id = of_match_device(of_match_ptr(samsung_wm8994_of_match), &pdev->dev);