From patchwork Tue Apr 13 23:20:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 420248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89FAAC433ED for ; Tue, 13 Apr 2021 23:22:54 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E05AA61242 for ; Tue, 13 Apr 2021 23:22:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E05AA61242 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 63AD016D3; Wed, 14 Apr 2021 01:22:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 63AD016D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1618356172; bh=0LgLS8TSFc/GOwQzQ1aGDF0fPsyJj7QV8K7TuFwr4K4=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=gHR4f4D5W8t9ITd7W14H0r+E3K9di34gLfnhg9ulZG9dpgRAoesb6VgHL7KNVeBNC gdn5Od6X22v+LdbhYS8gJP+qrk3Vj/pMRRyRbTlfRmZ+eJtg18n01Cm/Vmxpe2r9WO higKUYTjImj8E9AONksVVX7O6EYzAUXkm6Lnr1VQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A5828F804AF; Wed, 14 Apr 2021 01:20:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D1FACF804B0; Wed, 14 Apr 2021 01:20:27 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 0C683F804AE for ; Wed, 14 Apr 2021 01:20:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0C683F804AE Date: 14 Apr 2021 08:20:20 +0900 X-IronPort-AV: E=Sophos;i="5.82,220,1613401200"; d="scan'208";a="77981019" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 14 Apr 2021 08:20:20 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 94D9A41139AA; Wed, 14 Apr 2021 08:20:20 +0900 (JST) Message-ID: <87k0p5zs97.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 5/5] ASoC: audio-graph: use simple_props_to_xxx() macro User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown In-Reply-To: <87r1jdzsaj.wl-kuninori.morimoto.gx@renesas.com> References: <87r1jdzsaj.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA 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" From: Kuninori Morimoto We shouldn't use dai_props->cpus/codecs directly, because these are array now to supporting multi CPU/Codec/Platform. This patch uses simple_props_to_xxx() macro for it. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 55384f1415b3..36b2ad7dd283 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -246,7 +246,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, dai_link->dynamic = 1; dai_link->dpcm_merged_format = 1; - dai = dai_props->cpu_dai; + dai = simple_props_to_dai_cpu(dai_props, 0); ret = asoc_simple_parse_dai(ep, cpus, &is_single_links); if (ret) @@ -288,8 +288,8 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, dai_link->no_pcm = 1; dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup; - dai = dai_props->codec_dai; - cconf = dai_props->codec_conf; + dai = simple_props_to_dai_codec(dai_props, 0); + cconf = simple_props_to_codec_conf(dai_props, 0); ret = asoc_simple_parse_dai(ep, codecs, NULL); if (ret < 0) @@ -355,8 +355,8 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv, struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link); struct device_node *top = dev->of_node; - struct asoc_simple_dai *cpu_dai = dai_props->cpu_dai; - struct asoc_simple_dai *codec_dai = dai_props->codec_dai; + struct asoc_simple_dai *cpu_dai = simple_props_to_dai_cpu(dai_props, 0); + struct asoc_simple_dai *codec_dai = simple_props_to_dai_codec(dai_props, 0); struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0); struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0); struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0);