From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH v2 094/146] ASoC: qcom: storm: use modern dai_link style Date: 06 Jun 2019 13:16:51 +0900 Message-ID: <87pnnrgy53.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 relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id F05B5F898FF for ; Thu, 6 Jun 2019 06:16:52 +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/qcom/storm.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sound/soc/qcom/storm.c b/sound/soc/qcom/storm.c index a9fa972..672edee 100644 --- a/sound/soc/qcom/storm.c +++ b/sound/soc/qcom/storm.c @@ -61,11 +61,16 @@ static const struct snd_soc_ops storm_soc_ops = { .hw_params = storm_ops_hw_params, }; +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link storm_dai_link = { .name = "Primary", .stream_name = "Primary", - .codec_dai_name = "HiFi", .ops = &storm_soc_ops, + SND_SOC_DAILINK_REG(hifi), }; static int storm_parse_of(struct snd_soc_card *card) @@ -73,15 +78,15 @@ static int storm_parse_of(struct snd_soc_card *card) struct snd_soc_dai_link *dai_link = card->dai_link; struct device_node *np = card->dev->of_node; - dai_link->cpu_of_node = of_parse_phandle(np, "cpu", 0); - if (!dai_link->cpu_of_node) { + dai_link->cpus->of_node = of_parse_phandle(np, "cpu", 0); + if (!dai_link->cpus->of_node) { dev_err(card->dev, "error getting cpu phandle\n"); return -EINVAL; } - dai_link->platform_of_node = dai_link->cpu_of_node; + dai_link->platforms->of_node = dai_link->cpus->of_node; - dai_link->codec_of_node = of_parse_phandle(np, "codec", 0); - if (!dai_link->codec_of_node) { + dai_link->codecs->of_node = of_parse_phandle(np, "codec", 0); + if (!dai_link->codecs->of_node) { dev_err(card->dev, "error getting codec phandle\n"); return -EINVAL; } -- 2.7.4