From patchwork Wed May 22 03:38:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954741 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 2B56F912 for ; Wed, 22 May 2019 03:39:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 153DA28AA4 for ; Wed, 22 May 2019 03:39:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 042B728B3E; Wed, 22 May 2019 03:39:38 +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 1D56028AA4 for ; Wed, 22 May 2019 03:39:37 +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 5AF1D166D; Wed, 22 May 2019 05:38:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5AF1D166D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496375; bh=Ib3JZDuSPmunuI5Cyhek/sdjR502Ao2YLTiUlL5mdc8=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Mf7kMS93rl5WBjDjj0yzRjUFhVbLgQCaHdPi/MKf0nFK1TbUVEkIPu2+vLH4sWHKZ tg+W8V3Ng+cegpVPTcTynmJaFh9zPm1bK75ROoCKFp5wVLju+nveJv9ShoFI98uxLU Vv5h4VLdeLoR/jNYIMjeHH8PHtN2CLFdPuckrMow= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EA5B2F8972A; Wed, 22 May 2019 05:38:14 +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 F2D13F8972C; Wed, 22 May 2019 05:38:11 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id CAD3AF80C20 for ; Wed, 22 May 2019 05:38:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CAD3AF80C20 Date: 22 May 2019 12:38:05 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627147" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:38:05 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 8E517416FA6F; Wed, 22 May 2019 12:38:05 +0900 (JST) Message-ID: <87r28rp3yo.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 001/145] ASoC: soc-core: use snd_soc_dai_link_component for CPU 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 From: Kuninori Morimoto current ALSA SoC is starting to support modern style dai_linke (= struct snd_soc_dai_link_component) which is mainly used for multipul DAI/component connection. Now Codec has full multi-codec support, Platform is using modern style but still for single Platform. Only CPU is not yet supporting modern style yet. If we could support it for CPU, we can switch to modern style dai_link on all CPU/Codec/Platform, and remove legacy style from ALSA SoC. Multi-CPU will be supported in the future. This patch is initial support for modern style for CPU Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 4 +++ sound/soc/soc-core.c | 83 +++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 73 insertions(+), 14 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index f20785a..ae7ca82 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -927,6 +927,9 @@ struct snd_soc_dai_link { */ const char *cpu_dai_name; + struct snd_soc_dai_link_component *cpus; + unsigned int num_cpus; + /* * codec_name * codec_of_node @@ -1035,6 +1038,7 @@ struct snd_soc_dai_link { * drivers should not modify this value. */ unsigned int legacy_platform:1; + unsigned int legacy_cpu:1; struct list_head list; /* DAI link list of the soc card */ struct snd_soc_dobj dobj; /* For topology */ diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ce8c057..f1128d5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -884,7 +884,6 @@ static int soc_bind_dai_link(struct snd_soc_card *card, { struct snd_soc_pcm_runtime *rtd; struct snd_soc_dai_link_component *codecs; - struct snd_soc_dai_link_component cpu_dai_component; struct snd_soc_component *component; int i; @@ -903,13 +902,11 @@ static int soc_bind_dai_link(struct snd_soc_card *card, if (!rtd) return -ENOMEM; - cpu_dai_component.name = dai_link->cpu_name; - cpu_dai_component.of_node = dai_link->cpu_of_node; - cpu_dai_component.dai_name = dai_link->cpu_dai_name; - rtd->cpu_dai = snd_soc_find_dai(&cpu_dai_component); + /* FIXME: we need multi CPU support in the future */ + rtd->cpu_dai = snd_soc_find_dai(dai_link->cpus); if (!rtd->cpu_dai) { dev_info(card->dev, "ASoC: CPU DAI %s not registered\n", - dai_link->cpu_dai_name); + dai_link->cpus->dai_name); goto _err_defer; } snd_soc_rtdcom_add(rtd, rtd->cpu_dai->component); @@ -1043,6 +1040,46 @@ static void soc_remove_dai_links(struct snd_soc_card *card) } } +static int snd_soc_init_cpu(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_link) +{ + struct snd_soc_dai_link_component *cpu = dai_link->cpus; + + /* + * REMOVE ME + * + * This is glue code for Legacy vs Modern dai_link. + * This function will be removed if all derivers are switched to + * modern style dai_link. + * Driver shouldn't use both legacy and modern style in the same time. + * see + * soc.h :: struct snd_soc_dai_link + */ + /* convert Legacy platform link */ + if (!cpu) { + cpu = devm_kzalloc(card->dev, + sizeof(struct snd_soc_dai_link_component), + GFP_KERNEL); + if (!cpu) + return -ENOMEM; + + dai_link->cpus = cpu; + dai_link->num_cpus = 1; + dai_link->legacy_cpu = 1; + + cpu->name = dai_link->cpu_name; + cpu->of_node = dai_link->cpu_of_node; + cpu->dai_name = dai_link->cpu_dai_name; + } + + if (!dai_link->cpus) { + dev_err(card->dev, "ASoC: DAI link has no CPUs\n"); + return -EINVAL; + } + + return 0; +} + static int snd_soc_init_platform(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { @@ -1082,7 +1119,7 @@ static int snd_soc_init_platform(struct snd_soc_card *card, return 0; } -static void soc_cleanup_platform(struct snd_soc_card *card) +static void soc_cleanup_legacy(struct snd_soc_card *card) { struct snd_soc_dai_link *link; int i; @@ -1097,6 +1134,10 @@ static void soc_cleanup_platform(struct snd_soc_card *card) link->legacy_platform = 0; link->platforms = NULL; } + if (link->legacy_cpu) { + link->legacy_cpu = 0; + link->cpus = NULL; + } } } @@ -1144,6 +1185,12 @@ static int soc_init_dai_link(struct snd_soc_card *card, int i, ret; struct snd_soc_dai_link_component *codec; + ret = snd_soc_init_cpu(card, link); + if (ret) { + dev_err(card->dev, "ASoC: failed to init cpu\n"); + return ret; + } + ret = snd_soc_init_platform(card, link); if (ret) { dev_err(card->dev, "ASoC: failed to init multiplatform\n"); @@ -1202,12 +1249,20 @@ static int soc_init_dai_link(struct snd_soc_card *card, !soc_find_component(link->platforms->of_node, link->platforms->name)) return -EPROBE_DEFER; + /* FIXME */ + if (link->num_cpus > 1) { + dev_err(card->dev, + "ASoC: multi cpu is not yet supported %s\n", + link->name); + return -EINVAL; + } + /* * CPU device may be specified by either name or OF node, but * can be left unspecified, and will be matched based on DAI * name alone.. */ - if (link->cpu_name && link->cpu_of_node) { + if (link->cpus->name && link->cpus->of_node) { dev_err(card->dev, "ASoC: Neither/both cpu name/of_node are set for %s\n", link->name); @@ -1218,16 +1273,16 @@ static int soc_init_dai_link(struct snd_soc_card *card, * Defer card registartion if cpu dai component is not added to * component list. */ - if ((link->cpu_of_node || link->cpu_name) && - !soc_find_component(link->cpu_of_node, link->cpu_name)) + if ((link->cpus->of_node || link->cpus->name) && + !soc_find_component(link->cpus->of_node, link->cpus->name)) return -EPROBE_DEFER; /* * At least one of CPU DAI name or CPU device name/node must be * specified */ - if (!link->cpu_dai_name && - !(link->cpu_name || link->cpu_of_node)) { + if (!link->cpus->dai_name && + !(link->cpus->name || link->cpus->of_node)) { dev_err(card->dev, "ASoC: Neither cpu_dai_name nor cpu_name/of_node are set for %s\n", link->name); @@ -2041,7 +2096,7 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card) /* remove and free each DAI */ soc_remove_dai_links(card); soc_remove_pcm_runtimes(card); - soc_cleanup_platform(card); + soc_cleanup_legacy(card); /* remove auxiliary devices */ soc_remove_aux_devices(card); @@ -2798,7 +2853,7 @@ int snd_soc_register_card(struct snd_soc_card *card) ret = soc_init_dai_link(card, link); if (ret) { - soc_cleanup_platform(card); + soc_cleanup_legacy(card); dev_err(card->dev, "ASoC: failed to init link %s\n", link->name); mutex_unlock(&client_mutex); From patchwork Wed May 22 03:38:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954743 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 A874F13AD for ; Wed, 22 May 2019 03:40:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93C2228A81 for ; Wed, 22 May 2019 03:40:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86A6228AAC; Wed, 22 May 2019 03:40:22 +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 6718928A81 for ; Wed, 22 May 2019 03:40:21 +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 A8D631677; Wed, 22 May 2019 05:39:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A8D631677 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496419; bh=troFFn57MUBXOLCa7j0idl47LLSCZhyn9oK2A2z2mXU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fxZbtbxEp7Gtv8Of+QkI73Y7mk3lWn6wocxBhpJCjBsKy/qdSpJFZ1bSkxrzsgpQY s7Sw3kMJdGS4PNylPWQvtUT6KMRKzujcqxgz0L8orK9EChjmgTtMDH/nFsA1SUky+P w21Bjpgmd728uCw92xB6QYrMhKZ0apO+KiXulcYM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 62220F89731; Wed, 22 May 2019 05:38:30 +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 3FFC1F89730; Wed, 22 May 2019 05:38:28 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id EF068F8972D for ; Wed, 22 May 2019 05:38:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EF068F8972D Date: 22 May 2019 12:38:20 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425064" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:38:20 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 834A04009405; Wed, 22 May 2019 12:38:20 +0900 (JST) Message-ID: <87pnobp3y9.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 002/145] ASoC: simple-card: support snd_soc_dai_link_component style for cpu 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 From: Kuninori Morimoto ASoC supports modern style dai_link (= snd_soc_dai_link_component) for CPU. legacy style dai_link (= cpu_dai_name, cpu_name, cpu_of_node) are no longer needed. This patch switches to modern style. Signed-off-by: Kuninori Morimoto --- include/sound/simple_card_utils.h | 20 ++++++------------ sound/soc/generic/audio-graph-card.c | 30 +++++++-------------------- sound/soc/generic/simple-card-utils.c | 21 ++++++------------- sound/soc/generic/simple-card.c | 39 +++++++++++++---------------------- 4 files changed, 34 insertions(+), 76 deletions(-) diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 3429888..954563e 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -42,6 +42,7 @@ struct asoc_simple_priv { struct simple_dai_props { struct asoc_simple_dai *cpu_dai; struct asoc_simple_dai *codec_dai; + struct snd_soc_dai_link_component cpus; /* single cpu */ struct snd_soc_dai_link_component codecs; /* single codec */ struct snd_soc_dai_link_component platforms; struct asoc_simple_data adata; @@ -80,16 +81,12 @@ int asoc_simple_parse_card_name(struct snd_soc_card *card, char *prefix); #define asoc_simple_parse_clk_cpu(dev, node, dai_link, simple_dai) \ - asoc_simple_parse_clk(dev, node, dai_link->cpu_of_node, simple_dai, \ - dai_link->cpu_dai_name, NULL) + asoc_simple_parse_clk(dev, node, simple_dai, dai_link->cpus) #define asoc_simple_parse_clk_codec(dev, node, dai_link, simple_dai) \ - asoc_simple_parse_clk(dev, node, dai_link->codec_of_node, simple_dai,\ - dai_link->codec_dai_name, dai_link->codecs) + asoc_simple_parse_clk(dev, node, simple_dai, dai_link->codecs) int asoc_simple_parse_clk(struct device *dev, struct device_node *node, - struct device_node *dai_of_node, struct asoc_simple_dai *simple_dai, - const char *dai_name, struct snd_soc_dai_link_component *dlc); int asoc_simple_startup(struct snd_pcm_substream *substream); void asoc_simple_shutdown(struct snd_pcm_substream *substream); @@ -100,16 +97,11 @@ int asoc_simple_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params); #define asoc_simple_parse_cpu(node, dai_link, is_single_link) \ - asoc_simple_parse_dai(node, NULL, \ - &dai_link->cpu_of_node, \ - &dai_link->cpu_dai_name, is_single_link) + asoc_simple_parse_dai(node, dai_link->cpus, is_single_link) #define asoc_simple_parse_codec(node, dai_link) \ - asoc_simple_parse_dai(node, dai_link->codecs, \ - &dai_link->codec_of_node, \ - &dai_link->codec_dai_name, NULL) + asoc_simple_parse_dai(node, dai_link->codecs, NULL) #define asoc_simple_parse_platform(node, dai_link) \ - asoc_simple_parse_dai(node, dai_link->platforms, \ - &dai_link->platform_of_node, NULL, NULL) + asoc_simple_parse_dai(node, dai_link->platforms, NULL) #define asoc_simple_parse_tdm(np, dai) \ snd_soc_of_parse_tdm_slot(np, &(dai)->tx_slot_mask, \ diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index ec7e673..e438011 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -111,29 +111,14 @@ static int graph_get_dai_id(struct device_node *ep) static int asoc_simple_parse_dai(struct device_node *ep, struct snd_soc_dai_link_component *dlc, - struct device_node **dai_of_node, - const char **dai_name, int *is_single_link) { struct device_node *node; struct of_phandle_args args; int ret; - /* - * Use snd_soc_dai_link_component instead of legacy style. - * It is only for codec, but cpu will be supported in the future. - * see - * soc-core.c :: snd_soc_init_multicodec() - */ - if (dlc) { - dai_name = &dlc->dai_name; - dai_of_node = &dlc->of_node; - } - if (!ep) return 0; - if (!dai_name) - return 0; node = of_graph_get_port_parent(ep); @@ -142,11 +127,11 @@ static int asoc_simple_parse_dai(struct device_node *ep, args.args[0] = graph_get_dai_id(ep); args.args_count = (of_graph_get_endpoint_count(node) > 1); - ret = snd_soc_get_dai_name(&args, dai_name); + ret = snd_soc_get_dai_name(&args, &dlc->dai_name); if (ret < 0) return ret; - *dai_of_node = node; + dlc->of_node = node; if (is_single_link) *is_single_link = of_graph_get_endpoint_count(node) == 1; @@ -207,6 +192,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, struct device_node *ports; struct device_node *node; struct asoc_simple_dai *dai; + struct snd_soc_dai_link_component *cpus = dai_link->cpus; struct snd_soc_dai_link_component *codecs = dai_link->codecs; int ret; @@ -251,7 +237,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, ret = asoc_simple_set_dailink_name(dev, dai_link, "fe.%s", - dai_link->cpu_dai_name); + cpus->dai_name); if (ret < 0) return ret; @@ -261,9 +247,9 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, struct snd_soc_codec_conf *cconf; /* FE is dummy */ - dai_link->cpu_of_node = NULL; - dai_link->cpu_dai_name = "snd-soc-dummy-dai"; - dai_link->cpu_name = "snd-soc-dummy"; + cpus->of_node = NULL; + cpus->dai_name = "snd-soc-dummy-dai"; + cpus->name = "snd-soc-dummy"; /* BE settings */ dai_link->no_pcm = 1; @@ -383,7 +369,7 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv, ret = asoc_simple_set_dailink_name(dev, dai_link, "%s-%s", - dai_link->cpu_dai_name, + dai_link->cpus->dai_name, dai_link->codecs->dai_name); if (ret < 0) return ret; diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index f4c6375..ac8678f 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -159,24 +159,13 @@ static void asoc_simple_clk_disable(struct asoc_simple_dai *dai) int asoc_simple_parse_clk(struct device *dev, struct device_node *node, - struct device_node *dai_of_node, struct asoc_simple_dai *simple_dai, - const char *dai_name, struct snd_soc_dai_link_component *dlc) { struct clk *clk; u32 val; /* - * Use snd_soc_dai_link_component instead of legacy style. - * It is only for codec, but cpu will be supported in the future. - * see - * soc-core.c :: snd_soc_init_multicodec() - */ - if (dlc) - dai_of_node = dlc->of_node; - - /* * Parse dai->sysclk come from "clocks = <&xxx>" * (if system has common clock) * or "system-clock-frequency = " @@ -190,7 +179,7 @@ int asoc_simple_parse_clk(struct device *dev, } else if (!of_property_read_u32(node, "system-clock-frequency", &val)) { simple_dai->sysclk = val; } else { - clk = devm_get_clk_from_child(dev, dai_of_node, NULL); + clk = devm_get_clk_from_child(dev, dlc->of_node, NULL); if (!IS_ERR(clk)) simple_dai->sysclk = clk_get_rate(clk); } @@ -359,7 +348,7 @@ void asoc_simple_canonicalize_platform(struct snd_soc_dai_link *dai_link) { /* Assumes platform == cpu */ if (!dai_link->platforms->of_node) - dai_link->platforms->of_node = dai_link->cpu_of_node; + dai_link->platforms->of_node = dai_link->cpus->of_node; } EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_platform); @@ -376,7 +365,7 @@ void asoc_simple_canonicalize_cpu(struct snd_soc_dai_link *dai_link, * fmt_multiple_name() */ if (is_single_links) - dai_link->cpu_dai_name = NULL; + dai_link->cpus->dai_name = NULL; } EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_cpu); @@ -386,7 +375,7 @@ int asoc_simple_clean_reference(struct snd_soc_card *card) int i; for_each_card_prelinks(card, i, dai_link) { - of_node_put(dai_link->cpu_of_node); + of_node_put(dai_link->cpus->of_node); of_node_put(dai_link->codecs->of_node); } return 0; @@ -576,6 +565,8 @@ int asoc_simple_init_priv(struct asoc_simple_priv *priv, * simple-card-utils.c :: asoc_simple_canonicalize_platform() */ for (i = 0; i < li->link; i++) { + dai_link[i].cpus = &dai_props[i].cpus; + dai_link[i].num_cpus = 1; dai_link[i].codecs = &dai_props[i].codecs; dai_link[i].num_codecs = 1; dai_link[i].platforms = &dai_props[i].platforms; diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index c2a2c5f..b544eeb 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -30,8 +30,6 @@ static const struct snd_soc_ops simple_ops = { static int asoc_simple_parse_dai(struct device_node *node, struct snd_soc_dai_link_component *dlc, - struct device_node **dai_of_node, - const char **dai_name, int *is_single_link) { struct of_phandle_args args; @@ -41,17 +39,6 @@ static int asoc_simple_parse_dai(struct device_node *node, return 0; /* - * Use snd_soc_dai_link_component instead of legacy style. - * It is only for codec, but cpu will be supported in the future. - * see - * soc-core.c :: snd_soc_init_multicodec() - */ - if (dlc) { - dai_name = &dlc->dai_name; - dai_of_node = &dlc->of_node; - } - - /* * Get node via "sound-dai = <&phandle port>" * it will be used as xxx_of_node on soc_bind_dai_link() */ @@ -60,13 +47,11 @@ static int asoc_simple_parse_dai(struct device_node *node, return ret; /* Get dai->name */ - if (dai_name) { - ret = snd_soc_of_get_dai_name(node, dai_name); - if (ret < 0) - return ret; - } + ret = snd_soc_of_get_dai_name(node, &dlc->dai_name); + if (ret < 0) + return ret; - *dai_of_node = args.np; + dlc->of_node = args.np; if (is_single_link) *is_single_link = !args.args_count; @@ -119,6 +104,7 @@ static int simple_dai_link_of_dpcm(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 asoc_simple_dai *dai; + struct snd_soc_dai_link_component *cpus = dai_link->cpus; struct snd_soc_dai_link_component *codecs = dai_link->codecs; struct device_node *top = dev->of_node; struct device_node *node = of_get_parent(np); @@ -169,7 +155,7 @@ static int simple_dai_link_of_dpcm(struct asoc_simple_priv *priv, ret = asoc_simple_set_dailink_name(dev, dai_link, "fe.%s", - dai_link->cpu_dai_name); + cpus->dai_name); if (ret < 0) return ret; @@ -178,9 +164,9 @@ static int simple_dai_link_of_dpcm(struct asoc_simple_priv *priv, struct snd_soc_codec_conf *cconf; /* FE is dummy */ - dai_link->cpu_of_node = NULL; - dai_link->cpu_dai_name = "snd-soc-dummy-dai"; - dai_link->cpu_name = "snd-soc-dummy"; + cpus->of_node = NULL; + cpus->dai_name = "snd-soc-dummy-dai"; + cpus->name = "snd-soc-dummy"; /* BE settings */ dai_link->no_pcm = 1; @@ -320,7 +306,7 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv, ret = asoc_simple_set_dailink_name(dev, dai_link, "%s-%s", - dai_link->cpu_dai_name, + dai_link->cpus->dai_name, dai_link->codecs->dai_name); if (ret < 0) goto dai_link_of_err; @@ -646,6 +632,7 @@ static int asoc_simple_probe(struct platform_device *pdev) } else { struct asoc_simple_card_info *cinfo; + struct snd_soc_dai_link_component *cpus; struct snd_soc_dai_link_component *codecs; struct snd_soc_dai_link_component *platform; struct snd_soc_dai_link *dai_link = priv->dai_link; @@ -671,6 +658,9 @@ static int asoc_simple_probe(struct platform_device *pdev) dai_props->cpu_dai = &priv->dais[dai_idx++]; dai_props->codec_dai = &priv->dais[dai_idx++]; + cpus = dai_link->cpus; + cpus->dai_name = cinfo->cpu_dai.name; + codecs = dai_link->codecs; codecs->name = cinfo->codec; codecs->dai_name = cinfo->codec_dai.name; @@ -681,7 +671,6 @@ static int asoc_simple_probe(struct platform_device *pdev) card->name = (cinfo->card) ? cinfo->card : cinfo->name; dai_link->name = cinfo->name; dai_link->stream_name = cinfo->name; - dai_link->cpu_dai_name = cinfo->cpu_dai.name; dai_link->dai_fmt = cinfo->daifmt; dai_link->init = asoc_simple_dai_init; memcpy(dai_props->cpu_dai, &cinfo->cpu_dai, From patchwork Wed May 22 03:38:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954745 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 C1AC8912 for ; Wed, 22 May 2019 03:41:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B16FE28B37 for ; Wed, 22 May 2019 03:41:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A57DA28B3E; Wed, 22 May 2019 03:41:05 +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 DD94828B45 for ; Wed, 22 May 2019 03:41:04 +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 215ED1684; Wed, 22 May 2019 05:40:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 215ED1684 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496463; bh=bZcWs7wuHwvKiD0A56o+4jUNUQO4MOkd3/U8K169le0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ioi7C+xUqvi5YUH0CIRAB//lLX1z4BLuoBADPSYSce0dwxLehC/Gv8mnljKp3YNHp tn4Qnt56kty+Qz0Vz7QRL3QqAToNCDj6xlCOd1Pxq8gQ2saSxtZ1i7uTyshELHjcmM TJTzBPJBBHmXeTh0w/0OBfnHbCrP0GKir14PeY8s= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C9D06F8972F; Wed, 22 May 2019 05:38:34 +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 41041F89736; Wed, 22 May 2019 05:38:32 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 5E8E0F8962F for ; Wed, 22 May 2019 05:38:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5E8E0F8962F Date: 22 May 2019 12:38:26 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425071" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:38:26 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id E5948416FA6F; Wed, 22 May 2019 12:38:26 +0900 (JST) Message-ID: <87o93vp3y3.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 003/145] ASoC: soc.h: add sound dai_link connection macro 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 From: Kuninori Morimoto Modern style dai_link requests CPU/Codec/Platform component pointer array and its size, but it will be very verbose code. To avoid such scene, this patch adds dai_link connection macro. Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/soc-core.c | 7 +++++ 2 files changed, 95 insertions(+) diff --git a/include/sound/soc.h b/include/sound/soc.h index ae7ca82..0fa79b8 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1048,6 +1048,94 @@ struct snd_soc_dai_link { ((i) < link->num_codecs) && ((codec) = &link->codecs[i]); \ (i)++) +/* + * Sample 1 : Single CPU/Codec/Platform + * + * SND_SOC_DAILINK_DEFS(test, + * DAILINK_COMP_ARRAY(COMP_CPU("cpu_dai")), + * DAILINK_COMP_ARRAY(COMP_CODEC("codec", "codec_dai")), + * DAILINK_COMP_ARRAY(COMP_PLATFORM("platform"))); + * + * struct snd_soc_dai_link link = { + * ... + * SND_SOC_DAILINK_REG(test), + * }; + * + * Sample 2 : Multi CPU/Codec, no Platform + * + * SND_SOC_DAILINK_DEFS(test, + * DAILINK_COMP_ARRAY(COMP_CPU("cpu_dai1"), + * COMP_CPU("cpu_dai2")), + * DAILINK_COMP_ARRAY(COMP_CODEC("codec1", "codec_dai1"), + * COMP_CODEC("codec2", "codec_dai2"))); + * + * struct snd_soc_dai_link link = { + * ... + * SND_SOC_DAILINK_REG(test), + * }; + * + * Sample 3 : Define each CPU/Codec/Platform manually + * + * SND_SOC_DAILINK_DEF(test_cpu, + * DAILINK_COMP_ARRAY(COMP_CPU("cpu_dai1"), + * COMP_CPU("cpu_dai2"))); + * SND_SOC_DAILINK_DEF(test_codec, + * DAILINK_COMP_ARRAY(COMP_CODEC("codec1", "codec_dai1"), + * COMP_CODEC("codec2", "codec_dai2"))); + * SND_SOC_DAILINK_DEF(test_platform, + * DAILINK_COMP_ARRAY(COMP_PLATFORM("platform"))); + * + * struct snd_soc_dai_link link = { + * ... + * SND_SOC_DAILINK_REG(test_cpu, + * test_codec, + * test_platform), + * }; + * + * Sample 4 : Sample3 without platform + * + * struct snd_soc_dai_link link = { + * ... + * SND_SOC_DAILINK_REG(test_cpu, + * test_codec); + * }; + */ + +#define SND_SOC_DAILINK_REG1(name) SND_SOC_DAILINK_REG3(name##_cpus, name##_codecs, name##_platforms) +#define SND_SOC_DAILINK_REG2(cpu, codec) SND_SOC_DAILINK_REG3(cpu, codec, null_dailink_component) +#define SND_SOC_DAILINK_REG3(cpu, codec, platform) \ + .cpus = cpu, \ + .num_cpus = ARRAY_SIZE(cpu), \ + .codecs = codec, \ + .num_codecs = ARRAY_SIZE(codec), \ + .platforms = platform, \ + .num_platforms = ARRAY_SIZE(platform) + +#define SND_SOC_DAILINK_REGx(_1, _2, _3, func, ...) func +#define SND_SOC_DAILINK_REG(...) \ + SND_SOC_DAILINK_REGx(__VA_ARGS__, \ + SND_SOC_DAILINK_REG3, \ + SND_SOC_DAILINK_REG2, \ + SND_SOC_DAILINK_REG1)(__VA_ARGS__) + +#define SND_SOC_DAILINK_DEF(name, def...) \ + static struct snd_soc_dai_link_component name[] = { def } + +#define SND_SOC_DAILINK_DEFS(name, cpu, codec, platform...) \ + SND_SOC_DAILINK_DEF(name##_cpus, cpu); \ + SND_SOC_DAILINK_DEF(name##_codecs, codec); \ + SND_SOC_DAILINK_DEF(name##_platforms, platform) + +#define DAILINK_COMP_ARRAY(param...) param +#define COMP_EMPTY() { } +#define COMP_CPU(_dai) { .dai_name = _dai, } +#define COMP_CODEC(_name, _dai) { .name = _name, .dai_name = _dai, } +#define COMP_PLATFORM(_name) { .name = _name } +#define COMP_DUMMY() { .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", } + +extern struct snd_soc_dai_link_component null_dailink_component[0]; + + struct snd_soc_codec_conf { /* * specify device either by device name, or by diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index f1128d5..ab974bc 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -58,6 +58,13 @@ static LIST_HEAD(unbind_card_list); list_for_each_entry(component, &component_list, list) /* + * This is used if driver don't need to have CPU/Codec/Platform + * dai_link. see soc.h + */ +struct snd_soc_dai_link_component null_dailink_component[0]; +EXPORT_SYMBOL_GPL(null_dailink_component); + +/* * This is a timeout to do a DAPM powerdown after a stream is closed(). * It can be used to eliminate pops between different playback streams, e.g. * between two audio tracks. From patchwork Wed May 22 03:38:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954747 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 D3EF013AD for ; Wed, 22 May 2019 03:41:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEAB528B3E for ; Wed, 22 May 2019 03:41:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFC9D28B45; Wed, 22 May 2019 03:41:36 +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 CF64A28B3E for ; Wed, 22 May 2019 03:41:35 +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 254471672; Wed, 22 May 2019 05:40:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 254471672 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496494; bh=AflO9yURctxjLUiWuEsCvety0P5/SlIuFrBIi7Xip9U=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uDLcO8Yxq7YDgA3VKpRG8JZxO4mJUA7ETdclfGm450NqQgqqvxtJ5sTYasKmlShoj rb8/lE6PmSIXsVFjim65VsxSmnrxrctBLnSYiC41WaBMNTI4llmuX9ktIIg+NxNdeK Pn711GJoxb29KYTa62iOHajotnzrKRoDD2ZybryU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5F1C0F89636; Wed, 22 May 2019 05:38:47 +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 078C9F89738; Wed, 22 May 2019 05:38:41 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 42893F89735 for ; Wed, 22 May 2019 05:38:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 42893F89735 Date: 22 May 2019 12:38:33 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627173" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:38:33 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id A4CF44003EB4; Wed, 22 May 2019 12:38:33 +0900 (JST) Message-ID: <87mujfp3xw.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 004/145] ASoC: mediatek: mt6797-mt6351: 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 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/mediatek/mt6797/mt6797-mt6351.c | 115 ++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 39 deletions(-) diff --git a/sound/soc/mediatek/mt6797/mt6797-mt6351.c b/sound/soc/mediatek/mt6797/mt6797-mt6351.c index cc41eb5..496f32b 100644 --- a/sound/soc/mediatek/mt6797/mt6797-mt6351.c +++ b/sound/soc/mediatek/mt6797/mt6797-mt6351.c @@ -10,140 +10,177 @@ #include "mt6797-afe-common.h" +SND_SOC_DAILINK_DEFS(playback_1, + DAILINK_COMP_ARRAY(COMP_CPU("DL1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(playback_2, + DAILINK_COMP_ARRAY(COMP_CPU("DL2")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(playback_3, + DAILINK_COMP_ARRAY(COMP_CPU("DL3")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture_1, + DAILINK_COMP_ARRAY(COMP_CPU("UL1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture_2, + DAILINK_COMP_ARRAY(COMP_CPU("UL2")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture_3, + DAILINK_COMP_ARRAY(COMP_CPU("UL3")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture_mono_1, + DAILINK_COMP_ARRAY(COMP_CPU("UL_MONO_1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hostless_lpbk, + DAILINK_COMP_ARRAY(COMP_CPU("Hostless LPBK DAI")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hostless_speech, + DAILINK_COMP_ARRAY(COMP_CPU("Hostless Speech DAI")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(primary_codec, + DAILINK_COMP_ARRAY(COMP_CPU("ADDA")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "mt6351-snd-codec-aif1")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(pcm1, + DAILINK_COMP_ARRAY(COMP_CPU("PCM 1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(pcm2, + DAILINK_COMP_ARRAY(COMP_CPU("PCM 2")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { /* FE */ { .name = "Playback_1", .stream_name = "Playback_1", - .cpu_dai_name = "DL1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback_1), }, { .name = "Playback_2", .stream_name = "Playback_2", - .cpu_dai_name = "DL2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback_2), }, { .name = "Playback_3", .stream_name = "Playback_3", - .cpu_dai_name = "DL3", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback_3), }, { .name = "Capture_1", .stream_name = "Capture_1", - .cpu_dai_name = "UL1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture_1), }, { .name = "Capture_2", .stream_name = "Capture_2", - .cpu_dai_name = "UL2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture_2), }, { .name = "Capture_3", .stream_name = "Capture_3", - .cpu_dai_name = "UL3", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture_3), }, { .name = "Capture_Mono_1", .stream_name = "Capture_Mono_1", - .cpu_dai_name = "UL_MONO_1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture_mono_1), }, { .name = "Hostless_LPBK", .stream_name = "Hostless_LPBK", - .cpu_dai_name = "Hostless LPBK DAI", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(hostless_lpbk), }, { .name = "Hostless_Speech", .stream_name = "Hostless_Speech", - .cpu_dai_name = "Hostless Speech DAI", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(hostless_speech), }, /* BE */ { .name = "Primary Codec", - .cpu_dai_name = "ADDA", - .codec_dai_name = "mt6351-snd-codec-aif1", .no_pcm = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(primary_codec), }, { .name = "PCM 1", - .cpu_dai_name = "PCM 1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .no_pcm = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", - .cpu_dai_name = "PCM 2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .no_pcm = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(pcm2), }, }; @@ -170,9 +207,9 @@ static int mt6797_mt6351_dev_probe(struct platform_device *pdev) return -EINVAL; } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->platform_name) + if (dai_link->platforms->name) continue; - dai_link->platform_of_node = platform_node; + dai_link->platforms->of_node = platform_node; } codec_node = of_parse_phandle(pdev->dev.of_node, @@ -183,9 +220,9 @@ static int mt6797_mt6351_dev_probe(struct platform_device *pdev) return -EINVAL; } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->codec_name) + if (dai_link->codecs->name) continue; - dai_link->codec_of_node = codec_node; + dai_link->codecs->of_node = codec_node; } ret = devm_snd_soc_register_card(&pdev->dev, card); From patchwork Wed May 22 03:38:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954749 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 BBAA3912 for ; Wed, 22 May 2019 03:42:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA70128B3E for ; Wed, 22 May 2019 03:42:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F0B428B45; Wed, 22 May 2019 03:42:25 +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 ED54928B3E for ; Wed, 22 May 2019 03:42:24 +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 54FBF1666; Wed, 22 May 2019 05:41:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 54FBF1666 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496543; bh=gEu0B5N7PCFaoR9YrpitUBhfc/meq6+joHBu3dN3pew=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ElKn8gMeB+k+pA6srPGLVaZedkfHNSyWejfO0pSwgyqXIq7rVqwUXYHVzYSF545en Oswk52UUk2RG+d/ELmkD0Ju/qIcyYpCE6FJjP93dgWrj/+9/EaOx25vAqKI2j7kj6i tSTiMHEwVnyEr3b4GY4t6kz/XwtA4Za3hMPG83FY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C9666F8973E; Wed, 22 May 2019 05:38:49 +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 65B09F89735; Wed, 22 May 2019 05:38:45 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 20D11F89633 for ; Wed, 22 May 2019 05:38:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 20D11F89633 Date: 22 May 2019 12:38:39 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627181" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:38:39 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id A79CA4003EB3; Wed, 22 May 2019 12:38:39 +0900 (JST) Message-ID: <87lfyzp3xq.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 005/145] ASoC: mediatek: mt2701-wm8960: 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 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/mediatek/mt2701/mt2701-wm8960.c | 34 ++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/sound/soc/mediatek/mt2701/mt2701-wm8960.c b/sound/soc/mediatek/mt2701/mt2701-wm8960.c index 6bc1d3d..8c4c89e 100644 --- a/sound/soc/mediatek/mt2701/mt2701-wm8960.c +++ b/sound/soc/mediatek/mt2701/mt2701-wm8960.c @@ -44,41 +44,51 @@ static struct snd_soc_ops mt2701_wm8960_be_ops = { .hw_params = mt2701_wm8960_be_ops_hw_params }; +SND_SOC_DAILINK_DEFS(playback, + DAILINK_COMP_ARRAY(COMP_CPU("PCMO0")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture, + DAILINK_COMP_ARRAY(COMP_CPU("PCM0")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(codec, + DAILINK_COMP_ARRAY(COMP_CPU("I2S0")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8960-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link mt2701_wm8960_dai_links[] = { /* FE */ { .name = "wm8960-playback", .stream_name = "wm8960-playback", - .cpu_dai_name = "PCMO0", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback), }, { .name = "wm8960-capture", .stream_name = "wm8960-capture", - .cpu_dai_name = "PCM0", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture), }, /* BE */ { .name = "wm8960-codec", - .cpu_dai_name = "I2S0", .no_pcm = 1, - .codec_dai_name = "wm8960-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_GATED, .ops = &mt2701_wm8960_be_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(codec), }, }; @@ -107,9 +117,9 @@ static int mt2701_wm8960_machine_probe(struct platform_device *pdev) return -EINVAL; } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->platform_name) + if (dai_link->platforms->name) continue; - dai_link->platform_of_node = platform_node; + dai_link->platforms->of_node = platform_node; } card->dev = &pdev->dev; @@ -122,9 +132,9 @@ static int mt2701_wm8960_machine_probe(struct platform_device *pdev) return -EINVAL; } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->codec_name) + if (dai_link->codecs->name) continue; - dai_link->codec_of_node = codec_node; + dai_link->codecs->of_node = codec_node; } ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); From patchwork Wed May 22 03:38:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954751 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 4C69913AD for ; Wed, 22 May 2019 03:43:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3956728B44 for ; Wed, 22 May 2019 03:43:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CBF128B47; Wed, 22 May 2019 03:43:04 +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 F1C8828B44 for ; Wed, 22 May 2019 03:43:01 +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 4798F1664; Wed, 22 May 2019 05:42:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4798F1664 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496580; bh=phLAFRfmh3AUfx0DKf8kvD0nn3FBbZog4YNwtu/1A44=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=n2irYbRHeghrpUCw78GLNhnhVz+UfSHmW1MpEWrsCLE/LemyD43qSWaTtYOrSJDy8 o7fAQxXKS5neLK8v3tZhJ9HmuLCUxKPnpZYtJdL1+RKRU4M0Nk6c4hzrVQM/PKmL+4 u2wngM+KRc0xUwws7gE7YLS7mQOO0lJDia1Q53tg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 205A9F89742; Wed, 22 May 2019 05:39:07 +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 684FDF89744; Wed, 22 May 2019 05:39:05 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 730F5F89718 for ; Wed, 22 May 2019 05:38:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 730F5F89718 Date: 22 May 2019 12:38:53 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425096" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:38:53 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 3FFF64003EB3; Wed, 22 May 2019 12:38:53 +0900 (JST) Message-ID: <87k1ejp3xd.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 006/145] ASoC: mediatek: mt2701-cs42448: 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 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/mediatek/mt2701/mt2701-cs42448.c | 95 ++++++++++++++++++++---------- 1 file changed, 65 insertions(+), 30 deletions(-) diff --git a/sound/soc/mediatek/mt2701/mt2701-cs42448.c b/sound/soc/mediatek/mt2701/mt2701-cs42448.c index 97f9f38..b694179 100644 --- a/sound/soc/mediatek/mt2701/mt2701-cs42448.c +++ b/sound/soc/mediatek/mt2701/mt2701-cs42448.c @@ -163,118 +163,153 @@ enum { DAI_LINK_BE_MRG_BT, }; +SND_SOC_DAILINK_DEFS(fe_multi_ch_out, + DAILINK_COMP_ARRAY(COMP_CPU("PCM_multi")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(fe_pcm0_in, + DAILINK_COMP_ARRAY(COMP_CPU("PCM0")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(fe_pcm1_in, + DAILINK_COMP_ARRAY(COMP_CPU("PCM1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(fe_bt_out, + DAILINK_COMP_ARRAY(COMP_CPU("PCM_BT_DL")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(fe_bt_in, + DAILINK_COMP_ARRAY(COMP_CPU("PCM_BT_UL")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(be_i2s0, + DAILINK_COMP_ARRAY(COMP_CPU("I2S0")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "cs42448")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(be_i2s1, + DAILINK_COMP_ARRAY(COMP_CPU("I2S1")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "cs42448")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(be_i2s2, + DAILINK_COMP_ARRAY(COMP_CPU("I2S2")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "cs42448")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(be_i2s3, + DAILINK_COMP_ARRAY(COMP_CPU("I2S3")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "cs42448")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(be_mrg_bt, + DAILINK_COMP_ARRAY(COMP_CPU("MRG BT")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "bt-sco-pcm-wb")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { /* FE */ [DAI_LINK_FE_MULTI_CH_OUT] = { .name = "mt2701-cs42448-multi-ch-out", .stream_name = "mt2701-cs42448-multi-ch-out", - .cpu_dai_name = "PCM_multi", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .ops = &mt2701_cs42448_48k_fe_ops, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(fe_multi_ch_out), }, [DAI_LINK_FE_PCM0_IN] = { .name = "mt2701-cs42448-pcm0", .stream_name = "mt2701-cs42448-pcm0-data-UL", - .cpu_dai_name = "PCM0", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .ops = &mt2701_cs42448_48k_fe_ops, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(fe_pcm0_in), }, [DAI_LINK_FE_PCM1_IN] = { .name = "mt2701-cs42448-pcm1-data-UL", .stream_name = "mt2701-cs42448-pcm1-data-UL", - .cpu_dai_name = "PCM1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .ops = &mt2701_cs42448_48k_fe_ops, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(fe_pcm1_in), }, [DAI_LINK_FE_BT_OUT] = { .name = "mt2701-cs42448-pcm-BT-out", .stream_name = "mt2701-cs42448-pcm-BT", - .cpu_dai_name = "PCM_BT_DL", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(fe_bt_out), }, [DAI_LINK_FE_BT_IN] = { .name = "mt2701-cs42448-pcm-BT-in", .stream_name = "mt2701-cs42448-pcm-BT", - .cpu_dai_name = "PCM_BT_UL", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(fe_bt_in), }, /* BE */ [DAI_LINK_BE_I2S0] = { .name = "mt2701-cs42448-I2S0", - .cpu_dai_name = "I2S0", .no_pcm = 1, - .codec_dai_name = "cs42448", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_GATED, .ops = &mt2701_cs42448_be_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(be_i2s0), }, [DAI_LINK_BE_I2S1] = { .name = "mt2701-cs42448-I2S1", - .cpu_dai_name = "I2S1", .no_pcm = 1, - .codec_dai_name = "cs42448", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_GATED, .ops = &mt2701_cs42448_be_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(be_i2s1), }, [DAI_LINK_BE_I2S2] = { .name = "mt2701-cs42448-I2S2", - .cpu_dai_name = "I2S2", .no_pcm = 1, - .codec_dai_name = "cs42448", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_GATED, .ops = &mt2701_cs42448_be_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(be_i2s2), }, [DAI_LINK_BE_I2S3] = { .name = "mt2701-cs42448-I2S3", - .cpu_dai_name = "I2S3", .no_pcm = 1, - .codec_dai_name = "cs42448", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_GATED, .ops = &mt2701_cs42448_be_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(be_i2s3), }, [DAI_LINK_BE_MRG_BT] = { .name = "mt2701-cs42448-MRG-BT", - .cpu_dai_name = "MRG BT", .no_pcm = 1, - .codec_dai_name = "bt-sco-pcm-wb", .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(be_mrg_bt), }, }; @@ -311,9 +346,9 @@ static int mt2701_cs42448_machine_probe(struct platform_device *pdev) return -EINVAL; } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->platform_name) + if (dai_link->platforms->name) continue; - dai_link->platform_of_node = platform_node; + dai_link->platforms->of_node = platform_node; } card->dev = dev; @@ -326,9 +361,9 @@ static int mt2701_cs42448_machine_probe(struct platform_device *pdev) return -EINVAL; } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->codec_name) + if (dai_link->codecs->name) continue; - dai_link->codec_of_node = codec_node; + dai_link->codecs->of_node = codec_node; } codec_node_bt_mrg = of_parse_phandle(pdev->dev.of_node, @@ -338,7 +373,7 @@ static int mt2701_cs42448_machine_probe(struct platform_device *pdev) "Property 'audio-codec-bt-mrg' missing or invalid\n"); return -EINVAL; } - mt2701_cs42448_dai_links[DAI_LINK_BE_MRG_BT].codec_of_node + mt2701_cs42448_dai_links[DAI_LINK_BE_MRG_BT].codecs->of_node = codec_node_bt_mrg; ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); From patchwork Wed May 22 03:38:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954753 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 5820313AD for ; Wed, 22 May 2019 03:43:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 455C928B44 for ; Wed, 22 May 2019 03:43:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39DAA28B49; Wed, 22 May 2019 03:43:44 +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 6A33528B44 for ; Wed, 22 May 2019 03:43:43 +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 B974F1688; Wed, 22 May 2019 05:42:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B974F1688 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496621; bh=OL9CFet81yM992JbzV/RNWYnAUFeAPp9rgqX2gnWcPk=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=LSuH13H6gQvodULnoAWSy9jzFkk0SLx4BBtLrQthEoT6IXEaa71qt5Q7f/KCUCfou AVM77+YmCyCcQXuKRXD4ZiFypeBr/rUNAXnWxeL4I9y8fqvHQUj3knMlHT87BbAP+q OBRlhdGEc1RX4m85Qp3v5dAsd03SM6QXKstGRBuY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9754BF89748; Wed, 22 May 2019 05:39:08 +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 C7031F89743; Wed, 22 May 2019 05:39:05 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 23CB9F89741 for ; Wed, 22 May 2019 05:39:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 23CB9F89741 Date: 22 May 2019 12:38:59 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425102" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:38:59 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id D3BD1416FB8A; Wed, 22 May 2019 12:38:59 +0900 (JST) Message-ID: <87imu3p3x6.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 007/145] ASoC: mediatek: mt8173-max98090: 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 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/mediatek/mt8173/mt8173-max98090.c | 34 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-max98090.c b/sound/soc/mediatek/mt8173/mt8173-max98090.c index 4d6596d..22c0060 100644 --- a/sound/soc/mediatek/mt8173/mt8173-max98090.c +++ b/sound/soc/mediatek/mt8173/mt8173-max98090.c @@ -82,41 +82,51 @@ static int mt8173_max98090_init(struct snd_soc_pcm_runtime *runtime) return max98090_mic_detect(component, &mt8173_max98090_jack); } +SND_SOC_DAILINK_DEFS(playback, + DAILINK_COMP_ARRAY(COMP_CPU("DL1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture, + DAILINK_COMP_ARRAY(COMP_CPU("VUL")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("I2S")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + /* Digital audio interface glue - connects codec <---> CPU */ static struct snd_soc_dai_link mt8173_max98090_dais[] = { /* Front End DAI links */ { .name = "MAX98090 Playback", .stream_name = "MAX98090 Playback", - .cpu_dai_name = "DL1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback), }, { .name = "MAX98090 Capture", .stream_name = "MAX98090 Capture", - .cpu_dai_name = "VUL", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture), }, /* Back End DAI links */ { .name = "Codec", - .cpu_dai_name = "I2S", .no_pcm = 1, - .codec_dai_name = "HiFi", .init = mt8173_max98090_init, .ops = &mt8173_max98090_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(hifi), }, }; @@ -147,9 +157,9 @@ static int mt8173_max98090_dev_probe(struct platform_device *pdev) return -EINVAL; } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->platform_name) + if (dai_link->platforms->name) continue; - dai_link->platform_of_node = platform_node; + dai_link->platforms->of_node = platform_node; } codec_node = of_parse_phandle(pdev->dev.of_node, @@ -160,9 +170,9 @@ static int mt8173_max98090_dev_probe(struct platform_device *pdev) return -EINVAL; } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->codec_name) + if (dai_link->codecs->name) continue; - dai_link->codec_of_node = codec_node; + dai_link->codecs->of_node = codec_node; } card->dev = &pdev->dev; From patchwork Wed May 22 03:39:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954755 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 397E7912 for ; Wed, 22 May 2019 03:44:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2594A28B44 for ; Wed, 22 May 2019 03:44:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 188D928B47; Wed, 22 May 2019 03:44:23 +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 4787928B44 for ; Wed, 22 May 2019 03:44:22 +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 97B8A1672; Wed, 22 May 2019 05:43:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 97B8A1672 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496660; bh=XiXUDXDBPWoA5ZeKhA79vwW8G9MXsEGKV55s/AKfeGY=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VO3YQ7NGgLoNdZS9LdDgttKOWlHlxj2c040fPLde5uLogkav1HPU0rRjf74Qljm8/ qc1lOjId7qgzJIYLWqxMFkBPvhKIlIKgbYhYp1W25pijhOZ5mu9Mn/oUSaXP8sv46E DXsVaDKQolz/yi2vPzJ4Vm7XtNVbVYQvS0n0uYeY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 77D56F89747; Wed, 22 May 2019 05:39:15 +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 55BEFF8974D; Wed, 22 May 2019 05:39:13 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 91B85F89747 for ; Wed, 22 May 2019 05:39:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 91B85F89747 Date: 22 May 2019 12:39:05 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425110" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:39:05 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id D048F416FBB5; Wed, 22 May 2019 12:39:05 +0900 (JST) Message-ID: <87h89np3x0.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 008/145] ASoC: mediatek: mt8173-rt5650: 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 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/mediatek/mt8173/mt8173-rt5650.c | 74 +++++++++++++++++-------------- 1 file changed, 41 insertions(+), 33 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650.c b/sound/soc/mediatek/mt8173/mt8173-rt5650.c index 7edf250..ef6f236 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c @@ -144,17 +144,6 @@ static int mt8173_rt5650_init(struct snd_soc_pcm_runtime *runtime) &mt8173_rt5650_jack); } -static struct snd_soc_dai_link_component mt8173_rt5650_codecs[] = { - { - /* Playback */ - .dai_name = "rt5645-aif1", - }, - { - /* Capture */ - .dai_name = "rt5645-aif1", - }, -}; - enum { DAI_LINK_PLAYBACK, DAI_LINK_CAPTURE, @@ -163,46 +152,63 @@ enum { DAI_LINK_HDMI_I2S, }; +SND_SOC_DAILINK_DEFS(playback, + DAILINK_COMP_ARRAY(COMP_CPU("DL1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture, + DAILINK_COMP_ARRAY(COMP_CPU("VUL")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hdmi_pcm, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(codec, + DAILINK_COMP_ARRAY(COMP_CPU("I2S")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5645-aif1"), /* Playback */ + COMP_CODEC(NULL, "rt5645-aif1")),/* Capture */ + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hdmi_be, + DAILINK_COMP_ARRAY(COMP_CPU("HDMIO")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "i2s-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + /* Digital audio interface glue - connects codec <---> CPU */ static struct snd_soc_dai_link mt8173_rt5650_dais[] = { /* Front End DAI links */ [DAI_LINK_PLAYBACK] = { .name = "rt5650 Playback", .stream_name = "rt5650 Playback", - .cpu_dai_name = "DL1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback), }, [DAI_LINK_CAPTURE] = { .name = "rt5650 Capture", .stream_name = "rt5650 Capture", - .cpu_dai_name = "VUL", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture), }, [DAI_LINK_HDMI] = { .name = "HDMI", .stream_name = "HDMI PCM", - .cpu_dai_name = "HDMI", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(hdmi_pcm), }, /* Back End DAI links */ [DAI_LINK_CODEC_I2S] = { .name = "Codec", - .cpu_dai_name = "I2S", .no_pcm = 1, - .codecs = mt8173_rt5650_codecs, - .num_codecs = 2, .init = mt8173_rt5650_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -210,13 +216,13 @@ static struct snd_soc_dai_link mt8173_rt5650_dais[] = { .ignore_pmdown_time = 1, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(codec), }, [DAI_LINK_HDMI_I2S] = { .name = "HDMI BE", - .cpu_dai_name = "HDMIO", .no_pcm = 1, - .codec_dai_name = "i2s-hifi", .dpcm_playback = 1, + SND_SOC_DAILINK_REG(hdmi_be), }, }; @@ -250,19 +256,20 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev) } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->platform_name) + if (dai_link->platforms->name) continue; - dai_link->platform_of_node = platform_node; + dai_link->platforms->of_node = platform_node; } - mt8173_rt5650_codecs[0].of_node = + mt8173_rt5650_dais[DAI_LINK_CODEC_I2S].codecs[0].of_node = of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 0); - if (!mt8173_rt5650_codecs[0].of_node) { + if (!mt8173_rt5650_dais[DAI_LINK_CODEC_I2S].codecs[0].of_node) { dev_err(&pdev->dev, "Property 'audio-codec' missing or invalid\n"); return -EINVAL; } - mt8173_rt5650_codecs[1].of_node = mt8173_rt5650_codecs[0].of_node; + mt8173_rt5650_dais[DAI_LINK_CODEC_I2S].codecs[1].of_node = + mt8173_rt5650_dais[DAI_LINK_CODEC_I2S].codecs[0].of_node; np = of_get_child_by_name(pdev->dev.of_node, "codec-capture"); if (np) { @@ -274,7 +281,8 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev) __func__, ret); return ret; } - mt8173_rt5650_codecs[1].dai_name = codec_capture_dai; + mt8173_rt5650_dais[DAI_LINK_CODEC_I2S].codecs[1].dai_name = + codec_capture_dai; } if (device_property_present(&pdev->dev, "mediatek,mclk")) { @@ -288,9 +296,9 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev) } } - mt8173_rt5650_dais[DAI_LINK_HDMI_I2S].codec_of_node = + mt8173_rt5650_dais[DAI_LINK_HDMI_I2S].codecs->of_node = of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 1); - if (!mt8173_rt5650_dais[DAI_LINK_HDMI_I2S].codec_of_node) { + if (!mt8173_rt5650_dais[DAI_LINK_HDMI_I2S].codecs->of_node) { dev_err(&pdev->dev, "Property 'audio-codec' missing or invalid\n"); return -EINVAL; From patchwork Wed May 22 03:39:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954757 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 90033912 for ; Wed, 22 May 2019 03:45:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C86828B44 for ; Wed, 22 May 2019 03:45:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D9A028B47; Wed, 22 May 2019 03:45:02 +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 9285A28B44 for ; Wed, 22 May 2019 03:45:01 +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 EA2551615; Wed, 22 May 2019 05:44:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EA2551615 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496700; bh=oQOQunPf/sQ8lOyRpzK7riLB333z3BghsjjX/8Z7xoE=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fiE4KdBY+xY6m7Mm2Xc2C2OpEBd3ExeOG8G1s/kzgD49zGIILt2CIw/Of2lrb8t/m jaoj9SxPeDUk2mkBoSq/RCa/i3t0m2RKVTvRa8ZST4kCpGowGZP1HeZUbQuUqTJWRw ZoAzgTmPXg6yV5HkW1F/PWppmqmlWuzGurW/l01A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 152E7F89749; Wed, 22 May 2019 05:39:22 +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 CEE33F89752; Wed, 22 May 2019 05:39:18 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 08F18F89749 for ; Wed, 22 May 2019 05:39:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 08F18F89749 Date: 22 May 2019 12:39:12 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627217" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:39:12 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 3F64F4003EB5; Wed, 22 May 2019 12:39:12 +0900 (JST) Message-ID: <87ftp7p3wu.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 009/145] ASoC: mediatek: mt8173-rt5650-rt5676: 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 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/mediatek/mt8173/mt8173-rt5650-rt5676.c | 85 +++++++++++++----------- 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c index d83cd03..9d4dd97 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c @@ -111,14 +111,6 @@ static int mt8173_rt5650_rt5676_init(struct snd_soc_pcm_runtime *runtime) &mt8173_rt5650_rt5676_jack); } -static struct snd_soc_dai_link_component mt8173_rt5650_rt5676_codecs[] = { - { - .dai_name = "rt5645-aif1", - }, - { - .dai_name = "rt5677-aif1", - }, -}; enum { DAI_LINK_PLAYBACK, @@ -129,47 +121,69 @@ enum { DAI_LINK_INTERCODEC }; +SND_SOC_DAILINK_DEFS(playback, + DAILINK_COMP_ARRAY(COMP_CPU("DL1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture, + DAILINK_COMP_ARRAY(COMP_CPU("VUL")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hdmi_pcm, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(codec, + DAILINK_COMP_ARRAY(COMP_CPU("I2S")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5645-aif1"), + COMP_CODEC(NULL, "rt5677-aif1")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hdmi_be, + DAILINK_COMP_ARRAY(COMP_CPU("HDMIO")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "i2s-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(intercodec, + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5677-aif2")), + DAILINK_COMP_ARRAY(COMP_DUMMY())); + /* Digital audio interface glue - connects codec <---> CPU */ static struct snd_soc_dai_link mt8173_rt5650_rt5676_dais[] = { /* Front End DAI links */ [DAI_LINK_PLAYBACK] = { .name = "rt5650_rt5676 Playback", .stream_name = "rt5650_rt5676 Playback", - .cpu_dai_name = "DL1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback), }, [DAI_LINK_CAPTURE] = { .name = "rt5650_rt5676 Capture", .stream_name = "rt5650_rt5676 Capture", - .cpu_dai_name = "VUL", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture), }, [DAI_LINK_HDMI] = { .name = "HDMI", .stream_name = "HDMI PCM", - .cpu_dai_name = "HDMI", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(hdmi_pcm), }, /* Back End DAI links */ [DAI_LINK_CODEC_I2S] = { .name = "Codec", - .cpu_dai_name = "I2S", .no_pcm = 1, - .codecs = mt8173_rt5650_rt5676_codecs, - .num_codecs = 2, .init = mt8173_rt5650_rt5676_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -177,26 +191,23 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5676_dais[] = { .ignore_pmdown_time = 1, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(codec), }, [DAI_LINK_HDMI_I2S] = { .name = "HDMI BE", - .cpu_dai_name = "HDMIO", .no_pcm = 1, - .codec_dai_name = "i2s-hifi", .dpcm_playback = 1, + SND_SOC_DAILINK_REG(hdmi_be), }, /* rt5676 <-> rt5650 intercodec link: Sets rt5676 I2S2 as master */ [DAI_LINK_INTERCODEC] = { .name = "rt5650_rt5676 intercodec", .stream_name = "rt5650_rt5676 intercodec", - .cpu_dai_name = "snd-soc-dummy-dai", - .platform_name = "snd-soc-dummy", .no_pcm = 1, - .codec_dai_name = "rt5677-aif2", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(intercodec), }, - }; static struct snd_soc_codec_conf mt8173_rt5650_rt5676_codec_conf[] = { @@ -235,34 +246,34 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev) } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->platform_name) + if (dai_link->platforms->name) continue; - dai_link->platform_of_node = platform_node; + dai_link->platforms->of_node = platform_node; } - mt8173_rt5650_rt5676_codecs[0].of_node = + mt8173_rt5650_rt5676_dais[DAI_LINK_CODEC_I2S].codecs[0].of_node = of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 0); - if (!mt8173_rt5650_rt5676_codecs[0].of_node) { + if (!mt8173_rt5650_rt5676_dais[DAI_LINK_CODEC_I2S].codecs[0].of_node) { dev_err(&pdev->dev, "Property 'audio-codec' missing or invalid\n"); return -EINVAL; } - mt8173_rt5650_rt5676_codecs[1].of_node = + mt8173_rt5650_rt5676_dais[DAI_LINK_CODEC_I2S].codecs[1].of_node = of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 1); - if (!mt8173_rt5650_rt5676_codecs[1].of_node) { + if (!mt8173_rt5650_rt5676_dais[DAI_LINK_CODEC_I2S].codecs[1].of_node) { dev_err(&pdev->dev, "Property 'audio-codec' missing or invalid\n"); return -EINVAL; } mt8173_rt5650_rt5676_codec_conf[0].of_node = - mt8173_rt5650_rt5676_codecs[1].of_node; + mt8173_rt5650_rt5676_dais[DAI_LINK_CODEC_I2S].codecs[1].of_node; - mt8173_rt5650_rt5676_dais[DAI_LINK_INTERCODEC].codec_of_node = - mt8173_rt5650_rt5676_codecs[1].of_node; + mt8173_rt5650_rt5676_dais[DAI_LINK_INTERCODEC].codecs->of_node = + mt8173_rt5650_rt5676_dais[DAI_LINK_CODEC_I2S].codecs[1].of_node; - mt8173_rt5650_rt5676_dais[DAI_LINK_HDMI_I2S].codec_of_node = + mt8173_rt5650_rt5676_dais[DAI_LINK_HDMI_I2S].codecs->of_node = of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 2); - if (!mt8173_rt5650_rt5676_dais[DAI_LINK_HDMI_I2S].codec_of_node) { + if (!mt8173_rt5650_rt5676_dais[DAI_LINK_HDMI_I2S].codecs->of_node) { dev_err(&pdev->dev, "Property 'audio-codec' missing or invalid\n"); return -EINVAL; From patchwork Wed May 22 03:39:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954759 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 BB2B9912 for ; Wed, 22 May 2019 03:45:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A637228B3E for ; Wed, 22 May 2019 03:45:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9794A28B45; Wed, 22 May 2019 03:45:52 +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 D04BA28B3E for ; Wed, 22 May 2019 03:45:51 +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 309F91616; Wed, 22 May 2019 05:45:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 309F91616 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496750; bh=GK6gVRXp/UukAbVgWc6myC/+r7ktVXvoGP9XGICxbEM=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OtU/WeMO+AsjtEFgQgNEQ9IltANzal5508PasQL8ZcZYGZf25YeDZ2TihegxJG5Yf WcuA0V/qLJowCPWFyLnhiLdSQiosFKkhVLkaB5jvYOQHk2IfORoc1+ae7SjYhzm3Q/ j9rA7BCp1tduxNet3bljUzSvVvmPXCinLqt9aebY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 44CA1F8962C; Wed, 22 May 2019 05:39:42 +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 E38D0F89730; Wed, 22 May 2019 05:39:30 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id CDEFEF89757 for ; Wed, 22 May 2019 05:39:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CDEFEF89757 Date: 22 May 2019 12:39:24 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425158" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:39:24 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 89A154003EB3; Wed, 22 May 2019 12:39:24 +0900 (JST) Message-ID: <87ef4rp3wh.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 010/145] ASoC: mediatek: mt8173-rt5650-rt5514: 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 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/mediatek/mt8173/mt8173-rt5650-rt5514.c | 51 ++++++++++++------------ 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c index da5b58c..8717e87 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c @@ -98,51 +98,51 @@ static int mt8173_rt5650_rt5514_init(struct snd_soc_pcm_runtime *runtime) &mt8173_rt5650_rt5514_jack); } -static struct snd_soc_dai_link_component mt8173_rt5650_rt5514_codecs[] = { - { - .dai_name = "rt5645-aif1", - }, - { - .dai_name = "rt5514-aif1", - }, -}; - enum { DAI_LINK_PLAYBACK, DAI_LINK_CAPTURE, DAI_LINK_CODEC_I2S, }; +SND_SOC_DAILINK_DEFS(playback, + DAILINK_COMP_ARRAY(COMP_CPU("DL1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture, + DAILINK_COMP_ARRAY(COMP_CPU("VUL")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(codec, + DAILINK_COMP_ARRAY(COMP_CPU("I2S")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5645-aif1"), + COMP_CODEC(NULL, "rt5514-aif1")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + /* Digital audio interface glue - connects codec <---> CPU */ static struct snd_soc_dai_link mt8173_rt5650_rt5514_dais[] = { /* Front End DAI links */ [DAI_LINK_PLAYBACK] = { .name = "rt5650_rt5514 Playback", .stream_name = "rt5650_rt5514 Playback", - .cpu_dai_name = "DL1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback), }, [DAI_LINK_CAPTURE] = { .name = "rt5650_rt5514 Capture", .stream_name = "rt5650_rt5514 Capture", - .cpu_dai_name = "VUL", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture), }, /* Back End DAI links */ [DAI_LINK_CODEC_I2S] = { .name = "Codec", - .cpu_dai_name = "I2S", .no_pcm = 1, - .codecs = mt8173_rt5650_rt5514_codecs, - .num_codecs = 2, .init = mt8173_rt5650_rt5514_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -150,6 +150,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5514_dais[] = { .ignore_pmdown_time = 1, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(codec), }, }; @@ -189,27 +190,27 @@ static int mt8173_rt5650_rt5514_dev_probe(struct platform_device *pdev) } for_each_card_prelinks(card, i, dai_link) { - if (dai_link->platform_name) + if (dai_link->platforms->name) continue; - dai_link->platform_of_node = platform_node; + dai_link->platforms->of_node = platform_node; } - mt8173_rt5650_rt5514_codecs[0].of_node = + mt8173_rt5650_rt5514_dais[DAI_LINK_CODEC_I2S].codecs[0].of_node = of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 0); - if (!mt8173_rt5650_rt5514_codecs[0].of_node) { + if (!mt8173_rt5650_rt5514_dais[DAI_LINK_CODEC_I2S].codecs[0].of_node) { dev_err(&pdev->dev, "Property 'audio-codec' missing or invalid\n"); return -EINVAL; } - mt8173_rt5650_rt5514_codecs[1].of_node = + mt8173_rt5650_rt5514_dais[DAI_LINK_CODEC_I2S].codecs[1].of_node = of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 1); - if (!mt8173_rt5650_rt5514_codecs[1].of_node) { + if (!mt8173_rt5650_rt5514_dais[DAI_LINK_CODEC_I2S].codecs[1].of_node) { dev_err(&pdev->dev, "Property 'audio-codec' missing or invalid\n"); return -EINVAL; } mt8173_rt5650_rt5514_codec_conf[0].of_node = - mt8173_rt5650_rt5514_codecs[1].of_node; + mt8173_rt5650_rt5514_dais[DAI_LINK_CODEC_I2S].codecs[1].of_node; card->dev = &pdev->dev; From patchwork Wed May 22 03:39:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954761 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 7CB34912 for ; Wed, 22 May 2019 03:46:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 682CA28B3E for ; Wed, 22 May 2019 03:46:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A03B28B45; Wed, 22 May 2019 03:46:26 +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 606F828B3E for ; Wed, 22 May 2019 03:46:25 +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 B7E80169F; Wed, 22 May 2019 05:45:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B7E80169F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496783; bh=hNH64jjWIDt1fnuBGFFZcOaSdzEEDHqAJHIRfY0oDhc=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mo7V5bM46aICOgNKXRS/i4ChBw3kq6XT14OmlMySnn8zEGqsq9ZlqzbIqQyBU7d0S 4eO/5mtWkLR9AlcbfLcmrYVwG5+bnbyRqm/hqOlhEI8C+qvZPgX+td1MlJXfExrOSY lh/intatjDbyvyLRPO0dzf5TTQDbLk3nd6OnOnvQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EB665F8972A; Wed, 22 May 2019 05:39:44 +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 2BFD2F8972A; Wed, 22 May 2019 05:39:36 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id A3758F89730 for ; Wed, 22 May 2019 05:39:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A3758F89730 Date: 22 May 2019 12:39:30 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425163" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:39:30 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 306694003EB3; Wed, 22 May 2019 12:39:30 +0900 (JST) Message-ID: <87d0kbp3wc.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 011/145] ASoC: mediatek: mt8183-da7219-max98357: 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 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/mediatek/mt8183/mt8183-da7219-max98357.c | 182 ++++++++++++--------- 1 file changed, 107 insertions(+), 75 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c index 31ea863..1fadbbc 100644 --- a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c @@ -30,18 +30,6 @@ static struct snd_soc_jack_pin headset_jack_pins[] = { }, }; -static struct snd_soc_dai_link_component -mt8183_da7219_max98357_external_codecs[] = { - { - .name = "max98357a", - .dai_name = "HiFi", - }, - { - .name = "da7219.5-001a", - .dai_name = "da7219-hifi", - }, -}; - static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { @@ -149,191 +137,244 @@ static const struct snd_soc_dapm_route mt8183_da7219_max98357_dapm_routes[] = { {"IT6505_8CH", NULL, "TDM"}, }; +/* FE */ +SND_SOC_DAILINK_DEFS(playback1, + DAILINK_COMP_ARRAY(COMP_CPU("DL1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(playback2, + DAILINK_COMP_ARRAY(COMP_CPU("DL2")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(playback3, + DAILINK_COMP_ARRAY(COMP_CPU("DL3")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture1, + DAILINK_COMP_ARRAY(COMP_CPU("UL1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture2, + DAILINK_COMP_ARRAY(COMP_CPU("UL2")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture3, + DAILINK_COMP_ARRAY(COMP_CPU("UL3")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture_mono, + DAILINK_COMP_ARRAY(COMP_CPU("UL_MONO_1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(playback_hdmi, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +/* BE */ +SND_SOC_DAILINK_DEFS(primary_codec, + DAILINK_COMP_ARRAY(COMP_CPU("ADDA")), + DAILINK_COMP_ARRAY(COMP_CODEC("mt6358-sound", "mt6358-snd-codec-aif1")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(pcm1, + DAILINK_COMP_ARRAY(COMP_CPU("PCM 1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(pcm2, + DAILINK_COMP_ARRAY(COMP_CPU("PCM 2")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(i2s0, + DAILINK_COMP_ARRAY(COMP_CPU("I2S0")), + DAILINK_COMP_ARRAY(COMP_CODEC("bt-sco", "bt-sco-pcm")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(i2s1, + DAILINK_COMP_ARRAY(COMP_CPU("I2S1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(i2s2, + DAILINK_COMP_ARRAY(COMP_CPU("I2S2")), + DAILINK_COMP_ARRAY(COMP_CODEC("da7219.5-001a", "da7219-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(i2s3, + DAILINK_COMP_ARRAY(COMP_CPU("I2S3")), + DAILINK_COMP_ARRAY(COMP_CODEC("max98357a", "HiFi"), + COMP_CODEC("da7219.5-001a", "da7219-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(i2s5, + DAILINK_COMP_ARRAY(COMP_CPU("I2S5")), + DAILINK_COMP_ARRAY(COMP_CODEC("bt-sco", "bt-sco-pcm")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(tdm, + DAILINK_COMP_ARRAY(COMP_CPU("TDM")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link mt8183_da7219_max98357_dai_links[] = { /* FE */ { .name = "Playback_1", .stream_name = "Playback_1", - .cpu_dai_name = "DL1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback1), }, { .name = "Playback_2", .stream_name = "Playback_2", - .cpu_dai_name = "DL2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback2), }, { .name = "Playback_3", .stream_name = "Playback_3", - .cpu_dai_name = "DL3", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback3), }, { .name = "Capture_1", .stream_name = "Capture_1", - .cpu_dai_name = "UL1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture1), }, { .name = "Capture_2", .stream_name = "Capture_2", - .cpu_dai_name = "UL2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture2), }, { .name = "Capture_3", .stream_name = "Capture_3", - .cpu_dai_name = "UL3", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture3), }, { .name = "Capture_Mono_1", .stream_name = "Capture_Mono_1", - .cpu_dai_name = "UL_MONO_1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture_mono), }, { .name = "Playback_HDMI", .stream_name = "Playback_HDMI", - .cpu_dai_name = "HDMI", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback_hdmi), }, /* BE */ { .name = "Primary Codec", - .cpu_dai_name = "ADDA", - .codec_dai_name = "mt6358-snd-codec-aif1", - .codec_name = "mt6358-sound", .no_pcm = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(primary_codec), }, { .name = "PCM 1", - .cpu_dai_name = "PCM 1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .no_pcm = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", - .cpu_dai_name = "PCM 2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .no_pcm = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(pcm2), }, { .name = "I2S0", - .cpu_dai_name = "I2S0", - .codec_dai_name = "bt-sco-pcm", - .codec_name = "bt-sco", .no_pcm = 1, .dpcm_capture = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, + SND_SOC_DAILINK_REG(i2s0), }, { .name = "I2S1", - .cpu_dai_name = "I2S1", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", .no_pcm = 1, .dpcm_playback = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, + SND_SOC_DAILINK_REG(i2s1), }, { .name = "I2S2", - .cpu_dai_name = "I2S2", - .codec_dai_name = "da7219-hifi", - .codec_name = "da7219.5-001a", .no_pcm = 1, .dpcm_capture = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_da7219_i2s_ops, + SND_SOC_DAILINK_REG(i2s2), }, { .name = "I2S3", - .cpu_dai_name = "I2S3", - .codecs = mt8183_da7219_max98357_external_codecs, - .num_codecs = - ARRAY_SIZE(mt8183_da7219_max98357_external_codecs), .no_pcm = 1, .dpcm_playback = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_da7219_i2s_ops, + SND_SOC_DAILINK_REG(i2s3), }, { .name = "I2S5", - .cpu_dai_name = "I2S5", - .codec_dai_name = "bt-sco-pcm", - .codec_name = "bt-sco", .no_pcm = 1, .dpcm_playback = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, + SND_SOC_DAILINK_REG(i2s5), }, { .name = "TDM", - .cpu_dai_name = "TDM", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .no_pcm = 1, .dpcm_playback = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(tdm), }, }; @@ -403,18 +444,9 @@ static int mt8183_da7219_max98357_dev_probe(struct platform_device *pdev) } for_each_card_prelinks(card, i, dai_link) { - /* In the alsa soc-core, the "platform" will be - * allocated by devm_kzalloc if null. - * There is a special case that registerring - * sound card is failed at the first time, but - * the "platform" will not null when probe is trying - * again. It's not expected normally. - */ - dai_link->platforms = NULL; - - if (dai_link->platform_name) + if (dai_link->platforms->name) continue; - dai_link->platform_of_node = platform_node; + dai_link->platforms->of_node = platform_node; } mt8183_da7219_max98357_headset_dev.codec_of_node = From patchwork Wed May 22 03:39:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954763 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 AFE66912 for ; Wed, 22 May 2019 03:47:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EDB928B3E for ; Wed, 22 May 2019 03:47:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 937D628B49; Wed, 22 May 2019 03:47:00 +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 9B41828B3E for ; Wed, 22 May 2019 03:46:59 +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 00ED41691; Wed, 22 May 2019 05:46:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 00ED41691 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496818; bh=d9U7iIVSHqZ9He9627JzpjrLEVRiYnTilk6G5epZjaU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qxpHWv8mWE0PSxpBDjy0ccvnQseFLQmvZaOxGDjfqTfvaxuK0kLeVH/CeIjZSd5HA asuxViS5AmTwSCdtBHRxDqxLC/diJ9ipINIbo9cTLIzDjJU9IcqYPoEwJNsUKmZBcW dywCk2pL7wNd2hj0pWqWcyz3/nWzWX/cODOGeZMA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A6E07F8975C; Wed, 22 May 2019 05:39:46 +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 766CAF89730; Wed, 22 May 2019 05:39:39 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id C114AF8962C for ; Wed, 22 May 2019 05:39:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C114AF8962C Date: 22 May 2019 12:39:35 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425167" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:39:35 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 4773D416FEC5; Wed, 22 May 2019 12:39:35 +0900 (JST) Message-ID: <87blzvp3w7.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 012/145] ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: 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 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 --- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 168 +++++++++++++-------- 1 file changed, 106 insertions(+), 62 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c index 4e44e56..0ea3bbe 100644 --- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c @@ -109,193 +109,246 @@ static const struct snd_soc_ops mt8183_mt6358_ts3a227_max98357_bt_sco_ops = { .startup = mt8183_mt6358_ts3a227_max98357_bt_sco_startup, }; +/* FE */ +SND_SOC_DAILINK_DEFS(playback1, + DAILINK_COMP_ARRAY(COMP_CPU("DL1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(playback2, + DAILINK_COMP_ARRAY(COMP_CPU("DL2")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(playback3, + DAILINK_COMP_ARRAY(COMP_CPU("DL3")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture1, + DAILINK_COMP_ARRAY(COMP_CPU("UL1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture2, + DAILINK_COMP_ARRAY(COMP_CPU("UL2")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture3, + DAILINK_COMP_ARRAY(COMP_CPU("UL3")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(capture_mono, + DAILINK_COMP_ARRAY(COMP_CPU("UL_MONO_1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(playback_hdmi, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +/* BE */ +SND_SOC_DAILINK_DEFS(primary_codec, + DAILINK_COMP_ARRAY(COMP_CPU("ADDA")), + DAILINK_COMP_ARRAY(COMP_CODEC("mt6358-sound", "mt6358-snd-codec-aif1")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(pcm1, + DAILINK_COMP_ARRAY(COMP_CPU("PCM 1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(pcm2, + DAILINK_COMP_ARRAY(COMP_CPU("PCM 2")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(i2s0, + DAILINK_COMP_ARRAY(COMP_CPU("I2S0")), + DAILINK_COMP_ARRAY(COMP_CODEC("bt-sco", "bt-sco-pcm")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(i2s1, + DAILINK_COMP_ARRAY(COMP_CPU("I2S1")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(i2s2, + DAILINK_COMP_ARRAY(COMP_CPU("I2S2")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(i2s3, + DAILINK_COMP_ARRAY(COMP_CPU("I2S3")), + DAILINK_COMP_ARRAY(COMP_CODEC("max98357a", "HiFi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(i2s5, + DAILINK_COMP_ARRAY(COMP_CPU("I2S5")), + DAILINK_COMP_ARRAY(COMP_CODEC("bt-sco", "bt-sco-pcm")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(tdm, + DAILINK_COMP_ARRAY(COMP_CPU("TDM")), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link mt8183_mt6358_ts3a227_max98357_dai_links[] = { /* FE */ { .name = "Playback_1", .stream_name = "Playback_1", - .cpu_dai_name = "DL1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback1), }, { .name = "Playback_2", .stream_name = "Playback_2", - .cpu_dai_name = "DL2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, .ops = &mt8183_mt6358_ts3a227_max98357_bt_sco_ops, + SND_SOC_DAILINK_REG(playback2), }, { .name = "Playback_3", .stream_name = "Playback_3", - .cpu_dai_name = "DL3", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback3), }, { .name = "Capture_1", .stream_name = "Capture_1", - .cpu_dai_name = "UL1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, .ops = &mt8183_mt6358_ts3a227_max98357_bt_sco_ops, + SND_SOC_DAILINK_REG(capture1), }, { .name = "Capture_2", .stream_name = "Capture_2", - .cpu_dai_name = "UL2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture2), }, { .name = "Capture_3", .stream_name = "Capture_3", - .cpu_dai_name = "UL3", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture3), }, { .name = "Capture_Mono_1", .stream_name = "Capture_Mono_1", - .cpu_dai_name = "UL_MONO_1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(capture_mono), }, { .name = "Playback_HDMI", .stream_name = "Playback_HDMI", - .cpu_dai_name = "HDMI", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(playback_hdmi), }, /* BE */ { .name = "Primary Codec", - .cpu_dai_name = "ADDA", - .codec_dai_name = "mt6358-snd-codec-aif1", - .codec_name = "mt6358-sound", .no_pcm = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(primary_codec), }, { .name = "PCM 1", - .cpu_dai_name = "PCM 1", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .no_pcm = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", - .cpu_dai_name = "PCM 2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .no_pcm = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(pcm2), }, { .name = "I2S0", - .cpu_dai_name = "I2S0", - .codec_dai_name = "bt-sco-pcm", - .codec_name = "bt-sco", .no_pcm = 1, .dpcm_capture = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, + SND_SOC_DAILINK_REG(i2s0), }, { .name = "I2S1", - .cpu_dai_name = "I2S1", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", .no_pcm = 1, .dpcm_playback = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, + SND_SOC_DAILINK_REG(i2s1), }, { .name = "I2S2", - .cpu_dai_name = "I2S2", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", .no_pcm = 1, .dpcm_capture = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, + SND_SOC_DAILINK_REG(i2s2), }, { .name = "I2S3", - .cpu_dai_name = "I2S3", - .codec_dai_name = "HiFi", - .codec_name = "max98357a", .no_pcm = 1, .dpcm_playback = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, + SND_SOC_DAILINK_REG(i2s3), }, { .name = "I2S5", - .cpu_dai_name = "I2S5", - .codec_dai_name = "bt-sco-pcm", - .codec_name = "bt-sco", .no_pcm = 1, .dpcm_playback = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, + SND_SOC_DAILINK_REG(i2s5), }, { .name = "TDM", - .cpu_dai_name = "TDM", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .no_pcm = 1, .dpcm_playback = 1, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(tdm), }, }; @@ -357,18 +410,9 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev) } for_each_card_prelinks(card, i, dai_link) { - /* In the alsa soc-core, the "platform" will be - * allocated by devm_kzalloc if null. - * There is a special case that registerring - * sound card is failed at the first time, but - * the "platform" will not null when probe is trying - * again. It's not expected normally. - */ - dai_link->platforms = NULL; - - if (dai_link->platform_name) + if (dai_link->platforms->name) continue; - dai_link->platform_of_node = platform_node; + dai_link->platforms->of_node = platform_node; } mt8183_mt6358_ts3a227_max98357_headset_dev.codec_of_node = From patchwork Wed May 22 03:39:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954765 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 7FC6A14B6 for ; Wed, 22 May 2019 03:47:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F47A28B3E for ; Wed, 22 May 2019 03:47:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 615FE28B45; Wed, 22 May 2019 03:47:55 +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 8EA2F28B3E for ; Wed, 22 May 2019 03:47:54 +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 F01CB16AA; Wed, 22 May 2019 05:47:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F01CB16AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496873; bh=DRciuz5U0blCAfZ1TPl7QPdig4hfQAxwUZvJGBVCM3c=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HrsJbVn1yPWxHc6rR4ixIzpt1zIAlVQU19yP75k1weSvF1CvdWlU7t3v3i+CWoObZ SJdeWVtstok6a1amnRs5qIOHlxm9GFJgjoSriOBpVJ0nG9s4b51ocqTcHC5zsQJPT6 2oKe4v91Ve/VRNUTJY+y8QK5UXUsS6hzZMARk3eE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EF3B8F8976C; Wed, 22 May 2019 05:39:50 +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 B3008F89767; Wed, 22 May 2019 05:39:47 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 6429EF89730 for ; Wed, 22 May 2019 05:39:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6429EF89730 Date: 22 May 2019 12:39:40 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627253" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:39:40 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 147824009405; Wed, 22 May 2019 12:39:40 +0900 (JST) Message-ID: <87a7ffp3w2.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 013/145] ASoC: samsung: bells: 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 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/samsung/bells.c | 87 +++++++++++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 33 deletions(-) diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c index 770845e..b60b226 100644 --- a/sound/soc/samsung/bells.c +++ b/sound/soc/samsung/bells.c @@ -242,119 +242,140 @@ static const struct snd_soc_pcm_stream sub_params = { .channels_max = 2, }; +SND_SOC_DAILINK_DEFS(wm2200_cpu_dsp, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("spi0.0", "wm0010-sdi1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + +SND_SOC_DAILINK_DEFS(wm2200_dsp_codec, + DAILINK_COMP_ARRAY(COMP_CPU("wm0010-sdi2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm2200.1-003a", "wm2200"))); + static struct snd_soc_dai_link bells_dai_wm2200[] = { { .name = "CPU-DSP", .stream_name = "CPU-DSP", - .cpu_dai_name = "samsung-i2s.0", - .codec_dai_name = "wm0010-sdi1", - .platform_name = "samsung-i2s.0", - .codec_name = "spi0.0", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(wm2200_cpu_dsp), }, { .name = "DSP-CODEC", .stream_name = "DSP-CODEC", - .cpu_dai_name = "wm0010-sdi2", - .codec_dai_name = "wm2200", - .codec_name = "wm2200.1-003a", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .params = &sub_params, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(wm2200_dsp_codec), }, }; +SND_SOC_DAILINK_DEFS(wm5102_cpu_dsp, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("spi0.0", "wm0010-sdi1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + +SND_SOC_DAILINK_DEFS(wm5102_dsp_codec, + DAILINK_COMP_ARRAY(COMP_CPU("wm0010-sdi2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm5102-codec", "wm5102-aif1"))); + +SND_SOC_DAILINK_DEFS(wm5102_baseband, + DAILINK_COMP_ARRAY(COMP_CPU("wm5102-aif2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm1250-ev1.1-0027", "wm1250-ev1"))); + +SND_SOC_DAILINK_DEFS(wm5102_sub, + DAILINK_COMP_ARRAY(COMP_CPU("wm5102-aif3")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9081.1-006c", "wm9081-hifi"))); + static struct snd_soc_dai_link bells_dai_wm5102[] = { { .name = "CPU-DSP", .stream_name = "CPU-DSP", - .cpu_dai_name = "samsung-i2s.0", - .codec_dai_name = "wm0010-sdi1", - .platform_name = "samsung-i2s.0", - .codec_name = "spi0.0", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(wm5102_cpu_dsp), }, { .name = "DSP-CODEC", .stream_name = "DSP-CODEC", - .cpu_dai_name = "wm0010-sdi2", - .codec_dai_name = "wm5102-aif1", - .codec_name = "wm5102-codec", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .params = &sub_params, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(wm5102_dsp_codec), }, { .name = "Baseband", .stream_name = "Baseband", - .cpu_dai_name = "wm5102-aif2", - .codec_dai_name = "wm1250-ev1", - .codec_name = "wm1250-ev1.1-0027", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ignore_suspend = 1, .params = &baseband_params, + SND_SOC_DAILINK_REG(wm5102_baseband), }, { .name = "Sub", .stream_name = "Sub", - .cpu_dai_name = "wm5102-aif3", - .codec_dai_name = "wm9081-hifi", - .codec_name = "wm9081.1-006c", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ignore_suspend = 1, .params = &sub_params, + SND_SOC_DAILINK_REG(wm5102_sub), }, }; +SND_SOC_DAILINK_DEFS(wm5110_cpu_dsp, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("spi0.0", "wm0010-sdi1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + +SND_SOC_DAILINK_DEFS(wm5110_dsp_codec, + DAILINK_COMP_ARRAY(COMP_CPU("wm0010-sdi2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm5110-codec", "wm5110-aif1"))); + +SND_SOC_DAILINK_DEFS(wm5110_baseband, + DAILINK_COMP_ARRAY(COMP_CPU("wm5110-aif2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm1250-ev1.1-0027", "wm1250-ev1"))); + + +SND_SOC_DAILINK_DEFS(wm5110_sub, + DAILINK_COMP_ARRAY(COMP_CPU("wm5110-aif3")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9081.1-006c", "wm9081-hifi"))); + static struct snd_soc_dai_link bells_dai_wm5110[] = { { .name = "CPU-DSP", .stream_name = "CPU-DSP", - .cpu_dai_name = "samsung-i2s.0", - .codec_dai_name = "wm0010-sdi1", - .platform_name = "samsung-i2s.0", - .codec_name = "spi0.0", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(wm5110_cpu_dsp), }, { .name = "DSP-CODEC", .stream_name = "DSP-CODEC", - .cpu_dai_name = "wm0010-sdi2", - .codec_dai_name = "wm5110-aif1", - .codec_name = "wm5110-codec", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .params = &sub_params, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(wm5110_dsp_codec), }, { .name = "Baseband", .stream_name = "Baseband", - .cpu_dai_name = "wm5110-aif2", - .codec_dai_name = "wm1250-ev1", - .codec_name = "wm1250-ev1.1-0027", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ignore_suspend = 1, .params = &baseband_params, + SND_SOC_DAILINK_REG(wm5110_baseband), }, { .name = "Sub", .stream_name = "Sub", - .cpu_dai_name = "wm5110-aif3", - .codec_dai_name = "wm9081-hifi", - .codec_name = "wm9081.1-006c", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ignore_suspend = 1, .params = &sub_params, + SND_SOC_DAILINK_REG(wm5110_sub), }, }; From patchwork Wed May 22 03:39:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954769 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 48647912 for ; Wed, 22 May 2019 03:48:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32A1B28B3E for ; Wed, 22 May 2019 03:48:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2335D28B45; Wed, 22 May 2019 03:48:33 +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 6DEFC28B3E for ; Wed, 22 May 2019 03:48:32 +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 BCC081698; Wed, 22 May 2019 05:47:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BCC081698 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496910; bh=Nh18Pe8/RtailZyEAWpfIbaR+nn2RRlnGNCIgRmVwuE=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=j6MbuWohgKv+10/CygHIbMCSCVH3998IzbrXXy8RrLBeyo0yBUYdhGk8bSwfirjkB 80lyCZGcFR56454ur4XuDjVwGFId6fj5YFtxowzJ4NzCiJyaHX6TtJgCDJJF8VDpVN LmiES14B0EbGzan4gVi2tcO73ysxV8bbjggSW9iU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 561E8F89771; Wed, 22 May 2019 05:39:53 +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 92AE6F89770; Wed, 22 May 2019 05:39:51 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id BDFE3F89763 for ; Wed, 22 May 2019 05:39:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BDFE3F89763 Date: 22 May 2019 12:39:45 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627257" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:39:45 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 44FB74009405; Wed, 22 May 2019 12:39:45 +0900 (JST) Message-ID: <878suzp3vx.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 014/145] ASoC: samsung: smdk_wm8580: 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 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/samsung/smdk_wm8580.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/samsung/smdk_wm8580.c b/sound/soc/samsung/smdk_wm8580.c index 987807e..d096ff9 100644 --- a/sound/soc/samsung/smdk_wm8580.c +++ b/sound/soc/samsung/smdk_wm8580.c @@ -140,27 +140,31 @@ enum { #define SMDK_DAI_FMT (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | \ SND_SOC_DAIFMT_CBM_CFM) +SND_SOC_DAILINK_DEFS(paif_rx, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8580.0-001b", "wm8580-hifi-playback")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + +SND_SOC_DAILINK_DEFS(paif_tx, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8580.0-001b", "wm8580-hifi-capture")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + static struct snd_soc_dai_link smdk_dai[] = { [PRI_PLAYBACK] = { /* Primary Playback i/f */ .name = "WM8580 PAIF RX", .stream_name = "Playback", - .cpu_dai_name = "samsung-i2s.2", - .codec_dai_name = "wm8580-hifi-playback", - .platform_name = "samsung-i2s.0", - .codec_name = "wm8580.0-001b", .dai_fmt = SMDK_DAI_FMT, .ops = &smdk_ops, + SND_SOC_DAILINK_REG(paif_rx), }, [PRI_CAPTURE] = { /* Primary Capture i/f */ .name = "WM8580 PAIF TX", .stream_name = "Capture", - .cpu_dai_name = "samsung-i2s.2", - .codec_dai_name = "wm8580-hifi-capture", - .platform_name = "samsung-i2s.0", - .codec_name = "wm8580.0-001b", .dai_fmt = SMDK_DAI_FMT, .init = smdk_wm8580_init_paiftx, .ops = &smdk_ops, + SND_SOC_DAILINK_REG(paif_tx), }, }; From patchwork Wed May 22 03:39:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954771 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 537B1912 for ; Wed, 22 May 2019 03:49:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40A2E28B2C for ; Wed, 22 May 2019 03:49:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31D2C28B45; Wed, 22 May 2019 03:49:14 +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 6727A28B2C for ; Wed, 22 May 2019 03:49:13 +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 BA0341677; Wed, 22 May 2019 05:48:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BA0341677 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496951; bh=TplX3E3mtjJzwKsfyqfD2y8ioKzDDP0hGH/AZgn4xo4=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TabQ2eubPKM29D3bB5Eb0m747+PgieQ7tVYYQ1zPl1LW7T/o2ufL/XGWk/WoffsGJ nkHoVdxm8uxaQ6T+GvMHg5noI514M4pqW9F+/4xnqSiKk7J3066A+GIMFaiw68cyIm GPEPb5ULlQ018GmIptoEGAJ6pAPkzurqY/0dt1Rc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6CF35F89776; Wed, 22 May 2019 05:39:57 +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 E0187F89776; Wed, 22 May 2019 05:39:55 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id D8397F89763 for ; Wed, 22 May 2019 05:39:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D8397F89763 Date: 22 May 2019 12:39:50 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627262" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:39:50 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 6422E416FEC5; Wed, 22 May 2019 12:39:50 +0900 (JST) Message-ID: <877eajp3vs.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 015/145] 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 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/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 135d8c2..28f8be0 100644 --- a/sound/soc/samsung/smdk_wm8994.c +++ b/sound/soc/samsung/smdk_wm8994.c @@ -100,28 +100,32 @@ static int smdk_wm8994_init_paiftx(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAILINK_DEFS(aif1, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8994-codec", "wm8994-aif1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + +SND_SOC_DAILINK_DEFS(fifo_tx, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s-sec")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8994-codec", "wm8994-aif1")), + DAILINK_COMP_ARRAY(COMP_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_DAILINK_REG(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_DAILINK_REG(fifo_tx), }, }; @@ -153,17 +157,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); From patchwork Wed May 22 03:39:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954773 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 476F4912 for ; Wed, 22 May 2019 03:49:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3388E28B2C for ; Wed, 22 May 2019 03:49:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24E3B28B45; Wed, 22 May 2019 03:49: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 7CDE428B2C for ; Wed, 22 May 2019 03:49:47 +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 CDC9F16B1; Wed, 22 May 2019 05:48:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CDC9F16B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558496985; bh=828eaqCS0roPuxlZWo9JCzTt3aLBLaJxfDAbAke3zF0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Y7uWHXcG1e59mXgHP3q7oPTArhcgOTM3q/ro8zahxoDkiwyV2qu6qF6dQjg0m/75+ Ng8osx9vM8uxokDfMkzI7hcHcUUWyjGJl3D9R9S/fIfI6nHG3il6wt4vYnUDQcSt5m 3DY7xOdt3KON+HfvcTJYjX7ZIP9Wl+x3OcLd1mc4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 199ECF89763; Wed, 22 May 2019 05:40:03 +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 A6D9EF8977B; Wed, 22 May 2019 05:40:00 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id D7ABDF89763 for ; Wed, 22 May 2019 05:39:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D7ABDF89763 Date: 22 May 2019 12:39:55 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627269" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:39:55 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 642AE4009405; Wed, 22 May 2019 12:39:55 +0900 (JST) Message-ID: <875zq3p3vn.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 016/145] ASoC: samsung: smdk_wm8994pcm: 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 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/samsung/smdk_wm8994pcm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/smdk_wm8994pcm.c b/sound/soc/samsung/smdk_wm8994pcm.c index 43171d6..2e3dc73 100644 --- a/sound/soc/samsung/smdk_wm8994pcm.c +++ b/sound/soc/samsung/smdk_wm8994pcm.c @@ -89,17 +89,19 @@ static struct snd_soc_ops smdk_wm8994_pcm_ops = { .hw_params = smdk_wm8994_pcm_hw_params, }; +SND_SOC_DAILINK_DEFS(paif_pcm, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-pcm.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8994-codec", "wm8994-aif1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-pcm.0"))); + static struct snd_soc_dai_link smdk_dai[] = { { .name = "WM8994 PAIF PCM", .stream_name = "Primary PCM", - .cpu_dai_name = "samsung-pcm.0", - .codec_dai_name = "wm8994-aif1", - .platform_name = "samsung-pcm.0", - .codec_name = "wm8994-codec", .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &smdk_wm8994_pcm_ops, + SND_SOC_DAILINK_REG(paif_pcm), }, }; From patchwork Wed May 22 03:40: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: 10954775 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 35745912 for ; Wed, 22 May 2019 03:50:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2508B28AE3 for ; Wed, 22 May 2019 03:50:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 184B228B37; Wed, 22 May 2019 03:50:31 +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 69C8228AE3 for ; Wed, 22 May 2019 03:50:30 +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 BE58816A5; Wed, 22 May 2019 05:49:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BE58816A5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497028; bh=6yN7YVdVvsbXR1ao0+s6ygvptKErZ7ircXvevKwLHNk=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=K5KCT0+1hR5zORn4IxlfV/3yeMClDpze+bPIACMKsPQWCF5ZyLYqrHn+CxeP+kp5d mEDeoWfI3DYuPfqma7kGJCkbTLC6dK3PGqkUelnzQes74N+DkUOVcoWE2rg4tiNBOT Qsa5jpeoGp9zWy2MIkUKVDAb0i0g79w5/A4iFvwM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1922AF89778; Wed, 22 May 2019 05:40: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 69C0AF89778; Wed, 22 May 2019 05:40:07 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 7D9A5F89778 for ; Wed, 22 May 2019 05:40:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7D9A5F89778 Date: 22 May 2019 12:40:00 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425191" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:40:00 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 3B3E54003EB3; Wed, 22 May 2019 12:40:00 +0900 (JST) Message-ID: <874l5np3vi.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 017/145] ASoC: samsung: smdk_spdif: 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 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/samsung/smdk_spdif.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/smdk_spdif.c b/sound/soc/samsung/smdk_spdif.c index 87a70d8..4baef84 100644 --- a/sound/soc/samsung/smdk_spdif.c +++ b/sound/soc/samsung/smdk_spdif.c @@ -142,14 +142,16 @@ static const struct snd_soc_ops smdk_spdif_ops = { .hw_params = smdk_hw_params, }; +SND_SOC_DAILINK_DEFS(spdif, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-spdif")), + DAILINK_COMP_ARRAY(COMP_CODEC("spdif-dit", "dit-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-spdif"))); + static struct snd_soc_dai_link smdk_dai = { .name = "S/PDIF", .stream_name = "S/PDIF PCM Playback", - .platform_name = "samsung-spdif", - .cpu_dai_name = "samsung-spdif", - .codec_dai_name = "dit-hifi", - .codec_name = "spdif-dit", .ops = &smdk_spdif_ops, + SND_SOC_DAILINK_REG(spdif), }; static struct snd_soc_card smdk = { From patchwork Wed May 22 03:40:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954777 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 C42EE912 for ; Wed, 22 May 2019 03:51:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4F4928B4C for ; Wed, 22 May 2019 03:51:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2AFF28B4F; Wed, 22 May 2019 03:51:07 +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 0F51528B4C for ; Wed, 22 May 2019 03:51:07 +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 69DCA16AB; Wed, 22 May 2019 05:50:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 69DCA16AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497065; bh=Mto1jW9A3zbpT70DZ61V9Z0hsYx+WU5Lt3fBqdGS0Go=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=o2aTqRjwQ2daqWxqM9C1XEz8sktRHsA2MSN89HfCi85r9bW3xOEMA2v9GFFd+cr8V w0fg/av0ZryPG5pkQDjWQ+cOVhrJwaZuRUrZ9Ix+zv4KnbzYOxzOzSX2NpmXmYEkD6 Eg7T3aFKSrdVA5lNizvVYMHsujQSmNndqTgRMl+4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A4572F8962F; Wed, 22 May 2019 05:40:12 +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 28970F89784; Wed, 22 May 2019 05:40:11 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 3EC26F8972D for ; Wed, 22 May 2019 05:40:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3EC26F8972D Date: 22 May 2019 12:40:05 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627280" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:40:05 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 02B334003EB9; Wed, 22 May 2019 12:40:05 +0900 (JST) Message-ID: <8736l7p3vd.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 018/145] ASoC: samsung: h1940_uda1380: 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 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/samsung/h1940_uda1380.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c index 95925c4..a95c34e 100644 --- a/sound/soc/samsung/h1940_uda1380.c +++ b/sound/soc/samsung/h1940_uda1380.c @@ -165,18 +165,20 @@ static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd) } /* s3c24xx digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(uda1380, + DAILINK_COMP_ARRAY(COMP_CPU("s3c24xx-iis")), + DAILINK_COMP_ARRAY(COMP_CODEC("uda1380-codec.0-001a", "uda1380-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("s3c24xx-iis"))); + static struct snd_soc_dai_link h1940_uda1380_dai[] = { { .name = "uda1380", .stream_name = "UDA1380 Duplex", - .cpu_dai_name = "s3c24xx-iis", - .codec_dai_name = "uda1380-hifi", .init = h1940_uda1380_init, - .platform_name = "s3c24xx-iis", - .codec_name = "uda1380-codec.0-001a", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &h1940_ops, + SND_SOC_DAILINK_REG(uda1380), }, }; From patchwork Wed May 22 03:40:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954779 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 64FD71708 for ; Wed, 22 May 2019 03:51:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5637828AD4 for ; Wed, 22 May 2019 03:51:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AFC228B2C; Wed, 22 May 2019 03:51:47 +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 A000028B4D for ; Wed, 22 May 2019 03:51:46 +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 D94CB16CA; Wed, 22 May 2019 05:50:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D94CB16CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497105; bh=oF/JPjVwna0RPKwDoA13ZfXTAqOO+NrJYuX34BhNWis=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=g41/vFGycuCBPAUl0VlO4K9gqy7bDj/W13cje1DGwgjGmd6xalXO9CvcMkOHPrQlA 0afeHPppTpwRzoIcVBpSXWICp3OM1h7O8bkIWvF1TOkURuBL3czqBXgGRMaG2mbrcF ZYVhBTthzEDg42VcmJ69ETrJh1ZM3J5k9qm/3P+Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A83E1F89784; Wed, 22 May 2019 05:40:15 +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 B1328F89787; Wed, 22 May 2019 05:40:14 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 3C2EFF8972D for ; Wed, 22 May 2019 05:40:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3C2EFF8972D Date: 22 May 2019 12:40:10 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425206" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:40:10 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 0C0464003EB5; Wed, 22 May 2019 12:40:10 +0900 (JST) Message-ID: <871s0rp3v8.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 019/145] ASoC: samsung: arndale_rt5631: 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 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/samsung/arndale_rt5631.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/sound/soc/samsung/arndale_rt5631.c b/sound/soc/samsung/arndale_rt5631.c index cc334e1..c213913 100644 --- a/sound/soc/samsung/arndale_rt5631.c +++ b/sound/soc/samsung/arndale_rt5631.c @@ -50,15 +50,20 @@ static struct snd_soc_ops arndale_ops = { .hw_params = arndale_hw_params, }; +SND_SOC_DAILINK_DEFS(rt5631_hifi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5631-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link arndale_rt5631_dai[] = { { .name = "RT5631 HiFi", .stream_name = "Primary", - .codec_dai_name = "rt5631-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &arndale_ops, + SND_SOC_DAILINK_REG(rt5631_hifi), }, }; @@ -78,24 +83,24 @@ static int arndale_audio_probe(struct platform_device *pdev) card->dev = &pdev->dev; for (n = 0; np && n < ARRAY_SIZE(arndale_rt5631_dai); n++) { - if (!arndale_rt5631_dai[n].cpu_dai_name) { - arndale_rt5631_dai[n].cpu_of_node = of_parse_phandle(np, + if (!arndale_rt5631_dai[n].cpus->dai_name) { + arndale_rt5631_dai[n].cpus->of_node = of_parse_phandle(np, "samsung,audio-cpu", n); - if (!arndale_rt5631_dai[n].cpu_of_node) { + if (!arndale_rt5631_dai[n].cpus->of_node) { dev_err(&pdev->dev, "Property 'samsung,audio-cpu' missing or invalid\n"); return -EINVAL; } } - if (!arndale_rt5631_dai[n].platform_name) - arndale_rt5631_dai[n].platform_of_node = - arndale_rt5631_dai[n].cpu_of_node; + if (!arndale_rt5631_dai[n].platforms->name) + arndale_rt5631_dai[n].platforms->of_node = + arndale_rt5631_dai[n].cpus->of_node; - arndale_rt5631_dai[n].codec_name = NULL; - arndale_rt5631_dai[n].codec_of_node = of_parse_phandle(np, + arndale_rt5631_dai[n].codecs->name = NULL; + arndale_rt5631_dai[n].codecs->of_node = of_parse_phandle(np, "samsung,audio-codec", n); - if (!arndale_rt5631_dai[0].codec_of_node) { + if (!arndale_rt5631_dai[0].codecs->of_node) { dev_err(&pdev->dev, "Property 'samsung,audio-codec' missing or invalid\n"); return -EINVAL; From patchwork Wed May 22 03:40:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954781 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 EC262912 for ; Wed, 22 May 2019 03:52:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD17728B4C for ; Wed, 22 May 2019 03:52:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF9E728B54; Wed, 22 May 2019 03:52:36 +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 42B0028B4D for ; Wed, 22 May 2019 03:52:36 +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 6C1C016C6; Wed, 22 May 2019 05:51:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6C1C016C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497154; bh=/BE8sLFKhe79/2yqYNVbf3itdDW5D57Bn7dAE4W4pmU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=U1ktxoXEHXOktvSTUnCCX0/svBE84WlylfhJVlObuLAle4sY6OPBRdKiUDVXcDL+P poUtT23BhZlIE6rs7O++WfpnO9S0OjUZ1SYBh8nePjUgbfMTaWeN6518WzQ4hy6nw9 Q8bi2eHt415QjEnTrRBxFoWpISHiVpZw+2Kca4pI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D455DF8978A; Wed, 22 May 2019 05:40:33 +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 6E8B4F89790; Wed, 22 May 2019 05:40:32 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id A4F18F89731 for ; Wed, 22 May 2019 05:40:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A4F18F89731 Date: 22 May 2019 12:40:26 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627306" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:40:26 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 5ACF54003EB8; Wed, 22 May 2019 12:40:26 +0900 (JST) Message-ID: <87zhnfnpac.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 020/145] ASoC: samsung: tobermory: 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 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/samsung/tobermory.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/tobermory.c b/sound/soc/samsung/tobermory.c index 14b11ac..ef51f28 100644 --- a/sound/soc/samsung/tobermory.c +++ b/sound/soc/samsung/tobermory.c @@ -109,17 +109,19 @@ static struct snd_soc_ops tobermory_ops = { .hw_params = tobermory_hw_params, }; +SND_SOC_DAILINK_DEFS(cpu, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8962.1-001a", "wm8962")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + static struct snd_soc_dai_link tobermory_dai[] = { { .name = "CPU", .stream_name = "CPU", - .cpu_dai_name = "samsung-i2s.0", - .codec_dai_name = "wm8962", - .platform_name = "samsung-i2s.0", - .codec_name = "wm8962.1-001a", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &tobermory_ops, + SND_SOC_DAILINK_REG(cpu), }, }; From patchwork Wed May 22 03:40:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954783 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 44815912 for ; Wed, 22 May 2019 03:53:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3611C28AE3 for ; Wed, 22 May 2019 03:53:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AD1028B50; Wed, 22 May 2019 03:53:13 +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 735FE28AE3 for ; Wed, 22 May 2019 03:53:12 +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 CA66316BE; Wed, 22 May 2019 05:52:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CA66316BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497190; bh=3qV/0uwhukgqiwn3R2DRJhDXynU0F0C3kqK+Gq9boWA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TDdZsSuQ4/Wr4Qm6XT8MYJmDH+6BBL1/ZzSpO2uZa+IWpkeIJW6x+yHx9HssBILA5 BQUQxjwCHClrKf9QIOE/m4ZFrpFQwWcmvMkkjTb7f9/28WmxtXJZY25LD+dwGUob8W D8C5HjwjnldjcuZLDy8AHA7oNXrMXurcAL78RoCY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id ECE64F89794; Wed, 22 May 2019 05:40:38 +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 7EA3DF89795; Wed, 22 May 2019 05:40:38 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 78B26F89792 for ; Wed, 22 May 2019 05:40:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 78B26F89792 Date: 22 May 2019 12:40:32 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425232" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:40:32 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 2944E4170715; Wed, 22 May 2019 12:40:32 +0900 (JST) Message-ID: <87y32znpa6.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 021/145] ASoC: samsung: tm2_wm5110: 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 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/samsung/tm2_wm5110.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/sound/soc/samsung/tm2_wm5110.c b/sound/soc/samsung/tm2_wm5110.c index 31f4256..c091033 100644 --- a/sound/soc/samsung/tm2_wm5110.c +++ b/sound/soc/samsung/tm2_wm5110.c @@ -427,38 +427,56 @@ static struct snd_soc_dai_driver tm2_ext_dai[] = { }, }; +SND_SOC_DAILINK_DEFS(aif1, + DAILINK_COMP_ARRAY(COMP_CPU(SAMSUNG_I2S_DAI)), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm5110-aif1")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(voice, + DAILINK_COMP_ARRAY(COMP_CPU(SAMSUNG_I2S_DAI)), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm5110-aif2")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(bt, + DAILINK_COMP_ARRAY(COMP_CPU(SAMSUNG_I2S_DAI)), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm5110-aif3")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hdmi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link tm2_dai_links[] = { { .name = "WM5110 AIF1", .stream_name = "HiFi Primary", - .cpu_dai_name = SAMSUNG_I2S_DAI, - .codec_dai_name = "wm5110-aif1", .ops = &tm2_aif1_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(aif1), }, { .name = "WM5110 Voice", .stream_name = "Voice call", - .cpu_dai_name = SAMSUNG_I2S_DAI, - .codec_dai_name = "wm5110-aif2", .ops = &tm2_aif2_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(voice), }, { .name = "WM5110 BT", .stream_name = "Bluetooth", - .cpu_dai_name = SAMSUNG_I2S_DAI, - .codec_dai_name = "wm5110-aif3", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(bt), }, { .name = "HDMI", .stream_name = "i2s1", .ops = &tm2_hdmi_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(hdmi), } }; @@ -557,15 +575,15 @@ static int tm2_probe(struct platform_device *pdev) for_each_card_prelinks(card, i, dai_link) { unsigned int dai_index = 0; /* WM5110 */ - dai_link->cpu_name = NULL; - dai_link->platform_name = NULL; + dai_link->cpus->name = NULL; + dai_link->platforms->name = NULL; if (num_codecs > 1 && i == card->num_links - 1) dai_index = 1; /* HDMI */ - dai_link->codec_of_node = codec_dai_node[dai_index]; - dai_link->cpu_of_node = cpu_dai_node[dai_index]; - dai_link->platform_of_node = cpu_dai_node[dai_index]; + dai_link->codecs->of_node = codec_dai_node[dai_index]; + dai_link->cpus->of_node = cpu_dai_node[dai_index]; + dai_link->platforms->of_node = cpu_dai_node[dai_index]; } if (num_codecs > 1) { @@ -579,7 +597,7 @@ static int tm2_probe(struct platform_device *pdev) goto dai_node_put; } - ret = snd_soc_get_dai_name(&args, &card->dai_link[i].codec_dai_name); + ret = snd_soc_get_dai_name(&args, &card->dai_link[i].codecs->dai_name); if (ret) { dev_err(dev, "Unable to get codec_dai_name\n"); goto dai_node_put; From patchwork Wed May 22 03:40:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955075 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 49C8614C0 for ; Wed, 22 May 2019 05:12:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3995F28B01 for ; Wed, 22 May 2019 05:12:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E08028B0C; Wed, 22 May 2019 05:12:31 +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 3215428B01 for ; Wed, 22 May 2019 05:12:29 +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 6CF481672; Wed, 22 May 2019 05:52:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6CF481672 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497229; bh=dpaOJYMEn26iB27jPSTcweFxEOaQGVB2PxxUuZrSdpY=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jYCfCTfAY0zBV+IvdZqnPDYf8YXw2ZUiP4DYethcE1vJlfAybV5G4j/JR3PGgLCNS fcrX8s4kG0if/uJ4sKBZFNB3wNNWf72y3GVvjdR8EWen75fNi6zbQ7LyBTk0x6SDtz HH7oPxIEpBzseGEvJjt6CvoqWswWTQUut6yvAni8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 68A22F89733; Wed, 22 May 2019 05:40:45 +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 1CA69F89796; Wed, 22 May 2019 05:40:44 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 441F0F89798 for ; Wed, 22 May 2019 05:40:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 441F0F89798 Date: 22 May 2019 12:40:38 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627323" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:40:38 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id F0A224003EB5; Wed, 22 May 2019 12:40:37 +0900 (JST) Message-ID: <87woijnpa0.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 022/145] ASoC: samsung: speyside: 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 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/samsung/speyside.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c index 15465c8..51e4c97 100644 --- a/sound/soc/samsung/speyside.c +++ b/sound/soc/samsung/speyside.c @@ -189,39 +189,45 @@ static const struct snd_soc_pcm_stream dsp_codec_params = { .channels_max = 2, }; +SND_SOC_DAILINK_DEFS(cpu_dsp, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("spi0.0", "wm0010-sdi1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + +SND_SOC_DAILINK_DEFS(dsp_codec, + DAILINK_COMP_ARRAY(COMP_CPU("wm0010-sdi2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8996.1-001a", "wm8996-aif1"))); + +SND_SOC_DAILINK_DEFS(baseband, + DAILINK_COMP_ARRAY(COMP_CPU("wm8996-aif2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm1250-ev1.1-0027", "wm1250-ev1"))); + static struct snd_soc_dai_link speyside_dai[] = { { .name = "CPU-DSP", .stream_name = "CPU-DSP", - .cpu_dai_name = "samsung-i2s.0", - .codec_dai_name = "wm0010-sdi1", - .platform_name = "samsung-i2s.0", - .codec_name = "spi0.0", .init = speyside_wm0010_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(cpu_dsp), }, { .name = "DSP-CODEC", .stream_name = "DSP-CODEC", - .cpu_dai_name = "wm0010-sdi2", - .codec_dai_name = "wm8996-aif1", - .codec_name = "wm8996.1-001a", .init = speyside_wm8996_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .params = &dsp_codec_params, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(dsp_codec), }, { .name = "Baseband", .stream_name = "Baseband", - .cpu_dai_name = "wm8996-aif2", - .codec_dai_name = "wm1250-ev1", - .codec_name = "wm1250-ev1.1-0027", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(baseband), }, }; From patchwork Wed May 22 03:40:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955073 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 0B8C5112C for ; Wed, 22 May 2019 05:12:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0AB928B5C for ; Wed, 22 May 2019 05:12:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E553328B0C; Wed, 22 May 2019 05:12:30 +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 0F14128847 for ; Wed, 22 May 2019 05:12:29 +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 3C96216CE; Wed, 22 May 2019 05:53:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3C96216CE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497267; bh=Y+5MvaonWDbVNE8Dos4lQHgNNREb2uyV29EK39Ev0YI=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qAJhLUAYSaMfas7MzsWhX+AKjkDWzSwk1C9+tXsUuFQDNWg1Np+s4+ubmBp2LSN0H TTLnK+VRmm1cTXRHhMskeH208EOd0Zhl3bcbU3sTF+gCKB0AtDx/lPdPluUhd2q0OS V0YCCRNs6N19C8LgKW77GMspVD1c3X1nSOxsByEI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 313F3F8979C; Wed, 22 May 2019 05:40:54 +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 CCC2BF8979D; Wed, 22 May 2019 05:40:51 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 33247F8979B for ; Wed, 22 May 2019 05:40:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 33247F8979B Date: 22 May 2019 12:40:45 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425243" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:40:45 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id CFD994170715; Wed, 22 May 2019 12:40:45 +0900 (JST) Message-ID: <87v9y3np9s.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 023/145] ASoC: samsung: snow: 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 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/samsung/snow.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c index 57ce90f..8ea7799 100644 --- a/sound/soc/samsung/snow.c +++ b/sound/soc/samsung/snow.c @@ -14,6 +14,11 @@ #define FIN_PLL_RATE 24000000 +SND_SOC_DAILINK_DEFS(links, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + struct snow_priv { struct snd_soc_dai_link dai_link; struct clk *clk_i2s_bus; @@ -141,6 +146,13 @@ static int snow_probe(struct platform_device *pdev) link->name = "Primary"; link->stream_name = link->name; + link->cpus = links_cpus; + link->num_cpus = ARRAY_SIZE(links_cpus); + link->codecs = links_codecs; + link->num_codecs = ARRAY_SIZE(links_codecs); + link->platforms = links_platforms; + link->num_platforms = ARRAY_SIZE(links_platforms); + card->dai_link = link; card->num_links = 1; card->dev = dev; @@ -151,10 +163,10 @@ static int snow_probe(struct platform_device *pdev) if (cpu) { link->ops = &snow_card_ops; - link->cpu_of_node = of_parse_phandle(cpu, "sound-dai", 0); + link->cpus->of_node = of_parse_phandle(cpu, "sound-dai", 0); of_node_put(cpu); - if (!link->cpu_of_node) { + if (!link->cpus->of_node) { dev_err(dev, "Failed parsing cpu/sound-dai property\n"); return -EINVAL; } @@ -164,38 +176,38 @@ static int snow_probe(struct platform_device *pdev) of_node_put(codec); if (ret < 0) { - of_node_put(link->cpu_of_node); + of_node_put(link->cpus->of_node); dev_err(dev, "Failed parsing codec node\n"); return ret; } - priv->clk_i2s_bus = of_clk_get_by_name(link->cpu_of_node, + priv->clk_i2s_bus = of_clk_get_by_name(link->cpus->of_node, "i2s_opclk0"); if (IS_ERR(priv->clk_i2s_bus)) { snd_soc_of_put_dai_link_codecs(link); - of_node_put(link->cpu_of_node); + of_node_put(link->cpus->of_node); return PTR_ERR(priv->clk_i2s_bus); } } else { - link->codec_dai_name = "HiFi", + link->codecs->dai_name = "HiFi", - link->cpu_of_node = of_parse_phandle(dev->of_node, + link->cpus->of_node = of_parse_phandle(dev->of_node, "samsung,i2s-controller", 0); - if (!link->cpu_of_node) { + if (!link->cpus->of_node) { dev_err(dev, "i2s-controller property parse error\n"); return -EINVAL; } - link->codec_of_node = of_parse_phandle(dev->of_node, + link->codecs->of_node = of_parse_phandle(dev->of_node, "samsung,audio-codec", 0); - if (!link->codec_of_node) { - of_node_put(link->cpu_of_node); + if (!link->codecs->of_node) { + of_node_put(link->cpus->of_node); dev_err(dev, "audio-codec property parse error\n"); return -EINVAL; } } - link->platform_of_node = link->cpu_of_node; + link->platforms->of_node = link->cpus->of_node; /* Update card-name if provided through DT, else use default name */ snd_soc_of_parse_card_name(card, "samsung,model"); @@ -216,8 +228,8 @@ static int snow_remove(struct platform_device *pdev) struct snow_priv *priv = platform_get_drvdata(pdev); struct snd_soc_dai_link *link = &priv->dai_link; - of_node_put(link->cpu_of_node); - of_node_put(link->codec_of_node); + of_node_put(link->cpus->of_node); + of_node_put(link->codecs->of_node); snd_soc_of_put_dai_link_codecs(link); clk_put(priv->clk_i2s_bus); From patchwork Wed May 22 03:40:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955077 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 59528924 for ; Wed, 22 May 2019 05:12:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4929F28B04 for ; Wed, 22 May 2019 05:12:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CBFF28B0A; Wed, 22 May 2019 05:12:32 +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 35E1C28B04 for ; Wed, 22 May 2019 05:12:29 +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 77F4D16D6; Wed, 22 May 2019 05:54:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 77F4D16D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497308; bh=K7GnpBbUfKwCcqJYBnUM2FytFKLk16jPMtPNyfX6apg=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lV1t7Ii7AospqaMsXiP7fxaLa+zIdq/nslfMV+yd7YpyqO4oGr/+qqx4stwKJkh8A KqyzoMdj73UKLuz25ZA2u0gZf3A8HjqUETxyVYLvxTXDCS9F9UVkMGnIb1IW703SYq xMJLp5U4fuwSwTv3qWoQEbzIdIx7SqaG1p06Llqk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E1257F897A0; Wed, 22 May 2019 05:40:58 +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 15AA1F897A0; Wed, 22 May 2019 05:40:57 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 50153F89734 for ; Wed, 22 May 2019 05:40:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 50153F89734 Date: 22 May 2019 12:40:51 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627339" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:40:51 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id F05E04170715; Wed, 22 May 2019 12:40:50 +0900 (JST) Message-ID: <87tvdnnp9n.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 024/145] ASoC: samsung: smartq_wm8987: 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 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/samsung/smartq_wm8987.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c index b9e887e..fab3db9 100644 --- a/sound/soc/samsung/smartq_wm8987.c +++ b/sound/soc/samsung/smartq_wm8987.c @@ -153,18 +153,20 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd) return err; } +SND_SOC_DAILINK_DEFS(wm8987, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8750.0-0x1a", "wm8750-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + static struct snd_soc_dai_link smartq_dai[] = { { .name = "wm8987", .stream_name = "SmartQ Hi-Fi", - .cpu_dai_name = "samsung-i2s.0", - .codec_dai_name = "wm8750-hifi", - .platform_name = "samsung-i2s.0", - .codec_name = "wm8750.0-0x1a", .init = smartq_wm8987_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &smartq_hifi_ops, + SND_SOC_DAILINK_REG(wm8987), }, }; From patchwork Wed May 22 03:40:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954925 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 A9232912 for ; Wed, 22 May 2019 04:52:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98AD528B56 for ; Wed, 22 May 2019 04:52:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BFEA28B58; Wed, 22 May 2019 04:52:32 +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 C0DEC28B3C for ; Wed, 22 May 2019 04:52:31 +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 081ED16D9; Wed, 22 May 2019 05:54:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 081ED16D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497347; bh=135qtc4+oX4wrKvgRoGnPAnd3lEHDpv7BEi/B6Y0fHA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vrdALHXbI1A3pfAcMHA2WNAxYyw5TY+i042WcHGiCW1AzUZmabQNiyWhpc31vA4nj 2UhD4cuNSfUxYJbNgWrML0nOq1jjtlFZh5n5p5oggGRDSzeUf1D8Qx8ZgnwOkDS3TH kR8bJ5cZR/OLACubQUOBbOl/aFNx3boan2F9br3Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 71586F897A4; Wed, 22 May 2019 05:41:04 +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 4959CF897A5; Wed, 22 May 2019 05:41:02 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 782CDF8979E for ; Wed, 22 May 2019 05:40:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 782CDF8979E Date: 22 May 2019 12:40:56 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425258" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:40:56 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 2D5424170715; Wed, 22 May 2019 12:40:56 +0900 (JST) Message-ID: <87sgt7np9i.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 025/145] ASoC: samsung: s3c24xx_uda134x: 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 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/samsung/s3c24xx_uda134x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index 9d68f8c..55d2a80 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c @@ -201,16 +201,18 @@ static const struct snd_soc_ops s3c24xx_uda134x_ops = { .hw_params = s3c24xx_uda134x_hw_params, }; +SND_SOC_DAILINK_DEFS(uda134x, + DAILINK_COMP_ARRAY(COMP_CPU("s3c24xx-iis")), + DAILINK_COMP_ARRAY(COMP_CODEC("uda134x-codec", "uda134x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("s3c24xx-iis"))); + static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = { .name = "UDA134X", .stream_name = "UDA134X", - .codec_name = "uda134x-codec", - .codec_dai_name = "uda134x-hifi", - .cpu_dai_name = "s3c24xx-iis", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &s3c24xx_uda134x_ops, - .platform_name = "s3c24xx-iis", + SND_SOC_DAILINK_REG(uda134x), }; static struct snd_soc_card snd_soc_s3c24xx_uda134x = { From patchwork Wed May 22 03:41:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954911 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 D764F924 for ; Wed, 22 May 2019 04:52:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C696028B55 for ; Wed, 22 May 2019 04:52:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAAC128B59; Wed, 22 May 2019 04:52:30 +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 6F2B528B54 for ; Wed, 22 May 2019 04:52:29 +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 CA198168F; Wed, 22 May 2019 05:55:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CA198168F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497384; bh=uCdobTanuWkDZLs5fun3gLJINUmpRNNhN7WB8mul6oA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=b8ODKiUC8X+4Ab10XiLOFkBWelhXx8hGZAGWIRD7hYDkp5JhVrD0Yg3W4F8iawE8h 3FVtq65n49aZx117B091yO7uuYW3pkrNGhV10aJxT3UENZy9CjVgd3G4ZvpJUz4dAn uYadMyRqN+w43YgctX6kYdT+FNAEksLVgbumODsQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3DB6DF897A9; Wed, 22 May 2019 05:41: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 57EF6F897A9; Wed, 22 May 2019 05:41:07 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 51329F897A3 for ; Wed, 22 May 2019 05:41:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 51329F897A3 Date: 22 May 2019 12:41:01 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627351" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:41:01 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 048064170715; Wed, 22 May 2019 12:41:01 +0900 (JST) Message-ID: <87r28rnp9d.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 026/145] ASoC: samsung: s3c24xx_simtec_tlv320aic23: 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 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/samsung/s3c24xx_simtec_tlv320aic23.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c index 1360b88..c03d529 100644 --- a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c +++ b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c @@ -52,14 +52,17 @@ static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAILINK_DEFS(tlv320aic23, + DAILINK_COMP_ARRAY(COMP_CPU("s3c24xx-iis")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.0-001a", + "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("s3c24xx-iis"))); + static struct snd_soc_dai_link simtec_dai_aic23 = { .name = "tlv320aic23", .stream_name = "TLV320AIC23", - .codec_name = "tlv320aic3x-codec.0-001a", - .cpu_dai_name = "s3c24xx-iis", - .codec_dai_name = "tlv320aic3x-hifi", - .platform_name = "s3c24xx-iis", .init = simtec_tlv320aic23_init, + SND_SOC_DAILINK_REG(tlv320aic23), }; /* simtec audio machine driver */ From patchwork Wed May 22 03:41:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954921 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 7F0CA924 for ; Wed, 22 May 2019 04:52:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FFA728B58 for ; Wed, 22 May 2019 04:52:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 630D328B60; Wed, 22 May 2019 04:52:32 +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 9F5D628B54 for ; Wed, 22 May 2019 04:52:31 +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 6B96816EC; Wed, 22 May 2019 05:56:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6B96816EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497435; bh=gk5a3gG8yE7EEoiysWlG11NP5p4O1rZPRlp0/GgKzA8=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=X0LplKCwgmHUUCHQzyi6x0iOxn4XLPxtIAPn0lRljRW9ruW2VX2BH1FtOlaUBpUdb +WjNLndYuFfVzSRFTfuutea0nKXG7ZXlWNmnPsyKFLHm3fulT5gD/MFjv+MZX6x9i1 SV+hjq2ezpRTrLp2IBErXCE36o2Kh+3qQ5DcQtfQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 732B8F897B4; Wed, 22 May 2019 05:41:13 +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 BD4CBF897AE; Wed, 22 May 2019 05:41:10 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 497B9F897A8 for ; Wed, 22 May 2019 05:41:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 497B9F897A8 Date: 22 May 2019 12:41:05 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627361" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:41:05 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id CF37F4170D29; Wed, 22 May 2019 12:41:05 +0900 (JST) Message-ID: <87pnobnp98.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 027/145] ASoC: samsung: s3c24xx_simtec_hermes: 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 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/samsung/s3c24xx_simtec_hermes.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/s3c24xx_simtec_hermes.c b/sound/soc/samsung/s3c24xx_simtec_hermes.c index e3528e7..ed0d1b8 100644 --- a/sound/soc/samsung/s3c24xx_simtec_hermes.c +++ b/sound/soc/samsung/s3c24xx_simtec_hermes.c @@ -63,14 +63,17 @@ static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAILINK_DEFS(tlv320aic33, + DAILINK_COMP_ARRAY(COMP_CPU("s3c24xx-iis")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.0-001a", + "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("s3c24xx-iis"))); + static struct snd_soc_dai_link simtec_dai_aic33 = { .name = "tlv320aic33", .stream_name = "TLV320AIC33", - .codec_name = "tlv320aic3x-codec.0-001a", - .cpu_dai_name = "s3c24xx-iis", - .codec_dai_name = "tlv320aic3x-hifi", - .platform_name = "s3c24xx-iis", .init = simtec_hermes_init, + SND_SOC_DAILINK_REG(tlv320aic33), }; /* simtec audio machine driver */ From patchwork Wed May 22 03:41:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954929 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 506926C5 for ; Wed, 22 May 2019 04:52:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E824289F9 for ; Wed, 22 May 2019 04:52:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32BDB28B56; Wed, 22 May 2019 04:52:33 +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 AA89F28B52 for ; Wed, 22 May 2019 04:52:31 +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 1B22016F1; Wed, 22 May 2019 05:56:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1B22016F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497469; bh=4da3v+PGqWhGHSmprQpnmJ2rFyHTfpO6e/ftA9HC+4I=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=t1q1gpbvd2lfSRHJovbqjwXaHFb8JyWfGnnT/jk/Jb9p3xGFipfFQ9+Sp4L7EG3iO /IOKwyezVt3OEQ8syoH40WcqZGLLCv9b0MuaHdKeCsS2TmCM23z1ocoro23uWzlE9O zwGnywJnpPiL5p4qUDh3M6yq9N9/3bWCSY/775ZI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 19875F897B8; Wed, 22 May 2019 05:41:18 +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 821FEF897BA; Wed, 22 May 2019 05:41:16 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id C3020F897B2 for ; Wed, 22 May 2019 05:41:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C3020F897B2 Date: 22 May 2019 12:41:10 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425280" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:41:10 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 800CC4170D2D; Wed, 22 May 2019 12:41:10 +0900 (JST) Message-ID: <87o93vnp93.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 028/145] ASoC: samsung: rx1950_uda1380: 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 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/samsung/rx1950_uda1380.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c index 1dcc1b2..4b247e9 100644 --- a/sound/soc/samsung/rx1950_uda1380.c +++ b/sound/soc/samsung/rx1950_uda1380.c @@ -72,18 +72,21 @@ static struct snd_soc_ops rx1950_ops = { }; /* s3c24xx digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(uda1380, + DAILINK_COMP_ARRAY(COMP_CPU("s3c24xx-iis")), + DAILINK_COMP_ARRAY(COMP_CODEC("uda1380-codec.0-001a", + "uda1380-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("s3c24xx-iis"))); + static struct snd_soc_dai_link rx1950_uda1380_dai[] = { { .name = "uda1380", .stream_name = "UDA1380 Duplex", - .cpu_dai_name = "s3c24xx-iis", - .codec_dai_name = "uda1380-hifi", .init = rx1950_uda1380_init, - .platform_name = "s3c24xx-iis", - .codec_name = "uda1380-codec.0-001a", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &rx1950_ops, + SND_SOC_DAILINK_REG(uda1380), }, }; From patchwork Wed May 22 03:41:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954931 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 8A1B0912 for ; Wed, 22 May 2019 04:52:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A559289F9 for ; Wed, 22 May 2019 04:52:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EC6128B3B; Wed, 22 May 2019 04:52:33 +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 AA24A28A81 for ; Wed, 22 May 2019 04:52:31 +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 F394216E4; Wed, 22 May 2019 05:57:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F394216E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497508; bh=DfP9rwOmp+l6DS2tIFgiNva5VzKmHHggGhG+M3LBjpw=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QnrN/6jEZgCwlgQhYNPFJwBvFuWuCj5fN/jkME2I0Du6CkDEemxpLcvnjopCcS4gY iAZyihUPS+rsA7e75RwM5xdLl5/jXGXBWqCn6TOEFVGRvWCN+iYmtaFhJND8NlV16p kUj92Ev8EGiB1q8nOy6VPOyPn0PfINNPLJXo9lWI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 781D7F897B7; Wed, 22 May 2019 05:41:21 +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 10723F897BC; Wed, 22 May 2019 05:41:20 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 6EB9AF897B7 for ; Wed, 22 May 2019 05:41:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6EB9AF897B7 Date: 22 May 2019 12:41:15 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425286" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:41:15 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id EE5E04003EBA; Wed, 22 May 2019 12:41:14 +0900 (JST) Message-ID: <87mujfnp8z.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 029/145] ASoC: samsung: odroid: 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 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/samsung/odroid.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index e688169f..dfb6e46 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -151,39 +151,48 @@ static const struct snd_soc_dapm_route odroid_dapm_routes[] = { { "HiFi Playback", NULL, "Mixer DAI TX" }, }; +SND_SOC_DAILINK_DEFS(primary, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_PLATFORM("3830000.i2s"))); + +SND_SOC_DAILINK_DEFS(mixer, + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEFS(secondary, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_PLATFORM("3830000.i2s-sec"))); + static struct snd_soc_dai_link odroid_card_dais[] = { { /* Primary FE <-> BE link */ - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .ops = &odroid_card_fe_ops, .name = "Primary", .stream_name = "Primary", - .platform_name = "3830000.i2s", .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(primary), }, { /* BE <-> CODECs link */ .name = "I2S Mixer", - .cpu_name = "snd-soc-dummy", - .cpu_dai_name = "snd-soc-dummy-dai", - .platform_name = "snd-soc-dummy", .ops = &odroid_card_be_ops, .no_pcm = 1, .dpcm_playback = 1, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(mixer), }, { /* Secondary FE <-> BE link */ .playback_only = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .ops = &odroid_card_fe_ops, .name = "Secondary", .stream_name = "Secondary", - .platform_name = "3830000.i2s-sec", .dynamic = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(secondary), } }; @@ -262,7 +271,7 @@ static int odroid_audio_probe(struct platform_device *pdev) break; } - ret = snd_soc_get_dai_name(&args, &link->cpu_dai_name); + ret = snd_soc_get_dai_name(&args, &link->cpus->dai_name); of_node_put(args.np); if (ret < 0) From patchwork Wed May 22 03:41:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955103 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 162D46C5 for ; Wed, 22 May 2019 05:17:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0473528AEF for ; Wed, 22 May 2019 05:17:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAAAE28B0A; Wed, 22 May 2019 05:17:30 +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 0CECA28AEF for ; Wed, 22 May 2019 05:17:30 +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 5594D16F4; Wed, 22 May 2019 05:58:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5594D16F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497547; bh=dogm5QC7jEyLsQgwcI60Ie2+7j7KfxvgVEXDYh3FHrk=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lsc1psPTBV5xnBDPmKKnEp2d1QR03FFR5FsE+ql5+xhRSmB/hsn22Y3VwvKZXveXX 1dvyEqNszab7UjBFSWv1KzPYdqbllMRSgzpMIGi1c6TvSVdRLxsP3uqJ2euy1Af4w2 /mvjgAERSlEqe6wXhu2bc60accJI5T46IwsukYOY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4FE19F89738; Wed, 22 May 2019 05:41:35 +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 31078F89739; Wed, 22 May 2019 05:41:33 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 10B66F8963E for ; Wed, 22 May 2019 05:41:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 10B66F8963E Date: 22 May 2019 12:41:27 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627388" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:41:27 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B36794170D2D; Wed, 22 May 2019 12:41:27 +0900 (JST) Message-ID: <87lfyznp8m.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 030/145] ASoC: samsung: neo1973_wm8753: 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 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/samsung/neo1973_wm8753.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c index 7e62506..396776f 100644 --- a/sound/soc/samsung/neo1973_wm8753.c +++ b/sound/soc/samsung/neo1973_wm8753.c @@ -266,28 +266,32 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAILINK_DEFS(wm8753, + DAILINK_COMP_ARRAY(COMP_CPU("s3c24xx-iis")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8753.0-001a", "wm8753-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("s3c24xx-iis"))); + +SND_SOC_DAILINK_DEFS(bluetooth, + DAILINK_COMP_ARRAY(COMP_CPU("bt-sco-pcm")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8753.0-001a", "wm8753-voice"))); + static struct snd_soc_dai_link neo1973_dai[] = { { /* Hifi Playback - for similatious use with voice below */ .name = "WM8753", .stream_name = "WM8753 HiFi", - .platform_name = "s3c24xx-iis", - .cpu_dai_name = "s3c24xx-iis", - .codec_dai_name = "wm8753-hifi", - .codec_name = "wm8753.0-001a", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .init = neo1973_wm8753_init, .ops = &neo1973_hifi_ops, + SND_SOC_DAILINK_REG(wm8753), }, { /* Voice via BT */ .name = "Bluetooth", .stream_name = "Voice", - .cpu_dai_name = "bt-sco-pcm", - .codec_dai_name = "wm8753-voice", - .codec_name = "wm8753.0-001a", .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &neo1973_voice_ops, + SND_SOC_DAILINK_REG(bluetooth), }, }; From patchwork Wed May 22 03:41:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955111 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 CDD5D6C5 for ; Wed, 22 May 2019 05:17:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCBD228847 for ; Wed, 22 May 2019 05:17:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B11C628AEF; Wed, 22 May 2019 05:17:33 +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 50D4628B01 for ; Wed, 22 May 2019 05:17:30 +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 6AD5916FD; Wed, 22 May 2019 05:58:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6AD5916FD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497588; bh=KY8S3SqJio53kY8K5iRKURhMchzddmPujLnMRk6bGQQ=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=iYp+4Bd26U6Y/QeAL6qyYORozTHHBviLKpI76s6wI7kJdT+wBLt4Fd7DOMEPc63rX +8uHxj0wUvBQPU1LPnBDHGelq9QB9CondyQbyfABXrLOSpVe+bK2LUwTUNBFlmX1Am aXzGbxxQKYSstj6gV11HL++U2AP+AVCpomZO6DfY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 83551F897BE; Wed, 22 May 2019 05:41:39 +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 51663F897BF; Wed, 22 May 2019 05:41:38 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 077EFF89636 for ; Wed, 22 May 2019 05:41:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 077EFF89636 Date: 22 May 2019 12:41:32 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425299" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:41:32 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id C15374170D2D; Wed, 22 May 2019 12:41:32 +0900 (JST) Message-ID: <87k1ejnp8h.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 031/145] ASoC: samsung: lowland: 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 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/samsung/lowland.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/sound/soc/samsung/lowland.c b/sound/soc/samsung/lowland.c index 2fdab2a..973f22b 100644 --- a/sound/soc/samsung/lowland.c +++ b/sound/soc/samsung/lowland.c @@ -82,39 +82,45 @@ static const struct snd_soc_pcm_stream sub_params = { .channels_max = 2, }; +SND_SOC_DAILINK_DEFS(cpu, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm5100.1-001a", "wm5100-aif1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + +SND_SOC_DAILINK_DEFS(baseband, + DAILINK_COMP_ARRAY(COMP_CPU("wm5100-aif2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm1250-ev1.1-0027", "wm1250-ev1"))); + +SND_SOC_DAILINK_DEFS(speaker, + DAILINK_COMP_ARRAY(COMP_CPU("wm5100-aif3")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9081.1-006c", "wm9081-hifi"))); + static struct snd_soc_dai_link lowland_dai[] = { { .name = "CPU", .stream_name = "CPU", - .cpu_dai_name = "samsung-i2s.0", - .codec_dai_name = "wm5100-aif1", - .platform_name = "samsung-i2s.0", - .codec_name = "wm5100.1-001a", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .init = lowland_wm5100_init, + SND_SOC_DAILINK_REG(cpu), }, { .name = "Baseband", .stream_name = "Baseband", - .cpu_dai_name = "wm5100-aif2", - .codec_dai_name = "wm1250-ev1", - .codec_name = "wm1250-ev1.1-0027", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ignore_suspend = 1, + SND_SOC_DAILINK_REG(baseband), }, { .name = "Sub Speaker", .stream_name = "Sub Speaker", - .cpu_dai_name = "wm5100-aif3", - .codec_dai_name = "wm9081-hifi", - .codec_name = "wm9081.1-006c", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ignore_suspend = 1, .params = &sub_params, .init = lowland_wm9081_init, + SND_SOC_DAILINK_REG(speaker), }, }; From patchwork Wed May 22 03:41:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955109 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 7974D112C for ; Wed, 22 May 2019 05:17:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6903128847 for ; Wed, 22 May 2019 05:17:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C48728B04; Wed, 22 May 2019 05:17:32 +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 0063E28847 for ; Wed, 22 May 2019 05:17:29 +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 4C9061711; Wed, 22 May 2019 05:59:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4C9061711 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497627; bh=8NaMfw32xUozShOmzIA/FJbcKB63e0ElnnWd25ivXvw=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uqbvvQHJ1VPdwsMrayg5YxPVzojaQH5IpdW1Vq5n4Z2N1iEUZoO8tjFliEVn036ZE hI6g/ye1HCTAsHywV/o3uZxcBLkDI9ZUQP3gLwEDrhGUe+vQ67NrfdzWlZjzrvxv9p 1gqXmoRqSGVCXXvnxfivKRT2ickmNDbNUcRRSrD8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B2EC0F897C2; Wed, 22 May 2019 05:41:44 +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 975E2F897C3; Wed, 22 May 2019 05:41:43 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 6A40BF89636 for ; Wed, 22 May 2019 05:41:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6A40BF89636 Date: 22 May 2019 12:41:38 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425307" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:41:38 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id F1C304170D29; Wed, 22 May 2019 12:41:37 +0900 (JST) Message-ID: <87imu3np8c.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 032/145] ASoC: samsung: littlemill: 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 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/samsung/littlemill.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sound/soc/samsung/littlemill.c b/sound/soc/samsung/littlemill.c index cd70b06..6132cee 100644 --- a/sound/soc/samsung/littlemill.c +++ b/sound/soc/samsung/littlemill.c @@ -142,28 +142,33 @@ static const struct snd_soc_pcm_stream baseband_params = { .channels_max = 2, }; +SND_SOC_DAILINK_DEFS(cpu, + DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8994-codec", "wm8994-aif1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + +SND_SOC_DAILINK_DEFS(baseband, + DAILINK_COMP_ARRAY(COMP_CPU("wm8994-aif2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm1250-ev1.1-0027", + "wm1250-ev1"))); + static struct snd_soc_dai_link littlemill_dai[] = { { .name = "CPU", .stream_name = "CPU", - .cpu_dai_name = "samsung-i2s.0", - .codec_dai_name = "wm8994-aif1", - .platform_name = "samsung-i2s.0", - .codec_name = "wm8994-codec", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &littlemill_ops, + SND_SOC_DAILINK_REG(cpu), }, { .name = "Baseband", .stream_name = "Baseband", - .cpu_dai_name = "wm8994-aif2", - .codec_dai_name = "wm1250-ev1", - .codec_name = "wm1250-ev1.1-0027", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ignore_suspend = 1, .params = &baseband_params, + SND_SOC_DAILINK_REG(baseband), }, }; From patchwork Wed May 22 03:41:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955107 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 62BE2112C for ; Wed, 22 May 2019 05:17:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51D5B28B04 for ; Wed, 22 May 2019 05:17:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4611328B0C; Wed, 22 May 2019 05:17:31 +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 552D328B04 for ; Wed, 22 May 2019 05:17:30 +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 62B6B16F9; Wed, 22 May 2019 06:00:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 62B6B16F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497665; bh=JBd8WPkPzT5XHXCGBRcCacynmCCgui73KZMPUM6FcYc=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ohd+iVrlvA+9dIqBg72+/g6Qo66KlsnvCx+r8WQYT37YcSDCR7E2zfVzdJZG3RRnY CwEl68mui4TyAAQDLvSfC3MQfLrOzAhX1HwUvKMD64Cb6UvI4C1aEs5dMBAnqE18kb gJBwnqILcRnYqpzFiPErcBab3+TIwsRDlMZ3h3uA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4AA1AF897C7; Wed, 22 May 2019 05:41:49 +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 40AC9F897C8; Wed, 22 May 2019 05:41:47 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id D5E8CF897C4 for ; Wed, 22 May 2019 05:41:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D5E8CF897C4 Date: 22 May 2019 12:41:42 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627401" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:41:42 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 8C3504003EBA; Wed, 22 May 2019 12:41:42 +0900 (JST) Message-ID: <87h89nnp87.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 033/145] ASoC: samsung: jive_wm8750: 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 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/samsung/jive_wm8750.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/samsung/jive_wm8750.c b/sound/soc/samsung/jive_wm8750.c index f05f9e0..949d2e0 100644 --- a/sound/soc/samsung/jive_wm8750.c +++ b/sound/soc/samsung/jive_wm8750.c @@ -78,16 +78,18 @@ static const struct snd_soc_ops jive_ops = { .hw_params = jive_hw_params, }; +SND_SOC_DAILINK_DEFS(wm8750, + DAILINK_COMP_ARRAY(COMP_CPU("s3c2412-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8750.0-001a", "wm8750-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("s3c2412-i2s"))); + static struct snd_soc_dai_link jive_dai = { .name = "wm8750", .stream_name = "WM8750", - .cpu_dai_name = "s3c2412-i2s", - .codec_dai_name = "wm8750-hifi", - .platform_name = "s3c2412-i2s", - .codec_name = "wm8750.0-001a", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &jive_ops, + SND_SOC_DAILINK_REG(wm8750), }; /* jive audio machine driver */ From patchwork Wed May 22 03:41:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955105 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 5105A14C0 for ; Wed, 22 May 2019 05:17:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4046028AF2 for ; Wed, 22 May 2019 05:17:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3490728B0A; Wed, 22 May 2019 05:17:31 +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 4CC7628AF2 for ; Wed, 22 May 2019 05:17:30 +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 504E61724; Wed, 22 May 2019 06:00:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 504E61724 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497703; bh=0VdipX+W0SuM+DbfnzyFJCbMOhs6ouIkbxNiXzSFYSE=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=iO+jocXuOlsySPuEMPXs5toqGBJR1EQT9M17svNwIKL56YP9XLAQuJv+37yTS4nB1 9vNcB1+6+CYrH1HQkzRCO2NV0qOrFRBa7exumoDAmeIjEaTWWWxRwwvFDxu1nMc86C vguBrLUnMpeKUYeXcSZz5w3viGLq0o79q0twH2rs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D5147F897CC; Wed, 22 May 2019 05:41:52 +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 83466F897CD; Wed, 22 May 2019 05:41:51 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id BC9C9F897C8 for ; Wed, 22 May 2019 05:41:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BC9C9F897C8 Date: 22 May 2019 12:41:47 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425320" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:41:47 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 74BFF4170D2F; Wed, 22 May 2019 12:41:47 +0900 (JST) Message-ID: <87ftp7np82.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 034/145] ASoC: pxa: brownstone: 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 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/pxa/brownstone.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/pxa/brownstone.c b/sound/soc/pxa/brownstone.c index 9a3f5b7..38ea26c 100644 --- a/sound/soc/pxa/brownstone.c +++ b/sound/soc/pxa/brownstone.c @@ -78,17 +78,19 @@ static const struct snd_soc_ops brownstone_ops = { .hw_params = brownstone_wm8994_hw_params, }; +SND_SOC_DAILINK_DEFS(wm8994, + DAILINK_COMP_ARRAY(COMP_CPU("mmp-sspa-dai.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8994-codec", "wm8994-aif1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("mmp-pcm-audio"))); + static struct snd_soc_dai_link brownstone_wm8994_dai[] = { { .name = "WM8994", .stream_name = "WM8994 HiFi", - .cpu_dai_name = "mmp-sspa-dai.0", - .codec_dai_name = "wm8994-aif1", - .platform_name = "mmp-pcm-audio", - .codec_name = "wm8994-codec", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &brownstone_ops, + SND_SOC_DAILINK_REG(wm8994), }, }; From patchwork Wed May 22 03:41:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954973 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 3CBDF912 for ; Wed, 22 May 2019 04:57:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D2F828A81 for ; Wed, 22 May 2019 04:57:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 217A128AB3; Wed, 22 May 2019 04:57:32 +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 5CC4628A81 for ; Wed, 22 May 2019 04:57:31 +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 DEAA7172E; Wed, 22 May 2019 06:01:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DEAA7172E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497754; bh=/fFg8Yw+Bo3VFnU7inthsjY3JsxBPDd1Jqmvm/szx0s=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RfAJhrYMWqhbKcZSbOM5m8aysDhbRTF4Nv3XOa3KJ+dYRqGfNX2Y90rTs+uL28XCs mgwZSXa6zeIltm1QWC89YVr/Fsb213AqlMkjIklFO+WkJorYYZD/264delW+FTaqZY iaMmTQyqtO1J/25sPO/6K+usyi/Wcug5RyNt+980= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E2538F897D7; Wed, 22 May 2019 05:41:55 +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 F0626F897D8; Wed, 22 May 2019 05:41:54 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 5011FF897CF for ; Wed, 22 May 2019 05:41:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5011FF897CF Date: 22 May 2019 12:41:51 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425325" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:41:51 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id D69DD4170D2D; Wed, 22 May 2019 12:41:51 +0900 (JST) Message-ID: <87ef4rnp7y.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 035/145] ASoC: pxa: corgi: 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 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/pxa/corgi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index 054e0d6..dae1288 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c @@ -260,16 +260,18 @@ static const struct snd_kcontrol_new wm8731_corgi_controls[] = { }; /* corgi digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(wm8731, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8731.0-001b", "wm8731-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link corgi_dai = { .name = "WM8731", .stream_name = "WM8731", - .cpu_dai_name = "pxa2xx-i2s", - .codec_dai_name = "wm8731-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm8731.0-001b", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &corgi_ops, + SND_SOC_DAILINK_REG(wm8731), }; /* corgi audio machine driver */ From patchwork Wed May 22 03:41:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954965 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 3A2D8924 for ; Wed, 22 May 2019 04:57:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AC9C28AC2 for ; Wed, 22 May 2019 04:57:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EB1528A81; Wed, 22 May 2019 04:57:30 +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 6ADF428A93 for ; Wed, 22 May 2019 04:57:29 +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 9A4881739; Wed, 22 May 2019 06:02:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9A4881739 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497790; bh=5QwlPpd8ACkpOzoBcicnWHGB1Txcy7kIwbaf6VYlgb4=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RTAbLJngdKxvedIdpT77w+JtS7C/NbzeQYkPulP/FPN/7r/aEO5lAQULtBBqb+id2 frKopE3cKmKbwDm2I4i3gqXQ6vjJ3B/wtzGYvZwNAe1yjQ4szCZ5w791NdszrR9AjN mYLo06eOxG88pUdIs09fD9w3FBlPtkKjAJc9eVvM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F3FFEF897DC; Wed, 22 May 2019 05:42:01 +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 CE917F897DD; Wed, 22 May 2019 05:42:00 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id E77A9F897D8 for ; Wed, 22 May 2019 05:41:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E77A9F897D8 Date: 22 May 2019 12:41:56 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425331" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:41:56 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 795134009405; Wed, 22 May 2019 12:41:56 +0900 (JST) Message-ID: <87d0kbnp7t.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 036/145] ASoC: pxa: e740_wm9705: 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 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/pxa/e740_wm9705.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/pxa/e740_wm9705.c b/sound/soc/pxa/e740_wm9705.c index 8ab7032..15141a8 100644 --- a/sound/soc/pxa/e740_wm9705.c +++ b/sound/soc/pxa/e740_wm9705.c @@ -84,22 +84,26 @@ static const struct snd_soc_dapm_route audio_map[] = { {"Mic Amp", NULL, "Mic (Internal)"}, }; +SND_SOC_DAILINK_DEFS(ac97, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9705-codec", "wm9705-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(ac97_aux, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97-aux")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9705-codec", "wm9705-aux")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link e740_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa2xx-ac97", - .codec_dai_name = "wm9705-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm9705-codec", + SND_SOC_DAILINK_REG(ac97), }, { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa2xx-ac97-aux", - .codec_dai_name = "wm9705-aux", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm9705-codec", + SND_SOC_DAILINK_REG(ac97_aux), }, }; From patchwork Wed May 22 03:42:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954805 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 7FBED17E0 for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 717562882F for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6604128B51; Wed, 22 May 2019 04:42:32 +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 AC54F2882F for ; Wed, 22 May 2019 04:42:31 +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 BF5E71700; Wed, 22 May 2019 06:02:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BF5E71700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497827; bh=eZa43j9ZybdEPdEXSiQ2m6WggfqdzGv3ajfKRh/Yrq8=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=CLyJig2vUxwVKcb2oDSaTVGD68uq+je18IrJWXBlHTd35+BpthGqpd9UGOzr5cy1l QX6Txbb46D14JBF8vem8CVGW4AmxCRnIu6oteAieAWuC9tN/1docrsHNQglRdfr3WM F1Ij9LPQtViSdLRFxk/ISz+N2DAThiopMeLEVJ6A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D751CF897E1; Wed, 22 May 2019 05:42:06 +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 77EE8F897E1; Wed, 22 May 2019 05:42:05 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 7AC72F896E9 for ; Wed, 22 May 2019 05:42:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7AC72F896E9 Date: 22 May 2019 12:42:01 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627421" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:42:01 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 345364003EBB; Wed, 22 May 2019 12:42:01 +0900 (JST) Message-ID: <87blzvnp7p.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 037/145] ASoC: pxa: e750_wm9705: 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 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/pxa/e750_wm9705.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/pxa/e750_wm9705.c b/sound/soc/pxa/e750_wm9705.c index 82bcbbb..406ecf2 100644 --- a/sound/soc/pxa/e750_wm9705.c +++ b/sound/soc/pxa/e750_wm9705.c @@ -67,23 +67,27 @@ static const struct snd_soc_dapm_route audio_map[] = { {"MIC1", NULL, "Mic (Internal)"}, }; +SND_SOC_DAILINK_DEFS(ac97, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9705-codec", "wm9705-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(ac97_aux, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97-aux")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9705-codec", "wm9705-aux")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link e750_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa2xx-ac97", - .codec_dai_name = "wm9705-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm9705-codec", + SND_SOC_DAILINK_REG(ac97), /* use ops to check startup state */ }, { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa2xx-ac97-aux", - .codec_dai_name = "wm9705-aux", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm9705-codec", + SND_SOC_DAILINK_REG(ac97_aux), }, }; From patchwork Wed May 22 03:42:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954793 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 8E6D917E0 for ; Wed, 22 May 2019 04:42:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8048228782 for ; Wed, 22 May 2019 04:42:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7456A28B54; Wed, 22 May 2019 04:42:30 +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 9F1A628B56 for ; Wed, 22 May 2019 04:42:29 +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 4B7CA172C; Wed, 22 May 2019 06:03:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4B7CA172C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497867; bh=wfHRCcsQ9fQpB7X8bHUAeet/g7DwTEY6DeXUuSYoglE=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RFTtFt7hCdtGSfA35RFbBLMuaWi73BW51yccuj1qBHDZTf+VEIv3uhgD5MUIlpyi7 /oL3w3EJoh/eWHZdrJSF11ZM4fCMLjqbL98sfvEfYpaZYOwHkiozx1wxShj5opwNXW Fmbg7j3mjXYNcDbGpxaotw0nqrHl3EvqoR4HSitw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B1391F89718; Wed, 22 May 2019 05:42:11 +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 24E42F89718; Wed, 22 May 2019 05:42:10 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 6E61FF897E2 for ; Wed, 22 May 2019 05:42:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6E61FF897E2 Date: 22 May 2019 12:42:06 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627429" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:42:06 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id EF6C74003EBD; Wed, 22 May 2019 12:42:05 +0900 (JST) Message-ID: <87a7ffnp7k.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 038/145] ASoC: pxa: e800_wm9712: 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 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/pxa/e800_wm9712.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c index 1ed8aa2..fc3aa3d 100644 --- a/sound/soc/pxa/e800_wm9712.c +++ b/sound/soc/pxa/e800_wm9712.c @@ -68,22 +68,27 @@ static const struct snd_soc_dapm_route audio_map[] = { {"MIC2", NULL, "Mic (Internal2)"}, }; + +SND_SOC_DAILINK_DEFS(ac97, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(ac97_aux, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97-aux")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-aux")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link e800_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa2xx-ac97", - .codec_dai_name = "wm9712-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm9712-codec", + SND_SOC_DAILINK_REG(ac97), }, { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa2xx-ac97-aux", - .codec_dai_name = "wm9712-aux", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm9712-codec", + SND_SOC_DAILINK_REG(ac97_aux), }, }; From patchwork Wed May 22 03:42:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954807 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 BE64E1908 for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD51F2882F for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1BA828B3E; Wed, 22 May 2019 04:42:32 +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 A1F1228B57 for ; Wed, 22 May 2019 04:42:29 +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 9CD061731; Wed, 22 May 2019 06:04:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9CD061731 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497908; bh=xHJ/D0FRYhMuW4Vy597XZwVhFOKaJ6XJ+VfjDkpupmk=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=J4+fsaJMUWIciAIgauOfEi0lC0jiO/t5B1naEARH/KtknEX+n5plX6evshmsHOkCw yKSaRWCu0qBsd5aAUHJlla4szFd+27D7U0av0kLl72oBJrdxtS/pA35yBi6LbNhrPa VvDPwzPyxEYVbn9mv4QjOOsd1zW8XMyH0AkTTy7U= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 566B5F897E6; Wed, 22 May 2019 05:42:16 +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 943DDF897E7; Wed, 22 May 2019 05:42:15 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 1C49FF897E2 for ; Wed, 22 May 2019 05:42:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1C49FF897E2 Date: 22 May 2019 12:42:10 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627434" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:42:10 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 9BB614003EBA; Wed, 22 May 2019 12:42:10 +0900 (JST) Message-ID: <878suznp7f.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 039/145] ASoC: pxa: em-x270: 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 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/pxa/em-x270.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/pxa/em-x270.c b/sound/soc/pxa/em-x270.c index e046770..9ff2a64e 100644 --- a/sound/soc/pxa/em-x270.c +++ b/sound/soc/pxa/em-x270.c @@ -30,22 +30,26 @@ #include #include +SND_SOC_DAILINK_DEFS(ac97, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(ac97_aux, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97-aux")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-aux")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link em_x270_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa2xx-ac97", - .codec_dai_name = "wm9712-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm9712-codec", + SND_SOC_DAILINK_REG(ac97), }, { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa2xx-ac97-aux", - .codec_dai_name = "wm9712-aux", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm9712-codec", + SND_SOC_DAILINK_REG(ac97_aux), }, }; From patchwork Wed May 22 03:42:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955005 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 9D1C8912 for ; Wed, 22 May 2019 05:02:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8988228AEB for ; Wed, 22 May 2019 05:02:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 732BD28B44; Wed, 22 May 2019 05:02:30 +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 7411728B3C for ; Wed, 22 May 2019 05:02:29 +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 8CF4E1714; Wed, 22 May 2019 06:04:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8CF4E1714 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497946; bh=21nUjKUsq4NZkDEO+MtptR3zOHfeyBIHPFTJujr35wo=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EN0m5g4mc386W2KmdYrXbuwWhaNTMkLnQZrxOpEMizmkEaVZkRGq0dFAXvbxqWJgi 8OrcDuv35Q4AfRWXXbDTqBjT8TqE8gt9A0fMF83o4ngJBEZLb3FDeiIupjx75bXoE6 AtGeT1TfRlAQyWbj+H6te2x1ecoftfkmwDwja+N4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A63EDF897EB; Wed, 22 May 2019 05:42:44 +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 5867DF897EB; Wed, 22 May 2019 05:42:43 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 27E71F8973E for ; Wed, 22 May 2019 05:42:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 27E71F8973E Date: 22 May 2019 12:42:37 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627462" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:42:37 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 5799C4003EBB; Wed, 22 May 2019 12:42:37 +0900 (JST) Message-ID: <877eajnp6p.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 040/145] ASoC: pxa: hx4700: 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 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/pxa/hx4700.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/pxa/hx4700.c b/sound/soc/pxa/hx4700.c index 6cdef5d..5d86e61 100644 --- a/sound/soc/pxa/hx4700.c +++ b/sound/soc/pxa/hx4700.c @@ -139,17 +139,19 @@ static int hx4700_ak4641_init(struct snd_soc_pcm_runtime *rtd) } /* hx4700 digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(ak4641, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("ak4641.0-0012", "ak4641-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link hx4700_dai = { .name = "ak4641", .stream_name = "AK4641", - .cpu_dai_name = "pxa2xx-i2s", - .codec_dai_name = "ak4641-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "ak4641.0-0012", .init = hx4700_ak4641_init, .dai_fmt = SND_SOC_DAIFMT_MSB | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &hx4700_ops, + SND_SOC_DAILINK_REG(ak4641), }; /* hx4700 audio machine driver */ From patchwork Wed May 22 03:42:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955003 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 8149B13AD for ; Wed, 22 May 2019 05:02:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D22B28AEB for ; Wed, 22 May 2019 05:02:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61BAA28B47; Wed, 22 May 2019 05:02:30 +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 6E40128B3B for ; Wed, 22 May 2019 05:02:29 +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 989401733; Wed, 22 May 2019 06:05:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 989401733 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558497984; bh=/r9DKsIDduYSvBLWpr7vMLoYMRj6hNG76cTSyeEgHso=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vdOZtJ6jIqb78c9wADRxOxavWf0NioIpGI6cIun2LpuI9ckpTIFvk5ew0uhUlN9Wd 1r37JduDgezkXaW690SaLuhLQpzFqUatj+fsbVt7Lq8ww6dXIqfxVaH0NYC80Wz1tH cgjm1jUYCfbV82CVKMOHxrQWglklMZtWAX90ghIA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6567FF897E7; Wed, 22 May 2019 05:42:49 +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 2466DF897F0; Wed, 22 May 2019 05:42:47 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 7A396F897E7 for ; Wed, 22 May 2019 05:42:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7A396F897E7 Date: 22 May 2019 12:42:43 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627465" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:42:43 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 06DCB41715DE; Wed, 22 May 2019 12:42:43 +0900 (JST) Message-ID: <875zq3np6j.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 041/145] ASoC: pxa: imote2: 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 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/pxa/imote2.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/pxa/imote2.c b/sound/soc/pxa/imote2.c index 7847537..9095edd 100644 --- a/sound/soc/pxa/imote2.c +++ b/sound/soc/pxa/imote2.c @@ -46,16 +46,19 @@ static const struct snd_soc_ops imote2_asoc_ops = { .hw_params = imote2_asoc_hw_params, }; +SND_SOC_DAILINK_DEFS(wm8940, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8940-codec.0-0034", + "wm8940-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link imote2_dai = { .name = "WM8940", .stream_name = "WM8940", - .cpu_dai_name = "pxa2xx-i2s", - .codec_dai_name = "wm8940-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm8940-codec.0-0034", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &imote2_asoc_ops, + SND_SOC_DAILINK_REG(wm8940), }; static struct snd_soc_card imote2 = { From patchwork Wed May 22 03:42:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955007 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 5821E912 for ; Wed, 22 May 2019 05:02:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4558828AEB for ; Wed, 22 May 2019 05:02:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3119F28B3B; Wed, 22 May 2019 05:02:31 +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 66ADD28B37 for ; Wed, 22 May 2019 05:02:29 +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 70D261701; Wed, 22 May 2019 06:06:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 70D261701 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498022; bh=K5SWqRQItS/TbXEtqtcPa1FDZhUFkVNMhzQ868jHYG8=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dgvTQOtIlQrGBkxqJb/IbjGSEQddtWuVQFMNxoADTYJW/FttSG8qPOegpPqkbg4rx c0j3INwmmjkP5tpRY/XZCU5iEFeLh4hKlu/9WzwrSP6wM5knMHRLjKAHq3Yx0sj8k6 kklMV9jHgw5CtoMq4zMUVkiZSMJc4q/XjTEbVrq0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D8C54F897F1; Wed, 22 May 2019 05:42:52 +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 1319CF897F3; Wed, 22 May 2019 05:42:52 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 81E70F8973E for ; Wed, 22 May 2019 05:42:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 81E70F8973E Date: 22 May 2019 12:42:49 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627469" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:42:49 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 12BB641715DE; Wed, 22 May 2019 12:42:49 +0900 (JST) Message-ID: <874l5nnp6d.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 042/145] ASoC: pxa: magician: 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 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/pxa/magician.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index 935a248..bf8084f 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c @@ -290,24 +290,30 @@ static const struct snd_kcontrol_new uda1380_magician_controls[] = { }; /* magician digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(playback, + DAILINK_COMP_ARRAY(COMP_CPU("pxa-ssp-dai.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("uda1380-codec.0-0018", + "uda1380-hifi-playback")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(capture, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("uda1380-codec.0-0018", + "uda1380-hifi-capture")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link magician_dai[] = { { .name = "uda1380", .stream_name = "UDA1380 Playback", - .cpu_dai_name = "pxa-ssp-dai.0", - .codec_dai_name = "uda1380-hifi-playback", - .platform_name = "pxa-pcm-audio", - .codec_name = "uda1380-codec.0-0018", .ops = &magician_playback_ops, + SND_SOC_DAILINK_REG(playback), }, { .name = "uda1380", .stream_name = "UDA1380 Capture", - .cpu_dai_name = "pxa2xx-i2s", - .codec_dai_name = "uda1380-hifi-capture", - .platform_name = "pxa-pcm-audio", - .codec_name = "uda1380-codec.0-0018", .ops = &magician_capture_ops, + SND_SOC_DAILINK_REG(capture), } }; From patchwork Wed May 22 03:42:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955001 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 45B88924 for ; Wed, 22 May 2019 05:02:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3633F28AEB for ; Wed, 22 May 2019 05:02:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2745228B47; Wed, 22 May 2019 05:02:30 +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 6623F28AEB for ; Wed, 22 May 2019 05:02:29 +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 198E51769; Wed, 22 May 2019 06:07:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 198E51769 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498073; bh=6SqZmxx2JQ/Q9PADW5PUABtC3sbuNTmafUQyWpmxgIc=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tfEDQPApVE2zqijxqIHLNUcOOSRaS2CH7D3Jl28pm2BVwoX/XJ7gfGK7n6uQZ4mAk 6+BgKBEiB0Kk+rWFPi6Q+12TchsNLtSJG0//sxMVwWM1RguV/Pe0a+KO/TYb9t9UWS pfsyy+2zcR+XTeA6KU3IfnrjDapleD2r5s9dRmP0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A38E2F897F5; Wed, 22 May 2019 05:42:58 +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 2418CF897FC; Wed, 22 May 2019 05:42:58 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 0AB1BF897F5 for ; Wed, 22 May 2019 05:42:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0AB1BF897F5 Date: 22 May 2019 12:42:54 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627484" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:42:54 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 917D841715D5; Wed, 22 May 2019 12:42:54 +0900 (JST) Message-ID: <8736l7np67.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 043/145] ASoC: pxa: mioa701_wm9713: 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 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/pxa/mioa701_wm9713.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c index 47052fe..6244e5c 100644 --- a/sound/soc/pxa/mioa701_wm9713.c +++ b/sound/soc/pxa/mioa701_wm9713.c @@ -142,25 +142,29 @@ static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd) static struct snd_soc_ops mioa701_ops; +SND_SOC_DAILINK_DEFS(ac97, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9713-codec", "wm9713-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(ac97_aux, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97-aux")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9713-codec", "wm9713-aux")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link mioa701_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa2xx-ac97", - .codec_dai_name = "wm9713-hifi", - .codec_name = "wm9713-codec", .init = mioa701_wm9713_init, - .platform_name = "pxa-pcm-audio", .ops = &mioa701_ops, + SND_SOC_DAILINK_REG(ac97), }, { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa2xx-ac97-aux", - .codec_dai_name = "wm9713-aux", - .codec_name = "wm9713-codec", - .platform_name = "pxa-pcm-audio", .ops = &mioa701_ops, + SND_SOC_DAILINK_REG(ac97_aux), }, }; From patchwork Wed May 22 03:42:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954849 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 7D17B1708 for ; Wed, 22 May 2019 04:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F0D3205F6 for ; Wed, 22 May 2019 04:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63D5D28B5A; Wed, 22 May 2019 04:47:32 +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 62DAF205F6 for ; Wed, 22 May 2019 04:47:31 +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 8215C16DC; Wed, 22 May 2019 06:07:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8215C16DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498108; bh=VFDYIyapUFjY8R2RPhVt5lba/ng7vXSbrGwFboBeFy4=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QHuV8YlWJhheCnji3Ef9f61NCXM91+ofmnbN4MeCvAt9dMiVNTrGNgz918N6w7c9K WNwGWDzCZx+Go9Pxilof+9NULMcDKv3wV66eJEeKAXkWBH1Z2BTY9j8IbjX5VTaKFh CuaH6JZ0stz4NJR6dYHwWwWqhd7XrVqXg43UDBF4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 404C7F897FF; Wed, 22 May 2019 05:43:06 +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 6F9C3F89800; Wed, 22 May 2019 05:43:04 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 25931F89742 for ; Wed, 22 May 2019 05:43:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 25931F89742 Date: 22 May 2019 12:42:59 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425403" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:42:59 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id DBCA64003EBA; Wed, 22 May 2019 12:42:59 +0900 (JST) Message-ID: <871s0rnp62.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 044/145] ASoC: pxa: palm27x: 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 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/pxa/palm27x.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c index 9716704..d973f9b 100644 --- a/sound/soc/pxa/palm27x.c +++ b/sound/soc/pxa/palm27x.c @@ -87,23 +87,27 @@ static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd) return err; } +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(aux, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97-aux")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-aux")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link palm27x_dai[] = { { .name = "AC97 HiFi", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa2xx-ac97", - .codec_dai_name = "wm9712-hifi", - .codec_name = "wm9712-codec", - .platform_name = "pxa-pcm-audio", .init = palm27x_ac97_init, + SND_SOC_DAILINK_REG(hifi), }, { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa2xx-ac97-aux", - .codec_dai_name = "wm9712-aux", - .codec_name = "wm9712-codec", - .platform_name = "pxa-pcm-audio", + SND_SOC_DAILINK_REG(aux), }, }; From patchwork Wed May 22 03:43:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954839 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 7A98A1708 for ; Wed, 22 May 2019 04:47:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A2FB28610 for ; Wed, 22 May 2019 04:47:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5ED7528B54; Wed, 22 May 2019 04:47:30 +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 7D3B128610 for ; Wed, 22 May 2019 04:47:29 +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 3C15416B3; Wed, 22 May 2019 06:08:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3C15416B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498148; bh=6BcJGzbLkLciKEiHqwF0OSNkc1MgwOzUuh8coRg2eps=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vH1o7nnz46ef66QsbZfa+EhjMWCN2pUBjcQpyxeZ0O7ESFemILmLdu5yEfuj1YG2I QEltyh2v9wzxbxyYLp2S2Hc4fOE65kAASyWrFV0Lbn/UQN16KezDBBR4yknN4DZ+jg w0JnYqDF29KzuNdjHb1PJIjJJISfjLUewhw4VxNA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 89490F89804; Wed, 22 May 2019 05:43:10 +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 04B90F89805; Wed, 22 May 2019 05:43:08 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id E7BE1F89802 for ; Wed, 22 May 2019 05:43:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E7BE1F89802 Date: 22 May 2019 12:43:04 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627499" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:43:04 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B4C2B41715D5; Wed, 22 May 2019 12:43:04 +0900 (JST) Message-ID: <87zhnfmalh.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 045/145] ASoC: pxa: zylonite: 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 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/pxa/zylonite.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c index 230eee4..ac7d052 100644 --- a/sound/soc/pxa/zylonite.c +++ b/sound/soc/pxa/zylonite.c @@ -127,34 +127,40 @@ static const struct snd_soc_ops zylonite_voice_ops = { .hw_params = zylonite_voice_hw_params, }; +SND_SOC_DAILINK_DEFS(ac97, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9713-codec", "wm9713-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(ac97_aux, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97-aux")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9713-codec", "wm9713-aux")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(voice, + DAILINK_COMP_ARRAY(COMP_CPU("pxa-ssp-dai.2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9713-codec", "wm9713-voice")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link zylonite_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .codec_name = "wm9713-codec", - .platform_name = "pxa-pcm-audio", - .cpu_dai_name = "pxa2xx-ac97", - .codec_dai_name = "wm9713-hifi", .init = zylonite_wm9713_init, + SND_SOC_DAILINK_REG(ac97), }, { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .codec_name = "wm9713-codec", - .platform_name = "pxa-pcm-audio", - .cpu_dai_name = "pxa2xx-ac97-aux", - .codec_dai_name = "wm9713-aux", + SND_SOC_DAILINK_REG(ac97_aux), }, { .name = "WM9713 Voice", .stream_name = "WM9713 Voice", - .codec_name = "wm9713-codec", - .platform_name = "pxa-pcm-audio", - .cpu_dai_name = "pxa-ssp-dai.2", - .codec_dai_name = "wm9713-voice", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &zylonite_voice_ops, + SND_SOC_DAILINK_REG(voice), }, }; From patchwork Wed May 22 03:43:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954873 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 E6D4517E0 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D566E1FF29 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C99D71FF83; Wed, 22 May 2019 04:47:34 +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 63AE328B58 for ; Wed, 22 May 2019 04:47:33 +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 092C1175F; Wed, 22 May 2019 06:08:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 092C1175F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498187; bh=PEyb/qiWxxUgZyYNHgNVGjmrEsIziHg3aglWmZipmnc=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Rz0t/rU9cTALWkqTTl/ElItHTtG0l7GXH+BkjCJm44Emr7FrPDvDqI1mMiKg86Rdo sAslNLEwIKsIlwjzxboBOpx7PC2Jcio6ewinBBY6nFMvBB8RtOwGNq7wYqXjfyNzn6 Tm8NvYpAcyXzr6/3xJsLpXcljPlOvNXceGse6Sxw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EDF8AF8980A; Wed, 22 May 2019 05:43:15 +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 6865CF8980B; Wed, 22 May 2019 05:43:15 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 8C42EF89807 for ; Wed, 22 May 2019 05:43:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8C42EF89807 Date: 22 May 2019 12:43:09 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425415" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:43:09 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 414A941715D5; Wed, 22 May 2019 12:43:09 +0900 (JST) Message-ID: <87y32zmald.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 046/145] ASoC: pxa: z2: 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 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/pxa/z2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/pxa/z2.c b/sound/soc/pxa/z2.c index 5b0eccd..40d34b9 100644 --- a/sound/soc/pxa/z2.c +++ b/sound/soc/pxa/z2.c @@ -157,17 +157,19 @@ static const struct snd_soc_ops z2_ops = { }; /* z2 digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(wm8750, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8750.0-001b", "wm8750-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link z2_dai = { .name = "wm8750", .stream_name = "WM8750", - .cpu_dai_name = "pxa2xx-i2s", - .codec_dai_name = "wm8750-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm8750.0-001b", .init = z2_wm8750_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &z2_ops, + SND_SOC_DAILINK_REG(wm8750), }; /* z2 audio machine driver */ From patchwork Wed May 22 03:43:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954843 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 B54B018E8 for ; Wed, 22 May 2019 04:47:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6C6E1FF83 for ; Wed, 22 May 2019 04:47:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B3481FF29; Wed, 22 May 2019 04:47:30 +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 66E4C1FF83 for ; Wed, 22 May 2019 04:47:29 +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 380361775; Wed, 22 May 2019 06:09:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 380361775 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498228; bh=HcUv4sO9Hp7h3vc8iQ5M49PWcMiVu793Uj9ovPPrJBM=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=n2dnn3WP0xhaEEV2bRgL9QYqMBBfMfDmS66fPEtG+TqnI20BWITcHrS+4ydEhGhjv eH3T33ey+l6KFN4YKiLGzs5DWihkpNb7EYweHB+tZUDfL2y+yeDPU8gSqVlc3L99RX cPhlzka1OOq1d5juDWC60uO41dbZMovxxpQhq6L4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8CB4AF8980E; Wed, 22 May 2019 05:43:19 +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 E3F52F8980F; Wed, 22 May 2019 05:43:17 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 05954F89809 for ; Wed, 22 May 2019 05:43:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 05954F89809 Date: 22 May 2019 12:43:13 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425418" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:43:13 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 897FB4009406; Wed, 22 May 2019 12:43:13 +0900 (JST) Message-ID: <87woijmal8.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 047/145] ASoC: pxa: ttc-dkb: 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 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/pxa/ttc-dkb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/pxa/ttc-dkb.c b/sound/soc/pxa/ttc-dkb.c index 5d6e61a..5a13e36 100644 --- a/sound/soc/pxa/ttc-dkb.c +++ b/sound/soc/pxa/ttc-dkb.c @@ -94,17 +94,19 @@ static int ttc_pm860x_init(struct snd_soc_pcm_runtime *rtd) } /* ttc/td-dkb digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(i2s, + DAILINK_COMP_ARRAY(COMP_CPU("pxa-ssp-dai.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("88pm860x-codec", "88pm860x-i2s")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("mmp-pcm-audio"))); + static struct snd_soc_dai_link ttc_pm860x_hifi_dai[] = { { .name = "88pm860x i2s", .stream_name = "audio playback", - .codec_name = "88pm860x-codec", - .platform_name = "mmp-pcm-audio", - .cpu_dai_name = "pxa-ssp-dai.1", - .codec_dai_name = "88pm860x-i2s", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .init = ttc_pm860x_init, + SND_SOC_DAILINK_REG(i2s), }, }; From patchwork Wed May 22 03:43:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955045 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 777B7924 for ; Wed, 22 May 2019 05:07:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6905A28B2C for ; Wed, 22 May 2019 05:07:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D4A028B3B; Wed, 22 May 2019 05:07:36 +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 A4DBC28B44 for ; Wed, 22 May 2019 05:07:29 +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 DDE391722; Wed, 22 May 2019 06:10:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DDE391722 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498266; bh=xm26H7+zNIc+qt9NGqE03WNK15a0yOIhMktKsTgQBps=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jQj4AEF8sUKEOiVtvjnkr27W6h0WqR8bYSJyUHScXs0xz9vUXMkD1a9/V8w/XCCjr iQTP8K1j0zfaSBG2ectFNOVHYhZD0fWDDxGB6Dh+nfh3PM5dLVQCzBWplwaTyVuGwK aY7YNvpLuRl8JeoVZFIRdm0ECFOzcjfMlfcV1Do0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 00FE4F89811; Wed, 22 May 2019 05:43:24 +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 9C931F89814; Wed, 22 May 2019 05:43:23 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id ED330F89811 for ; Wed, 22 May 2019 05:43:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ED330F89811 Date: 22 May 2019 12:43:17 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627516" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:43:17 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id B463A4003EBA; Wed, 22 May 2019 12:43:17 +0900 (JST) Message-ID: <87v9y3mal4.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 048/145] ASoC: pxa: tosa: 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 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/pxa/tosa.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index ae9c12e..e7cb450 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c @@ -182,24 +182,28 @@ static const struct snd_kcontrol_new tosa_controls[] = { tosa_set_spk), }; +SND_SOC_DAILINK_DEFS(ac97, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(ac97_aux, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97-aux")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-aux")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link tosa_dai[] = { { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "pxa2xx-ac97", - .codec_dai_name = "wm9712-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm9712-codec", .ops = &tosa_ops, + SND_SOC_DAILINK_REG(ac97), }, { .name = "AC97 Aux", .stream_name = "AC97 Aux", - .cpu_dai_name = "pxa2xx-ac97-aux", - .codec_dai_name = "wm9712-aux", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm9712-codec", .ops = &tosa_ops, + SND_SOC_DAILINK_REG(ac97_aux), }, }; From patchwork Wed May 22 03:43:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954845 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 4B4A21708 for ; Wed, 22 May 2019 04:47:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38A771FF29 for ; Wed, 22 May 2019 04:47:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CD2A1FF83; Wed, 22 May 2019 04:47:31 +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 7510B205F6 for ; Wed, 22 May 2019 04:47:29 +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 CBBB41783; Wed, 22 May 2019 06:10:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CBBB41783 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498304; bh=cVbLZflmBptSs8nV4UDlcDSZ697dqwvX2l6P/EzXAJk=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tB8STMhAIwUJcEpA7DEeLsxqTTNmFd4CCdFN+dOjNt5BL+2zqDb2nU7mNNw2h5gVk O8zPSXE0zVKiAdj1dLM4pWm6FuKH69XhosGgXFXFTGNLycrZo2JBOiaGTufc65IHlh VEYanfzlaMS5He1GQ6OrwahBjKE3GYF0jUVwwiXw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4DECBF89818; Wed, 22 May 2019 05:43:29 +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 069ACF89812; Wed, 22 May 2019 05:43:28 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 7D812F89812 for ; Wed, 22 May 2019 05:43:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7D812F89812 Date: 22 May 2019 12:43:22 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425427" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:43:22 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 48FDD4003EBA; Wed, 22 May 2019 12:43:22 +0900 (JST) Message-ID: <87tvdnmal0.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 049/145] ASoC: pxa: spitz: 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 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/pxa/spitz.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index 1671da6..7973466 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c @@ -257,16 +257,18 @@ static const struct snd_kcontrol_new wm8750_spitz_controls[] = { }; /* spitz digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(wm8750, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8750.0-001b", "wm8750-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link spitz_dai = { .name = "wm8750", .stream_name = "WM8750", - .cpu_dai_name = "pxa2xx-i2s", - .codec_dai_name = "wm8750-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm8750.0-001b", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &spitz_ops, + SND_SOC_DAILINK_REG(wm8750), }; /* spitz audio machine driver */ From patchwork Wed May 22 03:43:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955043 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 D3399112C for ; Wed, 22 May 2019 05:07:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C398E28B2C for ; Wed, 22 May 2019 05:07:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B847D28B45; Wed, 22 May 2019 05:07:35 +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 9381828B3C for ; Wed, 22 May 2019 05:07:29 +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 AE0231778; Wed, 22 May 2019 06:11:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AE0231778 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498342; bh=taNaH9VYlwn68OZqDOIJeYOyNlnjD2uwpE9CxUvVBGw=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=o/2OXXeAwfMPoF5sQ5cIGuooavHgvaq1StYKQrvUF38L7C0xfTtxpaUcgF8MPPaWL PfzDmesUlqnJDS2pfWnkWfX40QPuEs9gKyF587X8oXHIjaJHKp0jxP7Y3M4s/mqybg 1jHv8uJcvZDixwbVMAfvAXQzf0G/48O+lB7E34uI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 75F26F89748; Wed, 22 May 2019 05:43:44 +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 1112BF8974C; Wed, 22 May 2019 05:43:43 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 6DC26F89745 for ; Wed, 22 May 2019 05:43:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6DC26F89745 Date: 22 May 2019 12:43:38 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627533" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:43:38 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 352FE4003EBC; Wed, 22 May 2019 12:43:38 +0900 (JST) Message-ID: <87sgt7makk.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 050/145] ASoC: pxa: poodle: 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 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/pxa/poodle.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index b6693f3..2a56418 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c @@ -224,16 +224,18 @@ static const struct snd_kcontrol_new wm8731_poodle_controls[] = { }; /* poodle digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(wm8731, + DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8731.0-001b", "wm8731-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("pxa-pcm-audio"))); + static struct snd_soc_dai_link poodle_dai = { .name = "WM8731", .stream_name = "WM8731", - .cpu_dai_name = "pxa2xx-i2s", - .codec_dai_name = "wm8731-hifi", - .platform_name = "pxa-pcm-audio", - .codec_name = "wm8731.0-001b", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &poodle_ops, + SND_SOC_DAILINK_REG(wm8731), }; /* poodle audio machine driver */ From patchwork Wed May 22 03:43:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955041 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 944D6112C for ; Wed, 22 May 2019 05:07:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8417428B2C for ; Wed, 22 May 2019 05:07:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78A0E28B45; Wed, 22 May 2019 05:07:34 +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 7978528B2C for ; Wed, 22 May 2019 05:07:29 +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 404431794; Wed, 22 May 2019 06:12:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 404431794 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498393; bh=gOEm8KD0IitdyBtL7evBtUHbjkyQdu8eS3RVAkH8BDw=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qzshaTz2eM1gaHzO3srs8hpoWOPCFM2Lwl9IrtR+xq8zLpBtrhQg2Dy3uClF5JxfY cSzIIxoT7CCnEFHLgxAQuJcpMF0HxiJMupGZvnYtxDCf78wb8jqjEoGxQJB8e4Vdz/ BzmIFvs9D3taGlneWbIQPFwHPyO42apgdsXQetZM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0312EF89824; Wed, 22 May 2019 05:43:50 +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 5182FF8981E; Wed, 22 May 2019 05:43:48 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 90945F8981B for ; Wed, 22 May 2019 05:43:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 90945F8981B Date: 22 May 2019 12:43:43 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425447" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:43:43 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 6088741717AC; Wed, 22 May 2019 12:43:43 +0900 (JST) Message-ID: <87r28rmakf.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 051/145] ASoC: kirkwood: armada-370-db: 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 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/kirkwood/armada-370-db.c | 42 ++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/sound/soc/kirkwood/armada-370-db.c b/sound/soc/kirkwood/armada-370-db.c index 677a48d..b2d735b 100644 --- a/sound/soc/kirkwood/armada-370-db.c +++ b/sound/soc/kirkwood/armada-370-db.c @@ -58,28 +58,40 @@ static const struct snd_soc_dapm_route a370db_route[] = { { "AIN1L", NULL, "In Jack" }, }; +SND_SOC_DAILINK_DEFS(analog, + DAILINK_COMP_ARRAY(COMP_CPU("i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "cs42l51-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(spdif_out, + DAILINK_COMP_ARRAY(COMP_CPU("spdif")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "dit-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(spdif_in, + DAILINK_COMP_ARRAY(COMP_CPU("spdif")), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "dir-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link a370db_dai[] = { { .name = "CS42L51", .stream_name = "analog", - .cpu_dai_name = "i2s", - .codec_dai_name = "cs42l51-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, .ops = &a370db_ops, + SND_SOC_DAILINK_REG(analog), }, { .name = "S/PDIF out", .stream_name = "spdif-out", - .cpu_dai_name = "spdif", - .codec_dai_name = "dit-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(spdif_out), }, { .name = "S/PDIF in", .stream_name = "spdif-in", - .cpu_dai_name = "spdif", - .codec_dai_name = "dir-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(spdif_in), }, }; @@ -100,26 +112,26 @@ static int a370db_probe(struct platform_device *pdev) card->dev = &pdev->dev; - a370db_dai[0].cpu_of_node = + a370db_dai[0].cpus->of_node = of_parse_phandle(pdev->dev.of_node, "marvell,audio-controller", 0); - a370db_dai[0].platform_of_node = a370db_dai[0].cpu_of_node; + a370db_dai[0].platforms->of_node = a370db_dai[0].cpus->of_node; - a370db_dai[0].codec_of_node = + a370db_dai[0].codecs->of_node = of_parse_phandle(pdev->dev.of_node, "marvell,audio-codec", 0); - a370db_dai[1].cpu_of_node = a370db_dai[0].cpu_of_node; - a370db_dai[1].platform_of_node = a370db_dai[0].cpu_of_node; + a370db_dai[1].cpus->of_node = a370db_dai[0].cpus->of_node; + a370db_dai[1].platforms->of_node = a370db_dai[0].cpus->of_node; - a370db_dai[1].codec_of_node = + a370db_dai[1].codecs->of_node = of_parse_phandle(pdev->dev.of_node, "marvell,audio-codec", 1); - a370db_dai[2].cpu_of_node = a370db_dai[0].cpu_of_node; - a370db_dai[2].platform_of_node = a370db_dai[0].cpu_of_node; + a370db_dai[2].cpus->of_node = a370db_dai[0].cpus->of_node; + a370db_dai[2].platforms->of_node = a370db_dai[0].cpus->of_node; - a370db_dai[2].codec_of_node = + a370db_dai[2].codecs->of_node = of_parse_phandle(pdev->dev.of_node, "marvell,audio-codec", 2); From patchwork Wed May 22 03:43:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954917 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 9EF2B6C5 for ; Wed, 22 May 2019 04:52:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 904AF28B52 for ; Wed, 22 May 2019 04:52:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84C8628B55; Wed, 22 May 2019 04:52:31 +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 6B24728B52 for ; Wed, 22 May 2019 04:52:29 +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 328C71773; Wed, 22 May 2019 06:12:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 328C71773 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498429; bh=b+mOwgzgq9v7jmNrFrvhrMy4xlNj6LtXHdkqtG8Qti0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uVSc4qVh76xZqP5tQDWht5R8G4xLCbeXw4Tj9eufQEUR6GSQZDrs3Nz4zgiZQVJSV 29fUaAnmcBlrD6nVEtcj7yDWUBziN/cr5Zxk1ryA4qxlJP8frJ7btFMoiN5NCotZon YBMxUC7lj4bm4F6PYD88Bcquqht0f6W1zZ0A4q4Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EC893F89829; Wed, 22 May 2019 05:43:53 +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 52E57F89829; Wed, 22 May 2019 05:43:52 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id F4184F8981E for ; Wed, 22 May 2019 05:43:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F4184F8981E Date: 22 May 2019 12:43:47 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425454" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:43:47 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 8790D41717AC; Wed, 22 May 2019 12:43:47 +0900 (JST) Message-ID: <87pnobmaka.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 052/145] ASoC: ti: n810: 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 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/ti/n810.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/ti/n810.c b/sound/soc/ti/n810.c index 9cfefe4..66b69eb 100644 --- a/sound/soc/ti/n810.c +++ b/sound/soc/ti/n810.c @@ -261,16 +261,19 @@ static const struct snd_kcontrol_new aic33_n810_controls[] = { }; /* Digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(aic33, + DAILINK_COMP_ARRAY(COMP_CPU("48076000.mcbsp")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.1-0018", + "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("48076000.mcbsp"))); + static struct snd_soc_dai_link n810_dai = { .name = "TLV320AIC33", .stream_name = "AIC33", - .cpu_dai_name = "48076000.mcbsp", - .platform_name = "48076000.mcbsp", - .codec_name = "tlv320aic3x-codec.1-0018", - .codec_dai_name = "tlv320aic3x-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &n810_ops, + SND_SOC_DAILINK_REG(aic33), }; /* Audio machine driver */ From patchwork Wed May 22 03:43:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954933 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 353216C5 for ; Wed, 22 May 2019 04:52:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2599728B52 for ; Wed, 22 May 2019 04:52:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A48D28B54; Wed, 22 May 2019 04:52:34 +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 BB73628B5C for ; Wed, 22 May 2019 04:52:31 +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 ADEAF1791; Wed, 22 May 2019 06:13:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ADEAF1791 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498466; bh=icVxFEemXXqbMZxhEIw5Cjh9Z9gorPbsAwRsCbvUjHY=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IeQfhWyI4K3uwBUCB4WFoD3JqCIYd2ohtMtuB5ke5GaKzW7mr58hadbBPrVhbitL+ 38oTDHuU79SwzV7zJob6eky1BrY2zBrOa+LfLHwyuKIjsDabWnWT2NcWTZr94nBdSh YhsopOl1f2LKnB+q31/LNY+y2Z+PSEdPZbodDUho= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A8F3BF8982E; Wed, 22 May 2019 05:43:58 +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 D7095F8982E; Wed, 22 May 2019 05:43:56 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 0F3E5F89827 for ; Wed, 22 May 2019 05:43:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0F3E5F89827 Date: 22 May 2019 12:43:51 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425458" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:43:51 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 94CE14003EBC; Wed, 22 May 2019 12:43:51 +0900 (JST) Message-ID: <87o93vmak6.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 053/145] ASoC: ti: osk5912: 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 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/ti/osk5912.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/ti/osk5912.c b/sound/soc/ti/osk5912.c index e409677..0144f91 100644 --- a/sound/soc/ti/osk5912.c +++ b/sound/soc/ti/osk5912.c @@ -91,16 +91,19 @@ static const struct snd_soc_dapm_route audio_map[] = { }; /* Digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(aic23, + DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic23-codec", + "tlv320aic23-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.1"))); + static struct snd_soc_dai_link osk_dai = { .name = "TLV320AIC23", .stream_name = "AIC23", - .cpu_dai_name = "omap-mcbsp.1", - .codec_dai_name = "tlv320aic23-hifi", - .platform_name = "omap-mcbsp.1", - .codec_name = "tlv320aic23-codec", .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &osk_ops, + SND_SOC_DAILINK_REG(aic23), }; /* Audio machine driver */ From patchwork Wed May 22 03:43:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954927 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 B70CE1908 for ; Wed, 22 May 2019 04:52:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4CEB28B55 for ; Wed, 22 May 2019 04:52:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98F2E28B60; Wed, 22 May 2019 04:52:32 +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 BDE0228B63 for ; Wed, 22 May 2019 04:52:31 +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 DC0F21730; Wed, 22 May 2019 06:14:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DC0F21730 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498507; bh=ArwliaNe/I3NapxPXO8VdMPC/5hhTVXN57C+x/VAqKY=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QviwZCcD+evFgxASVeA9iXz1/NaSAuHF7UK9LGzl2gfsrHmedPQqMCme7ZIUbbsZK x8+Cs9nHsfa3TpvwYROGlYZjx+cWiCSLPztacmTbn3PGuCJR7MpW4hO6G+QoFoX0dU vlzTOVmbd/nxyJxcgu7VGBzmxuPtYI74wHbTLGSM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CC112F89833; Wed, 22 May 2019 05:44:02 +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 A5AE9F89833; Wed, 22 May 2019 05:44:00 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 2664BF89827 for ; Wed, 22 May 2019 05:43:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2664BF89827 Date: 22 May 2019 12:43:55 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425464" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:43:55 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id AC2D24003EBD; Wed, 22 May 2019 12:43:55 +0900 (JST) Message-ID: <87mujfmak2.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 054/145] ASoC: ti: ams-delta: 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 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/ti/ams-delta.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c index b9611db..50ca3c4 100644 --- a/sound/soc/ti/ams-delta.c +++ b/sound/soc/ti/ams-delta.c @@ -518,17 +518,19 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd) } /* DAI glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(cx20442, + DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("cx20442-codec", "cx20442-voice")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.1"))); + static struct snd_soc_dai_link ams_delta_dai_link = { .name = "CX20442", .stream_name = "CX20442", - .cpu_dai_name = "omap-mcbsp.1", - .codec_dai_name = "cx20442-voice", .init = ams_delta_cx20442_init, - .platform_name = "omap-mcbsp.1", - .codec_name = "cx20442-codec", .ops = &ams_delta_ops, .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(cx20442), }; /* Audio card driver */ From patchwork Wed May 22 03:43:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954913 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 E98E3912 for ; Wed, 22 May 2019 04:52:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D784228B5B for ; Wed, 22 May 2019 04:52:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B880E28B65; Wed, 22 May 2019 04:52:30 +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 7A59228B56 for ; Wed, 22 May 2019 04:52:29 +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 5274F1799; Wed, 22 May 2019 06:14:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5274F1799 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498548; bh=XyNtFUMcl7NI5IMi0xVq+htsdYSvYvvkhOZIfS55gfQ=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=N7xenA5YGhXoAtOY6H5D6V9WCQDjYsl6eLu48ZwcH6n7gFmPOHeaW9fPN7OAiG7M0 TxJZg8lDIaLk+D3y/cjoHqtid3QblmFoo56iTURav0c32AZIdUtxPR6Ei4yMSKQHpx F0Ag9SVPJ6OLrzgjwiGUo7ZOPqBtagv/ypDwKJVE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AD135F89838; Wed, 22 May 2019 05:44:06 +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 60A0EF89838; Wed, 22 May 2019 05:44:05 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id F14A5F89827 for ; Wed, 22 May 2019 05:44:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F14A5F89827 Date: 22 May 2019 12:43:59 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627553" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:43:59 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id C1F0C41717AA; Wed, 22 May 2019 12:43:59 +0900 (JST) Message-ID: <87lfyzmajy.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 055/145] ASoC: ti: omap3pandora: 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 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/ti/omap3pandora.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/ti/omap3pandora.c b/sound/soc/ti/omap3pandora.c index 4e3de71..3d52b6b 100644 --- a/sound/soc/ti/omap3pandora.c +++ b/sound/soc/ti/omap3pandora.c @@ -189,29 +189,33 @@ static const struct snd_soc_ops omap3pandora_ops = { }; /* Digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(out, + DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.2")), + DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.2"))); + +SND_SOC_DAILINK_DEFS(in, + DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.4")), + DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.4"))); + static struct snd_soc_dai_link omap3pandora_dai[] = { { .name = "PCM1773", .stream_name = "HiFi Out", - .cpu_dai_name = "omap-mcbsp.2", - .codec_dai_name = "twl4030-hifi", - .platform_name = "omap-mcbsp.2", - .codec_name = "twl4030-codec", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &omap3pandora_ops, .init = omap3pandora_out_init, + SND_SOC_DAILINK_REG(out), }, { .name = "TWL4030", .stream_name = "Line/Mic In", - .cpu_dai_name = "omap-mcbsp.4", - .codec_dai_name = "twl4030-hifi", - .platform_name = "omap-mcbsp.4", - .codec_name = "twl4030-codec", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &omap3pandora_ops, .init = omap3pandora_in_init, + SND_SOC_DAILINK_REG(in), } }; From patchwork Wed May 22 03:44:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954789 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 3CE0513AD for ; Wed, 22 May 2019 04:42:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AD2128782 for ; Wed, 22 May 2019 04:42:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F535289F9; Wed, 22 May 2019 04:42:30 +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 5BE1928B3C for ; Wed, 22 May 2019 04:42:29 +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 4B563179F; Wed, 22 May 2019 06:15:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4B563179F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498586; bh=Ortj00QWdFl3PChH8j0p48fB9ahUOdamCwtSYMQWi3w=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OSI5D7gmj7roqSU4oqEQ0iqQNJ/9vI6f3Dwffcnbw9itEheoJNH7wQ/rcs5YPyT0u E5urZXa1GkFq09H36hTY6pkIWm0WuaqVY4Harp7UK6NRZCv7+K4mhAtvE/4LQp5EZo jw/flI25B/LZ1g5AD6IFE0HhgCIQ5ZEw5vja8Zh8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BEA5EF8974E; Wed, 22 May 2019 05:44:11 +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 3A8D4F89839; Wed, 22 May 2019 05:44:10 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id AA20BF89827 for ; Wed, 22 May 2019 05:44:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AA20BF89827 Date: 22 May 2019 12:44:04 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627556" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:44:04 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 3BD0A41717C5; Wed, 22 May 2019 12:44:04 +0900 (JST) Message-ID: <87k1ejmaju.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 056/145] ASoC: ti: davinci-evm: 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 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/ti/davinci-evm.c | 105 +++++++++++++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 38 deletions(-) diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c index 4869d63..bd822bc 100644 --- a/sound/soc/ti/davinci-evm.c +++ b/sound/soc/ti/davinci-evm.c @@ -143,103 +143,127 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) } /* davinci-evm digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(dm6446, + DAILINK_COMP_ARRAY(COMP_CPU("davinci-mcbsp")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.1-001b", + "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("davinci-mcbsp"))); + static struct snd_soc_dai_link dm6446_evm_dai = { .name = "TLV320AIC3X", .stream_name = "AIC3X", - .cpu_dai_name = "davinci-mcbsp", - .codec_dai_name = "tlv320aic3x-hifi", - .codec_name = "tlv320aic3x-codec.1-001b", - .platform_name = "davinci-mcbsp", .init = evm_aic3x_init, .ops = &evm_ops, .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF, + SND_SOC_DAILINK_REG(dm6446), }; +SND_SOC_DAILINK_DEFS(dm355, + DAILINK_COMP_ARRAY(COMP_CPU("davinci-mcbsp.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.1-001b", + "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("davinci-mcbsp.1"))); + static struct snd_soc_dai_link dm355_evm_dai = { .name = "TLV320AIC3X", .stream_name = "AIC3X", - .cpu_dai_name = "davinci-mcbsp.1", - .codec_dai_name = "tlv320aic3x-hifi", - .codec_name = "tlv320aic3x-codec.1-001b", - .platform_name = "davinci-mcbsp.1", .init = evm_aic3x_init, .ops = &evm_ops, .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF, + SND_SOC_DAILINK_REG(dm355), }; +#ifdef CONFIG_SND_SOC_DM365_AIC3X_CODEC +SND_SOC_DAILINK_DEFS(dm365, + DAILINK_COMP_ARRAY(COMP_CPU("davinci-mcbsp")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.1-0018", + "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("davinci-mcbsp"))); +#elif defined(CONFIG_SND_SOC_DM365_VOICE_CODEC) +SND_SOC_DAILINK_DEFS(dm365, + DAILINK_COMP_ARRAY(COMP_CPU("davinci-vcif")), + DAILINK_COMP_ARRAY(COMP_CODEC("cq93vc-codec", "cq93vc-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("davinci-vcif"))); +#endif + static struct snd_soc_dai_link dm365_evm_dai = { #ifdef CONFIG_SND_SOC_DM365_AIC3X_CODEC .name = "TLV320AIC3X", .stream_name = "AIC3X", - .cpu_dai_name = "davinci-mcbsp", - .codec_dai_name = "tlv320aic3x-hifi", - .codec_name = "tlv320aic3x-codec.1-0018", - .platform_name = "davinci-mcbsp", .init = evm_aic3x_init, .ops = &evm_ops, .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF, + SND_SOC_DAILINK_REG(dm365), #elif defined(CONFIG_SND_SOC_DM365_VOICE_CODEC) .name = "Voice Codec - CQ93VC", .stream_name = "CQ93", - .cpu_dai_name = "davinci-vcif", - .codec_dai_name = "cq93vc-hifi", - .codec_name = "cq93vc-codec", - .platform_name = "davinci-vcif", + SND_SOC_DAILINK_REG(dm365), #endif }; +SND_SOC_DAILINK_DEFS(dm6467_aic3x, + DAILINK_COMP_ARRAY(COMP_CPU("davinci-mcasp.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.0-001a", + "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("davinci-mcasp.0"))); + +SND_SOC_DAILINK_DEFS(dm6467_spdif, + DAILINK_COMP_ARRAY(COMP_CPU("davinci-mcasp.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("spdif_dit", "dit-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("davinci-mcasp.1"))); + static struct snd_soc_dai_link dm6467_evm_dai[] = { { .name = "TLV320AIC3X", .stream_name = "AIC3X", - .cpu_dai_name= "davinci-mcasp.0", - .codec_dai_name = "tlv320aic3x-hifi", - .platform_name = "davinci-mcasp.0", - .codec_name = "tlv320aic3x-codec.0-001a", .init = evm_aic3x_init, .ops = &evm_ops, .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF, + SND_SOC_DAILINK_REG(dm6467_aic3x), }, { .name = "McASP", .stream_name = "spdif", - .cpu_dai_name= "davinci-mcasp.1", - .codec_dai_name = "dit-hifi", - .codec_name = "spdif_dit", - .platform_name = "davinci-mcasp.1", .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF, + SND_SOC_DAILINK_REG(dm6467_spdif), }, }; +SND_SOC_DAILINK_DEFS(da830, + DAILINK_COMP_ARRAY(COMP_CPU("davinci-mcasp.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.1-0018", + "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("davinci-mcasp.1"))); + static struct snd_soc_dai_link da830_evm_dai = { .name = "TLV320AIC3X", .stream_name = "AIC3X", - .cpu_dai_name = "davinci-mcasp.1", - .codec_dai_name = "tlv320aic3x-hifi", - .codec_name = "tlv320aic3x-codec.1-0018", - .platform_name = "davinci-mcasp.1", .init = evm_aic3x_init, .ops = &evm_ops, .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF, + SND_SOC_DAILINK_REG(da830), }; +SND_SOC_DAILINK_DEFS(da850, + DAILINK_COMP_ARRAY(COMP_CPU("davinci-mcasp.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.1-0018", + "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("davinci-mcasp.0"))); + static struct snd_soc_dai_link da850_evm_dai = { .name = "TLV320AIC3X", .stream_name = "AIC3X", - .cpu_dai_name= "davinci-mcasp.0", - .codec_dai_name = "tlv320aic3x-hifi", - .codec_name = "tlv320aic3x-codec.1-0018", - .platform_name = "davinci-mcasp.0", .init = evm_aic3x_init, .ops = &evm_ops, .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF, + SND_SOC_DAILINK_REG(da850), }; /* davinci dm6446 evm audio machine driver */ @@ -330,14 +354,19 @@ static struct snd_soc_card da850_snd_soc_card = { * The struct is used as place holder. It will be completely * filled with data from dt node. */ +SND_SOC_DAILINK_DEFS(evm, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link evm_dai_tlv320aic3x = { .name = "TLV320AIC3X", .stream_name = "AIC3X", - .codec_dai_name = "tlv320aic3x-hifi", .ops = &evm_ops, .init = evm_aic3x_init, .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF, + SND_SOC_DAILINK_REG(evm), }; static const struct of_device_id davinci_evm_dt_ids[] = { @@ -374,15 +403,15 @@ static int davinci_evm_probe(struct platform_device *pdev) evm_soc_card.dai_link = dai; - dai->codec_of_node = of_parse_phandle(np, "ti,audio-codec", 0); - if (!dai->codec_of_node) + dai->codecs->of_node = of_parse_phandle(np, "ti,audio-codec", 0); + if (!dai->codecs->of_node) return -EINVAL; - dai->cpu_of_node = of_parse_phandle(np, "ti,mcasp-controller", 0); - if (!dai->cpu_of_node) + dai->cpus->of_node = of_parse_phandle(np, "ti,mcasp-controller", 0); + if (!dai->cpus->of_node) return -EINVAL; - dai->platform_of_node = dai->cpu_of_node; + dai->platforms->of_node = dai->cpus->of_node; evm_soc_card.dev = &pdev->dev; ret = snd_soc_of_parse_card_name(&evm_soc_card, "ti,model"); From patchwork Wed May 22 03:44:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954919 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 6639E6C5 for ; Wed, 22 May 2019 04:52:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 571B128B58 for ; Wed, 22 May 2019 04:52:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4BD5828B5B; Wed, 22 May 2019 04:52:32 +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 9FD9528B55 for ; Wed, 22 May 2019 04:52:31 +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 D31E217AF; Wed, 22 May 2019 06:16:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D31E217AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498636; bh=C7hLziV7Ah3qNrdPcUXrNJ7RDp82NQxMotV7hHBER1c=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VjuqpUYtqmHx4zgxkPw4iYe/PeBDLTfNFnETt8SYaS2nUjcCKEYM1pypBEA2N+khR WP1fqLBn0ZobInEZIe2EuObldMFZhjJehfU4LuzBPitSUsBslvV5fy/QclonbKHcxX vinuCOnq9gIYSvNEtSj/UQ0uoiiOgElARUEdGz4g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 07704F89843; Wed, 22 May 2019 05:44:15 +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 29880F8974B; Wed, 22 May 2019 05:44:13 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id EE4D2F8974A for ; Wed, 22 May 2019 05:44:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EE4D2F8974A Date: 22 May 2019 12:44:08 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627561" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:44:08 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 7E26E41717AA; Wed, 22 May 2019 12:44:08 +0900 (JST) Message-ID: <87imu3majp.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 057/145] ASoC: ti: omap-hdmi: 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 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/ti/omap-hdmi.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c index 673a9eb..11c1440 100644 --- a/sound/soc/ti/omap-hdmi.c +++ b/sound/soc/ti/omap-hdmi.c @@ -321,6 +321,7 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) struct hdmi_audio_data *ad; struct snd_soc_dai_driver *dai_drv; struct snd_soc_card *card; + struct snd_soc_dai_link_component *compnent; int ret; if (!ha) { @@ -371,12 +372,23 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) devm_kzalloc(dev, sizeof(*(card->dai_link)), GFP_KERNEL); if (!card->dai_link) return -ENOMEM; + + compnent = devm_kzalloc(dev, 3 * sizeof(*compnent), GFP_KERNEL); + if (!compnent) + return -ENOMEM; + card->dai_link->cpus = &compnent[0]; + card->dai_link->num_cpus = 1; + card->dai_link->codecs = &compnent[1]; + card->dai_link->num_codecs = 1; + card->dai_link->platforms = &compnent[2]; + card->dai_link->num_platforms = 1; + card->dai_link->name = card->name; card->dai_link->stream_name = card->name; - card->dai_link->cpu_dai_name = dev_name(ad->dssdev); - card->dai_link->platform_name = dev_name(ad->dssdev); - card->dai_link->codec_name = "snd-soc-dummy"; - card->dai_link->codec_dai_name = "snd-soc-dummy-dai"; + card->dai_link->cpus->dai_name = dev_name(ad->dssdev); + card->dai_link->platforms->name = dev_name(ad->dssdev); + card->dai_link->codecs->name = "snd-soc-dummy"; + card->dai_link->codecs->dai_name = "snd-soc-dummy-dai"; card->num_links = 1; card->dev = dev; From patchwork Wed May 22 03:44:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954817 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 47ED61708 for ; Wed, 22 May 2019 04:42:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38738289F9 for ; Wed, 22 May 2019 04:42:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3702228B51; Wed, 22 May 2019 04:42:34 +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 DB70028B61 for ; Wed, 22 May 2019 04:42:31 +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 B9B5D17B1; Wed, 22 May 2019 06:17:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B9B5D17B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498670; bh=JGFhnL8XHLSgW9kgUrYcdhXdhcYZOJneiuQJ0UlqsqA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FBYkDZUWPFrLqYncjcWxFQnXZVvCCVVakwdQzmmvIxypXXJhT+UXn2OPrQkccjWwI Xm6z2b6/sRGkzEhgZ8cKNfbuQwmYCLGudd8Froppi+f/n84OcHOgRyDK/apKSHfoXD PiYN6HrC3+UwecTQW6v70McAVDWKPBH0znXb3QeM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 989F8F89849; Wed, 22 May 2019 05:44:20 +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 15C0DF89849; Wed, 22 May 2019 05:44:18 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 182DCF89844 for ; Wed, 22 May 2019 05:44:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 182DCF89844 Date: 22 May 2019 12:44:12 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425477" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:44:12 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 7F5BD4003EBC; Wed, 22 May 2019 12:44:12 +0900 (JST) Message-ID: <87h89nmajl.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 058/145] ASoC: ti: omap-abe-twl6040: 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 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/ti/omap-abe-twl6040.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/sound/soc/ti/omap-abe-twl6040.c b/sound/soc/ti/omap-abe-twl6040.c index fed45b4..3522ea7 100644 --- a/sound/soc/ti/omap-abe-twl6040.c +++ b/sound/soc/ti/omap-abe-twl6040.c @@ -35,6 +35,18 @@ #include "omap-mcpdm.h" #include "../codecs/twl6040.h" +SND_SOC_DAILINK_DEFS(link0, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC("twl6040-codec", + "twl6040-legacy")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(link1, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", + "dmic-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + struct abe_twl6040 { struct snd_soc_card card; struct snd_soc_dai_link dai_links[2]; @@ -255,10 +267,14 @@ static int omap_abe_probe(struct platform_device *pdev) priv->dai_links[0].name = "DMIC"; priv->dai_links[0].stream_name = "TWL6040"; - priv->dai_links[0].cpu_of_node = dai_node; - priv->dai_links[0].platform_of_node = dai_node; - priv->dai_links[0].codec_dai_name = "twl6040-legacy"; - priv->dai_links[0].codec_name = "twl6040-codec"; + priv->dai_links[0].cpus = link0_cpus; + priv->dai_links[0].num_cpus = 1; + priv->dai_links[0].cpus->of_node = dai_node; + priv->dai_links[0].platforms = link0_platforms; + priv->dai_links[0].num_platforms = 1; + priv->dai_links[0].platforms->of_node = dai_node; + priv->dai_links[0].codecs = link0_codecs; + priv->dai_links[0].num_codecs = 1; priv->dai_links[0].init = omap_abe_twl6040_init; priv->dai_links[0].ops = &omap_abe_ops; @@ -267,10 +283,14 @@ static int omap_abe_probe(struct platform_device *pdev) num_links = 2; priv->dai_links[1].name = "TWL6040"; priv->dai_links[1].stream_name = "DMIC Capture"; - priv->dai_links[1].cpu_of_node = dai_node; - priv->dai_links[1].platform_of_node = dai_node; - priv->dai_links[1].codec_dai_name = "dmic-hifi"; - priv->dai_links[1].codec_name = "dmic-codec"; + priv->dai_links[1].cpus = link1_cpus; + priv->dai_links[1].num_cpus = 1; + priv->dai_links[1].cpus->of_node = dai_node; + priv->dai_links[1].platforms = link1_platforms; + priv->dai_links[1].num_platforms = 1; + priv->dai_links[1].platforms->of_node = dai_node; + priv->dai_links[1].codecs = link1_codecs; + priv->dai_links[1].num_codecs = 1; priv->dai_links[1].init = omap_abe_dmic_init; priv->dai_links[1].ops = &omap_abe_dmic_ops; } else { From patchwork Wed May 22 03:44:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954971 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 8EEC217E0 for ; Wed, 22 May 2019 04:57:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B5F828AB3 for ; Wed, 22 May 2019 04:57:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FCFC28AB2; Wed, 22 May 2019 04:57:30 +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 BBE6E28AB3 for ; Wed, 22 May 2019 04:57:29 +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 F0E68175D; Wed, 22 May 2019 06:17:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F0E68175D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498709; bh=MM2Hipg/gA5z9yyk5kWjm3qtGxnI3zthtqJMFDJr5cs=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lKYyBigEbtOtVzjDXwvxEMct9MYqKL+JFjA+8WBSStENRgJ3oyMrc+wpYRLanx0aG mevfQ/HdMWIj4ZYaPE868ZMowFzoozWnM+smhV2SQtHYFWkO7Sl58I+cB1p4IZyfVK l2tEQZjDp8XBQ8uh99u4+J7hAoVO5Yn138nqHh6Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7A1C7F8984C; Wed, 22 May 2019 05:44:24 +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 14F41F8984D; Wed, 22 May 2019 05:44:23 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id F3275F89847 for ; Wed, 22 May 2019 05:44:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F3275F89847 Date: 22 May 2019 12:44:16 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627566" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:44:16 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id BFEE141717B8; Wed, 22 May 2019 12:44:16 +0900 (JST) Message-ID: <87ftp7majh.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 059/145] ASoC: ti: omap-twl4030: 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 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/ti/omap-twl4030.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/sound/soc/ti/omap-twl4030.c b/sound/soc/ti/omap-twl4030.c index cccc316..ddd24b2 100644 --- a/sound/soc/ti/omap-twl4030.c +++ b/sound/soc/ti/omap-twl4030.c @@ -209,26 +209,30 @@ static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd) } /* Digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.2")), + DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.2"))); + +SND_SOC_DAILINK_DEFS(voice, + DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.3")), + DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-voice")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.3"))); + static struct snd_soc_dai_link omap_twl4030_dai_links[] = { { .name = "TWL4030 HiFi", .stream_name = "TWL4030 HiFi", - .cpu_dai_name = "omap-mcbsp.2", - .codec_dai_name = "twl4030-hifi", - .platform_name = "omap-mcbsp.2", - .codec_name = "twl4030-codec", .init = omap_twl4030_init, .ops = &omap_twl4030_ops, + SND_SOC_DAILINK_REG(hifi), }, { .name = "TWL4030 Voice", .stream_name = "TWL4030 Voice", - .cpu_dai_name = "omap-mcbsp.3", - .codec_dai_name = "twl4030-voice", - .platform_name = "omap-mcbsp.3", - .codec_name = "twl4030-codec", .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(voice), }, }; @@ -272,21 +276,21 @@ static int omap_twl4030_probe(struct platform_device *pdev) dev_err(&pdev->dev, "McBSP node is not provided\n"); return -EINVAL; } - omap_twl4030_dai_links[0].cpu_dai_name = NULL; - omap_twl4030_dai_links[0].cpu_of_node = dai_node; + omap_twl4030_dai_links[0].cpus->dai_name = NULL; + omap_twl4030_dai_links[0].cpus->of_node = dai_node; - omap_twl4030_dai_links[0].platform_name = NULL; - omap_twl4030_dai_links[0].platform_of_node = dai_node; + omap_twl4030_dai_links[0].platforms->name = NULL; + omap_twl4030_dai_links[0].platforms->of_node = dai_node; dai_node = of_parse_phandle(node, "ti,mcbsp-voice", 0); if (!dai_node) { card->num_links = 1; } else { - omap_twl4030_dai_links[1].cpu_dai_name = NULL; - omap_twl4030_dai_links[1].cpu_of_node = dai_node; + omap_twl4030_dai_links[1].cpus->dai_name = NULL; + omap_twl4030_dai_links[1].cpus->of_node = dai_node; - omap_twl4030_dai_links[1].platform_name = NULL; - omap_twl4030_dai_links[1].platform_of_node = dai_node; + omap_twl4030_dai_links[1].platforms->name = NULL; + omap_twl4030_dai_links[1].platforms->of_node = dai_node; } priv->jack_detect = of_get_named_gpio(node, From patchwork Wed May 22 03:44:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954969 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 7C51B18E8 for ; Wed, 22 May 2019 04:57:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A32B28A81 for ; Wed, 22 May 2019 04:57:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E57428AAB; Wed, 22 May 2019 04:57:30 +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 9EDA428AB2 for ; Wed, 22 May 2019 04:57:29 +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 683AE179A; Wed, 22 May 2019 06:18:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 683AE179A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498748; bh=BRVxHo7avEXIsMhNnAPHNXlnMOgokPCsK2Bzl5GYfw0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=H7H3dQeWbC8SsOANSszNfuTA7jwEyZUXXQ30J9BiAghZKHlaYtTcjuSjlW3p3Xav3 QxFHm0ofC/d6dR59JnfZqgXSFcEm4kvysYz+4zoHt5zMxJ+aV1XF/zzFi3tb9INJ0f S5p+Iqe4to0jXy8q8OWAc2ucYU8OoaNOkIhEPKXo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6D48DF89852; Wed, 22 May 2019 05:44:36 +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 F00ABF89852; Wed, 22 May 2019 05:44:34 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 12863F89850 for ; Wed, 22 May 2019 05:44:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 12863F89850 Date: 22 May 2019 12:44:29 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627572" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:44:29 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id CB3D64003EBC; Wed, 22 May 2019 12:44:29 +0900 (JST) Message-ID: <87ef4rmaj4.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 060/145] ASoC: ti: rx51: 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 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/ti/rx51.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sound/soc/ti/rx51.c b/sound/soc/ti/rx51.c index 57448bd..0684f96 100644 --- a/sound/soc/ti/rx51.c +++ b/sound/soc/ti/rx51.c @@ -312,18 +312,21 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) } /* Digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(aic34, + DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.2")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.2-0018", + "tlv320aic3x-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.2"))); + static struct snd_soc_dai_link rx51_dai[] = { { .name = "TLV320AIC34", .stream_name = "AIC34", - .cpu_dai_name = "omap-mcbsp.2", - .codec_dai_name = "tlv320aic3x-hifi", - .platform_name = "omap-mcbsp.2", - .codec_name = "tlv320aic3x-codec.2-0018", .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM, .init = rx51_aic34_init, .ops = &rx51_ops, + SND_SOC_DAILINK_REG(aic34), }, }; @@ -389,18 +392,18 @@ static int rx51_soc_probe(struct platform_device *pdev) dev_err(&pdev->dev, "McBSP node is not provided\n"); return -EINVAL; } - rx51_dai[0].cpu_dai_name = NULL; - rx51_dai[0].platform_name = NULL; - rx51_dai[0].cpu_of_node = dai_node; - rx51_dai[0].platform_of_node = dai_node; + rx51_dai[0].cpus->dai_name = NULL; + rx51_dai[0].platforms->name = NULL; + rx51_dai[0].cpus->of_node = dai_node; + rx51_dai[0].platforms->of_node = dai_node; dai_node = of_parse_phandle(np, "nokia,audio-codec", 0); if (!dai_node) { dev_err(&pdev->dev, "Codec node is not provided\n"); return -EINVAL; } - rx51_dai[0].codec_name = NULL; - rx51_dai[0].codec_of_node = dai_node; + rx51_dai[0].codecs->name = NULL; + rx51_dai[0].codecs->of_node = dai_node; dai_node = of_parse_phandle(np, "nokia,audio-codec", 1); if (!dai_node) { From patchwork Wed May 22 03:44:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954967 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 55F1B912 for ; Wed, 22 May 2019 04:57:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45B9228A81 for ; Wed, 22 May 2019 04:57:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A69A28B3B; Wed, 22 May 2019 04:57:30 +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 90B5928AAB for ; Wed, 22 May 2019 04:57:29 +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 6680117C8; Wed, 22 May 2019 06:19:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6680117C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498790; bh=koPNcCeUYQP6wNTxB6CnZPK28HZISuh4sE7Otgpf07g=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HE0PdX6dHlbSsx6PlRR9d0MdX7hiYDNnR+YOfeWHcCYXmnpFGtn/NAtXKjsIsO9Vb dmM1RfDgqk5Nv6R7o1Bt8vb6H0gZZ6O+v+5rYDHNddfbe2llEZSlu3y9BcETkWBHED ZjytrPe3xkQi/xu6ngz2wJrrBmM9MOSxpByzvfVk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 83115F89856; Wed, 22 May 2019 05:44:39 +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 C51BCF89856; Wed, 22 May 2019 05:44:37 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 8AF4FF8984D for ; Wed, 22 May 2019 05:44:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8AF4FF8984D Date: 22 May 2019 12:44:34 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627578" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:44:34 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 0DEA14003EBC; Wed, 22 May 2019 12:44:34 +0900 (JST) Message-ID: <87d0kbmaj0.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 061/145] ASoC: sh: migor: 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 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/sh/migor.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/sh/migor.c b/sound/soc/sh/migor.c index 8739c9f..991557e 100644 --- a/sound/soc/sh/migor.c +++ b/sound/soc/sh/migor.c @@ -123,16 +123,18 @@ static const struct snd_soc_dapm_route audio_map[] = { }; /* migor digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(wm8978, + DAILINK_COMP_ARRAY(COMP_CPU("siu-pcm-audio")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8978.0-001a", "wm8978-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("siu-pcm-audio"))); + static struct snd_soc_dai_link migor_dai = { .name = "wm8978", .stream_name = "WM8978", - .cpu_dai_name = "siu-pcm-audio", - .codec_dai_name = "wm8978-hifi", - .platform_name = "siu-pcm-audio", - .codec_name = "wm8978.0-001a", .dai_fmt = SND_SOC_DAIFMT_NB_IF | SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, .ops = &migor_dai_ops, + SND_SOC_DAILINK_REG(wm8978), }; /* migor audio machine driver */ From patchwork Wed May 22 03:44:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954963 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 180156C5 for ; Wed, 22 May 2019 04:57:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0874028A81 for ; Wed, 22 May 2019 04:57:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF58528ACE; Wed, 22 May 2019 04:57:29 +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 5980D28A81 for ; Wed, 22 May 2019 04:57:29 +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 36CE317A5; Wed, 22 May 2019 06:19:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 36CE317A5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498827; bh=tR0KviC0xhpDtudvkMW6l8Aqv6ZoeX1eOkmbkAOyKMU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=XwMVji7ebcZWyafClLYkrhGjT5HDmOnrjpJugn7SYmbObRF21rxAujQpeqiphaEyZ zpZYUrAyCC8xxg15FQFTJRdZKUqXwPdLibezNPOl8LXCVxw+a4Owwic6xszFtmt/5c +9N8dgRS1goLzwS1z9JNtbu6cQvj/TynBkyaRgaU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B1340F8985B; Wed, 22 May 2019 05:44:45 +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 952A9F8985B; Wed, 22 May 2019 05:44:43 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id B4402F8985A for ; Wed, 22 May 2019 05:44:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B4402F8985A Date: 22 May 2019 12:44:38 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425494" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:44:38 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 7570441717CC; Wed, 22 May 2019 12:44:38 +0900 (JST) Message-ID: <87blzvmaiv.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 062/145] ASoC: sh: sh7760-ac97: 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 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/sh/sh7760-ac97.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sound/soc/sh/sh7760-ac97.c b/sound/soc/sh/sh7760-ac97.c index 4bb4c13..d267243 100644 --- a/sound/soc/sh/sh7760-ac97.c +++ b/sound/soc/sh/sh7760-ac97.c @@ -14,14 +14,15 @@ #define IPSEL 0xFE400034 +SND_SOC_DAILINK_DEFS(ac97, + DAILINK_COMP_ARRAY(COMP_CPU("hac-dai.0")), /* HAC0 */ + DAILINK_COMP_ARRAY(COMP_CODEC("ac97-codec", "ac97-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("sh7760-pcm-audio"))); + static struct snd_soc_dai_link sh7760_ac97_dai = { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "hac-dai.0", /* HAC0 */ - .codec_dai_name = "ac97-hifi", - .platform_name = "sh7760-pcm-audio", - .codec_name = "ac97-codec", - .ops = NULL, + SND_SOC_DAILINK_REG(ac97), }; static struct snd_soc_card sh7760_ac97_soc_machine = { From patchwork Wed May 22 03:44:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954851 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 9FADC17E0 for ; Wed, 22 May 2019 04:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DE891FF83 for ; Wed, 22 May 2019 04:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B00E28B5D; Wed, 22 May 2019 04:47:32 +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 604F11FF29 for ; Wed, 22 May 2019 04:47:31 +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 8324C17D6; Wed, 22 May 2019 06:20:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8324C17D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498865; bh=D2JCQC7mMvbgjDlkFDeDEl4bKODIDa0jGvD+aFq2/0U=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VDnWq5ClqPu1TZQD7m/57MSmvrjgxWm76FZrI/U177qrKdigPUbQAN7BXwLGGqh9k UvX+ZC+C5rFtZX8iTu65DZ7k2If8fJOugO2jwYZ4U5cBnUWV1GkWFPYK3PuAS9JlU0 EpPUeFbcZi5SY/Y7dDZK6WcLWcroh7hcJLfPKjDg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9D0C9F8985E; Wed, 22 May 2019 05:44:48 +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 D41A7F8985E; Wed, 22 May 2019 05:44:46 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id D5F2CF8984D for ; Wed, 22 May 2019 05:44:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D5F2CF8984D Date: 22 May 2019 12:44:42 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425496" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:44:42 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 42D2841717CC; Wed, 22 May 2019 12:44:42 +0900 (JST) Message-ID: <87a7ffmais.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 063/145] ASoC: amd: acp-da7219-max98357a: 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 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/amd/acp-da7219-max98357a.c | 42 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c index 16b0ea3..f4ee679 100644 --- a/sound/soc/amd/acp-da7219-max98357a.c +++ b/sound/soc/amd/acp-da7219-max98357a.c @@ -298,69 +298,71 @@ static const struct snd_soc_ops cz_dmic1_cap_ops = { .hw_params = cz_da7219_params, }; +SND_SOC_DAILINK_DEF(designware1, + DAILINK_COMP_ARRAY(COMP_CPU("designware-i2s.1.auto"))); +SND_SOC_DAILINK_DEF(designware2, + DAILINK_COMP_ARRAY(COMP_CPU("designware-i2s.2.auto"))); +SND_SOC_DAILINK_DEF(designware3, + DAILINK_COMP_ARRAY(COMP_CPU("designware-i2s.3.auto"))); + +SND_SOC_DAILINK_DEF(dlgs, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7219:00", "da7219-hifi"))); +SND_SOC_DAILINK_DEF(mx, + DAILINK_COMP_ARRAY(COMP_CODEC("MX98357A:00", "HiFi"))); +SND_SOC_DAILINK_DEF(adau, + DAILINK_COMP_ARRAY(COMP_CODEC("ADAU7002:00", "adau7002-hifi"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("acp_audio_dma.0.auto"))); + static struct snd_soc_dai_link cz_dai_7219_98357[] = { { .name = "amd-da7219-play", .stream_name = "Playback", - .platform_name = "acp_audio_dma.0.auto", - .cpu_dai_name = "designware-i2s.1.auto", - .codec_dai_name = "da7219-hifi", - .codec_name = "i2c-DLGS7219:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .init = cz_da7219_init, .dpcm_playback = 1, .ops = &cz_da7219_play_ops, + SND_SOC_DAILINK_REG(designware1, dlgs, platform), }, { .name = "amd-da7219-cap", .stream_name = "Capture", - .platform_name = "acp_audio_dma.0.auto", - .cpu_dai_name = "designware-i2s.2.auto", - .codec_dai_name = "da7219-hifi", - .codec_name = "i2c-DLGS7219:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .dpcm_capture = 1, .ops = &cz_da7219_cap_ops, + SND_SOC_DAILINK_REG(designware2, dlgs, platform), }, { .name = "amd-max98357-play", .stream_name = "HiFi Playback", - .platform_name = "acp_audio_dma.0.auto", - .cpu_dai_name = "designware-i2s.3.auto", - .codec_dai_name = "HiFi", - .codec_name = "MX98357A:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .dpcm_playback = 1, .ops = &cz_max_play_ops, + SND_SOC_DAILINK_REG(designware3, mx, platform), }, { /* C panel DMIC */ .name = "dmic0", .stream_name = "DMIC0 Capture", - .platform_name = "acp_audio_dma.0.auto", - .cpu_dai_name = "designware-i2s.3.auto", - .codec_dai_name = "adau7002-hifi", - .codec_name = "ADAU7002:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .dpcm_capture = 1, .ops = &cz_dmic0_cap_ops, + SND_SOC_DAILINK_REG(designware3, adau, platform), }, { /* A/B panel DMIC */ .name = "dmic1", .stream_name = "DMIC1 Capture", - .platform_name = "acp_audio_dma.0.auto", - .cpu_dai_name = "designware-i2s.2.auto", - .codec_dai_name = "adau7002-hifi", - .codec_name = "ADAU7002:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .dpcm_capture = 1, .ops = &cz_dmic1_cap_ops, + SND_SOC_DAILINK_REG(designware2, adau, platform), }, }; From patchwork Wed May 22 03:44:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954975 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 37FAA6C5 for ; Wed, 22 May 2019 04:57:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24E4428A81 for ; Wed, 22 May 2019 04:57:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 197DA28AAB; Wed, 22 May 2019 04:57:33 +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 6206D28A93 for ; Wed, 22 May 2019 04:57:31 +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 1023F17DF; Wed, 22 May 2019 06:21:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1023F17DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498916; bh=CMVuqOABfhA4yqYvp9OGN05bD6zBIUsmk9cIC6Fda6U=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=irn5jHr1/IytfX1HDUXTA+z/da+bPmD5QDcswbQ98+9zMQwrJ4jlvoNWVRfv1XXtk 4BvluvYAvVoZYpX/kLONf5GGc0+soLWN3cxOuBC59Zav7JCYBY/H/EW6jqVJ0MkzZg /F+rhXP/qk5Q5ZpdVJqdagXUdMFV6S13SznYPHrk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B71A0F8974D; Wed, 22 May 2019 05:44:53 +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 1EF90F89867; Wed, 22 May 2019 05:44:52 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 8BCDDF8984D for ; Wed, 22 May 2019 05:44:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8BCDDF8984D Date: 22 May 2019 12:44:46 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627584" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:44:46 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 57EE04004953; Wed, 22 May 2019 12:44:46 +0900 (JST) Message-ID: <878suzmaio.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 064/145] ASoC: amd: acp-rt5645: 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 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/amd/acp-rt5645.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sound/soc/amd/acp-rt5645.c b/sound/soc/amd/acp-rt5645.c index b79b922..91abeb9 100644 --- a/sound/soc/amd/acp-rt5645.c +++ b/sound/soc/amd/acp-rt5645.c @@ -95,29 +95,34 @@ static struct snd_soc_ops cz_aif1_ops = { .hw_params = cz_aif1_hw_params, }; +SND_SOC_DAILINK_DEF(designware1, + DAILINK_COMP_ARRAY(COMP_CPU("designware-i2s.1.auto"))); +SND_SOC_DAILINK_DEF(designware2, + DAILINK_COMP_ARRAY(COMP_CPU("designware-i2s.2.auto"))); + +SND_SOC_DAILINK_DEF(codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5650:00", "rt5645-aif1"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("acp_audio_dma.0.auto"))); + static struct snd_soc_dai_link cz_dai_rt5650[] = { { .name = "amd-rt5645-play", .stream_name = "RT5645_AIF1", - .platform_name = "acp_audio_dma.0.auto", - .cpu_dai_name = "designware-i2s.1.auto", - .codec_dai_name = "rt5645-aif1", - .codec_name = "i2c-10EC5650:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .init = cz_init, .ops = &cz_aif1_ops, + SND_SOC_DAILINK_REG(designware1, codec, platform), }, { .name = "amd-rt5645-cap", .stream_name = "RT5645_AIF1", - .platform_name = "acp_audio_dma.0.auto", - .cpu_dai_name = "designware-i2s.2.auto", - .codec_dai_name = "rt5645-aif1", - .codec_name = "i2c-10EC5650:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &cz_aif1_ops, + SND_SOC_DAILINK_REG(designware2, codec, platform), }, }; From patchwork Wed May 22 03:44:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954841 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 968FE14C0 for ; Wed, 22 May 2019 04:47:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 864851FF29 for ; Wed, 22 May 2019 04:47:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AB3D28B56; Wed, 22 May 2019 04:47:30 +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 B9F2F286BF for ; Wed, 22 May 2019 04:47:29 +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 401931756; Wed, 22 May 2019 06:21:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 401931756 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498952; bh=GIiaDA6KOygRurxSn/hhc7GLA7koVqPqXGmi1yyzUdk=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tkg9slnLxdtEt/NTYIypcqkPUxASW02VTlF4tiVqwe6nT5KuiriprCA4LUCHo4hoY c+NuDr06kUn5prTlyGxDaQgBDurmgLjVE9VLEocBDBrTpl4CxXqEVlqiY5WrgVysyy 6cwK3B4M+th/DpUTWV6liJzYiS2evTb0G4uXgg9Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6A380F8986A; Wed, 22 May 2019 05:44:57 +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 31C49F8986A; Wed, 22 May 2019 05:44:56 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id C7C45F89751 for ; Wed, 22 May 2019 05:44:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C7C45F89751 Date: 22 May 2019 12:44:50 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425500" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:44:50 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 8840041717C5; Wed, 22 May 2019 12:44:50 +0900 (JST) Message-ID: <877eajmaij.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 065/145] ASoC: atmel: mikroe-proto: 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 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 Tested-by: Codrin Ciubotariu --- sound/soc/atmel/mikroe-proto.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/mikroe-proto.c b/sound/soc/atmel/mikroe-proto.c index d47aaa5..255168a 100644 --- a/sound/soc/atmel/mikroe-proto.c +++ b/sound/soc/atmel/mikroe-proto.c @@ -66,6 +66,7 @@ static struct snd_soc_card snd_proto = { static int snd_proto_probe(struct platform_device *pdev) { struct snd_soc_dai_link *dai; + struct snd_soc_dai_link_component *comp; struct device_node *np = pdev->dev.of_node; struct device_node *codec_np, *cpu_np; struct device_node *bitclkmaster = NULL; @@ -87,12 +88,24 @@ static int snd_proto_probe(struct platform_device *pdev) if (!dai) return -ENOMEM; + /* for cpus/codecs/platforms */ + comp = devm_kzalloc(&pdev->dev, 3 * sizeof(*comp), GFP_KERNEL); + if (!comp) + return -ENOMEM; + snd_proto.dai_link = dai; snd_proto.num_links = 1; + dai->cpus = &comp[0]; + dai->num_cpus = 1; + dai->codecs = &comp[1]; + dai->num_codecs = 1; + dai->platforms = &comp[2]; + dai->num_platforms = 1; + dai->name = "WM8731"; dai->stream_name = "WM8731 HiFi"; - dai->codec_dai_name = "wm8731-hifi"; + dai->codecs->dai_name = "wm8731-hifi"; dai->init = &snd_proto_init; codec_np = of_parse_phandle(np, "audio-codec", 0); @@ -100,15 +113,15 @@ static int snd_proto_probe(struct platform_device *pdev) dev_err(&pdev->dev, "audio-codec node missing\n"); return -EINVAL; } - dai->codec_of_node = codec_np; + dai->codecs->of_node = codec_np; cpu_np = of_parse_phandle(np, "i2s-controller", 0); if (!cpu_np) { dev_err(&pdev->dev, "i2s-controller missing\n"); return -EINVAL; } - dai->cpu_of_node = cpu_np; - dai->platform_of_node = cpu_np; + dai->cpus->of_node = cpu_np; + dai->platforms->of_node = cpu_np; dai_fmt = snd_soc_of_parse_daifmt(np, NULL, &bitclkmaster, &framemaster); From patchwork Wed May 22 03:44:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954847 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 2FADE6C5 for ; Wed, 22 May 2019 04:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 207131FF83 for ; Wed, 22 May 2019 04:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14F9428B5A; Wed, 22 May 2019 04:47:32 +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 60F4D1FF83 for ; Wed, 22 May 2019 04:47:31 +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 8E44717EA; Wed, 22 May 2019 06:22:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8E44717EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558498990; bh=fxOpBtZF4b7vEU0xnz/jQ2Ob6JVvX/1elgV9S7d9O3w=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=V5wg8pI3vlFVre2WMiUYgM5CAWMMBPjNVWyodeNvlv7IUYAmiq9MPf1g2adH8Dt2M aCQ/GndgqE8R0VDjcXLswOfTBrg+jyvleptmYDs8E97V4jYkTs2iXKUhRtb+bvKDIF BbTR9PzYju3K5oP+7sYauEUQXo+gexYPBgsYjYHs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 643F8F8986B; Wed, 22 May 2019 05:45:00 +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 C5681F89756; Wed, 22 May 2019 05:44:58 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id A72ADF89756 for ; Wed, 22 May 2019 05:44:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A72ADF89756 Date: 22 May 2019 12:44:54 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627588" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:44:54 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 6F2914003EBC; Wed, 22 May 2019 12:44:54 +0900 (JST) Message-ID: <875zq3maif.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 066/145] ASoC: atmel: sam9x5_wm8731: 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 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/atmel/sam9x5_wm8731.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c index e6c303a..36917ac 100644 --- a/sound/soc/atmel/sam9x5_wm8731.c +++ b/sound/soc/atmel/sam9x5_wm8731.c @@ -82,6 +82,7 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) struct snd_soc_card *card; struct snd_soc_dai_link *dai; struct sam9x5_drvdata *priv; + struct snd_soc_dai_link_component *comp; int ret; if (!np) { @@ -92,7 +93,8 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) card = devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL); priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); dai = devm_kzalloc(&pdev->dev, sizeof(*dai), GFP_KERNEL); - if (!dai || !card || !priv) { + comp = devm_kzalloc(&pdev->dev, 3 * sizeof(*comp), GFP_KERNEL); + if (!dai || !card || !priv || !comp) { ret = -ENOMEM; goto out; } @@ -105,9 +107,17 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) card->num_links = 1; card->dapm_widgets = sam9x5_dapm_widgets; card->num_dapm_widgets = ARRAY_SIZE(sam9x5_dapm_widgets); + + dai->cpus = &comp[0]; + dai->num_cpus = 1; + dai->codecs = &comp[1]; + dai->num_codecs = 1; + dai->platforms = &comp[2]; + dai->num_platforms = 1; + dai->name = "WM8731"; dai->stream_name = "WM8731 PCM"; - dai->codec_dai_name = "wm8731-hifi"; + dai->codecs->dai_name = "wm8731-hifi"; dai->init = sam9x5_wm8731_init; dai->dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM; @@ -131,7 +141,7 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) goto out; } - dai->codec_of_node = codec_np; + dai->codecs->of_node = codec_np; cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0); if (!cpu_np) { @@ -139,8 +149,8 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) ret = -EINVAL; goto out; } - dai->cpu_of_node = cpu_np; - dai->platform_of_node = cpu_np; + dai->cpus->of_node = cpu_np; + dai->platforms->of_node = cpu_np; priv->ssc_id = of_alias_get_id(cpu_np, "ssc"); From patchwork Wed May 22 03:44:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954797 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 E826413AD for ; Wed, 22 May 2019 04:42:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8E34286BF for ; Wed, 22 May 2019 04:42:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAE4628B5B; Wed, 22 May 2019 04:42:31 +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 28277286BF for ; Wed, 22 May 2019 04:42:31 +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 8681017EB; Wed, 22 May 2019 06:22:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8681017EB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499029; bh=ndMTj8KD81kIJDROaAqP0dmqaq4Ln0rwC2nZXBOsCvw=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=C3AoNfQSEZHR3SGt2v4g6AS01NVmMxzbEROrvZye6eDvV1lQUYvRoY8r4ULT+UnJH DrKaPoKW7ejUv8Bqx7Oh9g1xJFz0wUCJALssZYnfu0PMyX9PcnA2A+nSGqQHf3+qt2 tTn8+KQW5EOmbrIYwZ0JkaH5N5vCanPdKXJsUi6s= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 79C7DF89872; Wed, 22 May 2019 05:45:06 +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 4712DF89872; Wed, 22 May 2019 05:45:04 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id E1939F8986E for ; Wed, 22 May 2019 05:44:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E1939F8986E Date: 22 May 2019 12:44:58 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627595" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:44:58 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id A1D8C4003EA8; Wed, 22 May 2019 12:44:58 +0900 (JST) Message-ID: <874l5nmaib.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 067/145] ASoC: atmel: sam9g20_wm8731: 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 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/atmel/sam9g20_wm8731.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index 98f93e7..a5b4c39 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c @@ -129,16 +129,18 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAILINK_DEFS(pcm, + DAILINK_COMP_ARRAY(COMP_CPU("at91rm9200_ssc.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8731.0-001b", "wm8731-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("at91rm9200_ssc.0"))); + static struct snd_soc_dai_link at91sam9g20ek_dai = { .name = "WM8731", .stream_name = "WM8731 PCM", - .cpu_dai_name = "at91rm9200_ssc.0", - .codec_dai_name = "wm8731-hifi", .init = at91sam9g20ek_wm8731_init, - .platform_name = "at91rm9200_ssc.0", - .codec_name = "wm8731.0-001b", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(pcm), }; static struct snd_soc_card snd_soc_at91sam9g20ek = { @@ -211,24 +213,24 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) goto err; /* Parse codec info */ - at91sam9g20ek_dai.codec_name = NULL; + at91sam9g20ek_dai.codecs->name = NULL; codec_np = of_parse_phandle(np, "atmel,audio-codec", 0); if (!codec_np) { dev_err(&pdev->dev, "codec info missing\n"); return -EINVAL; } - at91sam9g20ek_dai.codec_of_node = codec_np; + at91sam9g20ek_dai.codecs->of_node = codec_np; /* Parse dai and platform info */ - at91sam9g20ek_dai.cpu_dai_name = NULL; - at91sam9g20ek_dai.platform_name = NULL; + at91sam9g20ek_dai.cpus->dai_name = NULL; + at91sam9g20ek_dai.platforms->name = NULL; cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0); if (!cpu_np) { dev_err(&pdev->dev, "dai and pcm info missing\n"); return -EINVAL; } - at91sam9g20ek_dai.cpu_of_node = cpu_np; - at91sam9g20ek_dai.platform_of_node = cpu_np; + at91sam9g20ek_dai.cpus->of_node = cpu_np; + at91sam9g20ek_dai.platforms->of_node = cpu_np; of_node_put(codec_np); of_node_put(cpu_np); From patchwork Wed May 22 03:45:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954799 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 1BC071708 for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B47A28B3C for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 001DF28B56; Wed, 22 May 2019 04:42:31 +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 3692E28B3C for ; Wed, 22 May 2019 04:42:31 +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 8B0E917EC; Wed, 22 May 2019 06:23:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8B0E917EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499071; bh=Be5JB1yVoeMVvmURYa7lbZ4+DVcb70KCannlxhmSUVA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MSdfPxdzMBIGrHhLLChzgLYnvA/H0k4Whgkvdmk+SNauJFCTKltjnL3wUvtgXaDXb W+BeSytM2LBk4TWJKr/WxF5gTUlleqUMQi48QC5qePrFqswKnDnrT0FrovA/Yyaq7S I2Dwh6ALMsb3vNCNAvDVEisAQycroyyWM9hkvBH4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E47D5F89875; Wed, 22 May 2019 05:45:07 +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 A3E94F8986E; Wed, 22 May 2019 05:45:06 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id C0942F8986E for ; Wed, 22 May 2019 05:45:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C0942F8986E Date: 22 May 2019 12:45:02 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425512" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:45:02 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 8D0AB4171C8B; Wed, 22 May 2019 12:45:02 +0900 (JST) Message-ID: <8736l7mai7.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 068/145] ASoC: atmel: tse850-pcm5142: 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 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/atmel/tse850-pcm5142.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/tse850-pcm5142.c b/sound/soc/atmel/tse850-pcm5142.c index ae44518..59e2edb 100644 --- a/sound/soc/atmel/tse850-pcm5142.c +++ b/sound/soc/atmel/tse850-pcm5142.c @@ -294,13 +294,18 @@ static const struct snd_soc_dapm_route tse850_intercon[] = { { "DAC", NULL, "OUTL" }, }; +SND_SOC_DAILINK_DEFS(pcm, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "pcm512x-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link tse850_dailink = { .name = "TSE-850", .stream_name = "TSE-850-PCM", - .codec_dai_name = "pcm512x-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFS, + SND_SOC_DAILINK_REG(pcm), }; static struct snd_soc_card tse850_card = { @@ -331,8 +336,8 @@ static int tse850_dt_init(struct platform_device *pdev) dev_err(&pdev->dev, "failed to get cpu dai\n"); return -EINVAL; } - dailink->cpu_of_node = cpu_np; - dailink->platform_of_node = cpu_np; + dailink->cpus->of_node = cpu_np; + dailink->platforms->of_node = cpu_np; of_node_put(cpu_np); codec_np = of_parse_phandle(np, "axentia,audio-codec", 0); @@ -340,7 +345,7 @@ static int tse850_dt_init(struct platform_device *pdev) dev_err(&pdev->dev, "failed to get codec info\n"); return -EINVAL; } - dailink->codec_of_node = codec_np; + dailink->codecs->of_node = codec_np; of_node_put(codec_np); return 0; From patchwork Wed May 22 03:45:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954803 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 7102718E8 for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6124C286BF for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5591828B56; Wed, 22 May 2019 04:42:32 +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 9B69E28B51 for ; Wed, 22 May 2019 04:42:31 +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 BBD0017FA; Wed, 22 May 2019 06:24:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BBD0017FA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499109; bh=bAjHUpJJUCSWG1z0QUszwWriV//9f5spPy/IyTLcTkQ=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=p/MqAx3qI/cXTxRBEnaWBCEwbvsSysDjDEitBu7HcUYam/iEB+rOWZ05CVrVS6fbw BZlWZOZ374ETlvTeOxmXkZblSvhXrVXU/Im/664OqMraLMum5oCtMJQGgxauhLHZTI qLHqvm6BAhTU9DaXd0iMBYQ0DrFzqTKfOmNnIdHE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 101C4F8987A; Wed, 22 May 2019 05:45:12 +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 AECB3F8987B; Wed, 22 May 2019 05:45:10 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 41675F89878 for ; Wed, 22 May 2019 05:45:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 41675F89878 Date: 22 May 2019 12:45:06 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425520" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:45:06 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id C46124003EA8; Wed, 22 May 2019 12:45:06 +0900 (JST) Message-ID: <871s0rmai3.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 069/145] ASoC: atmel: atmel-wm8904: 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 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/atmel/atmel_wm8904.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index fbc10f6..084788e 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c @@ -57,14 +57,19 @@ static const struct snd_soc_ops atmel_asoc_wm8904_ops = { .hw_params = atmel_asoc_wm8904_hw_params, }; +SND_SOC_DAILINK_DEFS(pcm, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8904-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link atmel_asoc_wm8904_dailink = { .name = "WM8904", .stream_name = "WM8904 PCM", - .codec_dai_name = "wm8904-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &atmel_asoc_wm8904_ops, + SND_SOC_DAILINK_REG(pcm), }; static struct snd_soc_card atmel_asoc_wm8904_card = { @@ -108,8 +113,8 @@ static int atmel_asoc_wm8904_dt_init(struct platform_device *pdev) ret = -EINVAL; return ret; } - dailink->cpu_of_node = cpu_np; - dailink->platform_of_node = cpu_np; + dailink->cpus->of_node = cpu_np; + dailink->platforms->of_node = cpu_np; of_node_put(cpu_np); codec_np = of_parse_phandle(np, "atmel,audio-codec", 0); @@ -118,7 +123,7 @@ static int atmel_asoc_wm8904_dt_init(struct platform_device *pdev) ret = -EINVAL; return ret; } - dailink->codec_of_node = codec_np; + dailink->codecs->of_node = codec_np; of_node_put(codec_np); return 0; @@ -137,7 +142,7 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) return ret; } - id = of_alias_get_id((struct device_node *)dailink->cpu_of_node, "ssc"); + id = of_alias_get_id((struct device_node *)dailink->cpus->of_node, "ssc"); ret = atmel_ssc_set_audio(id); if (ret != 0) { dev_err(&pdev->dev, "failed to set SSC %d for audio\n", id); @@ -163,7 +168,7 @@ static int atmel_asoc_wm8904_remove(struct platform_device *pdev) struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink; int id; - id = of_alias_get_id((struct device_node *)dailink->cpu_of_node, "ssc"); + id = of_alias_get_id((struct device_node *)dailink->cpus->of_node, "ssc"); snd_soc_unregister_card(card); atmel_ssc_put_audio(id); From patchwork Wed May 22 03:45:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954909 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 833AC6C5 for ; Wed, 22 May 2019 04:52:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73D8C28B55 for ; Wed, 22 May 2019 04:52:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67E9128B5B; Wed, 22 May 2019 04:52:30 +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 763BF28B55 for ; Wed, 22 May 2019 04:52:29 +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 9F2741800; Wed, 22 May 2019 06:24:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9F2741800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499146; bh=6NDh0D3GL6ZN83R8GGW4QPR7kK6p2UTXWzKdCxKPB2s=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Yb2QPXl30/AehrLnhGia8ntZXcEVDRRmPz9QSLERjbkCZrRfLNPiZjjtViiHuotrw h7snq04xVZH12TP4nVTGNj6yDMrI3QVjSQ2WAx6cd0GN2RnZwMmK18cXgL7hrWJRWm QP0SuErqUtRs7NKh0nI5huB7oPErmpE3NFsPzE14= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5A6FAF8987F; Wed, 22 May 2019 05:45:28 +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 A3CC3F8987F; Wed, 22 May 2019 05:45:26 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 24AB7F8987D for ; Wed, 22 May 2019 05:45:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 24AB7F8987D Date: 22 May 2019 12:45:21 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425558" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:45:21 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id EA67C4171C98; Wed, 22 May 2019 12:45:20 +0900 (JST) Message-ID: <87zhnfkvx9.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 070/145] ASoC: atmel: atmel-pdmic: 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 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/atmel/atmel-pdmic.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c index 915c2b0..f532134 100644 --- a/sound/soc/atmel/atmel-pdmic.c +++ b/sound/soc/atmel/atmel-pdmic.c @@ -511,17 +511,30 @@ static int atmel_pdmic_asoc_card_init(struct device *dev, { struct snd_soc_dai_link *dai_link; struct atmel_pdmic *dd = snd_soc_card_get_drvdata(card); + struct snd_soc_dai_link_component *comp; dai_link = devm_kzalloc(dev, sizeof(*dai_link), GFP_KERNEL); if (!dai_link) return -ENOMEM; + comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL); + if (!comp) + return -ENOMEM; + + dai_link->cpus = &comp[0]; + dai_link->codecs = &comp[1]; + dai_link->platforms = &comp[2]; + + dai_link->num_cpus = 1; + dai_link->num_codecs = 1; + dai_link->num_platforms = 1; + dai_link->name = "PDMIC"; dai_link->stream_name = "PDMIC PCM"; - dai_link->codec_dai_name = ATMEL_PDMIC_CODEC_DAI_NAME; - dai_link->cpu_dai_name = dev_name(dev); - dai_link->codec_name = dev_name(dev); - dai_link->platform_name = dev_name(dev); + dai_link->codecs->dai_name = ATMEL_PDMIC_CODEC_DAI_NAME; + dai_link->cpus->dai_name = dev_name(dev); + dai_link->codecs->name = dev_name(dev); + dai_link->platforms->name = dev_name(dev); card->dai_link = dai_link; card->num_links = 1; From patchwork Wed May 22 03:45:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954815 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 E8A0A14C0 for ; Wed, 22 May 2019 04:42:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9EFB28782 for ; Wed, 22 May 2019 04:42:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEA1028B56; Wed, 22 May 2019 04:42:33 +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 3702B28782 for ; Wed, 22 May 2019 04:42:33 +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 DF700180F; Wed, 22 May 2019 06:25:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DF700180F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499198; bh=DMvDqRmYJ/3dmyUdndFaY58zuZRdfzjwet6UqMGPtyI=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TZ/KYIHPHXGEA/mO1mkqzOttS0DdVwX4gWwwqhG+pKdUsijTWD4gXLz/KXezPsGK6 VMN6T2cTcuPxvaPRU1EIZL6qt2Wr0i0Lyu/Zi+4q9DCHlmqPSrJeLvBsrp/1R0aspC GG3XGK+fOoPRZxdVIX17RE9px6mzKbnXV/pMERHM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D98E4F8988A; Wed, 22 May 2019 05:45:31 +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 6C35FF89883; Wed, 22 May 2019 05:45:29 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id DC4FFF8972C for ; Wed, 22 May 2019 05:45:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DC4FFF8972C Date: 22 May 2019 12:45:25 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425562" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:45:25 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 6B65F4171C8B; Wed, 22 May 2019 12:45:25 +0900 (JST) Message-ID: <87y32zkvx5.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 071/145] ASoC: atmel: atmel-classd: 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 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/atmel/atmel-classd.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index 3d70061..cfebbeb 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -500,17 +500,30 @@ static int atmel_classd_asoc_card_init(struct device *dev, { struct snd_soc_dai_link *dai_link; struct atmel_classd *dd = snd_soc_card_get_drvdata(card); + struct snd_soc_dai_link_component *comp; dai_link = devm_kzalloc(dev, sizeof(*dai_link), GFP_KERNEL); if (!dai_link) return -ENOMEM; + comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL); + if (!comp) + return -ENOMEM; + + dai_link->cpus = &comp[0]; + dai_link->codecs = &comp[1]; + dai_link->platforms = &comp[2]; + + dai_link->num_cpus = 1; + dai_link->num_codecs = 1; + dai_link->num_platforms = 1; + dai_link->name = "CLASSD"; dai_link->stream_name = "CLASSD PCM"; - dai_link->codec_dai_name = ATMEL_CLASSD_CODEC_DAI_NAME; - dai_link->cpu_dai_name = dev_name(dev); - dai_link->codec_name = dev_name(dev); - dai_link->platform_name = dev_name(dev); + dai_link->codecs->dai_name = ATMEL_CLASSD_CODEC_DAI_NAME; + dai_link->cpus->dai_name = dev_name(dev); + dai_link->codecs->name = dev_name(dev); + dai_link->platforms->name = dev_name(dev); card->dai_link = dai_link; card->num_links = 1; From patchwork Wed May 22 03:45:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954923 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 817F617E0 for ; Wed, 22 May 2019 04:52:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7205228B55 for ; Wed, 22 May 2019 04:52:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7049C28B61; Wed, 22 May 2019 04:52:32 +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 A2B0528B56 for ; Wed, 22 May 2019 04:52:31 +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 779471815; Wed, 22 May 2019 06:26:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 779471815 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499232; bh=9QdzSdLBPMUF+M4SEQPUbvQqGptVnFmlat9gbX62iPI=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GsTmuYRlok/qYXmirgMmIbdpZO0V32qGjeVf2Qd0GRvwz/qdWGYvYznAM444orG4Y PQuCihM19iJxBtPuvm5EqVmEPX5jh0UudvixF5vKuKmEUk0SGThpwLgQdbWSMxibXo azVDk4LoWFf8EYkzKB/+kZSQj9DBp3qL7eivj/zc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F3397F89889; Wed, 22 May 2019 05:45:35 +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 31E89F8988D; Wed, 22 May 2019 05:45:34 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id EA430F89888 for ; Wed, 22 May 2019 05:45:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EA430F89888 Date: 22 May 2019 12:45:29 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425568" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:45:29 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 7B0854171C8E; Wed, 22 May 2019 12:45:29 +0900 (JST) Message-ID: <87woijkvx0.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 072/145] ASoC: au1x: db1000: 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 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/au1x/db1000.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/au1x/db1000.c b/sound/soc/au1x/db1000.c index e97c327..5819b89 100644 --- a/sound/soc/au1x/db1000.c +++ b/sound/soc/au1x/db1000.c @@ -18,13 +18,15 @@ #include "psc.h" +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("alchemy-ac97c")), + DAILINK_COMP_ARRAY(COMP_CODEC("ac97-codec", "ac97-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("alchemy-pcm-dma.0"))); + static struct snd_soc_dai_link db1000_ac97_dai = { .name = "AC97", .stream_name = "AC97 HiFi", - .codec_dai_name = "ac97-hifi", - .cpu_dai_name = "alchemy-ac97c", - .platform_name = "alchemy-pcm-dma.0", - .codec_name = "ac97-codec", + SND_SOC_DAILINK_REG(hifi), }; static struct snd_soc_card db1000_ac97 = { From patchwork Wed May 22 03:45:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954915 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 0549818E8 for ; Wed, 22 May 2019 04:52:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7BE728B59 for ; Wed, 22 May 2019 04:52:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC14628B55; Wed, 22 May 2019 04:52:30 +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 9951928B3C for ; Wed, 22 May 2019 04:52:29 +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 50E3B181D; Wed, 22 May 2019 06:27:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 50E3B181D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499270; bh=iuPpsEu8hiEC649QQV67bEuWHwKcz0GPmOHG/HBEJxg=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Vlryh9snwLyCo2UeHopo+iUudPdEoeSkggo2QFKf3KNZJSbApULxXLnKcFzouIOk3 FM8YQYeDOHsB2A6CTA2XouPsONOa86dSN3Y/9CvPtboRYyW+DObIGi5s9x4Gn/vvfk TvuZe3j/7K1tcY21i/sFeVHrCf0zc1Q1JRfwkjbY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 31507F89757; Wed, 22 May 2019 05:45:41 +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 83999F8988E; Wed, 22 May 2019 05:45:40 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 6591DF89890 for ; Wed, 22 May 2019 05:45:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6591DF89890 Date: 22 May 2019 12:45:35 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627661" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:45:35 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 32A4D4004953; Wed, 22 May 2019 12:45:35 +0900 (JST) Message-ID: <87v9y3kvwv.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 073/145] ASoC: au1x: db1200: 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 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/au1x/db1200.c | 50 +++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/sound/soc/au1x/db1200.c b/sound/soc/au1x/db1200.c index 301e1fc..4b012bf 100644 --- a/sound/soc/au1x/db1200.c +++ b/sound/soc/au1x/db1200.c @@ -46,13 +46,15 @@ static const struct platform_device_id db1200_pids[] = { /*------------------------- AC97 PART ---------------------------*/ +SND_SOC_DAILINK_DEFS(db1200_ac97, + DAILINK_COMP_ARRAY(COMP_CPU("au1xpsc_ac97.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("ac97-codec.1", "ac97-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("au1xpsc-pcm.1"))); + static struct snd_soc_dai_link db1200_ac97_dai = { .name = "AC97", .stream_name = "AC97 HiFi", - .codec_dai_name = "ac97-hifi", - .cpu_dai_name = "au1xpsc_ac97.1", - .platform_name = "au1xpsc-pcm.1", - .codec_name = "ac97-codec.1", + SND_SOC_DAILINK_REG(db1200_ac97), }; static struct snd_soc_card db1200_ac97_machine = { @@ -62,13 +64,15 @@ static struct snd_soc_card db1200_ac97_machine = { .num_links = 1, }; +SND_SOC_DAILINK_DEFS(db1300_ac97, + DAILINK_COMP_ARRAY(COMP_CPU("au1xpsc_ac97.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec.1", "wm9712-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("au1xpsc-pcm.1"))); + static struct snd_soc_dai_link db1300_ac97_dai = { .name = "AC97", .stream_name = "AC97 HiFi", - .codec_dai_name = "wm9712-hifi", - .cpu_dai_name = "au1xpsc_ac97.1", - .platform_name = "au1xpsc-pcm.1", - .codec_name = "wm9712-codec.1", + SND_SOC_DAILINK_REG(db1300_ac97), }; static struct snd_soc_card db1300_ac97_machine = { @@ -103,16 +107,18 @@ static const struct snd_soc_ops db1200_i2s_wm8731_ops = { .startup = db1200_i2s_startup, }; +SND_SOC_DAILINK_DEFS(db1200_i2s, + DAILINK_COMP_ARRAY(COMP_CPU("au1xpsc_i2s.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8731.0-001b", "wm8731-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("au1xpsc-pcm.1"))); + static struct snd_soc_dai_link db1200_i2s_dai = { .name = "WM8731", .stream_name = "WM8731 PCM", - .codec_dai_name = "wm8731-hifi", - .cpu_dai_name = "au1xpsc_i2s.1", - .platform_name = "au1xpsc-pcm.1", - .codec_name = "wm8731.0-001b", .dai_fmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &db1200_i2s_wm8731_ops, + SND_SOC_DAILINK_REG(db1200_i2s), }; static struct snd_soc_card db1200_i2s_machine = { @@ -122,16 +128,18 @@ static struct snd_soc_card db1200_i2s_machine = { .num_links = 1, }; +SND_SOC_DAILINK_DEFS(db1300_i2s, + DAILINK_COMP_ARRAY(COMP_CPU("au1xpsc_i2s.2")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8731.0-001b", "wm8731-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("au1xpsc-pcm.2"))); + static struct snd_soc_dai_link db1300_i2s_dai = { .name = "WM8731", .stream_name = "WM8731 PCM", - .codec_dai_name = "wm8731-hifi", - .cpu_dai_name = "au1xpsc_i2s.2", - .platform_name = "au1xpsc-pcm.2", - .codec_name = "wm8731.0-001b", .dai_fmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &db1200_i2s_wm8731_ops, + SND_SOC_DAILINK_REG(db1300_i2s), }; static struct snd_soc_card db1300_i2s_machine = { @@ -141,16 +149,18 @@ static struct snd_soc_card db1300_i2s_machine = { .num_links = 1, }; +SND_SOC_DAILINK_DEFS(db1550_i2s, + DAILINK_COMP_ARRAY(COMP_CPU("au1xpsc_i2s.3")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8731.0-001b", "wm8731-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("au1xpsc-pcm.3"))); + static struct snd_soc_dai_link db1550_i2s_dai = { .name = "WM8731", .stream_name = "WM8731 PCM", - .codec_dai_name = "wm8731-hifi", - .cpu_dai_name = "au1xpsc_i2s.3", - .platform_name = "au1xpsc-pcm.3", - .codec_name = "wm8731.0-001b", .dai_fmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &db1200_i2s_wm8731_ops, + SND_SOC_DAILINK_REG(db1550_i2s), }; static struct snd_soc_card db1550_i2s_machine = { From patchwork Wed May 22 03:45:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954863 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 247DD17E0 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 133D71FF29 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 080B128B5F; Wed, 22 May 2019 04:47:34 +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 5A8721FF29 for ; Wed, 22 May 2019 04:47:33 +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 DDD3C17FF; Wed, 22 May 2019 06:27:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DDD3C17FF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499311; bh=pxJLEfZI/RJCQdDrRoPIVIEdxBuV+iJI5qjsD/7ozLU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mWqchSPmzOkoD2T1NgoyZ+OJ95XaDCs/fuKRekMqe2UqyHv6AXAJs8RBcg8OpdNWR rmIbjQCTpDgRzVqkUONyjcV5ZMbCrlV6CXBdaBl/DOlnoogCmQ4tENNcdmlQcVPwYT /La3pwHVi78zPOwWOWGVQGNptJFL6DeQkX2oHUE0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 052A4F89895; Wed, 22 May 2019 05:45:45 +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 8D67DF89895; Wed, 22 May 2019 05:45:42 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id C4EB1F89754 for ; Wed, 22 May 2019 05:45:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C4EB1F89754 Date: 22 May 2019 12:45:39 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627666" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:45:39 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 57C464171C98; Wed, 22 May 2019 12:45:39 +0900 (JST) Message-ID: <87tvdnkvwr.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 074/145] ASoC: cirrus: edb93xx: 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 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/cirrus/edb93xx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/cirrus/edb93xx.c b/sound/soc/cirrus/edb93xx.c index f678b4c..1528d14 100644 --- a/sound/soc/cirrus/edb93xx.c +++ b/sound/soc/cirrus/edb93xx.c @@ -60,16 +60,18 @@ static const struct snd_soc_ops edb93xx_ops = { .hw_params = edb93xx_hw_params, }; +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("ep93xx-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("spi0.0", "cs4271-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("ep93xx-i2s"))); + static struct snd_soc_dai_link edb93xx_dai = { .name = "CS4271", .stream_name = "CS4271 HiFi", - .platform_name = "ep93xx-i2s", - .cpu_dai_name = "ep93xx-i2s", - .codec_name = "spi0.0", - .codec_dai_name = "cs4271-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &edb93xx_ops, + SND_SOC_DAILINK_REG(hifi), }; static struct snd_soc_card snd_soc_edb93xx = { From patchwork Wed May 22 03:45:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954867 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 656CB14C0 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53EB11FF83 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4833728B60; Wed, 22 May 2019 04:47:34 +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 6E76E1FF83 for ; Wed, 22 May 2019 04:47:33 +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 244C21810; Wed, 22 May 2019 06:28:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 244C21810 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499351; bh=YM1zPgwciu+Y5U5h85GHkHfAPpK0B6imkzgqihccaYc=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RSguWbYSAz7SWV5DD6StclvrhLeV07RjTeWpMbAfiD0OK+ZugnPTrYVtMD+JtIDKa AnvwGghwvOG0YwynKGk1WdVn9ImLcj1lz4gBN/HpD/aVZOZUoUlKXOcYs9LeuSF+1e sPArYa7EtUrSR0ccs5wV0LUcOr1C+BXHmQW0vOBk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 99FFEF89894; Wed, 22 May 2019 05:45:49 +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 24064F8989B; Wed, 22 May 2019 05:45:48 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 20079F89894 for ; Wed, 22 May 2019 05:45:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 20079F89894 Date: 22 May 2019 12:45:43 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425584" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:45:43 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 8834E4003EA8; Wed, 22 May 2019 12:45:43 +0900 (JST) Message-ID: <87sgt7kvwm.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 075/145] ASoC: cirrus: simone: 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 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/cirrus/simone.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/cirrus/simone.c b/sound/soc/cirrus/simone.c index cb85053..88b082c 100644 --- a/sound/soc/cirrus/simone.c +++ b/sound/soc/cirrus/simone.c @@ -21,13 +21,15 @@ #include +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("ep93xx-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("ac97-codec", "ac97-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("ep93xx-ac97"))); + static struct snd_soc_dai_link simone_dai = { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "ep93xx-ac97", - .codec_dai_name = "ac97-hifi", - .codec_name = "ac97-codec", - .platform_name = "ep93xx-ac97", + SND_SOC_DAILINK_REG(hifi), }; static struct snd_soc_card snd_soc_simone = { From patchwork Wed May 22 03:45:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954875 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 782DC6C5 for ; Wed, 22 May 2019 04:47:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 690181FF29 for ; Wed, 22 May 2019 04:47:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D7111FF83; Wed, 22 May 2019 04:47:35 +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 6300728B56 for ; Wed, 22 May 2019 04:47:33 +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 2C54C1825; Wed, 22 May 2019 06:29:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2C54C1825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499390; bh=5nHVJZ6arl0vySxi7ympoA7Zpc0k5Rm8DOLp0oHNRIs=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Em6+E3h1qpFVgtFAPRIdBmDa9+lDE9eXvyt+/m94xvWfcGV68/JpQ5SNmgEPA+zNL evfbksxW3ZdrR0ma+673FeKnCsa2GhwwmT8Gg5IjNOKNysfB806dvgZkrEk0OIYmVc 480YOGQVM8jJPE/Hrfa49D9luM18CuE+ySK+1JmI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 10726F8989D; Wed, 22 May 2019 05:45:53 +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 B2328F8989E; Wed, 22 May 2019 05:45:51 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id ECD72F8989C for ; Wed, 22 May 2019 05:45:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ECD72F8989C Date: 22 May 2019 12:45:47 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627669" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:45:47 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id AA20F4171C8B; Wed, 22 May 2019 12:45:47 +0900 (JST) Message-ID: <87r28rkvwi.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 076/145] ASoC: cirrus: snappercl15: 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 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/cirrus/snappercl15.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/cirrus/snappercl15.c b/sound/soc/cirrus/snappercl15.c index dea4909..0b4efcc 100644 --- a/sound/soc/cirrus/snappercl15.c +++ b/sound/soc/cirrus/snappercl15.c @@ -65,16 +65,19 @@ static const struct snd_soc_dapm_route audio_map[] = { {"MICIN", NULL, "Mic Jack"}, }; +SND_SOC_DAILINK_DEFS(aic23, + DAILINK_COMP_ARRAY(COMP_CPU("ep93xx-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic23-codec.0-001a", + "tlv320aic23-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("ep93xx-i2s"))); + static struct snd_soc_dai_link snappercl15_dai = { .name = "tlv320aic23", .stream_name = "AIC23", - .cpu_dai_name = "ep93xx-i2s", - .codec_dai_name = "tlv320aic23-hifi", - .codec_name = "tlv320aic23-codec.0-001a", - .platform_name = "ep93xx-i2s", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ops = &snappercl15_ops, + SND_SOC_DAILINK_REG(aic23), }; static struct snd_soc_card snd_soc_snappercl15 = { From patchwork Wed May 22 03:45:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954865 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 589396C5 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44FBB28782 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3953228B52; Wed, 22 May 2019 04:47:34 +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 5B482286BF for ; Wed, 22 May 2019 04:47:33 +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 78F0A1834; Wed, 22 May 2019 06:29:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 78F0A1834 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499427; bh=ioiBOSTcFzY0/+B7K77EFy8OGtg6GK+OZhlOc/dfnn4=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=a1RaXTfHwMl4AKE9dI6Z1QTDfoDdJ8Uew3z6w1znIei3eKyedNXj4/89Gff5j8F5Y pOBtXHt+o7Wml028Jky2/tEpmrhmtCC0en5fprjembdupS02I+0mJUYn2txSChRdqy tx4247zdUtPjGIJ5UMjbe0/wgmYtNPaLRjN+oAGw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 56263F898A1; Wed, 22 May 2019 05:46:00 +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 E5367F898A4; Wed, 22 May 2019 05:45:57 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 8D231F898A0 for ; Wed, 22 May 2019 05:45:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8D231F898A0 Date: 22 May 2019 12:45:52 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425589" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:45:52 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 55E7D4171C98; Wed, 22 May 2019 12:45:52 +0900 (JST) Message-ID: <87pnobkvwe.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 077/145] ASoC: fsl: efika-audio-fabric: 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 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/fsl/efika-audio-fabric.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sound/soc/fsl/efika-audio-fabric.c b/sound/soc/fsl/efika-audio-fabric.c index 667f421..8f6396f 100644 --- a/sound/soc/fsl/efika-audio-fabric.c +++ b/sound/soc/fsl/efika-audio-fabric.c @@ -29,22 +29,28 @@ #define DRV_NAME "efika-audio-fabric" +SND_SOC_DAILINK_DEFS(analog, + DAILINK_COMP_ARRAY(COMP_CPU("mpc5200-psc-ac97.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("stac9766-codec", + "stac9766-hifi-analog")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("mpc5200-pcm-audio"))); + +SND_SOC_DAILINK_DEFS(iec958, + DAILINK_COMP_ARRAY(COMP_CPU("mpc5200-psc-ac97.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("stac9766-codec", + "stac9766-hifi-IEC958")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("mpc5200-pcm-audio"))); + static struct snd_soc_dai_link efika_fabric_dai[] = { { .name = "AC97", .stream_name = "AC97 Analog", - .codec_dai_name = "stac9766-hifi-analog", - .cpu_dai_name = "mpc5200-psc-ac97.0", - .platform_name = "mpc5200-pcm-audio", - .codec_name = "stac9766-codec", + SND_SOC_DAILINK_REG(analog), }, { .name = "AC97", .stream_name = "AC97 IEC958", - .codec_dai_name = "stac9766-hifi-IEC958", - .cpu_dai_name = "mpc5200-psc-ac97.1", - .platform_name = "mpc5200-pcm-audio", - .codec_name = "stac9766-codec", + SND_SOC_DAILINK_REG(iec958), }, }; From patchwork Wed May 22 03:45:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954877 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 0EFDB1708 for ; Wed, 22 May 2019 04:47:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F27B51FF29 for ; Wed, 22 May 2019 04:47:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E70DF1FF83; Wed, 22 May 2019 04:47:35 +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 C06A128B57 for ; Wed, 22 May 2019 04:47:31 +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 27A04182B; Wed, 22 May 2019 06:30:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 27A04182B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499467; bh=q31vyd6qs/FsV3XkBfiVltSKyqoAxa25+tDmwDIbv0M=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rz8AZJyy9Y8tsxeQLyjvsT+qVrqfkKhCXbylVnPhRQD/Lh8MxHQTVMOBU2hTmDf6b X2ZXCMDaVZh4WtPAVii1qH7lVQR/dQ2XfKTh31IxFqHIComjC9MsyPaCCtrcmgiHEP en2gPjZUO0kyYcl+qlDwR1nAPpVe7wDP08fSypHw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8F498F898A8; Wed, 22 May 2019 05:46:03 +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 991BEF898A3; Wed, 22 May 2019 05:45:59 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id B2F50F898A1 for ; Wed, 22 May 2019 05:45:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B2F50F898A1 Date: 22 May 2019 12:45:56 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425592" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:45:56 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 3F2444171C98; Wed, 22 May 2019 12:45:56 +0900 (JST) Message-ID: <87o93vkvwa.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 078/145] ASoC: fsl: imx-spdif: 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 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/fsl/imx-spdif.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c index 4f7f210..6c4dadf 100644 --- a/sound/soc/fsl/imx-spdif.c +++ b/sound/soc/fsl/imx-spdif.c @@ -15,6 +15,7 @@ static int imx_spdif_audio_probe(struct platform_device *pdev) { struct device_node *spdif_np, *np = pdev->dev.of_node; struct imx_spdif_data *data; + struct snd_soc_dai_link_component *comp; int ret = 0; spdif_np = of_parse_phandle(np, "spdif-controller", 0); @@ -25,17 +26,26 @@ static int imx_spdif_audio_probe(struct platform_device *pdev) } data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); - if (!data) { + comp = devm_kzalloc(&pdev->dev, 3 * sizeof(*comp), GFP_KERNEL); + if (!data || !comp) { ret = -ENOMEM; goto end; } + data->dai.cpus = &comp[0]; + data->dai.codecs = &comp[1]; + data->dai.platforms = &comp[2]; + + data->dai.num_cpus = 1; + data->dai.num_codecs = 1; + data->dai.num_platforms = 1; + data->dai.name = "S/PDIF PCM"; data->dai.stream_name = "S/PDIF PCM"; - data->dai.codec_dai_name = "snd-soc-dummy-dai"; - data->dai.codec_name = "snd-soc-dummy"; - data->dai.cpu_of_node = spdif_np; - data->dai.platform_of_node = spdif_np; + data->dai.codecs->dai_name = "snd-soc-dummy-dai"; + data->dai.codecs->name = "snd-soc-dummy"; + data->dai.cpus->of_node = spdif_np; + data->dai.platforms->of_node = spdif_np; data->dai.playback_only = true; data->dai.capture_only = true; From patchwork Wed May 22 03:46: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: 10954791 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 837611708 for ; Wed, 22 May 2019 04:42:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73FE828B3D for ; Wed, 22 May 2019 04:42:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6696828B59; Wed, 22 May 2019 04:42:30 +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 5CB1528B3D for ; Wed, 22 May 2019 04:42:29 +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 CA4DB1843; Wed, 22 May 2019 06:31:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CA4DB1843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499517; bh=/1n2vgts947zWKwsGbTiuVQuJ+LQRFpA3oOveS73d0Y=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=I3z+/7wr31fOMmF1MKULibMTq1tc7M6JqYjc2w1yhQSdL0ozwG0iEPzqJJiuBMpQy zUB9Fx9vWUNXWlRSOhv7VCXJJeYiNTuf+3Ur0fDVUB9DYaDLihhiC6v0Qyk5WuSNdA Fzj8THRL7OMhH9o6E1dLz3NEmoRjyaiwXF0r5v7s= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 13D9BF898B1; Wed, 22 May 2019 05:46:07 +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 F177CF898AD; Wed, 22 May 2019 05:46:04 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id BC161F898A6 for ; Wed, 22 May 2019 05:46:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BC161F898A6 Date: 22 May 2019 12:46:00 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425596" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:46:00 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 4B79F4003EBC; Wed, 22 May 2019 12:46:00 +0900 (JST) Message-ID: <87mujfkvw6.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 079/145] ASoC: fsl: mx27vis-aic32x4: 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 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/fsl/mx27vis-aic32x4.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/mx27vis-aic32x4.c b/sound/soc/fsl/mx27vis-aic32x4.c index 37a4520..38ac4a3 100644 --- a/sound/soc/fsl/mx27vis-aic32x4.c +++ b/sound/soc/fsl/mx27vis-aic32x4.c @@ -132,16 +132,19 @@ static const struct snd_soc_dapm_route aic32x4_dapm_routes[] = { {"IN3_L", NULL, "Mic Bias"}, }; +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("imx-ssi.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic32x4.0-0018", + "tlv320aic32x4-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("imx-ssi.0"))); + static struct snd_soc_dai_link mx27vis_aic32x4_dai = { .name = "tlv320aic32x4", .stream_name = "TLV320AIC32X4", - .codec_dai_name = "tlv320aic32x4-hifi", - .platform_name = "imx-ssi.0", - .codec_name = "tlv320aic32x4.0-0018", - .cpu_dai_name = "imx-ssi.0", .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &mx27vis_aic32x4_snd_ops, + SND_SOC_DAILINK_REG(hifi), }; static struct snd_soc_card mx27vis_aic32x4 = { From patchwork Wed May 22 03:46:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954819 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 98B3814C0 for ; Wed, 22 May 2019 04:42:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 880A628751 for ; Wed, 22 May 2019 04:42:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CCCE28B3E; Wed, 22 May 2019 04:42:34 +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 5F8B328B3D for ; Wed, 22 May 2019 04:42:31 +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 AAF931840; Wed, 22 May 2019 06:31:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AAF931840 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499552; bh=K5fWMrpeUw+JCiOF24GqaMnsprAbWcYq+dg2WZxBCUU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dgs3uGuqXo6UUHctehw00kYRc+HlSUV6fLmYQiVhilo3FzgplY9br/ykAbKqZIUPZ ZvK8OQC9s+EMo5Io1q4J4xrqT13UNpFqR4Bh2qTv0iDaNNKmrnYhctLyOziFi+l3ZD CAvreyCIgzTjRP6vV2q9ASyABC3c7YimF8NE6BRM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CAF8AF8975A; Wed, 22 May 2019 05:46:18 +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 C0066F898B4; Wed, 22 May 2019 05:46:17 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 4BF0FF8975A for ; Wed, 22 May 2019 05:46:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4BF0FF8975A Date: 22 May 2019 12:46:14 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627716" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:46:14 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 0C09D4171CBC; Wed, 22 May 2019 12:46:14 +0900 (JST) Message-ID: <87lfyzkvvs.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 080/145] ASoC: fsl: phycore-ac97: 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 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/fsl/phycore-ac97.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/phycore-ac97.c b/sound/soc/fsl/phycore-ac97.c index fe7ba6d..e561f7f 100644 --- a/sound/soc/fsl/phycore-ac97.c +++ b/sound/soc/fsl/phycore-ac97.c @@ -20,15 +20,17 @@ static struct snd_soc_card imx_phycore; static const struct snd_soc_ops imx_phycore_hifi_ops = { }; +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("imx-ssi.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("imx-ssi.0"))); + static struct snd_soc_dai_link imx_phycore_dai_ac97[] = { { .name = "HiFi", .stream_name = "HiFi", - .codec_dai_name = "wm9712-hifi", - .codec_name = "wm9712-codec", - .cpu_dai_name = "imx-ssi.0", - .platform_name = "imx-ssi.0", .ops = &imx_phycore_hifi_ops, + SND_SOC_DAILINK_REG(hifi), }, }; From patchwork Wed May 22 03:46:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954813 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 5417017E0 for ; Wed, 22 May 2019 04:42:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3ECD328B54 for ; Wed, 22 May 2019 04:42:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CC3328B57; Wed, 22 May 2019 04:42:33 +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 9DD3A28B54 for ; Wed, 22 May 2019 04:42:31 +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 669651849; Wed, 22 May 2019 06:32:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 669651849 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499591; bh=/1AAwOVUx4ff3Zoo7QRj61L7z1K3mdKVk2QvGanZXl8=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sz3Bij48EpB4egjiY3hUCj5NmijGtnbv3QKEhxkhPMxX+Py8lvk46Zm5z2pTN+8nV Oq16fnmp07mqu2Fq3KqNe+dFsSkCSRk/jh2bNtmamxteHG07KCfAZebI8FbxXFMENW 8SiOroPwFP5F/5tUDDWvC4XvyMaMeGnMeBvWi3LM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3CED1F898B8; Wed, 22 May 2019 05:46:23 +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 C7719F898B7; Wed, 22 May 2019 05:46:21 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 52E7BF898B7 for ; Wed, 22 May 2019 05:46:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 52E7BF898B7 Date: 22 May 2019 12:46:18 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425632" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:46:18 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 1C73E4009407; Wed, 22 May 2019 12:46:18 +0900 (JST) Message-ID: <87k1ejkvvo.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 081/145] ASoC: fsl: wm1133-ev1: 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 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/fsl/wm1133-ev1.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/wm1133-ev1.c b/sound/soc/fsl/wm1133-ev1.c index aad24cc..52d321b 100644 --- a/sound/soc/fsl/wm1133-ev1.c +++ b/sound/soc/fsl/wm1133-ev1.c @@ -216,18 +216,20 @@ static int wm1133_ev1_init(struct snd_soc_pcm_runtime *rtd) } +SND_SOC_DAILINK_DEFS(ev1, + DAILINK_COMP_ARRAY(COMP_CPU("imx-ssi.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm8350-codec.0-0x1a", "wm8350-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("imx-ssi.0"))); + static struct snd_soc_dai_link wm1133_ev1_dai = { .name = "WM1133-EV1", .stream_name = "Audio", - .cpu_dai_name = "imx-ssi.0", - .codec_dai_name = "wm8350-hifi", - .platform_name = "imx-ssi.0", - .codec_name = "wm8350-codec.0-0x1a", .init = wm1133_ev1_init, .ops = &wm1133_ev1_ops, .symmetric_rates = 1, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(ev1), }; static struct snd_soc_card wm1133_ev1 = { From patchwork Wed May 22 03:46:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954809 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 CD7E11708 for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE94B28B3C for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B320C28B55; Wed, 22 May 2019 04:42:32 +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 D8F3728B5A for ; Wed, 22 May 2019 04:42:31 +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 19BED17D7; Wed, 22 May 2019 06:33:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 19BED17D7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499631; bh=NnbideIv/d0zNwXQDIHTqjrSQe1WZS0oti5YvgRAi/0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=seCvD9DknTmOj5/hg+VZO4u5mWd2Vm5JWVstPe34HcYgYgVG1NpQQeT4MMlAr7JkX m8l7rbYnOHTyLYauJqdlQWOC3XDg5fJ8UwSpRQJLT86YJrxWQA9kCBSdhyH/jbGCSI lYMehu4jnlld+K+3mnBjszn/ZFnO/4awq0ZYV0A0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AC556F8972A; Wed, 22 May 2019 05:46:29 +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 CA234F898BE; Wed, 22 May 2019 05:46:28 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 00038F8972A for ; Wed, 22 May 2019 05:46:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 00038F8972A Date: 22 May 2019 12:46:22 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627725" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:46:22 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 2B7B74171CBB; Wed, 22 May 2019 12:46:22 +0900 (JST) Message-ID: <87imu3kvvk.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 082/145] ASoC: fsl: fsl-asoc-card: 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 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/fsl/fsl-asoc-card.c | 47 ++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 60f87a0..39ea9bd 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -200,32 +200,47 @@ static int be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hifi_fe, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hifi_be, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_DUMMY())); + static struct snd_soc_dai_link fsl_asoc_card_dai[] = { /* Default ASoC DAI Link*/ { .name = "HiFi", .stream_name = "HiFi", .ops = &fsl_asoc_card_ops, + SND_SOC_DAILINK_REG(hifi), }, /* DPCM Link between Front-End and Back-End (Optional) */ { .name = "HiFi-ASRC-FE", .stream_name = "HiFi-ASRC-FE", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .dpcm_playback = 1, .dpcm_capture = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hifi_fe), }, { .name = "HiFi-ASRC-BE", .stream_name = "HiFi-ASRC-BE", - .platform_name = "snd-soc-dummy", .be_hw_params_fixup = be_hw_params_fixup, .ops = &fsl_asoc_card_ops, .dpcm_playback = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(hifi_be), }, }; @@ -616,11 +631,11 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) } /* Normal DAI Link */ - priv->dai_link[0].cpu_of_node = cpu_np; - priv->dai_link[0].codec_dai_name = codec_dai_name; + priv->dai_link[0].cpus->of_node = cpu_np; + priv->dai_link[0].codecs->dai_name = codec_dai_name; if (!fsl_asoc_card_is_ac97(priv)) - priv->dai_link[0].codec_of_node = codec_np; + priv->dai_link[0].codecs->of_node = codec_np; else { u32 idx; @@ -631,29 +646,29 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) goto asrc_fail; } - priv->dai_link[0].codec_name = + priv->dai_link[0].codecs->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "ac97-codec.%u", (unsigned int)idx); - if (!priv->dai_link[0].codec_name) { + if (!priv->dai_link[0].codecs->name) { ret = -ENOMEM; goto asrc_fail; } } - priv->dai_link[0].platform_of_node = cpu_np; + priv->dai_link[0].platforms->of_node = cpu_np; priv->dai_link[0].dai_fmt = priv->dai_fmt; priv->card.num_links = 1; if (asrc_pdev) { /* DPCM DAI Links only if ASRC exsits */ - priv->dai_link[1].cpu_of_node = asrc_np; - priv->dai_link[1].platform_of_node = asrc_np; - priv->dai_link[2].codec_dai_name = codec_dai_name; - priv->dai_link[2].codec_of_node = codec_np; - priv->dai_link[2].codec_name = - priv->dai_link[0].codec_name; - priv->dai_link[2].cpu_of_node = cpu_np; + priv->dai_link[1].cpus->of_node = asrc_np; + priv->dai_link[1].platforms->of_node = asrc_np; + priv->dai_link[2].codecs->dai_name = codec_dai_name; + priv->dai_link[2].codecs->of_node = codec_np; + priv->dai_link[2].codecs->name = + priv->dai_link[0].codecs->name; + priv->dai_link[2].cpus->of_node = cpu_np; priv->dai_link[2].dai_fmt = priv->dai_fmt; priv->card.num_links = 3; From patchwork Wed May 22 03:46:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954795 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 0D7F413AD for ; Wed, 22 May 2019 04:42:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F084D28B3E for ; Wed, 22 May 2019 04:42:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDEE928B3C; Wed, 22 May 2019 04:42:30 +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 9C59828B55 for ; Wed, 22 May 2019 04:42:29 +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 91A2517B6; Wed, 22 May 2019 06:33:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 91A2517B6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499671; bh=F4dFhmMMRr2/o2DjQnwRS2U8GL6bP6zFQIpz+rTSti8=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JfWLWX43FMf5JMCR4cO4Fk10akAEbtrizoyOaDttR0cREO/nAdQmQuDSdwFpYBg2/ +RAiyFPjlpLSNs+u9DgMBEtETE9MNF1+SIW5uLqe4s3tOt6wGniyaIkR/4la5g1ufn YmgqzrNSr47n4M/XSMa5LVHyJisQGyxsyEcixcr4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D976CF898BB; Wed, 22 May 2019 05:46:32 +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 E2DACF898C1; Wed, 22 May 2019 05:46:31 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 9AB9DF898BB for ; Wed, 22 May 2019 05:46:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9AB9DF898BB Date: 22 May 2019 12:46:26 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425644" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:46:26 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 5B8A34003EBC; Wed, 22 May 2019 12:46:26 +0900 (JST) Message-ID: <87h89nkvvg.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 083/145] ASoC: fsl: mpc8610_hpcd/p1022_ds/p1022_rdk: 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 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. mpc8610_hpcd/p1022_ds/p1022_rdk are sharing fsl_asoc_get_dma_channel() which setups platform. We need to update these by 1 patch. Signed-off-by: Kuninori Morimoto --- sound/soc/fsl/fsl_utils.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 33 ++++++++++++++++++++++++++++----- sound/soc/fsl/p1022_ds.c | 36 ++++++++++++++++++++++++++++++------ sound/soc/fsl/p1022_rdk.c | 35 +++++++++++++++++++++++++++++------ 4 files changed, 88 insertions(+), 18 deletions(-) diff --git a/sound/soc/fsl/fsl_utils.c b/sound/soc/fsl/fsl_utils.c index 040d06b..9bab202 100644 --- a/sound/soc/fsl/fsl_utils.c +++ b/sound/soc/fsl/fsl_utils.c @@ -57,7 +57,7 @@ int fsl_asoc_get_dma_channel(struct device_node *ssi_np, of_node_put(dma_channel_np); return ret; } - snprintf((char *)dai->platform_name, DAI_NAME_SIZE, "%llx.%pOFn", + snprintf((char *)dai->platforms->name, DAI_NAME_SIZE, "%llx.%pOFn", (unsigned long long) res.start, dma_channel_np); iprop = of_get_property(dma_channel_np, "cell-index", NULL); diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index f6261a3..23617eb 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c @@ -189,6 +189,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) struct device_node *np = ssi_pdev->dev.of_node; struct device_node *codec_np = NULL; struct mpc8610_hpcd_data *machine_data; + struct snd_soc_dai_link_component *comp; int ret = -ENODEV; const char *sprop; const u32 *iprop; @@ -206,14 +207,36 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) goto error_alloc; } - machine_data->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev); + comp = devm_kzalloc(&pdev->dev, 6 * sizeof(*comp), GFP_KERNEL); + if (!comp) { + ret = -ENOMEM; + goto error_alloc; + } + + machine_data->dai[0].cpus = &comp[0]; + machine_data->dai[0].codecs = &comp[1]; + machine_data->dai[0].platforms = &comp[2]; + + machine_data->dai[0].num_cpus = 1; + machine_data->dai[0].num_codecs = 1; + machine_data->dai[0].num_platforms = 1; + + machine_data->dai[1].cpus = &comp[3]; + machine_data->dai[1].codecs = &comp[4]; + machine_data->dai[1].platforms = &comp[5]; + + machine_data->dai[1].num_cpus = 1; + machine_data->dai[1].num_codecs = 1; + machine_data->dai[1].num_platforms = 1; + + machine_data->dai[0].cpus->dai_name = dev_name(&ssi_pdev->dev); machine_data->dai[0].ops = &mpc8610_hpcd_ops; /* ASoC core can match codec with device node */ - machine_data->dai[0].codec_of_node = codec_np; + machine_data->dai[0].codecs->of_node = codec_np; /* The DAI name from the codec (snd_soc_dai_driver.name) */ - machine_data->dai[0].codec_dai_name = "cs4270-hifi"; + machine_data->dai[0].codecs->dai_name = "cs4270-hifi"; /* We register two DAIs per SSI, one for playback and the other for * capture. Currently, we only support codecs that have one DAI for @@ -306,7 +329,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) } /* Find the playback DMA channel to use. */ - machine_data->dai[0].platform_name = machine_data->platform_name[0]; + machine_data->dai[0].platforms->name = machine_data->platform_name[0]; ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", &machine_data->dai[0], &machine_data->dma_channel_id[0], @@ -317,7 +340,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) } /* Find the capture DMA channel to use. */ - machine_data->dai[1].platform_name = machine_data->platform_name[1]; + machine_data->dai[1].platforms->name = machine_data->platform_name[1]; ret = fsl_asoc_get_dma_channel(np, "fsl,capture-dma", &machine_data->dai[1], &machine_data->dma_channel_id[1], diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index 80384f7..6114b01 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c @@ -199,6 +199,7 @@ static int p1022_ds_probe(struct platform_device *pdev) struct device_node *np = ssi_pdev->dev.of_node; struct device_node *codec_np = NULL; struct machine_data *mdata; + struct snd_soc_dai_link_component *comp; int ret = -ENODEV; const char *sprop; const u32 *iprop; @@ -216,11 +217,34 @@ static int p1022_ds_probe(struct platform_device *pdev) goto error_put; } - mdata->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev); + comp = devm_kzalloc(&pdev->dev, 6 * sizeof(*comp), GFP_KERNEL); + if (!comp) { + ret = -ENOMEM; + goto error_put; + } + + mdata->dai[0].cpus = &comp[0]; + mdata->dai[0].codecs = &comp[1]; + mdata->dai[0].platforms = &comp[2]; + + mdata->dai[0].num_cpus = 1; + mdata->dai[0].num_codecs = 1; + mdata->dai[0].num_platforms = 1; + + mdata->dai[1].cpus = &comp[3]; + mdata->dai[1].codecs = &comp[4]; + mdata->dai[1].platforms = &comp[5]; + + mdata->dai[1].num_cpus = 1; + mdata->dai[1].num_codecs = 1; + mdata->dai[1].num_platforms = 1; + + + mdata->dai[0].cpus->dai_name = dev_name(&ssi_pdev->dev); mdata->dai[0].ops = &p1022_ds_ops; /* ASoC core can match codec with device node */ - mdata->dai[0].codec_of_node = codec_np; + mdata->dai[0].codecs->of_node = codec_np; /* We register two DAIs per SSI, one for playback and the other for * capture. We support codecs that have separate DAIs for both playback @@ -229,8 +253,8 @@ static int p1022_ds_probe(struct platform_device *pdev) memcpy(&mdata->dai[1], &mdata->dai[0], sizeof(struct snd_soc_dai_link)); /* The DAI names from the codec (snd_soc_dai_driver.name) */ - mdata->dai[0].codec_dai_name = "wm8776-hifi-playback"; - mdata->dai[1].codec_dai_name = "wm8776-hifi-capture"; + mdata->dai[0].codecs->dai_name = "wm8776-hifi-playback"; + mdata->dai[1].codecs->dai_name = "wm8776-hifi-capture"; /* Get the device ID */ iprop = of_get_property(np, "cell-index", NULL); @@ -316,7 +340,7 @@ static int p1022_ds_probe(struct platform_device *pdev) } /* Find the playback DMA channel to use. */ - mdata->dai[0].platform_name = mdata->platform_name[0]; + mdata->dai[0].platforms->name = mdata->platform_name[0]; ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", &mdata->dai[0], &mdata->dma_channel_id[0], &mdata->dma_id[0]); @@ -326,7 +350,7 @@ static int p1022_ds_probe(struct platform_device *pdev) } /* Find the capture DMA channel to use. */ - mdata->dai[1].platform_name = mdata->platform_name[1]; + mdata->dai[1].platforms->name = mdata->platform_name[1]; ret = fsl_asoc_get_dma_channel(np, "fsl,capture-dma", &mdata->dai[1], &mdata->dma_channel_id[1], &mdata->dma_id[1]); diff --git a/sound/soc/fsl/p1022_rdk.c b/sound/soc/fsl/p1022_rdk.c index 1c32c2d..7268723 100644 --- a/sound/soc/fsl/p1022_rdk.c +++ b/sound/soc/fsl/p1022_rdk.c @@ -203,6 +203,7 @@ static int p1022_rdk_probe(struct platform_device *pdev) struct device_node *np = ssi_pdev->dev.of_node; struct device_node *codec_np = NULL; struct machine_data *mdata; + struct snd_soc_dai_link_component *comp; const u32 *iprop; int ret; @@ -219,11 +220,33 @@ static int p1022_rdk_probe(struct platform_device *pdev) goto error_put; } - mdata->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev); + comp = devm_kzalloc(&pdev->dev, 6 * sizeof(*comp), GFP_KERNEL); + if (!comp) { + ret = -ENOMEM; + goto error_put; + } + + mdata->dai[0].cpus = &comp[0]; + mdata->dai[0].codecs = &comp[1]; + mdata->dai[0].platforms = &comp[2]; + + mdata->dai[0].num_cpus = 1; + mdata->dai[0].num_codecs = 1; + mdata->dai[0].num_platforms = 1; + + mdata->dai[1].cpus = &comp[3]; + mdata->dai[1].codecs = &comp[4]; + mdata->dai[1].platforms = &comp[5]; + + mdata->dai[1].num_cpus = 1; + mdata->dai[1].num_codecs = 1; + mdata->dai[1].num_platforms = 1; + + mdata->dai[0].cpus->dai_name = dev_name(&ssi_pdev->dev); mdata->dai[0].ops = &p1022_rdk_ops; /* ASoC core can match codec with device node */ - mdata->dai[0].codec_of_node = codec_np; + mdata->dai[0].codecs->of_node = codec_np; /* * We register two DAIs per SSI, one for playback and the other for @@ -233,8 +256,8 @@ static int p1022_rdk_probe(struct platform_device *pdev) memcpy(&mdata->dai[1], &mdata->dai[0], sizeof(struct snd_soc_dai_link)); /* The DAI names from the codec (snd_soc_dai_driver.name) */ - mdata->dai[0].codec_dai_name = "wm8960-hifi"; - mdata->dai[1].codec_dai_name = mdata->dai[0].codec_dai_name; + mdata->dai[0].codecs->dai_name = "wm8960-hifi"; + mdata->dai[1].codecs->dai_name = mdata->dai[0].codecs->dai_name; /* * Configure the SSI for I2S slave mode. Older device trees have @@ -266,7 +289,7 @@ static int p1022_rdk_probe(struct platform_device *pdev) } /* Find the playback DMA channel to use. */ - mdata->dai[0].platform_name = mdata->platform_name[0]; + mdata->dai[0].platforms->name = mdata->platform_name[0]; ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", &mdata->dai[0], &mdata->dma_channel_id[0], &mdata->dma_id[0]); @@ -277,7 +300,7 @@ static int p1022_rdk_probe(struct platform_device *pdev) } /* Find the capture DMA channel to use. */ - mdata->dai[1].platform_name = mdata->platform_name[1]; + mdata->dai[1].platforms->name = mdata->platform_name[1]; ret = fsl_asoc_get_dma_channel(np, "fsl,capture-dma", &mdata->dai[1], &mdata->dma_channel_id[1], &mdata->dma_id[1]); From patchwork Wed May 22 03:46:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954811 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 4ADB713AD for ; Wed, 22 May 2019 04:42:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 329FB286BF for ; Wed, 22 May 2019 04:42:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25C7F28B56; Wed, 22 May 2019 04:42:33 +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 796D1286BF for ; Wed, 22 May 2019 04:42:32 +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 D473F17F5; Wed, 22 May 2019 06:34:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D473F17F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499709; bh=LD9ZgwZGL0tccDVXepKhYNLzsjz0AUvCL3dQ/xsFJb4=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=iEd2beEIFtZmDC7xMu0n6zva/+NTplTFwtoJxPX5xDBqv5KM/x47Dt3VbYD1AQ9FX 0buZU5ewCri7YC7pVoyQsZvcOReI6VYy85DDs9nDh4uk+DLVpeolxuKqfjP+m8fyNa KVUuh6NhqJAPu+Wgo1GhyOrdIjfIBNxKS8AhUC4o= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C4057F898C6; Wed, 22 May 2019 05:46:37 +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 F3DAAF898C8; Wed, 22 May 2019 05:46:35 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id BABFFF898C0 for ; Wed, 22 May 2019 05:46:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BABFFF898C0 Date: 22 May 2019 12:46:30 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627736" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:46:30 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 6E9D14009405; Wed, 22 May 2019 12:46:30 +0900 (JST) Message-ID: <87ftp7kvvb.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 084/145] ASoC: fsl: imx-es8328: 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 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/fsl/imx-es8328.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/imx-es8328.c b/sound/soc/fsl/imx-es8328.c index c9d8739..15a27a2 100644 --- a/sound/soc/fsl/imx-es8328.c +++ b/sound/soc/fsl/imx-es8328.c @@ -74,6 +74,7 @@ static int imx_es8328_probe(struct platform_device *pdev) struct device_node *ssi_np = NULL, *codec_np = NULL; struct platform_device *ssi_pdev; struct imx_es8328_data *data; + struct snd_soc_dai_link_component *comp; u32 int_port, ext_port; int ret; struct device *dev = &pdev->dev; @@ -147,16 +148,30 @@ static int imx_es8328_probe(struct platform_device *pdev) goto fail; } + comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL); + if (!comp) { + ret = -ENOMEM; + goto fail; + } + data->dev = dev; data->jack_gpio = of_get_named_gpio(pdev->dev.of_node, "jack-gpio", 0); + data->dai.cpus = &comp[0]; + data->dai.codecs = &comp[1]; + data->dai.platforms = &comp[2]; + + data->dai.num_cpus = 1; + data->dai.num_codecs = 1; + data->dai.num_platforms = 1; + data->dai.name = "hifi"; data->dai.stream_name = "hifi"; - data->dai.codec_dai_name = "es8328-hifi-analog"; - data->dai.codec_of_node = codec_np; - data->dai.cpu_of_node = ssi_np; - data->dai.platform_of_node = ssi_np; + data->dai.codecs->dai_name = "es8328-hifi-analog"; + data->dai.codecs->of_node = codec_np; + data->dai.cpus->of_node = ssi_np; + data->dai.platforms->of_node = ssi_np; data->dai.init = &imx_es8328_dai_init; data->dai.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM; From patchwork Wed May 22 03:46:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954871 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 C799C1922 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6DFC1FF29 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB5211FF83; Wed, 22 May 2019 04:47:34 +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 9FADB28B54 for ; Wed, 22 May 2019 04:47:31 +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 6BCDB1859; Wed, 22 May 2019 06:35:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6BCDB1859 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499759; bh=HvpvMS2iD3Wvk6ZoeBoxJwHJD/iOEzhGm2xvl2XLl5w=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ARcdkWtiwNXsZ13BFkkO/LyhWFJyRmxlpA2nctymOah7ZzbuxhfUQz951EGU8RZ6W dEPhrJERl2nkSA7IVyCnYvXvHTPeF0JE6GVGkEwPTimivZWRw2+FppqKyCYt/b7xZY DTxPzgHHx4drd8QW9VXdh/Ih/co5N93HBEVXt3Hc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 12ABEF898D2; Wed, 22 May 2019 05:46:43 +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 9347CF898CB; Wed, 22 May 2019 05:46:38 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id E8870F898C7 for ; Wed, 22 May 2019 05:46:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E8870F898C7 Date: 22 May 2019 12:46:34 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425652" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:46:34 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 768264003EC0; Wed, 22 May 2019 12:46:34 +0900 (JST) Message-ID: <87ef4rkvv7.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 085/145] ASoC: fsl: eukrea-tlv320: 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 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/fsl/eukrea-tlv320.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sound/soc/fsl/eukrea-tlv320.c b/sound/soc/fsl/eukrea-tlv320.c index d648268..6f3b768 100644 --- a/sound/soc/fsl/eukrea-tlv320.c +++ b/sound/soc/fsl/eukrea-tlv320.c @@ -61,13 +61,18 @@ static const struct snd_soc_ops eukrea_tlv320_snd_ops = { .hw_params = eukrea_tlv320_hw_params, }; +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic23-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link eukrea_tlv320_dai = { .name = "tlv320aic23", .stream_name = "TLV320AIC23", - .codec_dai_name = "tlv320aic23-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &eukrea_tlv320_snd_ops, + SND_SOC_DAILINK_REG(hifi), }; static struct snd_soc_card eukrea_tlv320 = { @@ -104,7 +109,7 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) codec_np = of_parse_phandle(ssi_np, "codec-handle", 0); if (codec_np) - eukrea_tlv320_dai.codec_of_node = codec_np; + eukrea_tlv320_dai.codecs->of_node = codec_np; else dev_err(&pdev->dev, "codec-handle node missing or invalid.\n"); @@ -128,12 +133,12 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) int_port--; ext_port--; - eukrea_tlv320_dai.cpu_of_node = ssi_np; - eukrea_tlv320_dai.platform_of_node = ssi_np; + eukrea_tlv320_dai.cpus->of_node = ssi_np; + eukrea_tlv320_dai.platforms->of_node = ssi_np; } else { - eukrea_tlv320_dai.cpu_dai_name = "imx-ssi.0"; - eukrea_tlv320_dai.platform_name = "imx-ssi.0"; - eukrea_tlv320_dai.codec_name = "tlv320aic23-codec.0-001a"; + eukrea_tlv320_dai.cpus->dai_name = "imx-ssi.0"; + eukrea_tlv320_dai.platforms->name = "imx-ssi.0"; + eukrea_tlv320_dai.codecs->name = "tlv320aic23-codec.0-001a"; eukrea_tlv320.name = "cpuimx-audio"; } From patchwork Wed May 22 03:46:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954801 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 354A014C0 for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27499286BF for ; Wed, 22 May 2019 04:42:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BD4D28B5B; Wed, 22 May 2019 04:42:32 +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 5F01F28782 for ; Wed, 22 May 2019 04:42:31 +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 561881861; Wed, 22 May 2019 06:35:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 561881861 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499795; bh=6svWxfvK8+Qg3rpo49A1tC2csCBW+fE7sh1XeS9rxeU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=LXtK2L0RwAwDOqb1pwjbGm9XbnxJq4I/OPCXOWHe7KnMxJHwVxL/WX53Xr7LFLsJi VFULwGKc0kTKbUVBzb1TlbLzGu36Q54qW9mMCfOFk4rJripgWjO1gU62zK0swSxiEs Hzj0V5gErsOwMWrOgxyoU/Of1GhnO7XtJokLKkrw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B545EF898D7; Wed, 22 May 2019 05:46:44 +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 19CEDF898D4; Wed, 22 May 2019 05:46:43 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id E2745F898D0 for ; Wed, 22 May 2019 05:46:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E2745F898D0 Date: 22 May 2019 12:46:38 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627746" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:46:38 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 8A0D74009407; Wed, 22 May 2019 12:46:38 +0900 (JST) Message-ID: <87d0kbkvv3.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 086/145] ASoC: fsl: imx-sgtl5000: 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 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/fsl/imx-sgtl5000.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index bf8597f..15e8b93 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -55,6 +55,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) struct platform_device *ssi_pdev; struct i2c_client *codec_dev; struct imx_sgtl5000_data *data = NULL; + struct snd_soc_dai_link_component *comp; int int_port, ext_port; int ret; @@ -122,6 +123,12 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) goto fail; } + comp = devm_kzalloc(&pdev->dev, 3 * sizeof(*comp), GFP_KERNEL); + if (!comp) { + ret = -ENOMEM; + goto fail; + } + data->codec_clk = clk_get(&codec_dev->dev, NULL); if (IS_ERR(data->codec_clk)) { ret = PTR_ERR(data->codec_clk); @@ -130,12 +137,20 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) data->clk_frequency = clk_get_rate(data->codec_clk); + data->dai.cpus = &comp[0]; + data->dai.codecs = &comp[1]; + data->dai.platforms = &comp[2]; + + data->dai.num_cpus = 1; + data->dai.num_codecs = 1; + data->dai.num_platforms = 1; + data->dai.name = "HiFi"; data->dai.stream_name = "HiFi"; - data->dai.codec_dai_name = "sgtl5000"; - data->dai.codec_of_node = codec_np; - data->dai.cpu_of_node = ssi_np; - data->dai.platform_of_node = ssi_np; + data->dai.codecs->dai_name = "sgtl5000"; + data->dai.codecs->of_node = codec_np; + data->dai.cpus->of_node = ssi_np; + data->dai.platforms->of_node = ssi_np; data->dai.init = &imx_sgtl5000_dai_init; data->dai.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM; From patchwork Wed May 22 03:46:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954859 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 97A7E6C5 for ; Wed, 22 May 2019 04:47:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88BE828610 for ; Wed, 22 May 2019 04:47:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D20928B5C; Wed, 22 May 2019 04:47:33 +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 6568828610 for ; Wed, 22 May 2019 04:47:31 +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 574D1184D; Wed, 22 May 2019 06:36:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 574D1184D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499834; bh=E2jJqIEg2HGyj9CR6PYUuzygjm3YIRxOSmIRUfteg5k=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=AAie51J7CR21kyKUKu8MGqKaP56g45usQEmIdx4AFXWqM75aSjOLJmo9UyXN2lOnf jnzm4P3v/V9IOpqu9wV4EFWcUvR5aCdaDtAL4CNgJuocLJrP1nHMBKgbIfcBFrNrYx Hx/yOm3jdFh1l3NkjDY+54AEg2LYwAAEvCSWmWR0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 97241F8975E; Wed, 22 May 2019 05:46:52 +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 61CE7F898D9; Wed, 22 May 2019 05:46:48 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 9733BF898D4 for ; Wed, 22 May 2019 05:46:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9733BF898D4 Date: 22 May 2019 12:46:42 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627749" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:46:42 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 611414171CBD; Wed, 22 May 2019 12:46:42 +0900 (JST) Message-ID: <87blzvkvv0.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 087/145] ASoC: fsl: imx-mc13783: 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 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/fsl/imx-mc13783.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/imx-mc13783.c b/sound/soc/fsl/imx-mc13783.c index 545815a..2b67968 100644 --- a/sound/soc/fsl/imx-mc13783.c +++ b/sound/soc/fsl/imx-mc13783.c @@ -46,17 +46,19 @@ static const struct snd_soc_ops imx_mc13783_hifi_ops = { .hw_params = imx_mc13783_hifi_hw_params, }; +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("imx-ssi.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("mc13783-codec", "mc13783-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("imx-ssi.0"))); + static struct snd_soc_dai_link imx_mc13783_dai_mc13783[] = { { .name = "MC13783", .stream_name = "Sound", - .codec_dai_name = "mc13783-hifi", - .codec_name = "mc13783-codec", - .cpu_dai_name = "imx-ssi.0", - .platform_name = "imx-ssi.0", .ops = &imx_mc13783_hifi_ops, .symmetric_rates = 1, .dai_fmt = FMT_SSI, + SND_SOC_DAILINK_REG(hifi), }, }; From patchwork Wed May 22 03:46:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954861 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 13FF81708 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02D0D28610 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAF9128B52; Wed, 22 May 2019 04:47:33 +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 9C52528830 for ; Wed, 22 May 2019 04:47:31 +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 B1F58186D; Wed, 22 May 2019 06:37:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B1F58186D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499871; bh=/78f8IPDj6kFrHpgZREVtmZWTnoeeNEV/KNw351uF1w=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=nfm9JImhABPSAIQDLIvl9k9NNY7apHU13eGIJTLhQsMANMTzJb1XjPOQV4qxjBKpo rJ0lr6W4Jfpn480dprr8h+HGmW+zAtJBOePG7Xs3Jx7HvxE3dRr2JzgD2n8gKkkTiN DU6WjDF4umYmRlse4aDVSvz7edJB0x8iliUl1ElI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8A1C7F898DC; Wed, 22 May 2019 05:46:54 +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 5D58EF89766; Wed, 22 May 2019 05:46:50 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 8CEB0F898D4 for ; Wed, 22 May 2019 05:46:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8CEB0F898D4 Date: 22 May 2019 12:46:46 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425663" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:46:46 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 56DAF4003EC0; Wed, 22 May 2019 12:46:46 +0900 (JST) Message-ID: <87a7ffkvuw.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 088/145] ASoC: fsl: pcm030-audio-fabric: 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 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/fsl/pcm030-audio-fabric.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index a7fe4ad..af3c3b9 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c @@ -23,20 +23,26 @@ struct pcm030_audio_data { struct platform_device *codec_device; }; +SND_SOC_DAILINK_DEFS(analog, + DAILINK_COMP_ARRAY(COMP_CPU("mpc5200-psc-ac97.0")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(iec958, + DAILINK_COMP_ARRAY(COMP_CPU("mpc5200-psc-ac97.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-aux")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link pcm030_fabric_dai[] = { { .name = "AC97.0", .stream_name = "AC97 Analog", - .codec_dai_name = "wm9712-hifi", - .cpu_dai_name = "mpc5200-psc-ac97.0", - .codec_name = "wm9712-codec", + SND_SOC_DAILINK_REG(analog), }, { .name = "AC97.1", .stream_name = "AC97 IEC958", - .codec_dai_name = "wm9712-aux", - .cpu_dai_name = "mpc5200-psc-ac97.1", - .codec_name = "wm9712-codec", + SND_SOC_DAILINK_REG(iec958), }, }; @@ -76,7 +82,7 @@ static int pcm030_fabric_probe(struct platform_device *op) } for_each_card_prelinks(card, i, dai_link) - dai_link->platform_of_node = platform_np; + dai_link->platforms->of_node = platform_np; ret = request_module("snd-soc-wm9712"); if (ret) From patchwork Wed May 22 03:46:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954853 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 AB72314C0 for ; Wed, 22 May 2019 04:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B2F8286BF for ; Wed, 22 May 2019 04:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E21C28B5A; Wed, 22 May 2019 04:47:32 +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 7752B286BF for ; Wed, 22 May 2019 04:47:31 +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 5EA251875; Wed, 22 May 2019 06:37:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5EA251875 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499912; bh=lHZo9JSlTJwU70ExonChvgntvA+BhnC3FXFrETM0i74=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pCTDYhrxLUwMGBNkP58Dd8Y1qpfXodpJk2wuowm6tg2jzGZtuFyh5eWFcYFNLH+uN J/SRAzmg4FPQUxwAgel5nLS7RzrhvuzZLjySQ3O0ihXAgKl20SFWUI/OcJ7Odkl0kf 8DYbkIYvzEwwzv6V/2gK54eUBSMPEoLPU9ccxq1c= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 10B66F89767; Wed, 22 May 2019 05:46:57 +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 2FCD8F898E1; Wed, 22 May 2019 05:46:56 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id C847BF89766 for ; Wed, 22 May 2019 05:46:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C847BF89766 Date: 22 May 2019 12:46:50 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627755" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:46:50 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 819664009405; Wed, 22 May 2019 12:46:50 +0900 (JST) Message-ID: <878suzkvur.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 089/145] ASoC: fsl: imx-audmix: 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 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/fsl/imx-audmix.c | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c index 9aaf3e5..9e1cb18 100644 --- a/sound/soc/fsl/imx-audmix.c +++ b/sound/soc/fsl/imx-audmix.c @@ -205,6 +205,15 @@ static int imx_audmix_probe(struct platform_device *pdev) return -ENOMEM; for (i = 0; i < num_dai; i++) { + struct snd_soc_dai_link_component *dlc; + + /* for CPU/Codec/Platform x 2 */ + dlc = devm_kzalloc(&pdev->dev, 6 * sizeof(*dlc), GFP_KERNEL); + if (!dlc) { + dev_err(&pdev->dev, "failed to allocate dai_link\n"); + return -ENOMEM; + } + ret = of_parse_phandle_with_args(audmix_np, "dais", NULL, i, &args); if (ret < 0) { @@ -231,13 +240,21 @@ static int imx_audmix_probe(struct platform_device *pdev) dai_name, "CPU-Capture"); } + priv->dai[i].cpus = &dlc[0]; + priv->dai[i].codecs = &dlc[1]; + priv->dai[i].platforms = &dlc[2]; + + priv->dai[i].num_cpus = 1; + priv->dai[i].num_codecs = 1; + priv->dai[i].num_platforms = 1; + priv->dai[i].name = dai_name; priv->dai[i].stream_name = "HiFi-AUDMIX-FE"; - priv->dai[i].codec_dai_name = "snd-soc-dummy-dai"; - priv->dai[i].codec_name = "snd-soc-dummy"; - priv->dai[i].cpu_of_node = args.np; - priv->dai[i].cpu_dai_name = dev_name(&cpu_pdev->dev); - priv->dai[i].platform_of_node = args.np; + priv->dai[i].codecs->dai_name = "snd-soc-dummy-dai"; + priv->dai[i].codecs->name = "snd-soc-dummy"; + priv->dai[i].cpus->of_node = args.np; + priv->dai[i].cpus->dai_name = dev_name(&cpu_pdev->dev); + priv->dai[i].platforms->of_node = args.np; priv->dai[i].dynamic = 1; priv->dai[i].dpcm_playback = 1; priv->dai[i].dpcm_capture = (i == 0 ? 1 : 0); @@ -252,12 +269,20 @@ static int imx_audmix_probe(struct platform_device *pdev) be_cp = devm_kasprintf(&pdev->dev, GFP_KERNEL, "AUDMIX-Capture-%d", i); + priv->dai[num_dai + i].cpus = &dlc[3]; + priv->dai[num_dai + i].codecs = &dlc[4]; + priv->dai[num_dai + i].platforms = &dlc[5]; + + priv->dai[num_dai + i].num_cpus = 1; + priv->dai[num_dai + i].num_codecs = 1; + priv->dai[num_dai + i].num_platforms = 1; + priv->dai[num_dai + i].name = be_name; - priv->dai[num_dai + i].codec_dai_name = "snd-soc-dummy-dai"; - priv->dai[num_dai + i].codec_name = "snd-soc-dummy"; - priv->dai[num_dai + i].cpu_of_node = audmix_np; - priv->dai[num_dai + i].cpu_dai_name = be_name; - priv->dai[num_dai + i].platform_name = "snd-soc-dummy"; + priv->dai[num_dai + i].codecs->dai_name = "snd-soc-dummy-dai"; + priv->dai[num_dai + i].codecs->name = "snd-soc-dummy"; + priv->dai[num_dai + i].cpus->of_node = audmix_np; + priv->dai[num_dai + i].cpus->dai_name = be_name; + priv->dai[num_dai + i].platforms->name = "snd-soc-dummy"; priv->dai[num_dai + i].no_pcm = 1; priv->dai[num_dai + i].dpcm_playback = 1; priv->dai[num_dai + i].dpcm_capture = 1; From patchwork Wed May 22 03:47:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954855 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 D609E1908 for ; Wed, 22 May 2019 04:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C75A31FF29 for ; Wed, 22 May 2019 04:47:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5EFD1FF83; Wed, 22 May 2019 04:47:32 +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 9807428782 for ; Wed, 22 May 2019 04:47:31 +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 AA7501874; Wed, 22 May 2019 06:38:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AA7501874 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499952; bh=sdS8EH6mgfMRYReAdpT51YalrjegrQombhsOdJF2ojE=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kXb3Ro+bf0nGEUgHb3bT+RTiex0MZUWUEYGgwHH7rFzHXjKYbOElAysH2Ma0yIpUN 4cqaFCv9tDUecvbzhDng5GxDh8si1KetSwyUwDSzgnKdFITJ7tg8n2u73UAiPmcolH fJlWKWJXnkAKIJaW4AhaEnmf5GkcH/wN3ytiS58c= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1F272F898DD; Wed, 22 May 2019 05:47: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 3CF7FF8976B; Wed, 22 May 2019 05:47:08 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 574AAF8975C for ; Wed, 22 May 2019 05:47:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 574AAF8975C Date: 22 May 2019 12:47:03 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627771" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:47:03 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 186534171CBC; Wed, 22 May 2019 12:47:03 +0900 (JST) Message-ID: <877eajkvuf.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 090/145] ASoC: jz4740: qi_lb60: 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 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/jz4740/qi_lb60.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/jz4740/qi_lb60.c b/sound/soc/jz4740/qi_lb60.c index 5358699..45bdcaf 100644 --- a/sound/soc/jz4740/qi_lb60.c +++ b/sound/soc/jz4740/qi_lb60.c @@ -49,15 +49,17 @@ static const struct snd_soc_dapm_route qi_lb60_routes[] = { {"Speaker", NULL, "ROUT"}, }; +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("jz4740-i2s")), + DAILINK_COMP_ARRAY(COMP_CODEC("jz4740-codec", "jz4740-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("jz4740-i2s"))); + static struct snd_soc_dai_link qi_lb60_dai = { .name = "jz4740", .stream_name = "jz4740", - .cpu_dai_name = "jz4740-i2s", - .platform_name = "jz4740-i2s", - .codec_dai_name = "jz4740-hifi", - .codec_name = "jz4740-codec", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, + SND_SOC_DAILINK_REG(hifi), }; static struct snd_soc_card qi_lb60_card = { From patchwork Wed May 22 03:47:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954857 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 1E5C418E8 for ; Wed, 22 May 2019 04:47:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D7801FF29 for ; Wed, 22 May 2019 04:47:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 019E828782; Wed, 22 May 2019 04:47:32 +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 D196728B58 for ; Wed, 22 May 2019 04:47:31 +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 B02E81879; Wed, 22 May 2019 06:39:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B02E81879 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558499990; bh=AI8tHk307WHbxPAkbiDJ2vV38lkVeQanmHz7Q70xrXE=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hTiaW1scPR1iCKadyPSvEXV5c1vZe802EqYBpuaju7rRTE+uscb2aVdtTBR0WkHnd U3j8iJt3xIAKWeD5SIFjxW+qguEAeaQRhULgg6isUvLEGrxnOlI3rcemTdEwC1ij07 RWpSJL3mjYG/YfYJ5mbGuuqyTNFmYAwfBYoS7X34= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4D8BEF898E5; Wed, 22 May 2019 05:47:13 +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 23AC8F898E6; Wed, 22 May 2019 05:47:12 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 501EBF89760 for ; Wed, 22 May 2019 05:47:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 501EBF89760 Date: 22 May 2019 12:47:06 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627776" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:47:06 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id D2A7F4171DF1; Wed, 22 May 2019 12:47:06 +0900 (JST) Message-ID: <875zq3kvub.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 091/145] ASoC: meson: axg-card: 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 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/meson/axg-card.c | 57 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index db0a7fc..fb03258 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -115,7 +115,7 @@ static void axg_card_clean_references(struct axg_card *priv) if (card->dai_link) { for_each_card_prelinks(card, i, link) { - of_node_put(link->cpu_of_node); + of_node_put(link->cpus->of_node); for_each_link_codecs(link, j, codec) of_node_put(codec->of_node); } @@ -254,6 +254,7 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card, struct axg_card *priv = snd_soc_card_get_drvdata(card); struct snd_soc_dai_link *pad = &card->dai_link[*index]; struct snd_soc_dai_link *lb; + struct snd_soc_dai_link_component *dlc; int ret; /* extend links */ @@ -267,11 +268,20 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card, if (!lb->name) return -ENOMEM; + dlc = devm_kzalloc(card->dev, 2 * sizeof(*dlc), GFP_KERNEL); + if (!dlc) + return -ENOMEM; + + lb->cpus = &dlc[0]; + lb->codecs = &dlc[1]; + lb->num_cpus = 1; + lb->num_codecs = 1; + lb->stream_name = lb->name; - lb->cpu_of_node = pad->cpu_of_node; - lb->cpu_dai_name = "TDM Loopback"; - lb->codec_name = "snd-soc-dummy"; - lb->codec_dai_name = "snd-soc-dummy-dai"; + lb->cpus->of_node = pad->cpus->of_node; + lb->cpus->dai_name = "TDM Loopback"; + lb->codecs->name = "snd-soc-dummy"; + lb->codecs->dai_name = "snd-soc-dummy-dai"; lb->dpcm_capture = 1; lb->no_pcm = 1; lb->ops = &axg_card_tdm_be_ops; @@ -284,7 +294,7 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card, * axg_card_clean_references() will iterate over this link, * make sure the node count is balanced */ - of_node_get(lb->cpu_of_node); + of_node_get(lb->cpus->of_node); /* Let add_links continue where it should */ *index += 1; @@ -426,7 +436,7 @@ static int axg_card_parse_tdm(struct snd_soc_card *card, /* Setup tdm link */ link->ops = &axg_card_tdm_be_ops; link->init = axg_card_tdm_dai_init; - link->dai_fmt = axg_card_parse_daifmt(node, link->cpu_of_node); + link->dai_fmt = axg_card_parse_daifmt(node, link->cpus->of_node); of_property_read_u32(node, "mclk-fs", &be->mclk_fs); @@ -499,12 +509,21 @@ static int axg_card_set_fe_link(struct snd_soc_card *card, struct device_node *node, bool is_playback) { + struct snd_soc_dai_link_component *codec; + + codec = devm_kzalloc(card->dev, sizeof(*codec), GFP_KERNEL); + if (!codec) + return -ENOMEM; + + link->codecs = codec; + link->num_codecs = 1; + link->dynamic = 1; link->dpcm_merged_format = 1; link->dpcm_merged_chan = 1; link->dpcm_merged_rate = 1; - link->codec_dai_name = "snd-soc-dummy-dai"; - link->codec_name = "snd-soc-dummy"; + link->codecs->dai_name = "snd-soc-dummy-dai"; + link->codecs->name = "snd-soc-dummy"; if (is_playback) link->dpcm_playback = 1; @@ -538,16 +557,24 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np, int *index) { struct snd_soc_dai_link *dai_link = &card->dai_link[*index]; + struct snd_soc_dai_link_component *cpu; int ret; - ret = axg_card_parse_dai(card, np, &dai_link->cpu_of_node, - &dai_link->cpu_dai_name); + cpu = devm_kzalloc(card->dev, sizeof(*cpu), GFP_KERNEL); + if (!cpu) + return -ENOMEM; + + dai_link->cpus = cpu; + dai_link->num_cpus = 1; + + ret = axg_card_parse_dai(card, np, &dai_link->cpus->of_node, + &dai_link->cpus->dai_name); if (ret) return ret; - if (axg_card_cpu_is_playback_fe(dai_link->cpu_of_node)) + if (axg_card_cpu_is_playback_fe(dai_link->cpus->of_node)) ret = axg_card_set_fe_link(card, dai_link, np, true); - else if (axg_card_cpu_is_capture_fe(dai_link->cpu_of_node)) + else if (axg_card_cpu_is_capture_fe(dai_link->cpus->of_node)) ret = axg_card_set_fe_link(card, dai_link, np, false); else ret = axg_card_set_be_link(card, dai_link, np); @@ -555,9 +582,9 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np, if (ret) return ret; - if (axg_card_cpu_is_tdm_iface(dai_link->cpu_of_node)) + if (axg_card_cpu_is_tdm_iface(dai_link->cpus->of_node)) ret = axg_card_parse_tdm(card, np, index); - else if (axg_card_cpu_is_codec(dai_link->cpu_of_node)) + else if (axg_card_cpu_is_codec(dai_link->cpus->of_node)) dai_link->params = &codec_params; return ret; From patchwork Wed May 22 03:47:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954869 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 7225818E8 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62E0B1FF29 for ; Wed, 22 May 2019 04:47:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56CCD28B5D; Wed, 22 May 2019 04:47:34 +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 7136728B55 for ; Wed, 22 May 2019 04:47:33 +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 0ADD3188D; Wed, 22 May 2019 06:39:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0ADD3188D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500041; bh=GElZixMf7mSP8/0ighZYY5i1//zH2eXWtE3dnTTvBjA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=oO/JAsnHDJup390pyRJK5dMzd3nMjiF1nTeiQJ9Y2Mb/XFPTLwFyfVEIm9mnqTr3D Typ+K6JFy9brM9bF2KFhliK4GQKRPN3aMUD+ZNL45STpHXi4vn4aKNAHJukv4j7Zb2 82RclOIQPYxobS4VSNRFiTK+0FB34nGpCpDSz6b0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8EFAAF898E6; Wed, 22 May 2019 05:47:17 +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 654E8F898F1; Wed, 22 May 2019 05:47:16 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 50BE1F898E6 for ; Wed, 22 May 2019 05:47:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 50BE1F898E6 Date: 22 May 2019 12:47:11 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627780" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:47:11 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id D11EF4003EB5; Wed, 22 May 2019 12:47:11 +0900 (JST) Message-ID: <874l5nkvu6.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 092/145] ASoC: mxs: mxs-sgtl5000: 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 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/mxs/mxs-sgtl5000.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c index 2b3f240..459fced 100644 --- a/sound/soc/mxs/mxs-sgtl5000.c +++ b/sound/soc/mxs/mxs-sgtl5000.c @@ -75,21 +75,32 @@ static const struct snd_soc_ops mxs_sgtl5000_hifi_ops = { #define MXS_SGTL5000_DAI_FMT (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | \ SND_SOC_DAIFMT_CBS_CFS) + +SND_SOC_DAILINK_DEFS(hifi_tx, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(hifi_rx, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link mxs_sgtl5000_dai[] = { { .name = "HiFi Tx", .stream_name = "HiFi Playback", - .codec_dai_name = "sgtl5000", .dai_fmt = MXS_SGTL5000_DAI_FMT, .ops = &mxs_sgtl5000_hifi_ops, .playback_only = true, + SND_SOC_DAILINK_REG(hifi_tx), }, { .name = "HiFi Rx", .stream_name = "HiFi Capture", - .codec_dai_name = "sgtl5000", .dai_fmt = MXS_SGTL5000_DAI_FMT, .ops = &mxs_sgtl5000_hifi_ops, .capture_only = true, + SND_SOC_DAILINK_REG(hifi_rx), }, }; @@ -124,12 +135,12 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev) } for (i = 0; i < 2; i++) { - mxs_sgtl5000_dai[i].codec_name = NULL; - mxs_sgtl5000_dai[i].codec_of_node = codec_np; - mxs_sgtl5000_dai[i].cpu_dai_name = NULL; - mxs_sgtl5000_dai[i].cpu_of_node = saif_np[i]; - mxs_sgtl5000_dai[i].platform_name = NULL; - mxs_sgtl5000_dai[i].platform_of_node = saif_np[i]; + mxs_sgtl5000_dai[i].codecs->name = NULL; + mxs_sgtl5000_dai[i].codecs->of_node = codec_np; + mxs_sgtl5000_dai[i].cpus->dai_name = NULL; + mxs_sgtl5000_dai[i].cpus->of_node = saif_np[i]; + mxs_sgtl5000_dai[i].platforms->name = NULL; + mxs_sgtl5000_dai[i].platforms->of_node = saif_np[i]; } of_node_put(codec_np); From patchwork Wed May 22 03:47:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954837 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 38E396C5 for ; Wed, 22 May 2019 04:47:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25B091FF29 for ; Wed, 22 May 2019 04:47:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1291528B54; Wed, 22 May 2019 04:47:30 +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 618F61FF29 for ; Wed, 22 May 2019 04:47:29 +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 30F371897; Wed, 22 May 2019 06:40:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 30F371897 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500075; bh=HTF5FQHZoFthsSXz/xLtjEdlh5Qqmhb2lZK7kwxwYWo=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZFbR+wZJOBBfoR5iPZNmqDwn/cVotZHvx3Lc+Ozeh3zQ/Ch2E/W9Dari+KI5mIymV l9IWMpeSiNYUFD0Jr0emwJ/0s5dYskpDsi2kEFOhUxIwjxXQVPmFZX6i1F7yCdjqNv v2rjSszfqvsAEsQEYRnJsHA9Axg5Rb4kHAhU3Sd4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5A874F898F4; Wed, 22 May 2019 05:47:21 +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 49192F898F6; Wed, 22 May 2019 05:47:19 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 7762BF898ED for ; Wed, 22 May 2019 05:47:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7762BF898ED Date: 22 May 2019 12:47:16 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627782" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:47:16 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 035C84171CBC; Wed, 22 May 2019 12:47:16 +0900 (JST) Message-ID: <8736l7kvu2.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 093/145] ASoC: nuc900: nuc900-audio: 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 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/nuc900/nuc900-audio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/nuc900/nuc900-audio.c b/sound/soc/nuc900/nuc900-audio.c index 2f6e6fd..f207d3e 100644 --- a/sound/soc/nuc900/nuc900-audio.c +++ b/sound/soc/nuc900/nuc900-audio.c @@ -21,13 +21,15 @@ #include "nuc900-audio.h" +SND_SOC_DAILINK_DEFS(ac97, + DAILINK_COMP_ARRAY(COMP_CPU("nuc900-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("ac97-codec", "ac97-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("nuc900-pcm-audio"))); + static struct snd_soc_dai_link nuc900evb_ac97_dai = { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "nuc900-ac97", - .codec_dai_name = "ac97-hifi", - .codec_name = "ac97-codec", - .platform_name = "nuc900-pcm-audio", + SND_SOC_DAILINK_REG(ac97), }; static struct snd_soc_card nuc900evb_audio_machine = { From patchwork Wed May 22 03:47:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954787 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 9E46E14C0 for ; Wed, 22 May 2019 04:41:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82CF328751 for ; Wed, 22 May 2019 04:41:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76C4728B52; Wed, 22 May 2019 04:41:56 +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 68CD228751 for ; Wed, 22 May 2019 04:41:55 +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 7C9B818A2; Wed, 22 May 2019 06:41:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7C9B818A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500113; bh=uoTr3n5ooUWB79y1Yz5nfXwh6KOT0QConwn1SQjVu4o=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=t3BrfiJPcT6GHgINPYa/1Q2tc488pjA+2bNme6YwF6ov76PUh8NFxBpUOLmmoSWr9 rkrjfF9ushEr7skTWZ4n7329+kpLIxs2QWTcPDu8hKEQTJcEmidLyTRsYgoVaE23Pd 5Nu78ilAuUV2VR6E6P90HkLZiTeGwhEt/C/bXypI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6794CF898F9; Wed, 22 May 2019 05:47:24 +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 2F622F898FB; Wed, 22 May 2019 05:47:23 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 746BBF898F6 for ; Wed, 22 May 2019 05:47:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 746BBF898F6 Date: 22 May 2019 12:47:20 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627789" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:47:20 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 031DF4171DEB; Wed, 22 May 2019 12:47:20 +0900 (JST) Message-ID: <871s0rkvty.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 094/145] ASoC: qcom: storm: 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 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; } From patchwork Wed May 22 03:47:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954821 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 33BF413AD for ; Wed, 22 May 2019 04:42:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24E45289F9 for ; Wed, 22 May 2019 04:42:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 197BF28B51; Wed, 22 May 2019 04:42:36 +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 68B3928B3D for ; Wed, 22 May 2019 04:42:35 +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 AE98418A9; Wed, 22 May 2019 06:41:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AE98418A9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500153; bh=fXGNR6pdOgZ5qW8AFnkFp7ceOJNi4hR9EElMOzxoIOo=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ru1475wa05wCz6V6PLQT/UMndozWHmvIipfMsxbfcmnDEAZ2en6YaompH2d626RNa 8BDQ9Jg0oY7IKtRybkxmdbDEOPekKOe+o/Re0gepP6hYsOMHGExtSHbe94wsp0/mky VO9i6p7g54zL1v8aFgYjakceINdha7o1Ujj6ws9o= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D0B63F898FF; Wed, 22 May 2019 05:47:28 +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 1A594F89900; Wed, 22 May 2019 05:47:27 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 80750F898FA for ; Wed, 22 May 2019 05:47:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 80750F898FA Date: 22 May 2019 12:47:24 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627792" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:47:24 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 0F03E4171DEB; Wed, 22 May 2019 12:47:24 +0900 (JST) Message-ID: <87zhnfjh9e.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 095/145] ASoC: qcom: common: 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 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/common.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index 5661025..c7a8785 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -14,6 +14,7 @@ int qcom_snd_parse_of(struct snd_soc_card *card) struct device *dev = card->dev; struct snd_soc_dai_link *link; struct of_phandle_args args; + struct snd_soc_dai_link_component *dlc; int ret, num_links; ret = snd_soc_of_parse_card_name(card, "model"); @@ -40,6 +41,17 @@ int qcom_snd_parse_of(struct snd_soc_card *card) card->num_links = num_links; link = card->dai_link; + + dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL); + if (!dlc) + return -ENOMEM; + + link->cpus = &dlc[0]; + link->platforms = &dlc[1]; + + link->num_cpus = 1; + link->num_platforms = 1; + for_each_child_of_node(dev->of_node, np) { cpu = of_get_child_by_name(np, "cpu"); platform = of_get_child_by_name(np, "platform"); @@ -57,20 +69,20 @@ int qcom_snd_parse_of(struct snd_soc_card *card) dev_err(card->dev, "error getting cpu phandle\n"); goto err; } - link->cpu_of_node = args.np; + link->cpus->of_node = args.np; link->id = args.args[0]; - ret = snd_soc_of_get_dai_name(cpu, &link->cpu_dai_name); + ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name); if (ret) { dev_err(card->dev, "error getting cpu dai name\n"); goto err; } if (codec && platform) { - link->platform_of_node = of_parse_phandle(platform, + link->platforms->of_node = of_parse_phandle(platform, "sound-dai", 0); - if (!link->platform_of_node) { + if (!link->platforms->of_node) { dev_err(card->dev, "platform dai not found\n"); ret = -EINVAL; goto err; @@ -84,9 +96,16 @@ int qcom_snd_parse_of(struct snd_soc_card *card) link->no_pcm = 1; link->ignore_pmdown_time = 1; } else { - link->platform_of_node = link->cpu_of_node; - link->codec_dai_name = "snd-soc-dummy-dai"; - link->codec_name = "snd-soc-dummy"; + dlc = devm_kzalloc(dev, sizeof(*dlc), GFP_KERNEL); + if (!dlc) + return -ENOMEM; + + link->codecs = dlc; + link->num_codecs = 1; + + link->platforms->of_node = link->cpus->of_node; + link->codecs->dai_name = "snd-soc-dummy-dai"; + link->codecs->name = "snd-soc-dummy"; link->dynamic = 1; } From patchwork Wed May 22 03:47:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954823 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 3336F14C0 for ; Wed, 22 May 2019 04:43:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2413A28B51 for ; Wed, 22 May 2019 04:43:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18F9728B57; Wed, 22 May 2019 04:43:17 +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 3065628B51 for ; Wed, 22 May 2019 04:43:16 +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 78CA418A6; Wed, 22 May 2019 06:42:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 78CA418A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500194; bh=ixeB0Dv1nCO71z2PgdmhGCA8wAl9XP4dcPgzCO9fNcg=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=LqzkBEyMq2wpeeQ38x6/qvW7r7D2s5ZuRJMWECu0DVGLj+EfSJMNL79bjtmMmGrNb 4lhFYB6gPm5fjfQPkyXE8Sx5RtwD4d3L6EIHFPHGmSyQ2DQKjAEIDhNRRxSbFbXAW3 RwccqE0lU6JFs+b6i8f1TK9nLtTViQkRjWUnBGXE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 360A9F89903; Wed, 22 May 2019 05:47:34 +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 F1BE3F89904; Wed, 22 May 2019 05:47:32 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id CCD2DF89903 for ; Wed, 22 May 2019 05:47:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CCD2DF89903 Date: 22 May 2019 12:47:28 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627795" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:47:28 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 589064171DEB; Wed, 22 May 2019 12:47:28 +0900 (JST) Message-ID: <87y32zjh9a.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 096/145] ASoC: qcom: apq8016_sbc: 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 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/apq8016_sbc.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index 4b55993..717542c 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -126,6 +126,7 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) struct snd_soc_dai_link *link; struct device_node *np, *codec, *cpu, *node = dev->of_node; struct apq8016_sbc_data *data; + struct snd_soc_dai_link_component *dlc; int ret, num_links; ret = snd_soc_of_parse_card_name(card, "qcom,model"); @@ -158,6 +159,16 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) link = data->dai_link; + dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL); + if (!dlc) + return ERR_PTR(-ENOMEM); + + link->cpus = &dlc[0]; + link->platforms = &dlc[1]; + + link->num_cpus = 1; + link->num_platforms = 1; + for_each_child_of_node(node, np) { cpu = of_get_child_by_name(np, "cpu"); codec = of_get_child_by_name(np, "codec"); @@ -168,14 +179,14 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) goto error; } - link->cpu_of_node = of_parse_phandle(cpu, "sound-dai", 0); - if (!link->cpu_of_node) { + link->cpus->of_node = of_parse_phandle(cpu, "sound-dai", 0); + if (!link->cpus->of_node) { dev_err(card->dev, "error getting cpu phandle\n"); ret = -EINVAL; goto error; } - ret = snd_soc_of_get_dai_name(cpu, &link->cpu_dai_name); + ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name); if (ret) { dev_err(card->dev, "error getting cpu dai name\n"); goto error; @@ -188,7 +199,7 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) goto error; } - link->platform_of_node = link->cpu_of_node; + link->platforms->of_node = link->cpus->of_node; ret = of_property_read_string(np, "link-name", &link->name); if (ret) { dev_err(card->dev, "error getting codec dai_link name\n"); From patchwork Wed May 22 03:47:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954825 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 020DF13AD for ; Wed, 22 May 2019 04:43:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E584628B36 for ; Wed, 22 May 2019 04:43:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA29328B3D; Wed, 22 May 2019 04:43:55 +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 281F928B36 for ; Wed, 22 May 2019 04:43:55 +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 8594317BD; Wed, 22 May 2019 06:43:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8594317BD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500233; bh=5pjGoYl3ZrEvTQtsqjgkoAm2nx/0bYWomkZ0XxusP5M=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hTWCnREq8So5T2x329My+QKo8bexmGeY6UU6wkQdTTJxiykSHRwlry+kW4vqyRkk4 uh1Znc4pd5hG4XrvzeZA9szlBapBc6gX2R4zuexynjJHcmLbUU664zsjP7XNG5DVug nR0kbs+m36Vjpjj4fPgjT1ijMxjDDOoDdKXL1CUs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 204D5F89765; Wed, 22 May 2019 05:47:39 +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 0DBFCF89909; Wed, 22 May 2019 05:47:37 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id CC383F89906 for ; Wed, 22 May 2019 05:47:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CC383F89906 Date: 22 May 2019 12:47:32 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425708" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:47:32 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 981884171E05; Wed, 22 May 2019 12:47:32 +0900 (JST) Message-ID: <87woijjh95.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 097/145] ASoC: rockchip: rk3399_gru_sound: 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 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/rockchip/rk3399_gru_sound.c | 51 +++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c index f2a51ae..5e27002 100644 --- a/sound/soc/rockchip/rk3399_gru_sound.c +++ b/sound/soc/rockchip/rk3399_gru_sound.c @@ -276,56 +276,85 @@ enum { DAILINK_RT5514_DSP, }; +SND_SOC_DAILINK_DEFS(cdndp, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "spdif-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(da7219, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "da7219-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(dmic, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "dmic-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(max98357a, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(rt5514, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5514-aif1")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + +SND_SOC_DAILINK_DEFS(rt5514_dsp, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_DUMMY()), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static const struct snd_soc_dai_link rockchip_dais[] = { [DAILINK_CDNDP] = { .name = "DP", .stream_name = "DP PCM", - .codec_dai_name = "spdif-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(cdndp), }, [DAILINK_DA7219] = { .name = "DA7219", .stream_name = "DA7219 PCM", - .codec_dai_name = "da7219-hifi", .init = rockchip_sound_da7219_init, .ops = &rockchip_sound_da7219_ops, /* set da7219 as slave */ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(da7219), }, [DAILINK_DMIC] = { .name = "DMIC", .stream_name = "DMIC PCM", - .codec_dai_name = "dmic-hifi", .ops = &rockchip_sound_dmic_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(dmic), }, [DAILINK_MAX98357A] = { .name = "MAX98357A", .stream_name = "MAX98357A PCM", - .codec_dai_name = "HiFi", .ops = &rockchip_sound_max98357a_ops, /* set max98357a as slave */ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(max98357a), }, [DAILINK_RT5514] = { .name = "RT5514", .stream_name = "RT5514 PCM", - .codec_dai_name = "rt5514-aif1", .ops = &rockchip_sound_rt5514_ops, /* set rt5514 as slave */ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(rt5514), }, /* RT5514 DSP for voice wakeup via spi bus */ [DAILINK_RT5514_DSP] = { .name = "RT5514 DSP", .stream_name = "Wake on Voice", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", + SND_SOC_DAILINK_REG(rt5514_dsp), }, }; @@ -507,10 +536,10 @@ static int rockchip_sound_of_parse_dais(struct device *dev, dai = &card->dai_link[card->num_links++]; *dai = rockchip_dais[index]; - if (!dai->codec_name) - dai->codec_of_node = np_codec; - dai->platform_of_node = np_cpu; - dai->cpu_of_node = np_cpu; + if (!dai->codecs->name) + dai->codecs->of_node = np_codec; + dai->platforms->of_node = np_cpu; + dai->cpus->of_node = np_cpu; if (card->num_dapm_routes + rockchip_routes[index].num_routes > num_routes) { From patchwork Wed May 22 03:47:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954827 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 04FF913AD for ; Wed, 22 May 2019 04:44:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E987B28B5B for ; Wed, 22 May 2019 04:44:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDFE828B54; Wed, 22 May 2019 04:44:32 +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 0313128B51 for ; Wed, 22 May 2019 04:44:32 +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 603DA17F1; Wed, 22 May 2019 06:43:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 603DA17F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500270; bh=faihg//jg5JGlfArZtCDRuaVYcr1PTFHBfKdi+FgGU0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ia3cZxrQt6zXpLdK2v7j3k2nHXdmbgVDWDrTUh/405T8HqrgyGUFZlxEwe4FsbR4y VirE1GNXkdnJBHysG1uXPNmXK3BpyW493WB2i/al8kzpt5U5EbDd4Cd63hMRAvcxPz iWLwz/QY43SDCVeIFKrTIpd/BEgdMSX57YD+K00E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5108AF89768; Wed, 22 May 2019 05:47:46 +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 32E4EF8990C; Wed, 22 May 2019 05:47:44 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 49CABF8975F for ; Wed, 22 May 2019 05:47:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 49CABF8975F Date: 22 May 2019 12:47:39 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627805" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:47:39 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id BE0B34009405; Wed, 22 May 2019 12:47:39 +0900 (JST) Message-ID: <87v9y3jh8y.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 098/145] ASoC: rockchip: rk3288_hdmi_analog: 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 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/rockchip/rk3288_hdmi_analog.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c index a472d5e..71ee16d 100644 --- a/sound/soc/rockchip/rk3288_hdmi_analog.c +++ b/sound/soc/rockchip/rk3288_hdmi_analog.c @@ -151,24 +151,21 @@ static const struct snd_soc_ops rk_ops = { .hw_params = rk_hw_params, }; -static struct snd_soc_dai_link_component rk_codecs[] = { - { }, - { - .name = "hdmi-audio-codec.2.auto", - .dai_name = "i2s-hifi", - }, -}; +SND_SOC_DAILINK_DEFS(audio, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, NULL), + COMP_CODEC("hdmi-audio-codec.2.auto", "i2s-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); static struct snd_soc_dai_link rk_dailink = { .name = "Codecs", .stream_name = "Audio", .init = rk_init, .ops = &rk_ops, - .codecs = rk_codecs, - .num_codecs = ARRAY_SIZE(rk_codecs), /* Set codecs as slave */ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(audio), }; static struct snd_soc_card snd_soc_card_rk = { @@ -244,15 +241,15 @@ static int snd_rk_mc_probe(struct platform_device *pdev) return ret; } - rk_dailink.cpu_of_node = of_parse_phandle(np, "rockchip,i2s-controller", + rk_dailink.cpus->of_node = of_parse_phandle(np, "rockchip,i2s-controller", 0); - if (!rk_dailink.cpu_of_node) { + if (!rk_dailink.cpus->of_node) { dev_err(&pdev->dev, "Property 'rockchip,i2s-controller' missing or invalid\n"); return -EINVAL; } - rk_dailink.platform_of_node = rk_dailink.cpu_of_node; + rk_dailink.platforms->of_node = rk_dailink.cpus->of_node; ret = snd_soc_of_parse_audio_routing(card, "rockchip,routing"); if (ret) { From patchwork Wed May 22 03:47:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954829 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 67D386C5 for ; Wed, 22 May 2019 04:45:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57950286BF for ; Wed, 22 May 2019 04:45:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4BF9B289D8; Wed, 22 May 2019 04:45:23 +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 8C6CD28987 for ; Wed, 22 May 2019 04:45:22 +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 E28E0182E; Wed, 22 May 2019 06:44:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E28E0182E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500321; bh=zDd0bkDsvWanQzbCc35zy4bTwGiZ+vq3gk7hYseZE3w=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Uuef7uIK7zvoLyljJwayrHUgkCfXMqmOXJXbuJy2uv5yRhTcDvGLxVpMS2h3D0YUd JDn/qx6rOUunAiC8ToKWg9dgFPWamKYnudAlZIDNZO0rVEFeOP2sZ2Ze3aZuBQ6VSW 0OXOPlNrNLuF6Lk6uYp6lq8voutS+cPKZcB/wuQs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 00396F8990D; Wed, 22 May 2019 05:47:51 +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 3F934F8975F; Wed, 22 May 2019 05:47:50 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id CFA71F8990D for ; Wed, 22 May 2019 05:47:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CFA71F8990D Date: 22 May 2019 12:47:46 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627811" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:47:46 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 5D1874171DEB; Wed, 22 May 2019 12:47:46 +0900 (JST) Message-ID: <87tvdnjh8s.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 099/145] ASoC: rockchip: rockchip_rt5645: 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 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/rockchip/rockchip_rt5645.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/sound/soc/rockchip/rockchip_rt5645.c b/sound/soc/rockchip/rockchip_rt5645.c index 881c324..e17f016 100644 --- a/sound/soc/rockchip/rockchip_rt5645.c +++ b/sound/soc/rockchip/rockchip_rt5645.c @@ -135,15 +135,20 @@ static const struct snd_soc_ops rk_aif1_ops = { .hw_params = rk_aif1_hw_params, }; +SND_SOC_DAILINK_DEFS(pcm, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5645-aif1")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link rk_dailink = { .name = "rt5645", .stream_name = "rt5645 PCM", - .codec_dai_name = "rt5645-aif1", .init = rk_init, .ops = &rk_aif1_ops, /* set rt5645 as slave */ .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_card_rk = { @@ -168,24 +173,24 @@ static int snd_rk_mc_probe(struct platform_device *pdev) /* register the soc card */ card->dev = &pdev->dev; - rk_dailink.codec_of_node = of_parse_phandle(np, + rk_dailink.codecs->of_node = of_parse_phandle(np, "rockchip,audio-codec", 0); - if (!rk_dailink.codec_of_node) { + if (!rk_dailink.codecs->of_node) { dev_err(&pdev->dev, "Property 'rockchip,audio-codec' missing or invalid\n"); return -EINVAL; } - rk_dailink.cpu_of_node = of_parse_phandle(np, + rk_dailink.cpus->of_node = of_parse_phandle(np, "rockchip,i2s-controller", 0); - if (!rk_dailink.cpu_of_node) { + if (!rk_dailink.cpus->of_node) { dev_err(&pdev->dev, "Property 'rockchip,i2s-controller' missing or invalid\n"); ret = -EINVAL; goto put_codec_of_node; } - rk_dailink.platform_of_node = rk_dailink.cpu_of_node; + rk_dailink.platforms->of_node = rk_dailink.cpus->of_node; ret = snd_soc_of_parse_card_name(card, "rockchip,model"); if (ret) { @@ -204,21 +209,21 @@ static int snd_rk_mc_probe(struct platform_device *pdev) return ret; put_cpu_of_node: - of_node_put(rk_dailink.cpu_of_node); - rk_dailink.cpu_of_node = NULL; + of_node_put(rk_dailink.cpus->of_node); + rk_dailink.cpus->of_node = NULL; put_codec_of_node: - of_node_put(rk_dailink.codec_of_node); - rk_dailink.codec_of_node = NULL; + of_node_put(rk_dailink.codecs->of_node); + rk_dailink.codecs->of_node = NULL; return ret; } static int snd_rk_mc_remove(struct platform_device *pdev) { - of_node_put(rk_dailink.cpu_of_node); - rk_dailink.cpu_of_node = NULL; - of_node_put(rk_dailink.codec_of_node); - rk_dailink.codec_of_node = NULL; + of_node_put(rk_dailink.cpus->of_node); + rk_dailink.cpus->of_node = NULL; + of_node_put(rk_dailink.codecs->of_node); + rk_dailink.codecs->of_node = NULL; return 0; } From patchwork Wed May 22 03:48:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954831 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 2E63E6C5 for ; Wed, 22 May 2019 04:46:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D20E1FF29 for ; Wed, 22 May 2019 04:46:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E10A205F6; Wed, 22 May 2019 04:46:00 +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 2C28C1FF29 for ; Wed, 22 May 2019 04:45:59 +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 8016A16B4; Wed, 22 May 2019 06:45:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8016A16B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500357; bh=klVSfUjANVraar1FxWuI9fdrhNrBf3XwCErUFefb6js=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GxlLpnXmwrGSSsiAw5saYAnCrF/t2ZKVfAoSJ6OJeZ91728AwieRYypJsk74neNB4 c/A0/TJUabDFoKOODfcN0H51mqKb3De8ehAWmlqwB0HSumYvSLGhAP5+2qBgO+4VHq NDtgh3TtQf+KXYw+ov1Robx1TUcSjDXbcSokLGTw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BF9B7F89918; Wed, 22 May 2019 05:48:07 +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 AF507F89919; Wed, 22 May 2019 05:48:06 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id C8DF1F89914 for ; Wed, 22 May 2019 05:48:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C8DF1F89914 Date: 22 May 2019 12:48:02 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627827" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:48:02 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 889B84171E05; Wed, 22 May 2019 12:48:02 +0900 (JST) Message-ID: <87sgt7jh8b.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 100/145] ASoC: rockchip: rockchip_max98090: 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 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/rockchip/rockchip_max98090.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sound/soc/rockchip/rockchip_max98090.c b/sound/soc/rockchip/rockchip_max98090.c index 789d6f1..fcb5c06 100644 --- a/sound/soc/rockchip/rockchip_max98090.c +++ b/sound/soc/rockchip/rockchip_max98090.c @@ -123,14 +123,19 @@ static const struct snd_soc_ops rk_aif1_ops = { .hw_params = rk_aif1_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 rk_dailink = { .name = "max98090", .stream_name = "Audio", - .codec_dai_name = "HiFi", .ops = &rk_aif1_ops, /* set max98090 as slave */ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(hifi), }; static int rk_98090_headset_init(struct snd_soc_component *component); @@ -184,23 +189,23 @@ static int snd_rk_mc_probe(struct platform_device *pdev) /* register the soc card */ card->dev = &pdev->dev; - rk_dailink.codec_of_node = of_parse_phandle(np, + rk_dailink.codecs->of_node = of_parse_phandle(np, "rockchip,audio-codec", 0); - if (!rk_dailink.codec_of_node) { + if (!rk_dailink.codecs->of_node) { dev_err(&pdev->dev, "Property 'rockchip,audio-codec' missing or invalid\n"); return -EINVAL; } - rk_dailink.cpu_of_node = of_parse_phandle(np, + rk_dailink.cpus->of_node = of_parse_phandle(np, "rockchip,i2s-controller", 0); - if (!rk_dailink.cpu_of_node) { + if (!rk_dailink.cpus->of_node) { dev_err(&pdev->dev, "Property 'rockchip,i2s-controller' missing or invalid\n"); return -EINVAL; } - rk_dailink.platform_of_node = rk_dailink.cpu_of_node; + rk_dailink.platforms->of_node = rk_dailink.cpus->of_node; rk_98090_headset_dev.codec_of_node = of_parse_phandle(np, "rockchip,headset-codec", 0); From patchwork Wed May 22 03:48:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954833 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 1302A6C5 for ; Wed, 22 May 2019 04:46:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01FD91FF29 for ; Wed, 22 May 2019 04:46:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E97F4205F6; Wed, 22 May 2019 04:46:36 +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 2D68F1FF29 for ; Wed, 22 May 2019 04:46:36 +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 87153174F; Wed, 22 May 2019 06:45:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 87153174F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500394; bh=c0+yzey4tJC7h2FfRhfHgpOO4C9QQ16kGu4ni/JnLOQ=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WCIEh6dbUosweNiMQCZYwu+RxuWqc2iJix5YLGZpJ21+1IgTXQvlJkcWmUNJQzasM 9WJJgQJxy/OiMvn3XvWOpYR49YEkIR2mdpIPH4O6WVHxI64HMxPPaBwVLqt1hdH/t2 +QHL//b7OrFk3V6n3IA5gtcU37iwf3Q5JzrEVq5M= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 412A5F8991E; Wed, 22 May 2019 05:48:14 +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 682D2F8991E; Wed, 22 May 2019 05:48:12 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id A0569F8991C for ; Wed, 22 May 2019 05:48:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A0569F8991C Date: 22 May 2019 12:48:07 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425737" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:48:07 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 601134003EB5; Wed, 22 May 2019 12:48:07 +0900 (JST) Message-ID: <87r28rjh87.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 101/145] ASoC: sirf: sirf-audio: 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 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/sirf/sirf-audio.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sound/soc/sirf/sirf-audio.c b/sound/soc/sirf/sirf-audio.c index f2bc507..ba85ccf 100644 --- a/sound/soc/sirf/sirf-audio.c +++ b/sound/soc/sirf/sirf-audio.c @@ -61,11 +61,16 @@ static const struct snd_soc_dapm_route intercon[] = { }; /* Digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEFS(sirf, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sirf-audio-codec")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link sirf_audio_dai_link[] = { { .name = "SiRF audio card", .stream_name = "SiRF audio HiFi", - .codec_dai_name = "sirf-audio-codec", + SND_SOC_DAILINK_REG(sirf), }, }; @@ -92,11 +97,11 @@ static int sirf_audio_probe(struct platform_device *pdev) if (sirf_audio_card == NULL) return -ENOMEM; - sirf_audio_dai_link[0].cpu_of_node = + sirf_audio_dai_link[0].cpus->of_node = of_parse_phandle(pdev->dev.of_node, "sirf,audio-platform", 0); - sirf_audio_dai_link[0].platform_of_node = + sirf_audio_dai_link[0].platforms->of_node = of_parse_phandle(pdev->dev.of_node, "sirf,audio-platform", 0); - sirf_audio_dai_link[0].codec_of_node = + sirf_audio_dai_link[0].codecs->of_node = of_parse_phandle(pdev->dev.of_node, "sirf,audio-codec", 0); sirf_audio_card->gpio_spk_pa = of_get_named_gpio(pdev->dev.of_node, "spk-pa-gpios", 0); From patchwork Wed May 22 03:48:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954835 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 A80BF14C0 for ; Wed, 22 May 2019 04:47:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96E2B1FF29 for ; Wed, 22 May 2019 04:47:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AD8B205F6; Wed, 22 May 2019 04:47:16 +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 A44911FF29 for ; Wed, 22 May 2019 04:47:15 +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 EF5351853; Wed, 22 May 2019 06:46:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EF5351853 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500434; bh=Y2vc1UiliM2Fwq/mUPdvwXEaeVNS9x8YKKV6EPEpzhs=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=swexgXd4mGtiOIlf0wqphYgr6Yeh2OSDbRD/zs3+DsH9Z0mdjYJpRlmBLksIDdtuX MbWObIbOdZvpmMRoKYcBwpVZy6G+lcmtw/yIhtRKGbs5LGtD/d/LDFZ3Y2QOJEcCqw /T03MmmBwRc+Awn23jR3ptr9sGcRmQt26gT7MttQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EE848F89923; Wed, 22 May 2019 05:48:17 +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 8154DF89923; Wed, 22 May 2019 05:48:16 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 4A368F89914 for ; Wed, 22 May 2019 05:48:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4A368F89914 Date: 22 May 2019 12:48:11 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425744" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:48:11 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id C99A04003EB5; Wed, 22 May 2019 12:48:11 +0900 (JST) Message-ID: <87pnobjh82.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 102/145] ASoC: ux500: mop500: 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 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/ux500/mop500.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index c60a577..20552e9 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c @@ -27,26 +27,30 @@ #include "mop500_ab8500.h" /* Define the whole MOP500 soundcard, linking platform to the codec-drivers */ +SND_SOC_DAILINK_DEFS(link1, + DAILINK_COMP_ARRAY(COMP_CPU("ux500-msp-i2s.1")), + DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.0")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("ux500-msp-i2s.1"))); + +SND_SOC_DAILINK_DEFS(link2, + DAILINK_COMP_ARRAY(COMP_CPU("ux500-msp-i2s.3")), + DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("ux500-msp-i2s.3"))); + static struct snd_soc_dai_link mop500_dai_links[] = { { .name = "ab8500_0", .stream_name = "ab8500_0", - .cpu_dai_name = "ux500-msp-i2s.1", - .codec_dai_name = "ab8500-codec-dai.0", - .platform_name = "ux500-msp-i2s.1", - .codec_name = "ab8500-codec.0", .init = mop500_ab8500_machine_init, .ops = mop500_ab8500_ops, + SND_SOC_DAILINK_REG(link1), }, { .name = "ab8500_1", .stream_name = "ab8500_1", - .cpu_dai_name = "ux500-msp-i2s.3", - .codec_dai_name = "ab8500-codec-dai.1", - .platform_name = "ux500-msp-i2s.3", - .codec_name = "ab8500-codec.0", .init = NULL, .ops = mop500_ab8500_ops, + SND_SOC_DAILINK_REG(link2), }, }; @@ -63,8 +67,8 @@ static void mop500_of_node_put(void) int i; for (i = 0; i < 2; i++) { - of_node_put(mop500_dai_links[i].cpu_of_node); - of_node_put(mop500_dai_links[i].codec_of_node); + of_node_put(mop500_dai_links[i].cpus->of_node); + of_node_put(mop500_dai_links[i].codecs->of_node); } } @@ -85,12 +89,12 @@ static int mop500_of_probe(struct platform_device *pdev, } for (i = 0; i < 2; i++) { - mop500_dai_links[i].cpu_of_node = msp_np[i]; - mop500_dai_links[i].cpu_dai_name = NULL; - mop500_dai_links[i].platform_of_node = msp_np[i]; - mop500_dai_links[i].platform_name = NULL; - mop500_dai_links[i].codec_of_node = codec_np; - mop500_dai_links[i].codec_name = NULL; + mop500_dai_links[i].cpus->of_node = msp_np[i]; + mop500_dai_links[i].cpus->dai_name = NULL; + mop500_dai_links[i].platforms->of_node = msp_np[i]; + mop500_dai_links[i].platforms->name = NULL; + mop500_dai_links[i].codecs->of_node = codec_np; + mop500_dai_links[i].codecs->name = NULL; } snd_soc_of_parse_card_name(&mop500_card, "stericsson,card-name"); From patchwork Wed May 22 03:48:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954879 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 C63256C5 for ; Wed, 22 May 2019 04:47:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5E091FF29 for ; Wed, 22 May 2019 04:47:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA45128610; Wed, 22 May 2019 04:47:59 +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 08DB31FF29 for ; Wed, 22 May 2019 04:47:59 +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 56C87185C; Wed, 22 May 2019 06:47:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 56C87185C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500477; bh=BHNlc2pNI9yeGbMxEah7lzG4/G0ITw3Wjl5Y4/h5Qs0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DJ3xcYLztyQ49M/HcST8boLZ9MF4SnucadnpsErLoWW8gGaUGLVXQaghWGZYLuz4g TXxCkAJUGEgmy8V/k9GqKECrz/omyXj9xXy0DOtqheBDH7oBZZDDLX/LaRH9Lh7VKr uf3jfdnbnxzX/KDgvriDu68glN82vj5I3uw4aKW8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 595B6F89925; Wed, 22 May 2019 05:48:22 +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 8CAE3F89927; Wed, 22 May 2019 05:48:20 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 7265DF89920 for ; Wed, 22 May 2019 05:48:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7265DF89920 Date: 22 May 2019 12:48:16 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425746" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:48:16 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id F33C04172124; Wed, 22 May 2019 12:48:15 +0900 (JST) Message-ID: <87o93vjh7y.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 103/145] ASoC: sunxi: sun4i-codec: 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 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/sunxi/sun4i-codec.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 15d08e3..b32a3f1 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1305,15 +1305,25 @@ static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev, { struct snd_soc_dai_link *link = devm_kzalloc(dev, sizeof(*link), GFP_KERNEL); - if (!link) + struct snd_soc_dai_link_component *dlc = devm_kzalloc(dev, + 3 * sizeof(*dlc), GFP_KERNEL); + if (!link || !dlc) return NULL; + link->cpus = &dlc[0]; + link->codecs = &dlc[1]; + link->platforms = &dlc[2]; + + link->num_cpus = 1; + link->num_codecs = 1; + link->num_platforms = 1; + link->name = "cdc"; link->stream_name = "CDC PCM"; - link->codec_dai_name = "Codec"; - link->cpu_dai_name = dev_name(dev); - link->codec_name = dev_name(dev); - link->platform_name = dev_name(dev); + link->codecs->dai_name = "Codec"; + link->cpus->dai_name = dev_name(dev); + link->codecs->name = dev_name(dev); + link->platforms->name = dev_name(dev); link->dai_fmt = SND_SOC_DAIFMT_I2S; *num_links = 1; From patchwork Wed May 22 03:48:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954885 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 6CBA614C0 for ; Wed, 22 May 2019 04:48:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5975A1FF29 for ; Wed, 22 May 2019 04:48:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B3D028610; Wed, 22 May 2019 04:48:36 +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 5592A1FF29 for ; Wed, 22 May 2019 04:48:35 +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 A52EE176D; Wed, 22 May 2019 06:47:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A52EE176D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500513; bh=lSyNzORoGN9UcZqR56p3xrfE0VB64vlmDdE8qeEBmlA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=n2ed06JMpiCyh5kc+so/CfX1xxVLFlkzAp7ljoVfO8I+TWEwDHp7dLEnzgoN0mPTR 5ztS/KM4g7//VQVjTlEwVeh5I1gOPTNVJTwbHlyR8xYSyfmUOj0sWB1KgWykQt24n1 H1jAL61EKVNKBj0grZKJzMguANF4jf4B1ApwVn/Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C0577F89920; Wed, 22 May 2019 05:48:26 +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 6E004F8992B; Wed, 22 May 2019 05:48:25 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 80DF2F89920 for ; Wed, 22 May 2019 05:48:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 80DF2F89920 Date: 22 May 2019 12:48:20 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425752" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:48:20 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 0E88C4172118; Wed, 22 May 2019 12:48:20 +0900 (JST) Message-ID: <87mujfjh7u.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 104/145] ASoC: txx9: txx9aclc-generic: 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 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/txx9/txx9aclc-generic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/txx9/txx9aclc-generic.c b/sound/soc/txx9/txx9aclc-generic.c index d0b1e77..c5aaad1 100644 --- a/sound/soc/txx9/txx9aclc-generic.c +++ b/sound/soc/txx9/txx9aclc-generic.c @@ -21,13 +21,15 @@ #include #include "txx9aclc.h" +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_CPU("txx9aclc-ac97")), + DAILINK_COMP_ARRAY(COMP_CODEC("ac97-codec", "ac97-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("txx9aclc-pcm-audio"))); + static struct snd_soc_dai_link txx9aclc_generic_dai = { .name = "AC97", .stream_name = "AC97 HiFi", - .cpu_dai_name = "txx9aclc-ac97", - .codec_dai_name = "ac97-hifi", - .platform_name = "txx9aclc-pcm-audio", - .codec_name = "ac97-codec", + SND_SOC_DAILINK_REG(hifi), }; static struct snd_soc_card txx9aclc_generic_card = { From patchwork Wed May 22 03:48:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954891 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 8002314C0 for ; Wed, 22 May 2019 04:49:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D9F628610 for ; Wed, 22 May 2019 04:49:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 610CB28782; Wed, 22 May 2019 04:49:13 +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 A847128610 for ; Wed, 22 May 2019 04:49:12 +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 0D86617D1; Wed, 22 May 2019 06:48:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0D86617D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500551; bh=cfE8lQebKxaSNhccOq/iE7173ectTAUvw/zMT5LNiWE=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tezUITgbzvjuRYoDrI+ElmnIypZQqZQw/25ROn5pJBVG8JF3YxUzGqUwqg/E/ml9E PR5QiyDZpe4Fws2V8CoYrMgHBiQYYBRDWdwf7503lz0gcSE8/0We6ooS+I9OWUfXmZ rg6ndbrwtNs1dncSWCpRMW5otYl16IFo6rTERqw0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8E189F89775; Wed, 22 May 2019 05:48:34 +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 6BCEEF8992E; Wed, 22 May 2019 05:48:32 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 7F7BAF89775 for ; Wed, 22 May 2019 05:48:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7F7BAF89775 Date: 22 May 2019 12:48:24 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627851" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:48:24 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 469C44009407; Wed, 22 May 2019 12:48:24 +0900 (JST) Message-ID: <87lfyzjh7q.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 105/145] ASoC: tegra: tegra_rt5677: 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 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_rt5677.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/sound/soc/tegra/tegra_rt5677.c b/sound/soc/tegra/tegra_rt5677.c index 7081f15..7edf6c7 100644 --- a/sound/soc/tegra/tegra_rt5677.c +++ b/sound/soc/tegra/tegra_rt5677.c @@ -169,14 +169,19 @@ static int tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAILINK_DEFS(pcm, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5677-aif1")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link tegra_rt5677_dai = { .name = "RT5677", .stream_name = "RT5677 PCM", - .codec_dai_name = "rt5677-aif1", .init = tegra_rt5677_asoc_init, .ops = &tegra_rt5677_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_rt5677 = { @@ -249,24 +254,24 @@ static int tegra_rt5677_probe(struct platform_device *pdev) if (ret) goto err; - tegra_rt5677_dai.codec_of_node = of_parse_phandle(np, + tegra_rt5677_dai.codecs->of_node = of_parse_phandle(np, "nvidia,audio-codec", 0); - if (!tegra_rt5677_dai.codec_of_node) { + if (!tegra_rt5677_dai.codecs->of_node) { dev_err(&pdev->dev, "Property 'nvidia,audio-codec' missing or invalid\n"); ret = -EINVAL; goto err; } - tegra_rt5677_dai.cpu_of_node = of_parse_phandle(np, + tegra_rt5677_dai.cpus->of_node = of_parse_phandle(np, "nvidia,i2s-controller", 0); - if (!tegra_rt5677_dai.cpu_of_node) { + if (!tegra_rt5677_dai.cpus->of_node) { dev_err(&pdev->dev, "Property 'nvidia,i2s-controller' missing or invalid\n"); ret = -EINVAL; goto err_put_codec_of_node; } - tegra_rt5677_dai.platform_of_node = tegra_rt5677_dai.cpu_of_node; + tegra_rt5677_dai.platforms->of_node = tegra_rt5677_dai.cpus->of_node; ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) @@ -284,12 +289,12 @@ static int tegra_rt5677_probe(struct platform_device *pdev) err_fini_utils: tegra_asoc_utils_fini(&machine->util_data); err_put_cpu_of_node: - of_node_put(tegra_rt5677_dai.cpu_of_node); - tegra_rt5677_dai.cpu_of_node = NULL; - tegra_rt5677_dai.platform_of_node = NULL; + of_node_put(tegra_rt5677_dai.cpus->of_node); + tegra_rt5677_dai.cpus->of_node = NULL; + tegra_rt5677_dai.platforms->of_node = NULL; err_put_codec_of_node: - of_node_put(tegra_rt5677_dai.codec_of_node); - tegra_rt5677_dai.codec_of_node = NULL; + of_node_put(tegra_rt5677_dai.codecs->of_node); + tegra_rt5677_dai.codecs->of_node = NULL; err: return ret; } @@ -303,11 +308,11 @@ static int tegra_rt5677_remove(struct platform_device *pdev) tegra_asoc_utils_fini(&machine->util_data); - tegra_rt5677_dai.platform_of_node = NULL; - of_node_put(tegra_rt5677_dai.codec_of_node); - tegra_rt5677_dai.codec_of_node = NULL; - of_node_put(tegra_rt5677_dai.cpu_of_node); - tegra_rt5677_dai.cpu_of_node = NULL; + tegra_rt5677_dai.platforms->of_node = NULL; + of_node_put(tegra_rt5677_dai.codecs->of_node); + tegra_rt5677_dai.codecs->of_node = NULL; + of_node_put(tegra_rt5677_dai.cpus->of_node); + tegra_rt5677_dai.cpus->of_node = NULL; return 0; } From patchwork Wed May 22 03:48:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954893 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 955FE6C5 for ; Wed, 22 May 2019 04:49:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 811B828610 for ; Wed, 22 May 2019 04:49:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F22F28782; Wed, 22 May 2019 04:49:53 +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 8B71F28610 for ; Wed, 22 May 2019 04:49:52 +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 BFAB71848; Wed, 22 May 2019 06:49:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BFAB71848 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500590; bh=SI2InXcUPg72frzHDQxADJr4VVY+2+jbtZHSAuZNras=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QWZ74ac8Ty6hE+LHVYkLMqqz0p8YO3Qzbs+8iL4YInK1zLDMauqDu31/AVnsJF+t6 qbo0CvYZLd76o3KIhJjg5OEYtWLsTuXpl/UUlNGxNjcX9ymi1+ffPpw2xcFQIeo7UL G/GLfPFl7nJBJzLR2KvkYxK7aEHhj+RH2PVdA9ZU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 294F7F89931; Wed, 22 May 2019 05:48:37 +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 02E18F8992D; Wed, 22 May 2019 05:48:33 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id BB49DF8992C for ; Wed, 22 May 2019 05:48:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BB49DF8992C Date: 22 May 2019 12:48:28 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425759" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:48:28 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 893944009405; Wed, 22 May 2019 12:48:28 +0900 (JST) Message-ID: <87k1ejjh7l.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 106/145] ASoC: tegra: tegra_wm8753: 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 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_wm8753.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c index 23a810e..8492b3d 100644 --- a/sound/soc/tegra/tegra_wm8753.c +++ b/sound/soc/tegra/tegra_wm8753.c @@ -98,14 +98,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 +147,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) From patchwork Wed May 22 03:48:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954895 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 E20BA14C0 for ; Wed, 22 May 2019 04:50:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D286928B3C for ; Wed, 22 May 2019 04:50:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6D9A28A6E; Wed, 22 May 2019 04:50:43 +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 24B5328A81 for ; Wed, 22 May 2019 04:50:43 +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 77A391865; Wed, 22 May 2019 06:49:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 77A391865 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500641; bh=dX+QdUFn2jWnQQ5RYDNbANu4a8Eyx5ZvcWNUut10sX0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TsWvSQDjrUmYG6eflX5LnoL3QC5GrkQ2wjPClPNKT7c8x4HF4FPVtNW0bQTq5oneI nfldXhNqy3/MJwaYmX/MQs4wvzTT9xevDR5BCMf71ega/kMuJTIUFsaRyZB8WkEZQK w7nf4xW8zTHjjkry/SChWBkFOH4dEB/qw+2NY+Gg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BEED0F8993D; Wed, 22 May 2019 05:48:40 +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 CBED1F89932; Wed, 22 May 2019 05:48:36 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 07F29F8992E for ; Wed, 22 May 2019 05:48:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 07F29F8992E Date: 22 May 2019 12:48:32 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627855" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:48:32 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B6873417211A; Wed, 22 May 2019 12:48:32 +0900 (JST) Message-ID: <87imu3jh7h.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 107/145] ASoC: tegra: trimslice: 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 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/trimslice.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sound/soc/tegra/trimslice.c b/sound/soc/tegra/trimslice.c index 99bcdd9..a553daa 100644 --- a/sound/soc/tegra/trimslice.c +++ b/sound/soc/tegra/trimslice.c @@ -91,14 +91,19 @@ static const struct snd_soc_dapm_route trimslice_audio_map[] = { {"RLINEIN", NULL, "Line In"}, }; +SND_SOC_DAILINK_DEFS(single_dsp, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic23-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link trimslice_tlv320aic23_dai = { .name = "TLV320AIC23", .stream_name = "AIC23", - .codec_dai_name = "tlv320aic23-hifi", .ops = &trimslice_asoc_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(single_dsp), }; static struct snd_soc_card snd_soc_trimslice = { @@ -129,26 +134,26 @@ static int tegra_snd_trimslice_probe(struct platform_device *pdev) card->dev = &pdev->dev; snd_soc_card_set_drvdata(card, trimslice); - trimslice_tlv320aic23_dai.codec_of_node = of_parse_phandle(np, + trimslice_tlv320aic23_dai.codecs->of_node = of_parse_phandle(np, "nvidia,audio-codec", 0); - if (!trimslice_tlv320aic23_dai.codec_of_node) { + if (!trimslice_tlv320aic23_dai.codecs->of_node) { dev_err(&pdev->dev, "Property 'nvidia,audio-codec' missing or invalid\n"); ret = -EINVAL; goto err; } - trimslice_tlv320aic23_dai.cpu_of_node = of_parse_phandle(np, + trimslice_tlv320aic23_dai.cpus->of_node = of_parse_phandle(np, "nvidia,i2s-controller", 0); - if (!trimslice_tlv320aic23_dai.cpu_of_node) { + if (!trimslice_tlv320aic23_dai.cpus->of_node) { dev_err(&pdev->dev, "Property 'nvidia,i2s-controller' missing or invalid\n"); ret = -EINVAL; goto err; } - trimslice_tlv320aic23_dai.platform_of_node = - trimslice_tlv320aic23_dai.cpu_of_node; + trimslice_tlv320aic23_dai.platforms->of_node = + trimslice_tlv320aic23_dai.cpus->of_node; ret = tegra_asoc_utils_init(&trimslice->util_data, &pdev->dev); if (ret) From patchwork Wed May 22 03:48:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954901 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 E06E91708 for ; Wed, 22 May 2019 04:51:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0B0128904 for ; Wed, 22 May 2019 04:51:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4E2228A81; Wed, 22 May 2019 04:51:18 +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 D148D28A6E for ; Wed, 22 May 2019 04:51:17 +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 3AA01186B; Wed, 22 May 2019 06:50:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3AA01186B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500676; bh=1dDCZ6Eovc0NB9tM2gDJua/XsyBFLejdH1egniBWUxA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=t5A3joJGg2kLH8cOOW/gkqvpyH2qcmcJouMlZEHwBafbKmoobNgQekqv5Y5G+PT4L 7an/SFUrxM0ZC7ymgCkcGu45obvoKbe/x9TMbpG1uDJ0ZUOJj3RUaOWEc4vj48MxlF /ULDiM83tTDO0zONpSCpEWNAA/4xAHa51gkXuGiM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0DE0AF8993B; Wed, 22 May 2019 05:48:45 +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 79D3DF89943; Wed, 22 May 2019 05:48:43 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 1232AF89932 for ; Wed, 22 May 2019 05:48:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1232AF89932 Date: 22 May 2019 12:48:36 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425764" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:48:36 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id C36904003EB5; Wed, 22 May 2019 12:48:36 +0900 (JST) Message-ID: <87h89njh7d.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 108/145] ASoC: tegra: tegra_alc5632: 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 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_alc5632.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c index 98d8780..5a63249 100644 --- a/sound/soc/tegra/tegra_alc5632.c +++ b/sound/soc/tegra/tegra_alc5632.c @@ -124,15 +124,20 @@ static int tegra_alc5632_asoc_init(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAILINK_DEFS(pcm, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "alc5632-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link tegra_alc5632_dai = { .name = "ALC5632", .stream_name = "ALC5632 PCM", - .codec_dai_name = "alc5632-hifi", .init = tegra_alc5632_asoc_init, .ops = &tegra_alc5632_asoc_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_alc5632 = { @@ -174,26 +179,26 @@ static int tegra_alc5632_probe(struct platform_device *pdev) if (ret) goto err; - tegra_alc5632_dai.codec_of_node = of_parse_phandle( + tegra_alc5632_dai.codecs->of_node = of_parse_phandle( pdev->dev.of_node, "nvidia,audio-codec", 0); - if (!tegra_alc5632_dai.codec_of_node) { + if (!tegra_alc5632_dai.codecs->of_node) { dev_err(&pdev->dev, "Property 'nvidia,audio-codec' missing or invalid\n"); ret = -EINVAL; goto err; } - tegra_alc5632_dai.cpu_of_node = of_parse_phandle(np, + tegra_alc5632_dai.cpus->of_node = of_parse_phandle(np, "nvidia,i2s-controller", 0); - if (!tegra_alc5632_dai.cpu_of_node) { + if (!tegra_alc5632_dai.cpus->of_node) { dev_err(&pdev->dev, "Property 'nvidia,i2s-controller' missing or invalid\n"); ret = -EINVAL; goto err_put_codec_of_node; } - tegra_alc5632_dai.platform_of_node = tegra_alc5632_dai.cpu_of_node; + tegra_alc5632_dai.platforms->of_node = tegra_alc5632_dai.cpus->of_node; ret = tegra_asoc_utils_init(&alc5632->util_data, &pdev->dev); if (ret) @@ -211,12 +216,12 @@ static int tegra_alc5632_probe(struct platform_device *pdev) err_fini_utils: tegra_asoc_utils_fini(&alc5632->util_data); err_put_cpu_of_node: - of_node_put(tegra_alc5632_dai.cpu_of_node); - tegra_alc5632_dai.cpu_of_node = NULL; - tegra_alc5632_dai.platform_of_node = NULL; + of_node_put(tegra_alc5632_dai.cpus->of_node); + tegra_alc5632_dai.cpus->of_node = NULL; + tegra_alc5632_dai.platforms->of_node = NULL; err_put_codec_of_node: - of_node_put(tegra_alc5632_dai.codec_of_node); - tegra_alc5632_dai.codec_of_node = NULL; + of_node_put(tegra_alc5632_dai.codecs->of_node); + tegra_alc5632_dai.codecs->of_node = NULL; err: return ret; } @@ -230,11 +235,11 @@ static int tegra_alc5632_remove(struct platform_device *pdev) tegra_asoc_utils_fini(&machine->util_data); - of_node_put(tegra_alc5632_dai.cpu_of_node); - tegra_alc5632_dai.cpu_of_node = NULL; - tegra_alc5632_dai.platform_of_node = NULL; - of_node_put(tegra_alc5632_dai.codec_of_node); - tegra_alc5632_dai.codec_of_node = NULL; + of_node_put(tegra_alc5632_dai.cpus->of_node); + tegra_alc5632_dai.cpus->of_node = NULL; + tegra_alc5632_dai.platforms->of_node = NULL; + of_node_put(tegra_alc5632_dai.codecs->of_node); + tegra_alc5632_dai.codecs->of_node = NULL; return 0; } From patchwork Wed May 22 03:48:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954907 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 3F9741708 for ; Wed, 22 May 2019 04:51:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E56E289C6 for ; Wed, 22 May 2019 04:51:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 223B628A81; Wed, 22 May 2019 04:51:58 +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 5CED4285D8 for ; Wed, 22 May 2019 04:51:57 +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 C13B2187A; Wed, 22 May 2019 06:51:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C13B2187A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500715; bh=w6Y81lqKxzUnYcP8O9CPSs1G4Ne1uoVlFFLFGi/92VA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DYW/drdOPvgNBh8irMQEDMq7c4vce7T5FaF4mrK4luwYs9fZfw56uB/muGo8Efwu1 TZvy0k78j3EeyRur/v6Oa/Xn369u8q99V79pWcewdbiWaqNbgroTkzA1b8FZgW08h6 fjxzwM4ZQXxO1VGKB1oUceK3WAnTSQ98CBxbBmxQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AE4B4F89945; Wed, 22 May 2019 05:48:48 +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 322F0F89944; Wed, 22 May 2019 05:48:45 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 13835F89941 for ; Wed, 22 May 2019 05:48:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 13835F89941 Date: 22 May 2019 12:48:40 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627859" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:48:40 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id C632A417211A; Wed, 22 May 2019 12:48:40 +0900 (JST) Message-ID: <87ftp7jh79.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 109/145] ASoC: tegra: tegra_sgtl5000: 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 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_sgtl5000.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c index 901457da..c5d45a6 100644 --- a/sound/soc/tegra/tegra_sgtl5000.c +++ b/sound/soc/tegra/tegra_sgtl5000.c @@ -92,13 +92,18 @@ static const struct snd_soc_dapm_widget tegra_sgtl5000_dapm_widgets[] = { SND_SOC_DAPM_MIC("Mic Jack", NULL), }; +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link tegra_sgtl5000_dai = { .name = "sgtl5000", .stream_name = "HiFi", - .codec_dai_name = "sgtl5000", .ops = &tegra_sgtl5000_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(hifi), }; static struct snd_soc_card snd_soc_tegra_sgtl5000 = { @@ -134,25 +139,25 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev) if (ret) goto err; - tegra_sgtl5000_dai.codec_of_node = of_parse_phandle(np, + tegra_sgtl5000_dai.codecs->of_node = of_parse_phandle(np, "nvidia,audio-codec", 0); - if (!tegra_sgtl5000_dai.codec_of_node) { + if (!tegra_sgtl5000_dai.codecs->of_node) { dev_err(&pdev->dev, "Property 'nvidia,audio-codec' missing or invalid\n"); ret = -EINVAL; goto err; } - tegra_sgtl5000_dai.cpu_of_node = of_parse_phandle(np, + tegra_sgtl5000_dai.cpus->of_node = of_parse_phandle(np, "nvidia,i2s-controller", 0); - if (!tegra_sgtl5000_dai.cpu_of_node) { + if (!tegra_sgtl5000_dai.cpus->of_node) { dev_err(&pdev->dev, "Property 'nvidia,i2s-controller' missing/invalid\n"); ret = -EINVAL; goto err_put_codec_of_node; } - tegra_sgtl5000_dai.platform_of_node = tegra_sgtl5000_dai.cpu_of_node; + tegra_sgtl5000_dai.platforms->of_node = tegra_sgtl5000_dai.cpus->of_node; ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) @@ -170,12 +175,12 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev) err_fini_utils: tegra_asoc_utils_fini(&machine->util_data); err_put_cpu_of_node: - of_node_put(tegra_sgtl5000_dai.cpu_of_node); - tegra_sgtl5000_dai.cpu_of_node = NULL; - tegra_sgtl5000_dai.platform_of_node = NULL; + of_node_put(tegra_sgtl5000_dai.cpus->of_node); + tegra_sgtl5000_dai.cpus->of_node = NULL; + tegra_sgtl5000_dai.platforms->of_node = NULL; err_put_codec_of_node: - of_node_put(tegra_sgtl5000_dai.codec_of_node); - tegra_sgtl5000_dai.codec_of_node = NULL; + of_node_put(tegra_sgtl5000_dai.codecs->of_node); + tegra_sgtl5000_dai.codecs->of_node = NULL; err: return ret; } @@ -190,11 +195,11 @@ static int tegra_sgtl5000_driver_remove(struct platform_device *pdev) tegra_asoc_utils_fini(&machine->util_data); - of_node_put(tegra_sgtl5000_dai.cpu_of_node); - tegra_sgtl5000_dai.cpu_of_node = NULL; - tegra_sgtl5000_dai.platform_of_node = NULL; - of_node_put(tegra_sgtl5000_dai.codec_of_node); - tegra_sgtl5000_dai.codec_of_node = NULL; + of_node_put(tegra_sgtl5000_dai.cpus->of_node); + tegra_sgtl5000_dai.cpus->of_node = NULL; + tegra_sgtl5000_dai.platforms->of_node = NULL; + of_node_put(tegra_sgtl5000_dai.codecs->of_node); + tegra_sgtl5000_dai.codecs->of_node = NULL; return ret; } From patchwork Wed May 22 03:48:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954935 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 0ED3C6C5 for ; Wed, 22 May 2019 04:52:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3E3B28A81 for ; Wed, 22 May 2019 04:52:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E839628B56; Wed, 22 May 2019 04:52:35 +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 446EF28B3C for ; Wed, 22 May 2019 04:52:35 +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 7EA2D16E7; Wed, 22 May 2019 06:51:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7EA2D16E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500753; bh=me3Wwludp+mndFlnH3oz27wHLfuOnQpcEweimEVTTZU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PFvTCuDIo+DJaKTLdVUxM8YLk94N7Qwz5E2a8/y9i3SpCgh5gL7SrXkf3p7B2XwSD NiIgB/l1EvRJVGMQdXgWivtEFVXnV5qwolpYI3csYhsqehzCIpo072r4ZG3epA9FLs r0Q2azgEsHjo6gCMhY4TGcYg0uCCfLoW8wBmZEkY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2EF03F8994B; Wed, 22 May 2019 05:48:51 +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 4FB3AF89947; Wed, 22 May 2019 05:48:48 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 8040CF89945 for ; Wed, 22 May 2019 05:48:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8040CF89945 Date: 22 May 2019 12:48:45 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627861" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:48:45 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 0CDB04172124; Wed, 22 May 2019 12:48:45 +0900 (JST) Message-ID: <87ef4rjh75.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 110/145] ASoC: tegra: tegra_rt5640: 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 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_rt5640.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c index fc81b48..3f07561 100644 --- a/sound/soc/tegra/tegra_rt5640.c +++ b/sound/soc/tegra/tegra_rt5640.c @@ -126,14 +126,19 @@ static int tegra_rt5640_asoc_init(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAILINK_DEFS(aif1, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5640-aif1")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link tegra_rt5640_dai = { .name = "RT5640", .stream_name = "RT5640 PCM", - .codec_dai_name = "rt5640-aif1", .init = tegra_rt5640_asoc_init, .ops = &tegra_rt5640_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(aif1), }; static struct snd_soc_card snd_soc_tegra_rt5640 = { @@ -176,25 +181,25 @@ static int tegra_rt5640_probe(struct platform_device *pdev) if (ret) goto err; - tegra_rt5640_dai.codec_of_node = of_parse_phandle(np, + tegra_rt5640_dai.codecs->of_node = of_parse_phandle(np, "nvidia,audio-codec", 0); - if (!tegra_rt5640_dai.codec_of_node) { + if (!tegra_rt5640_dai.codecs->of_node) { dev_err(&pdev->dev, "Property 'nvidia,audio-codec' missing or invalid\n"); ret = -EINVAL; goto err; } - tegra_rt5640_dai.cpu_of_node = of_parse_phandle(np, + tegra_rt5640_dai.cpus->of_node = of_parse_phandle(np, "nvidia,i2s-controller", 0); - if (!tegra_rt5640_dai.cpu_of_node) { + if (!tegra_rt5640_dai.cpus->of_node) { dev_err(&pdev->dev, "Property 'nvidia,i2s-controller' missing or invalid\n"); ret = -EINVAL; goto err; } - tegra_rt5640_dai.platform_of_node = tegra_rt5640_dai.cpu_of_node; + tegra_rt5640_dai.platforms->of_node = tegra_rt5640_dai.cpus->of_node; ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) From patchwork Wed May 22 03:48:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954937 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 C082A912 for ; Wed, 22 May 2019 04:53:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADE2728A81 for ; Wed, 22 May 2019 04:53:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1980289F9; Wed, 22 May 2019 04:53:18 +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 0275728B55 for ; Wed, 22 May 2019 04:53:18 +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 44E421880; Wed, 22 May 2019 06:52:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 44E421880 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500796; bh=nr0CAMzn0ODH6gfqiPqdxnQsSRFoe49+svgEpQsRhqY=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pqN6AP6jAGgloetjiy1VAbfYFUKD8LuQsdt2ZxWlwaiDVi4zHI0SKFxppCrGwb1yk 0SYSu9sj163Nzot96VA6j+N+4pkIQdBeqLWT2luRmkZ5ax4qkk3S13RLClrVoNaH0c Owsl0O3/CNZl9vCP05ajDvKldVEJ49q1WN9FHJOo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9E8CBF8977A; Wed, 22 May 2019 05:48:56 +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 DC258F89951; Wed, 22 May 2019 05:48:54 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 81CB8F8994C for ; Wed, 22 May 2019 05:48:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 81CB8F8994C Date: 22 May 2019 12:48:49 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425770" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:48:49 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 471E64172124; Wed, 22 May 2019 12:48:49 +0900 (JST) Message-ID: <87d0kbjh71.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 111/145] ASoC: tegra: tegra_wm8903: 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 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_wm8903.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c index 69bc946..5915bf4 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c @@ -209,15 +209,20 @@ static int tegra_wm8903_remove(struct snd_soc_card *card) return 0; } +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8903-hifi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link tegra_wm8903_dai = { .name = "WM8903", .stream_name = "WM8903 PCM", - .codec_dai_name = "wm8903-hifi", .init = tegra_wm8903_init, .ops = &tegra_wm8903_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(hifi), }; static struct snd_soc_card snd_soc_tegra_wm8903 = { @@ -316,25 +321,25 @@ static int tegra_wm8903_driver_probe(struct platform_device *pdev) if (ret) goto err; - tegra_wm8903_dai.codec_of_node = of_parse_phandle(np, + tegra_wm8903_dai.codecs->of_node = of_parse_phandle(np, "nvidia,audio-codec", 0); - if (!tegra_wm8903_dai.codec_of_node) { + if (!tegra_wm8903_dai.codecs->of_node) { dev_err(&pdev->dev, "Property 'nvidia,audio-codec' missing or invalid\n"); ret = -EINVAL; goto err; } - tegra_wm8903_dai.cpu_of_node = of_parse_phandle(np, + tegra_wm8903_dai.cpus->of_node = of_parse_phandle(np, "nvidia,i2s-controller", 0); - if (!tegra_wm8903_dai.cpu_of_node) { + if (!tegra_wm8903_dai.cpus->of_node) { dev_err(&pdev->dev, "Property 'nvidia,i2s-controller' missing or invalid\n"); ret = -EINVAL; goto err; } - tegra_wm8903_dai.platform_of_node = tegra_wm8903_dai.cpu_of_node; + tegra_wm8903_dai.platforms->of_node = tegra_wm8903_dai.cpus->of_node; ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) From patchwork Wed May 22 03:48:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954939 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 2611F912 for ; Wed, 22 May 2019 04:53:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1671428B52 for ; Wed, 22 May 2019 04:53:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B04628A81; Wed, 22 May 2019 04:53:56 +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 22FD428B3B for ; Wed, 22 May 2019 04:53:55 +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 6991F17AF; Wed, 22 May 2019 06:53:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6991F17AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500833; bh=BlRFeZOmDEMzm+22m06xROdKr+15PDT7QBPXvsPvGKQ=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=eroLyQH83hX/IWkfJXyYYY91p3hzB/JIOeiTmInCgfV+2qSiAg7Sl3u3dvUAOj+ox Ljuikswo0nIoShfAOq7iCdCeZv6+6zW2WDrBsLIL5dAnylqiwYbuCYZ+fH5snLy+Kx jOA2HE6OqD1gdtgiR1VwYzlu8GhGFUcsorot9LCE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F35E9F89952; Wed, 22 May 2019 05:48:59 +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 DEC61F89953; Wed, 22 May 2019 05:48:57 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id C0D2BF8994C for ; Wed, 22 May 2019 05:48:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C0D2BF8994C Date: 22 May 2019 12:48:53 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627871" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:48:53 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 89649417212C; Wed, 22 May 2019 12:48:53 +0900 (JST) Message-ID: <87blzvjh6w.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 112/145] ASoC: tegra: tegra_wm9712: 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 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 864a334..7526aee 100644 --- a/sound/soc/tegra/tegra_wm9712.c +++ b/sound/soc/tegra/tegra_wm9712.c @@ -49,12 +49,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 = { @@ -101,16 +105,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) From patchwork Wed May 22 03:48:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954947 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 65AC86C5 for ; Wed, 22 May 2019 04:54:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55A3D28A81 for ; Wed, 22 May 2019 04:54:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4978C28B3B; Wed, 22 May 2019 04:54:46 +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 9E69928A81 for ; Wed, 22 May 2019 04:54:45 +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 F2E81179D; Wed, 22 May 2019 06:53:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F2E81179D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500884; bh=8WsQ0VagsPO3Lv352FqKmlfffqbtwn9uwpG6HsaGlmM=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Q4mo5DJSCDuzI3dZEe1cAnUNUiwvWd1/zuDAuIoQsXFh3GR1SPudCX5/3v8aZ/GoN EoAhiK5tKd8JsJeTlnmdLFd+riYBCWhlfvskds+3Gi5mZgiIKSa7MLRjkEvPzZn5Hp UhS08m5B9HverZW6+Tn3EgoN47hBHMnctXAcGMmY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2D05EF8995C; Wed, 22 May 2019 05:49:04 +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 D84B3F8995C; Wed, 22 May 2019 05:49:02 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id F0523F89955 for ; Wed, 22 May 2019 05:48:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F0523F89955 Date: 22 May 2019 12:48:58 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425780" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:48:58 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 1F4764003EC0; Wed, 22 May 2019 12:48:58 +0900 (JST) Message-ID: <87a7ffjh6s.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 113/145] ASoC: tegra: tegra_max98090: 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 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_max98090.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c index cf142e2..b6c1f48 100644 --- a/sound/soc/tegra/tegra_max98090.c +++ b/sound/soc/tegra/tegra_max98090.c @@ -176,14 +176,19 @@ static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAILINK_DEFS(pcm, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link tegra_max98090_dai = { .name = "max98090", .stream_name = "max98090 PCM", - .codec_dai_name = "HiFi", .init = tegra_max98090_asoc_init, .ops = &tegra_max98090_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_max98090 = { @@ -230,25 +235,25 @@ static int tegra_max98090_probe(struct platform_device *pdev) if (ret) goto err; - tegra_max98090_dai.codec_of_node = of_parse_phandle(np, + tegra_max98090_dai.codecs->of_node = of_parse_phandle(np, "nvidia,audio-codec", 0); - if (!tegra_max98090_dai.codec_of_node) { + if (!tegra_max98090_dai.codecs->of_node) { dev_err(&pdev->dev, "Property 'nvidia,audio-codec' missing or invalid\n"); ret = -EINVAL; goto err; } - tegra_max98090_dai.cpu_of_node = of_parse_phandle(np, + tegra_max98090_dai.cpus->of_node = of_parse_phandle(np, "nvidia,i2s-controller", 0); - if (!tegra_max98090_dai.cpu_of_node) { + if (!tegra_max98090_dai.cpus->of_node) { dev_err(&pdev->dev, "Property 'nvidia,i2s-controller' missing or invalid\n"); ret = -EINVAL; goto err; } - tegra_max98090_dai.platform_of_node = tegra_max98090_dai.cpu_of_node; + tegra_max98090_dai.platforms->of_node = tegra_max98090_dai.cpus->of_node; ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) From patchwork Wed May 22 03:49:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954949 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 CB1106C5 for ; Wed, 22 May 2019 04:55:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B52F82880A for ; Wed, 22 May 2019 04:55:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3CE328898; Wed, 22 May 2019 04:55:22 +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 F054E2880A for ; Wed, 22 May 2019 04:55:20 +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 4BC9F17CE; Wed, 22 May 2019 06:54:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4BC9F17CE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500919; bh=18Hk1kcjGTOUJnw2YA3M7LKqwZLZqLdI6oF5zoSZCtU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=l/XJbbuqBRHyWEZX60JoZUhZ74UIVH3Pt6L/tDJbgT4+ynufhM0d5I+2Yc+6qrAkC Nz4HNJ1dj6zuLurGiuduboZ+NmtkDbMFHs2GAmaJPKf9iLD+DFLA8cBIUh61g/V6lj Fiqin5pPhgXbg4HQVNnr6xB7j5xzRGdCWZy4kBSE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5D24AF89961; Wed, 22 May 2019 05:49:07 +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 9863EF89962; Wed, 22 May 2019 05:49:06 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id DC188F8995F for ; Wed, 22 May 2019 05:49:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DC188F8995F Date: 22 May 2019 12:49:02 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627881" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:49:02 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 947A24003EC2; Wed, 22 May 2019 12:49:02 +0900 (JST) Message-ID: <878suzjh6n.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 114/145] ASoC: soc-topology: 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 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/soc-topology.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 3299ebb..f485f7f 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -560,7 +560,7 @@ static void remove_link(struct snd_soc_component *comp, kfree(link->name); kfree(link->stream_name); - kfree(link->cpu_dai_name); + kfree(link->cpus->dai_name); list_del(&dobj->list); snd_soc_remove_dai_link(comp->card, link); @@ -1879,12 +1879,22 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, struct snd_soc_tplg_pcm *pcm) { struct snd_soc_dai_link *link; + struct snd_soc_dai_link_component *dlc; int ret; - link = kzalloc(sizeof(struct snd_soc_dai_link), GFP_KERNEL); + /* link + cpu + codec */ + link = kzalloc(sizeof(*link) + (2 * sizeof(*dlc)), GFP_KERNEL); if (link == NULL) return -ENOMEM; + dlc = (struct snd_soc_dai_link_component *)(link + 1); + + link->cpus = &dlc[0]; + link->codecs = &dlc[1]; + + link->num_cpus = 1; + link->num_codecs = 1; + if (strlen(pcm->pcm_name)) { link->name = kstrdup(pcm->pcm_name, GFP_KERNEL); link->stream_name = kstrdup(pcm->pcm_name, GFP_KERNEL); @@ -1892,10 +1902,10 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, link->id = le32_to_cpu(pcm->pcm_id); if (strlen(pcm->dai_name)) - link->cpu_dai_name = kstrdup(pcm->dai_name, GFP_KERNEL); + link->cpus->dai_name = kstrdup(pcm->dai_name, GFP_KERNEL); - link->codec_name = "snd-soc-dummy"; - link->codec_dai_name = "snd-soc-dummy-dai"; + link->codecs->name = "snd-soc-dummy"; + link->codecs->dai_name = "snd-soc-dummy-dai"; /* enable DPCM */ link->dynamic = 1; @@ -1912,7 +1922,7 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, dev_err(tplg->comp->dev, "ASoC: FE link loading failed\n"); kfree(link->name); kfree(link->stream_name); - kfree(link->cpu_dai_name); + kfree(link->cpus->dai_name); kfree(link); return ret; } From patchwork Wed May 22 03:49:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954951 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 6DE986C5 for ; Wed, 22 May 2019 04:55:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D85F28A81 for ; Wed, 22 May 2019 04:55:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51D7928AAB; Wed, 22 May 2019 04:55:58 +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 9E0C428A81 for ; Wed, 22 May 2019 04:55:57 +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 D33E317C4; Wed, 22 May 2019 06:55:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D33E317C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500955; bh=tYk82UF6zQnVzq+pn2ALauEgcfxdDtILPIDf1SUYiLA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=N86QvahzerEO40eJpqsetjnA6YAibsILi8w2i7CcrV0alueGr9AjSI5VeUp4TzHvC cpbhT5SdYS7NW58/IuKPrtzb3502y74kAi+sWHfBniq/FANDscdbM4YQ73C38toUro 40l5NkP4KUfj+fGfbreL1Qx6hcFpAG8+0p5FEZZg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 90AA6F89966; Wed, 22 May 2019 05:49:13 +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 18B8DF89966; Wed, 22 May 2019 05:49:12 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 6FAC4F89962 for ; Wed, 22 May 2019 05:49:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6FAC4F89962 Date: 22 May 2019 12:49:07 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627890" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:49:07 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id ECD534172130; Wed, 22 May 2019 12:49:06 +0900 (JST) Message-ID: <877eajjh6j.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 115/145] ASoC: vc4: vc4_htmi: 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 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 --- drivers/gpu/drm/vc4/vc4_hdmi.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 99fc856..6beac1c 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -69,6 +69,9 @@ struct vc4_hdmi_audio { struct snd_soc_card card; struct snd_soc_dai_link link; + struct snd_soc_dai_link_component cpu; + struct snd_soc_dai_link_component codec; + struct snd_soc_dai_link_component platform; int samplerate; int channels; struct snd_dmaengine_dai_dma_data dma_data; @@ -1096,12 +1099,20 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *hdmi) return ret; } + dai_link->cpus = &hdmi->audio.cpu; + dai_link->codecs = &hdmi->audio.codec; + dai_link->platforms = &hdmi->audio.platform; + + dai_link->num_cpus = 1; + dai_link->num_codecs = 1; + dai_link->num_platforms = 1; + dai_link->name = "MAI"; dai_link->stream_name = "MAI PCM"; - dai_link->codec_dai_name = vc4_hdmi_audio_codec_dai_drv.name; - dai_link->cpu_dai_name = dev_name(dev); - dai_link->codec_name = dev_name(dev); - dai_link->platform_name = dev_name(dev); + dai_link->codecs->dai_name = vc4_hdmi_audio_codec_dai_drv.name; + dai_link->cpus->dai_name = dev_name(dev); + dai_link->codecs->name = dev_name(dev); + dai_link->platforms->name = dev_name(dev); card->dai_link = dai_link; card->num_links = 1; From patchwork Wed May 22 03:49:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954955 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 A1E076C5 for ; Wed, 22 May 2019 04:56:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DEFB28A81 for ; Wed, 22 May 2019 04:56:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 814DB28A93; Wed, 22 May 2019 04:56:40 +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 81AEB28A93 for ; Wed, 22 May 2019 04:56:39 +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 C8F941791; Wed, 22 May 2019 06:55:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C8F941791 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558500997; bh=UD3Gp9GJLuev7o9IgZBnAQCTyv+O8Q7AbuvxNelG1aA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vULhYU6PHhw24y+jW9sjYZlzNWvtGStIdtBMsH4cvKUO8u1K7wwK8o+ID9yij1zK2 Cscg9bRe5dXi7eE+TkcWXehbLYd9+HMpnK35ShoVtFugPqaHjWlXGzQI1Ex5OO8i4x UQNim+rFloacRErgY1I2LAVoEwATOl5eCfYipY5w= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F0AE0F89969; Wed, 22 May 2019 05:49:16 +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 A1794F8996B; Wed, 22 May 2019 05:49:15 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 73BB3F89962 for ; Wed, 22 May 2019 05:49:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 73BB3F89962 Date: 22 May 2019 12:49:11 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425797" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:49:11 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 3F6A141717B3; Wed, 22 May 2019 12:49:11 +0900 (JST) Message-ID: <875zq3jh6f.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 116/145] ASoC: sof: 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 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/sof/nocodec.c | 21 +++++++++++++++++---- sound/soc/sof/topology.c | 20 +++++++++----------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c index f84b434..3d128e5 100644 --- a/sound/soc/sof/nocodec.c +++ b/sound/soc/sof/nocodec.c @@ -21,6 +21,7 @@ static int sof_nocodec_bes_setup(struct device *dev, struct snd_soc_dai_link *links, int link_num, struct snd_soc_card *card) { + struct snd_soc_dai_link_component *dlc; int i; if (!ops || !links || !card) @@ -28,17 +29,29 @@ static int sof_nocodec_bes_setup(struct device *dev, /* set up BE dai_links */ for (i = 0; i < link_num; i++) { + dlc = devm_kzalloc(dev, 3 * sizeof(*dlc), GFP_KERNEL); + if (!dlc) + return -ENOMEM; + links[i].name = devm_kasprintf(dev, GFP_KERNEL, "NoCodec-%d", i); if (!links[i].name) return -ENOMEM; + links[i].cpus = &dlc[0]; + links[i].codecs = &dlc[1]; + links[i].platforms = &dlc[2]; + + links[i].num_cpus = 1; + links[i].num_codecs = 1; + links[i].num_platforms = 1; + links[i].id = i; links[i].no_pcm = 1; - links[i].cpu_dai_name = ops->drv[i].name; - links[i].platform_name = dev_name(dev); - links[i].codec_dai_name = "snd-soc-dummy-dai"; - links[i].codec_name = "snd-soc-dummy"; + links[i].cpus->dai_name = ops->drv[i].name; + links[i].platforms->name = dev_name(dev); + links[i].codecs->dai_name = "snd-soc-dummy-dai"; + links[i].codecs->name = "snd-soc-dummy"; links[i].dpcm_playback = 1; links[i].dpcm_capture = 1; } diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index c88afa8..a249dd0 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -2639,7 +2639,6 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index, struct sof_ipc_dai_config *config) { struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); - struct snd_soc_dai_link_component dai_component; struct snd_soc_tplg_private *private = &cfg->priv; struct snd_soc_dai *dai; u32 size = sizeof(*config); @@ -2650,7 +2649,6 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index, int ret; /* init IPC */ - memset(&dai_component, 0, sizeof(dai_component)); memset(&config->hda, 0, sizeof(struct sof_ipc_dai_hda_params)); config->hdr.size = size; @@ -2664,11 +2662,10 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index, return ret; } - dai_component.dai_name = link->cpu_dai_name; - dai = snd_soc_find_dai(&dai_component); + dai = snd_soc_find_dai(link->cpus); if (!dai) { dev_err(sdev->dev, "error: failed to find dai %s in %s", - dai_component.dai_name, __func__); + link->cpus->dai_name, __func__); return -EINVAL; } @@ -2708,7 +2705,11 @@ static int sof_link_load(struct snd_soc_component *scomp, int index, int ret; int i = 0; - link->platform_name = dev_name(sdev->dev); + if (!link->platforms) { + dev_err(sdev->dev, "error: no platforms\n"); + return -EINVAL; + } + link->platforms->name = dev_name(sdev->dev); /* * Set nonatomic property for FE dai links as their trigger action @@ -2801,16 +2802,13 @@ static int sof_link_load(struct snd_soc_component *scomp, int index, static int sof_link_hda_unload(struct snd_sof_dev *sdev, struct snd_soc_dai_link *link) { - struct snd_soc_dai_link_component dai_component; struct snd_soc_dai *dai; int ret = 0; - memset(&dai_component, 0, sizeof(dai_component)); - dai_component.dai_name = link->cpu_dai_name; - dai = snd_soc_find_dai(&dai_component); + dai = snd_soc_find_dai(link->cpus); if (!dai) { dev_err(sdev->dev, "error: failed to find dai %s in %s", - dai_component.dai_name, __func__); + link->cpus->dai_name, __func__); return -EINVAL; } From patchwork Wed May 22 03:49:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954961 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 6C3106C5 for ; Wed, 22 May 2019 04:57:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C5A028A81 for ; Wed, 22 May 2019 04:57:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FF9C28AB2; Wed, 22 May 2019 04:57:19 +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 7A8BD28A81 for ; Wed, 22 May 2019 04:57:18 +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 59F071832; Wed, 22 May 2019 06:56:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 59F071832 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501036; bh=Ejf2fHkmxWrWk5eJC/eogRXBLrxoEa08AyP04TzRaFU=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OceBAq1KjUhht7tW91DAdX7FuFIrJYj+OID3IU40mtprecpczZHaGFtr86U1tRVHY Au5uAwM6Rpe/mWgVQwdKmrX6VmjENgM1QC6wivRs+8lQer2Bi8ZDfa+ZfMtiYoJij1 xkrdSyDmjkIbL3b2RnZujrAA8cD2iezqrXaQf5AM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 46AB4F8996E; Wed, 22 May 2019 05:49:21 +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 006D0F89970; Wed, 22 May 2019 05:49:18 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 9337AF8996D for ; Wed, 22 May 2019 05:49:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9337AF8996D Date: 22 May 2019 12:49:15 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627901" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:49:15 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 5A7554172130; Wed, 22 May 2019 12:49:15 +0900 (JST) Message-ID: <874l5njh6b.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 117/145] ASoC: Intel: bdw-rt5677: 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 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/intel/boards/bdw-rt5677.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sound/soc/intel/boards/bdw-rt5677.c b/sound/soc/intel/boards/bdw-rt5677.c index 6520a8e..ff32be5 100644 --- a/sound/soc/intel/boards/bdw-rt5677.c +++ b/sound/soc/intel/boards/bdw-rt5677.c @@ -257,16 +257,24 @@ static int bdw_rt5677_init(struct snd_soc_pcm_runtime *rtd) } /* broadwell digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(fe, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("haswell-pcm-audio"))); + +SND_SOC_DAILINK_DEF(be, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-RT5677CE:00", "rt5677-aif1"))); + static struct snd_soc_dai_link bdw_rt5677_dais[] = { /* Front End DAI links */ { .name = "System PCM", .stream_name = "System Playback/Capture", - .cpu_dai_name = "System Pin", - .platform_name = "haswell-pcm-audio", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", #if !IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL) .init = bdw_rt5677_rtd_init, #endif @@ -276,6 +284,7 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = { }, .dpcm_capture = 1, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(fe, dummy, platform), }, /* Back End DAI links */ @@ -283,11 +292,7 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = { /* SSP0 - Codec */ .name = "Codec", .id = 0, - .cpu_dai_name = "snd-soc-dummy-dai", - .platform_name = "snd-soc-dummy", .no_pcm = 1, - .codec_name = "i2c-RT5677CE:00", - .codec_dai_name = "rt5677-aif1", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ignore_suspend = 1, @@ -297,6 +302,7 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = { .dpcm_playback = 1, .dpcm_capture = 1, .init = bdw_rt5677_init, + SND_SOC_DAILINK_REG(dummy, be, dummy), }, }; From patchwork Wed May 22 03:49:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954979 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 D855B912 for ; Wed, 22 May 2019 04:57:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6BA228A93 for ; Wed, 22 May 2019 04:57:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB18528AB2; Wed, 22 May 2019 04:57:58 +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 D5D3928A93 for ; Wed, 22 May 2019 04:57:57 +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 ECD6E1852; Wed, 22 May 2019 06:57:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ECD6E1852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501076; bh=ViDlni8ktySOhBqvgW7Zp+3T3g5la40iSzBAjYL50gQ=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Jc/r8RSCy18qi2cZZzIv9BBdwXuMK8P2seJRWt/UzhU0DHj++q6cUR0n7najzHCDC YmLHw3KjfJJcP6/GQGBvDAWafRHmc4nhm8Ac1GWg0/Q0q0lYUZHw9XEwhjSG6h+t8H cpvI4ZttHziRZEh0+t/UuT9mk+/TM6PEq4Aul7ms= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 70C7AF89974; Wed, 22 May 2019 05:49:26 +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 7BA6FF8996F; Wed, 22 May 2019 05:49:24 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 7A697F89971 for ; Wed, 22 May 2019 05:49:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7A697F89971 Date: 22 May 2019 12:49:20 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627905" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:49:20 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 03D824009407; Wed, 22 May 2019 12:49:20 +0900 (JST) Message-ID: <8736l7jh66.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 118/145] ASoC: Intel: haswell: 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 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/intel/boards/haswell.c | 46 +++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/haswell.c index 971226d..aace44e 100644 --- a/sound/soc/intel/boards/haswell.c +++ b/sound/soc/intel/boards/haswell.c @@ -105,53 +105,62 @@ static int haswell_rtd_init(struct snd_soc_pcm_runtime *rtd) return 0; } +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(offload0, + DAILINK_COMP_ARRAY(COMP_CPU("Offload0 Pin"))); + +SND_SOC_DAILINK_DEF(offload1, + DAILINK_COMP_ARRAY(COMP_CPU("Offload1 Pin"))); + +SND_SOC_DAILINK_DEF(loopback, + DAILINK_COMP_ARRAY(COMP_CPU("Loopback Pin"))); + +SND_SOC_DAILINK_DEF(codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-INT33CA:00", "rt5640-aif1"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("haswell-pcm-audio"))); + static struct snd_soc_dai_link haswell_rt5640_dais[] = { /* Front End DAI links */ { .name = "System", .stream_name = "System Playback/Capture", - .cpu_dai_name = "System Pin", - .platform_name = "haswell-pcm-audio", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .init = haswell_rtd_init, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(system, dummy, platform), }, { .name = "Offload0", .stream_name = "Offload0 Playback", - .cpu_dai_name = "Offload0 Pin", - .platform_name = "haswell-pcm-audio", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(offload0, dummy, platform), }, { .name = "Offload1", .stream_name = "Offload1 Playback", - .cpu_dai_name = "Offload1 Pin", - .platform_name = "haswell-pcm-audio", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(offload1, dummy, platform), }, { .name = "Loopback", .stream_name = "Loopback", - .cpu_dai_name = "Loopback Pin", - .platform_name = "haswell-pcm-audio", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(loopback, dummy, platform), }, /* Back End DAI links */ @@ -159,11 +168,7 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = { /* SSP0 - Codec */ .name = "Codec", .id = 0, - .cpu_dai_name = "snd-soc-dummy-dai", - .platform_name = "snd-soc-dummy", .no_pcm = 1, - .codec_name = "i2c-INT33CA:00", - .codec_dai_name = "rt5640-aif1", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ignore_suspend = 1, @@ -172,6 +177,7 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = { .ops = &haswell_rt5640_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(dummy, codec, dummy), }, }; From patchwork Wed May 22 03:49:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954981 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 EB538912 for ; Wed, 22 May 2019 04:58:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA0C928A81 for ; Wed, 22 May 2019 04:58:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD25828AAB; Wed, 22 May 2019 04:58: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 1D10428A81 for ; Wed, 22 May 2019 04:58: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 815471814; Wed, 22 May 2019 06:57:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 815471814 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501126; bh=vzWBOu4OhiUxxiRchZNzy0oaOa2OoXFjyyXIETjjAoA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rlia4bip9gDAWBmQQG3ArgzNmzfULm1Ib1X8AMtjRTBEVU5cMXrJxWfP1W8VbNVbg inFT9IVDF7YP4ilEw5n02EtaBFCrjjoVi0RTWZkxhBkfgpZre4dyUl9oBH5X9WK4jL J5tOQgF96ftjGqSt3zFu7lVIdQoRyqDqL3Y+d6sw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 13EBCF8997F; Wed, 22 May 2019 05:49:31 +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 190BCF89977; Wed, 22 May 2019 05:49:29 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 8E6D2F89971 for ; Wed, 22 May 2019 05:49:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8E6D2F89971 Date: 22 May 2019 12:49:24 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425812" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:49:24 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 4CDA04172130; Wed, 22 May 2019 12:49:24 +0900 (JST) Message-ID: <871s0rjh62.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 119/145] ASoC: Intel: broadwell: 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 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/intel/boards/broadwell.c | 46 +++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/sound/soc/intel/boards/broadwell.c b/sound/soc/intel/boards/broadwell.c index 0f18f89..fd8d885 100644 --- a/sound/soc/intel/boards/broadwell.c +++ b/sound/soc/intel/boards/broadwell.c @@ -152,67 +152,72 @@ static int broadwell_rtd_init(struct snd_soc_pcm_runtime *rtd) } #endif +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(offload0, + DAILINK_COMP_ARRAY(COMP_CPU("Offload0 Pin"))); + +SND_SOC_DAILINK_DEF(offload1, + DAILINK_COMP_ARRAY(COMP_CPU("Offload1 Pin"))); + +SND_SOC_DAILINK_DEF(loopback, + DAILINK_COMP_ARRAY(COMP_CPU("Loopback Pin"))); + +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("haswell-pcm-audio"))); + +SND_SOC_DAILINK_DEF(codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-INT343A:00", "rt286-aif1"))); + /* broadwell digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link broadwell_rt286_dais[] = { /* Front End DAI links */ { .name = "System PCM", .stream_name = "System Playback/Capture", - .cpu_dai_name = "System Pin", - .platform_name = "haswell-pcm-audio", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", #if !IS_ENABLED(CONFIG_SND_SOC_SOF_BROADWELL) .init = broadwell_rtd_init, #endif .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(system, dummy, platform), }, { .name = "Offload0", .stream_name = "Offload0 Playback", - .cpu_dai_name = "Offload0 Pin", - .platform_name = "haswell-pcm-audio", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(offload0, dummy, platform), }, { .name = "Offload1", .stream_name = "Offload1 Playback", - .cpu_dai_name = "Offload1 Pin", - .platform_name = "haswell-pcm-audio", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(offload1, dummy, platform), }, { .name = "Loopback PCM", .stream_name = "Loopback", - .cpu_dai_name = "Loopback Pin", - .platform_name = "haswell-pcm-audio", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(loopback, dummy, platform), }, /* Back End DAI links */ { /* SSP0 - Codec */ .name = "Codec", .id = 0, - .cpu_dai_name = "snd-soc-dummy-dai", - .platform_name = "snd-soc-dummy", .no_pcm = 1, - .codec_name = "i2c-INT343A:00", - .codec_dai_name = "rt286-aif1", .init = broadwell_rt286_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -222,6 +227,7 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = { .ops = &broadwell_rt286_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(dummy, codec, dummy), }, }; From patchwork Wed May 22 03:49:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954983 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 1756F6C5 for ; Wed, 22 May 2019 04:59:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0539E28A81 for ; Wed, 22 May 2019 04:59:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2A2D28AAB; Wed, 22 May 2019 04:59:22 +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 ECF6028A81 for ; Wed, 22 May 2019 04:59:21 +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 442951851; Wed, 22 May 2019 06:58:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 442951851 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501160; bh=eVZnTqxzGDms8uv8w5/QUWNCIyukbvOkcojTJyT4RBc=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=n0NsmlbGdDOtDiemEL1t8GfooXLX+qQKW1KQN69EakC5MEi9zoxjjVs/lTQxCcvCA SCPIjLQUUMT2TUmJlDGpVNcRAkysftVNQrhmWLN4M6lUcfvR3GHNIhdJfYiXWsXz7r gAyX91O1TSLDo2PZXyuu3kf2RIkL6b8/nt1UKsH4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9897CF8977B; Wed, 22 May 2019 05:49:47 +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 738CFF8977E; Wed, 22 May 2019 05:49:46 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id CAE4DF89777 for ; Wed, 22 May 2019 05:49:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CAE4DF89777 Date: 22 May 2019 12:49:40 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425834" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:49:40 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 815614003EC0; Wed, 22 May 2019 12:49:40 +0900 (JST) Message-ID: <87zhnfi2l5.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 120/145] ASoC: Intel: bxt_da7219_max98357a: 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 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/intel/boards/bxt_da7219_max98357a.c | 140 +++++++++++++++----------- 1 file changed, 80 insertions(+), 60 deletions(-) diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c index 5cadb7f..13f746c 100644 --- a/sound/soc/intel/boards/bxt_da7219_max98357a.c +++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c @@ -373,146 +373,177 @@ static const struct snd_soc_ops broxton_refcap_ops = { }; /* broxton digital audio interface glue - connects codec <--> CPU */ +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(system2, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin2"))); + +SND_SOC_DAILINK_DEF(reference, + DAILINK_COMP_ARRAY(COMP_CPU("Reference Pin"))); + +SND_SOC_DAILINK_DEF(dmic, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi3, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin"))); + + /* Back End DAI */ +SND_SOC_DAILINK_DEF(ssp5_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP5 Pin"))); +SND_SOC_DAILINK_DEF(ssp5_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("MX98357A:00", + BXT_MAXIM_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(ssp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin"))); +SND_SOC_DAILINK_DEF(ssp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7219:00", + BXT_DIALOG_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(dmic01_pin, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin"))); +SND_SOC_DAILINK_DEF(dmic01_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi"))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", + "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(idisp3_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin"))); +SND_SOC_DAILINK_DEF(idisp3_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", + "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:0e.0"))); + static struct snd_soc_dai_link broxton_dais[] = { /* Front End DAI links */ [BXT_DPCM_AUDIO_PB] = { .name = "Bxt Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:0e.0", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .init = broxton_da7219_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &broxton_da7219_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [BXT_DPCM_AUDIO_CP] = { .name = "Bxt Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:0e.0", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, .ops = &broxton_da7219_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [BXT_DPCM_AUDIO_HS_PB] = { .name = "Bxt Audio Headset Playback", .stream_name = "Headset Playback", - .cpu_dai_name = "System Pin2", - .platform_name = "0000:00:0e.0", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &broxton_da7219_fe_ops, + SND_SOC_DAILINK_REG(system2, dummy, platform), }, [BXT_DPCM_AUDIO_REF_CP] = { .name = "Bxt Audio Reference cap", .stream_name = "Refcap", - .cpu_dai_name = "Reference Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &broxton_refcap_ops, + SND_SOC_DAILINK_REG(reference, dummy, platform), }, [BXT_DPCM_AUDIO_DMIC_CP] = { .name = "Bxt Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &broxton_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [BXT_DPCM_AUDIO_HDMI1_PB] = { .name = "Bxt HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [BXT_DPCM_AUDIO_HDMI2_PB] = { .name = "Bxt HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [BXT_DPCM_AUDIO_HDMI3_PB] = { .name = "Bxt HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, /* Back End DAI links */ { /* SSP5 - Codec */ .name = "SSP5-Codec", .id = 0, - .cpu_dai_name = "SSP5 Pin", - .platform_name = "0000:00:0e.0", .no_pcm = 1, - .codec_name = "MX98357A:00", - .codec_dai_name = BXT_MAXIM_CODEC_DAI, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ignore_pmdown_time = 1, .be_hw_params_fixup = broxton_ssp_fixup, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(ssp5_pin, ssp5_codec, platform), }, { /* SSP1 - Codec */ .name = "SSP1-Codec", .id = 1, - .cpu_dai_name = "SSP1 Pin", - .platform_name = "0000:00:0e.0", .no_pcm = 1, - .codec_name = "i2c-DLGS7219:00", - .codec_dai_name = BXT_DIALOG_CODEC_DAI, .init = broxton_da7219_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -520,51 +551,40 @@ static struct snd_soc_dai_link broxton_dais[] = { .be_hw_params_fixup = broxton_ssp_fixup, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { .name = "dmic01", .id = 2, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:0e.0", .ignore_suspend = 1, .be_hw_params_fixup = broxton_dmic_fixup, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic01_pin, dmic01_codec, platform), }, { .name = "iDisp1", .id = 3, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:0e.0", .init = broxton_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 4, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:0e.0", .init = broxton_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 5, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:0e.0", .init = broxton_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; @@ -652,16 +672,16 @@ static int broxton_audio_probe(struct platform_device *pdev) /* Fixup the SSP entries for geminilake */ for (i = 0; i < ARRAY_SIZE(broxton_dais); i++) { /* MAXIM_CODEC is connected to SSP1. */ - if (!strcmp(broxton_dais[i].codec_dai_name, + if (!strcmp(broxton_dais[i].codecs->dai_name, BXT_MAXIM_CODEC_DAI)) { broxton_dais[i].name = "SSP1-Codec"; - broxton_dais[i].cpu_dai_name = "SSP1 Pin"; + broxton_dais[i].cpus->dai_name = "SSP1 Pin"; } /* DIALOG_CODE is connected to SSP2 */ - else if (!strcmp(broxton_dais[i].codec_dai_name, + else if (!strcmp(broxton_dais[i].codecs->dai_name, BXT_DIALOG_CODEC_DAI)) { broxton_dais[i].name = "SSP2-Codec"; - broxton_dais[i].cpu_dai_name = "SSP2 Pin"; + broxton_dais[i].cpus->dai_name = "SSP2 Pin"; } } } From patchwork Wed May 22 03:49:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954987 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 B1D27924 for ; Wed, 22 May 2019 05:00:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DEBE28A81 for ; Wed, 22 May 2019 05:00:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DFB928AAB; Wed, 22 May 2019 05:00:02 +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 9BD8B28A81 for ; Wed, 22 May 2019 05:00:01 +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 EC3AF1860; Wed, 22 May 2019 06:59:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EC3AF1860 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501200; bh=evqIBjpw2H6Japejg/4mnRHgOYpBuz0jVsfI/1VpQFo=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pnVJlsTNptQtPAiL8FpI8AnNlsscu7zR0Q5bwpyWbx6uffc8Q225iLSwQHeS0k6kq MHC+sbKcdSY0KjPcB2xihrX7LDcLrGPmbN0Rq68iab5F9MRdVun2RtJZK18pZz0Wox Q76/o0HmMbrjjcB0r03PmepNktbTDexhyOtanH+E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1BC62F89984; Wed, 22 May 2019 05:49:54 +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 8F5D2F89763; Wed, 22 May 2019 05:49:51 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 43359F89763 for ; Wed, 22 May 2019 05:49:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 43359F89763 Date: 22 May 2019 12:49:44 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425837" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:49:44 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id C2A5041717B3; Wed, 22 May 2019 12:49:44 +0900 (JST) Message-ID: <87y32zi2l1.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 121/145] ASoC: Intel: bxt_rt298: 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 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/intel/boards/bxt_rt298.c | 129 +++++++++++++++++++++---------------- 1 file changed, 74 insertions(+), 55 deletions(-) diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c index e91057f..746ef9c 100644 --- a/sound/soc/intel/boards/bxt_rt298.c +++ b/sound/soc/intel/boards/bxt_rt298.c @@ -331,6 +331,64 @@ static const struct snd_soc_ops broxton_rt286_fe_ops = { .startup = bxt_fe_startup, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(reference, + DAILINK_COMP_ARRAY(COMP_CPU("Reference Pin"))); + +SND_SOC_DAILINK_DEF(dmic, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi3, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin"))); + +SND_SOC_DAILINK_DEF(ssp5_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP5 Pin"))); +SND_SOC_DAILINK_DEF(ssp5_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-INT343A:00", + "rt298-aif1"))); + +SND_SOC_DAILINK_DEF(dmic_pin, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin"))); + +SND_SOC_DAILINK_DEF(dmic_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", + "dmic-hifi"))); + +SND_SOC_DAILINK_DEF(dmic16k, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC16k Pin"))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", + "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", + "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(idisp3_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin"))); +SND_SOC_DAILINK_DEF(idisp3_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", + "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:0e.0"))); + /* broxton digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link broxton_rt298_dais[] = { /* Front End DAI links */ @@ -338,107 +396,82 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { { .name = "Bxt Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:0e.0", .nonatomic = 1, .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .init = broxton_rt298_fe_init, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &broxton_rt286_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [BXT_DPCM_AUDIO_CP] = { .name = "Bxt Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:0e.0", .nonatomic = 1, .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, .ops = &broxton_rt286_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [BXT_DPCM_AUDIO_REF_CP] = { .name = "Bxt Audio Reference cap", .stream_name = "refcap", - .cpu_dai_name = "Reference Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(reference, dummy, platform), }, [BXT_DPCM_AUDIO_DMIC_CP] = { .name = "Bxt Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &broxton_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [BXT_DPCM_AUDIO_HDMI1_PB] = { .name = "Bxt HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [BXT_DPCM_AUDIO_HDMI2_PB] = { .name = "Bxt HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [BXT_DPCM_AUDIO_HDMI3_PB] = { .name = "Bxt HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, /* Back End DAI links */ { /* SSP5 - Codec */ .name = "SSP5-Codec", .id = 0, - .cpu_dai_name = "SSP5 Pin", - .platform_name = "0000:00:0e.0", .no_pcm = 1, - .codec_name = "i2c-INT343A:00", - .codec_dai_name = "rt298-aif1", .init = broxton_rt298_codec_init, .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -447,63 +480,49 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .ops = &broxton_rt298_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp5_pin, ssp5_codec, platform), }, { .name = "dmic01", .id = 1, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:0e.0", .be_hw_params_fixup = broxton_dmic_fixup, .ignore_suspend = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "dmic16k", .id = 2, - .cpu_dai_name = "DMIC16k Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:0e.0", .be_hw_params_fixup = broxton_dmic_fixup, .ignore_suspend = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic16k, dmic_codec, platform), }, { .name = "iDisp1", .id = 3, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:0e.0", .init = broxton_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 4, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:0e.0", .init = broxton_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 5, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:0e.0", .init = broxton_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; @@ -583,16 +602,16 @@ static int broxton_audio_probe(struct platform_device *pdev) int i; for (i = 0; i < ARRAY_SIZE(broxton_rt298_dais); i++) { - if (!strncmp(card->dai_link[i].codec_name, "i2c-INT343A:00", + if (!strncmp(card->dai_link[i].codecs->name, "i2c-INT343A:00", I2C_NAME_SIZE)) { if (!strncmp(card->name, "broxton-rt298", PLATFORM_NAME_SIZE)) { card->dai_link[i].name = "SSP5-Codec"; - card->dai_link[i].cpu_dai_name = "SSP5 Pin"; + card->dai_link[i].cpus->dai_name = "SSP5 Pin"; } else if (!strncmp(card->name, "geminilake-rt298", PLATFORM_NAME_SIZE)) { card->dai_link[i].name = "SSP2-Codec"; - card->dai_link[i].cpu_dai_name = "SSP2 Pin"; + card->dai_link[i].cpus->dai_name = "SSP2 Pin"; } } } From patchwork Wed May 22 03:49:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954991 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 CB607912 for ; Wed, 22 May 2019 05:00:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBC2228AEB for ; Wed, 22 May 2019 05:00:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD70F28B3B; Wed, 22 May 2019 05:00:41 +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 A9C5E28AEB for ; Wed, 22 May 2019 05:00:40 +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 F2BD5186B; Wed, 22 May 2019 06:59:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F2BD5186B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501239; bh=Au2LNgqzVrb0vLwcfyfF1XaFynLePzqPrCATLz/fJ9c=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=toRZv8jIux7aO0JepsvhjGkwcf0ECuxzCq2wJwwTABMo7zpP53IHNm2v8/lY2JeCY 0Fv7v2Vnp9c9QYQ8/NsDbjypPQLdXPcjHqaBoMDEfSgBNyQxBnKETZF1fiI5cC7U8R 0O7QFi3O6BAp1e92HyaXz5uFb9UIx69DeLHwwAdw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 67F39F8998A; Wed, 22 May 2019 05:49:56 +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 CAD6AF89985; Wed, 22 May 2019 05:49:52 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 32B9AF89984 for ; Wed, 22 May 2019 05:49:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 32B9AF89984 Date: 22 May 2019 12:49:48 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627941" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:49:48 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id E20384003EC2; Wed, 22 May 2019 12:49:48 +0900 (JST) Message-ID: <87woiji2kx.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 122/145] ASoC: Intel: byt-rt5640: 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 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/intel/boards/byt-rt5640.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/boards/byt-rt5640.c b/sound/soc/intel/boards/byt-rt5640.c index df902d8..483043f 100644 --- a/sound/soc/intel/boards/byt-rt5640.c +++ b/sound/soc/intel/boards/byt-rt5640.c @@ -180,18 +180,20 @@ static struct snd_soc_ops byt_rt5640_ops = { .hw_params = byt_rt5640_hw_params, }; +SND_SOC_DAILINK_DEFS(audio, + DAILINK_COMP_ARRAY(COMP_CPU("baytrail-pcm-audio")), + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5640:00", "rt5640-aif1")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("baytrail-pcm-audio"))); + static struct snd_soc_dai_link byt_rt5640_dais[] = { { .name = "Baytrail Audio", .stream_name = "Audio", - .cpu_dai_name = "baytrail-pcm-audio", - .codec_dai_name = "rt5640-aif1", - .codec_name = "i2c-10EC5640:00", - .platform_name = "baytrail-pcm-audio", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .init = byt_rt5640_init, .ops = &byt_rt5640_ops, + SND_SOC_DAILINK_REG(audio), }, }; From patchwork Wed May 22 03:49:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954997 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 F2C80924 for ; Wed, 22 May 2019 05:01:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2E2228AEB for ; Wed, 22 May 2019 05:01:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D769B28B3B; Wed, 22 May 2019 05:01:31 +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 3FE5128B37 for ; Wed, 22 May 2019 05:01:31 +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 90EC31862; Wed, 22 May 2019 07:00:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 90EC31862 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501289; bh=EiaYiTbsfF9h2JF/VabkBbZFp3HJse/YGrSAwKFZ7Ks=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TXZE5TZhJPLPv7IFZIpkZV21gFrnN7JsRKJqCtzhndkmXqB8ZvFBLah4jEq+drb2z mFbbMvKpA+Sl4LKo8UiMMLEgL4RVjuaiB3aOBd78XWsKj2SZZpempEOVRQfv92/aSu 3EsjIUEt9rzDqUMUY7XPtYi02cxbXFdH4irst1A8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 23C2DF89991; Wed, 22 May 2019 05:50:00 +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 5821EF8998E; Wed, 22 May 2019 05:49:57 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 65D0AF89763 for ; Wed, 22 May 2019 05:49:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 65D0AF89763 Date: 22 May 2019 12:49:52 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627943" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:49:52 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id E4CFB41717B3; Wed, 22 May 2019 12:49:52 +0900 (JST) Message-ID: <87v9y3i2kt.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 123/145] ASoC: Intel: byt-max98090: 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 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/intel/boards/byt-max98090.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/boards/byt-max98090.c b/sound/soc/intel/boards/byt-max98090.c index f128363..589499f 100644 --- a/sound/soc/intel/boards/byt-max98090.c +++ b/sound/soc/intel/boards/byt-max98090.c @@ -117,17 +117,19 @@ static int byt_max98090_init(struct snd_soc_pcm_runtime *runtime) hs_jack_gpios); } +SND_SOC_DAILINK_DEFS(baytrail, + DAILINK_COMP_ARRAY(COMP_CPU("baytrail-pcm-audio")), + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-193C9890:00", "HiFi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("baytrail-pcm-audio"))); + static struct snd_soc_dai_link byt_max98090_dais[] = { { .name = "Baytrail Audio", .stream_name = "Audio", - .cpu_dai_name = "baytrail-pcm-audio", - .codec_dai_name = "HiFi", - .codec_name = "i2c-193C9890:00", - .platform_name = "baytrail-pcm-audio", .init = byt_max98090_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, + SND_SOC_DAILINK_REG(baytrail), }, }; From patchwork Wed May 22 03:49:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10954999 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 5F734912 for ; Wed, 22 May 2019 05:02:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A3E828AEB for ; Wed, 22 May 2019 05:02:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D64428B3B; Wed, 22 May 2019 05:02:09 +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 5163F28AEB for ; Wed, 22 May 2019 05:02:08 +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 A7F491888; Wed, 22 May 2019 07:01:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A7F491888 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501326; bh=NkCqlU5h8eoBKliYgMFRqh+PO4XKLGWEr80v5Lk3/nY=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VvsrJbA4BOYl9lsG4eEja7+5P7oLI0+Ra1fsGlXptRJoEhHtUWcJ397/W3lqzSnCX KYyD335NYWsCwCl4gbbpEEEpu1926D/Wyhs4RsHxdfJ8PvQ/MXs4tZOpztQmBKIqcl NoJkHm3xQ/Z2qAKX5pwUJRMVorVVFshtV4MfpQLM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 63083F8999A; Wed, 22 May 2019 05:50:05 +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 3A376F8999A; Wed, 22 May 2019 05:50:03 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id C8655F8998D for ; Wed, 22 May 2019 05:49:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C8655F8998D Date: 22 May 2019 12:49:57 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627946" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:49:57 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 5272041717AA; Wed, 22 May 2019 12:49:57 +0900 (JST) Message-ID: <87tvdni2kp.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 124/145] ASoC: Intel: bytcht_es8316: 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 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/intel/boards/bytcht_es8316.c | 38 ++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index e8c585f..fc7ab4d 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -309,32 +309,43 @@ static const struct snd_soc_ops byt_cht_es8316_aif1_ops = { .startup = byt_cht_es8316_aif1_startup, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(media, + DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai"))); + +SND_SOC_DAILINK_DEF(deepbuffer, + DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai"))); + +SND_SOC_DAILINK_DEF(ssp2_port, + DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port"))); +SND_SOC_DAILINK_DEF(ssp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-ESSX8316:00", "ES8316 HiFi"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform"))); + static struct snd_soc_dai_link byt_cht_es8316_dais[] = { [MERR_DPCM_AUDIO] = { .name = "Audio Port", .stream_name = "Audio", - .cpu_dai_name = "media-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &byt_cht_es8316_aif1_ops, + SND_SOC_DAILINK_REG(media, dummy, platform), }, [MERR_DPCM_DEEP_BUFFER] = { .name = "Deep-Buffer Audio Port", .stream_name = "Deep-Buffer Audio", - .cpu_dai_name = "deepbuffer-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .ops = &byt_cht_es8316_aif1_ops, + SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, /* back ends */ @@ -344,11 +355,7 @@ static struct snd_soc_dai_link byt_cht_es8316_dais[] = { */ .name = "SSP2-Codec", .id = 0, - .cpu_dai_name = "ssp2-port", - .platform_name = "sst-mfld-platform", .no_pcm = 1, - .codec_dai_name = "ES8316 HiFi", - .codec_name = "i2c-ESSX8316:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .be_hw_params_fixup = byt_cht_es8316_codec_fixup, @@ -356,6 +363,7 @@ static struct snd_soc_dai_link byt_cht_es8316_dais[] = { .dpcm_playback = 1, .dpcm_capture = 1, .init = byt_cht_es8316_init, + SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), }, }; @@ -478,7 +486,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) mach = dev->platform_data; /* fix index of codec dai */ for (i = 0; i < ARRAY_SIZE(byt_cht_es8316_dais); i++) { - if (!strcmp(byt_cht_es8316_dais[i].codec_name, + if (!strcmp(byt_cht_es8316_dais[i].codecs->name, "i2c-ESSX8316:00")) { dai_index = i; break; @@ -491,7 +499,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) snprintf(codec_name, sizeof(codec_name), "i2c-%s", acpi_dev_name(adev)); put_device(&adev->dev); - byt_cht_es8316_dais[dai_index].codec_name = codec_name; + byt_cht_es8316_dais[dai_index].codecs->name = codec_name; } /* override plaform name, if required */ @@ -525,7 +533,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) log_quirks(dev); if (quirk & BYT_CHT_ES8316_SSP0) - byt_cht_es8316_dais[dai_index].cpu_dai_name = "ssp0-port"; + byt_cht_es8316_dais[dai_index].cpus->dai_name = "ssp0-port"; /* get the clock */ priv->mclk = devm_clk_get(dev, "pmc_plt_clk_3"); From patchwork Wed May 22 03:50:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955009 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 C0D3D912 for ; Wed, 22 May 2019 05:02:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B049B28B37 for ; Wed, 22 May 2019 05:02:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4CDA28B3B; Wed, 22 May 2019 05:02:44 +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 DA9B028B3C for ; Wed, 22 May 2019 05:02:43 +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 3D637188E; Wed, 22 May 2019 07:01:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3D637188E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501362; bh=tKQnXNc0BaaLlc6ez+Z4q4RN97usxgoAjVD17OF7zJc=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=NKZ4uZaVgrmWHasXGzrdOQKnvuIZgp3F/L8ZhB/S5gRKf/ZgNHM3RD7GZ/umL24FL mHkP5WktdM+gdfuw4BvwXjXLm+MgdPlVhyALrysfYPW+/Yvw3oqRjz/dl3LKcDHN/p 4vzSAWh+KbDaD/HjKU7mrKspsWNCKFkGxJdIsDLk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C3B68F8999F; Wed, 22 May 2019 05:50:08 +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 D5ED5F8999E; Wed, 22 May 2019 05:50:06 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 112B8F89999 for ; Wed, 22 May 2019 05:50:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 112B8F89999 Date: 22 May 2019 12:50:01 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425851" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:50:01 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B837D417246A; Wed, 22 May 2019 12:50:01 +0900 (JST) Message-ID: <87sgt7i2kk.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 125/145] ASoC: Intel: bytcht_nocodec: 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 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/intel/boards/bytcht_nocodec.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/sound/soc/intel/boards/bytcht_nocodec.c b/sound/soc/intel/boards/bytcht_nocodec.c index b80ec02..ecb8585 100644 --- a/sound/soc/intel/boards/bytcht_nocodec.c +++ b/sound/soc/intel/boards/bytcht_nocodec.c @@ -105,44 +105,49 @@ static struct snd_soc_ops aif1_ops = { .startup = aif1_startup, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(media, + DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai"))); + +SND_SOC_DAILINK_DEF(deepbuffer, + DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai"))); + +SND_SOC_DAILINK_DEF(ssp2_port, + DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform"))); + static struct snd_soc_dai_link dais[] = { [MERR_DPCM_AUDIO] = { .name = "Audio Port", .stream_name = "Audio", - .cpu_dai_name = "media-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .ignore_suspend = 1, .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &aif1_ops, + SND_SOC_DAILINK_REG(media, dummy, platform), }, [MERR_DPCM_DEEP_BUFFER] = { .name = "Deep-Buffer Audio Port", .stream_name = "Deep-Buffer Audio", - .cpu_dai_name = "deepbuffer-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .ignore_suspend = 1, .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .ops = &aif1_ops, + SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, /* CODEC<->CODEC link */ /* back ends */ { .name = "SSP2-LowSpeed Connector", .id = 0, - .cpu_dai_name = "ssp2-port", - .platform_name = "sst-mfld-platform", .no_pcm = 1, - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .be_hw_params_fixup = codec_fixup, @@ -150,6 +155,7 @@ static struct snd_soc_dai_link dais[] = { .nonatomic = true, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp2_port, dummy, platform), }, }; From patchwork Wed May 22 03:50:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955015 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 11435912 for ; Wed, 22 May 2019 05:03:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0237E28AEB for ; Wed, 22 May 2019 05:03:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAED428B3B; Wed, 22 May 2019 05:03:24 +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 E9A5F28B37 for ; Wed, 22 May 2019 05:03:23 +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 060811727; Wed, 22 May 2019 07:02:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 060811727 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501402; bh=iGU8SAyPSkG9PU79cMcMBylyz54AV4euDFwXQWoVy5E=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ch2GSiIaTcXGOkdfb7AhfxJrXv8ditZoz39DRasDXly0Rh8HGfXR0kard6nN2+gHn f7jD3QcG/4h5YS5NVAFxK9PwU5cEoM7bv1D7hYLo7m5xV+PSeFcCmuRWfnpV+Yb7yc byfBdMfkgRQ0yAsqNyQOgaGWtA/k1/oRXFCZsP4A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 51AF0F899A4; Wed, 22 May 2019 05:50:13 +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 9EAD3F899A3; Wed, 22 May 2019 05:50:10 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 6AECBF8999B for ; Wed, 22 May 2019 05:50:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6AECBF8999B Date: 22 May 2019 12:50:06 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425860" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:50:06 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id E44664009405; Wed, 22 May 2019 12:50:05 +0900 (JST) Message-ID: <87r28ri2kg.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 126/145] ASoC: Intel: bytcht_da7213: 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 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/intel/boards/bytcht_da7213.c | 37 +++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c index 4decba3..1fa4d70 100644 --- a/sound/soc/intel/boards/bytcht_da7213.c +++ b/sound/soc/intel/boards/bytcht_da7213.c @@ -159,42 +159,50 @@ static const struct snd_soc_ops ssp2_ops = { }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(media, + DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai"))); + +SND_SOC_DAILINK_DEF(deepbuffer, + DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai"))); + +SND_SOC_DAILINK_DEF(ssp2_port, + DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port"))); +SND_SOC_DAILINK_DEF(ssp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7213:00", + "da7213-hifi"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform"))); + static struct snd_soc_dai_link dailink[] = { [MERR_DPCM_AUDIO] = { .name = "Audio Port", .stream_name = "Audio", - .cpu_dai_name = "media-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &aif1_ops, + SND_SOC_DAILINK_REG(media, dummy, platform), }, [MERR_DPCM_DEEP_BUFFER] = { .name = "Deep-Buffer Audio Port", .stream_name = "Deep-Buffer Audio", - .cpu_dai_name = "deepbuffer-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .ops = &aif1_ops, + SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, /* CODEC<->CODEC link */ /* back ends */ { .name = "SSP2-Codec", .id = 0, - .cpu_dai_name = "ssp2-port", - .platform_name = "sst-mfld-platform", .no_pcm = 1, - .codec_dai_name = "da7213-hifi", - .codec_name = "i2c-DLGS7213:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .be_hw_params_fixup = codec_fixup, @@ -202,6 +210,7 @@ static struct snd_soc_dai_link dailink[] = { .dpcm_playback = 1, .dpcm_capture = 1, .ops = &ssp2_ops, + SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), }, }; @@ -237,7 +246,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev) /* fix index of codec dai */ for (i = 0; i < ARRAY_SIZE(dailink); i++) { - if (!strcmp(dailink[i].codec_name, "i2c-DLGS7213:00")) { + if (!strcmp(dailink[i].codecs->name, "i2c-DLGS7213:00")) { dai_index = i; break; } @@ -249,7 +258,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev) snprintf(codec_name, sizeof(codec_name), "i2c-%s", acpi_dev_name(adev)); put_device(&adev->dev); - dailink[dai_index].codec_name = codec_name; + dailink[dai_index].codecs->name = codec_name; } /* override plaform name, if required */ From patchwork Wed May 22 03:50:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955017 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 0A11E912 for ; Wed, 22 May 2019 05:04:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED4C228B3B for ; Wed, 22 May 2019 05:04:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E00D828B44; Wed, 22 May 2019 05:04:06 +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 1CECE28B3B for ; Wed, 22 May 2019 05:04:06 +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 6BCEC171A; Wed, 22 May 2019 07:03:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6BCEC171A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501444; bh=C8Ep2JNPrHkASOmTV5xDlI2xGVztR5M8WkJhWnQgnCw=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=e/kAL+FTbBMj5AwPnIN+4ffMeCp7KZoNzgrYDfRM/O9rrP6NWhwShY+lgaMw/4sAg PR6NBNLfz00IdV+/D1akcvXAIMUNYoQ8QLae+irUSeGXx9naE7x4Ej30oPgC45+h+m h+Ck5yRZcyPwaoeor7Q+r15/SqTS6j57hHn9yoXA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D3D37F8999B; Wed, 22 May 2019 05:50:15 +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 3E1E1F899A7; Wed, 22 May 2019 05:50:14 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id DF872F8999B for ; Wed, 22 May 2019 05:50:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DF872F8999B Date: 22 May 2019 12:50:10 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425867" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:50:10 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 6C02F417268E; Wed, 22 May 2019 12:50:10 +0900 (JST) Message-ID: <87pnobi2kc.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 127/145] ASoC: Intel: bytcr_rt5651: 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 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/intel/boards/bytcr_rt5651.c | 40 +++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index ca657c3..2ef391e 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -746,42 +746,49 @@ static const struct snd_soc_ops byt_rt5651_be_ssp2_ops = { .hw_params = byt_rt5651_aif1_hw_params, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(media, + DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai"))); + +SND_SOC_DAILINK_DEF(deepbuffer, + DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai"))); + +SND_SOC_DAILINK_DEF(ssp2_port, + DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port"))); +SND_SOC_DAILINK_DEF(ssp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5651:00", "rt5651-aif1"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform"))); + static struct snd_soc_dai_link byt_rt5651_dais[] = { [MERR_DPCM_AUDIO] = { .name = "Audio Port", .stream_name = "Audio", - .cpu_dai_name = "media-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &byt_rt5651_aif1_ops, + SND_SOC_DAILINK_REG(media, dummy, platform), }, [MERR_DPCM_DEEP_BUFFER] = { .name = "Deep-Buffer Audio Port", .stream_name = "Deep-Buffer Audio", - .cpu_dai_name = "deepbuffer-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .ops = &byt_rt5651_aif1_ops, + SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, /* CODEC<->CODEC link */ /* back ends */ { .name = "SSP2-Codec", .id = 0, - .cpu_dai_name = "ssp2-port", - .platform_name = "sst-mfld-platform", .no_pcm = 1, - .codec_dai_name = "rt5651-aif1", - .codec_name = "i2c-10EC5651:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .be_hw_params_fixup = byt_rt5651_codec_fixup, @@ -791,6 +798,7 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = { .dpcm_capture = 1, .init = byt_rt5651_init, .ops = &byt_rt5651_be_ssp2_ops, + SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), }, }; @@ -905,7 +913,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) /* fix index of codec dai */ for (i = 0; i < ARRAY_SIZE(byt_rt5651_dais); i++) { - if (!strcmp(byt_rt5651_dais[i].codec_name, "i2c-10EC5651:00")) { + if (!strcmp(byt_rt5651_dais[i].codecs->name, "i2c-10EC5651:00")) { dai_index = i; break; } @@ -917,7 +925,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name), "i2c-%s", acpi_dev_name(adev)); put_device(&adev->dev); - byt_rt5651_dais[dai_index].codec_name = byt_rt5651_codec_name; + byt_rt5651_dais[dai_index].codecs->name = byt_rt5651_codec_name; } else { dev_err(&pdev->dev, "Error cannot find '%s' dev\n", mach->id); return -ENODEV; @@ -1057,7 +1065,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) sizeof(byt_rt5651_codec_aif_name), "%s", "rt5651-aif2"); - byt_rt5651_dais[dai_index].codec_dai_name = + byt_rt5651_dais[dai_index].codecs->dai_name = byt_rt5651_codec_aif_name; } @@ -1068,7 +1076,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) sizeof(byt_rt5651_cpu_dai_name), "%s", "ssp0-port"); - byt_rt5651_dais[dai_index].cpu_dai_name = + byt_rt5651_dais[dai_index].cpus->dai_name = byt_rt5651_cpu_dai_name; } From patchwork Wed May 22 03:50:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955023 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 77FDF924 for ; Wed, 22 May 2019 05:04:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68CE428B3B for ; Wed, 22 May 2019 05:04:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C18E28B44; Wed, 22 May 2019 05:04:45 +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 58A9628B3C for ; Wed, 22 May 2019 05:04:44 +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 B483417D3; Wed, 22 May 2019 07:03:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B483417D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501482; bh=myG2ALOX16S9IYWcdiQW3G0j3J78lKoeWwbRnTl2tNI=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=gqZs3UAgpsXdTodJLkMM1k2CtVy5Jc6er94usQDryvOthMuxfwLQF4vfaCZANUo7+ b3TtsjMHt9ogyQ6LPCp5g8Y+9hoEqm0h3616cfTpYZimYdT1Ph1lt55PnVDT0i9Oxq YC212qUUDK9+vwRhq4n+R2ODGYmVC0ulebRTiS5I= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0E118F89782; Wed, 22 May 2019 05:50:22 +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 6861FF899AA; Wed, 22 May 2019 05:50:20 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 5D17DF89782 for ; Wed, 22 May 2019 05:50:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5D17DF89782 Date: 22 May 2019 12:50:16 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425875" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:50:16 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id DCD0A41717AA; Wed, 22 May 2019 12:50:16 +0900 (JST) Message-ID: <87o93vi2k5.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 128/145] ASoC: Intel: bytcr_rt5640: 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 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/intel/boards/bytcr_rt5640.c | 43 ++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index dc22df9..8fbda85 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -1026,41 +1026,51 @@ static const struct snd_soc_ops byt_rt5640_be_ssp2_ops = { .hw_params = byt_rt5640_aif1_hw_params, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(media, + DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai"))); + +SND_SOC_DAILINK_DEF(deepbuffer, + DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai"))); + +SND_SOC_DAILINK_DEF(ssp2_port, + /* overwritten for ssp0 routing */ + DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port"))); +SND_SOC_DAILINK_DEF(ssp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC( + /* overwritten with HID */ "i2c-10EC5640:00", + /* changed w/ quirk */ "rt5640-aif1"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform"))); + static struct snd_soc_dai_link byt_rt5640_dais[] = { [MERR_DPCM_AUDIO] = { .name = "Baytrail Audio Port", .stream_name = "Baytrail Audio", - .cpu_dai_name = "media-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &byt_rt5640_aif1_ops, + SND_SOC_DAILINK_REG(media, dummy, platform), }, [MERR_DPCM_DEEP_BUFFER] = { .name = "Deep-Buffer Audio Port", .stream_name = "Deep-Buffer Audio", - .cpu_dai_name = "deepbuffer-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .ops = &byt_rt5640_aif1_ops, + SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, /* back ends */ { .name = "SSP2-Codec", .id = 0, - .cpu_dai_name = "ssp2-port", /* overwritten for ssp0 routing */ - .platform_name = "sst-mfld-platform", .no_pcm = 1, - .codec_dai_name = "rt5640-aif1", /* changed w/ quirk */ - .codec_name = "i2c-10EC5640:00", /* overwritten with HID */ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .be_hw_params_fixup = byt_rt5640_codec_fixup, @@ -1070,6 +1080,7 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { .dpcm_capture = 1, .init = byt_rt5640_init, .ops = &byt_rt5640_be_ssp2_ops, + SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), }, }; @@ -1171,7 +1182,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) /* fix index of codec dai */ for (i = 0; i < ARRAY_SIZE(byt_rt5640_dais); i++) { - if (!strcmp(byt_rt5640_dais[i].codec_name, "i2c-10EC5640:00")) { + if (!strcmp(byt_rt5640_dais[i].codecs->name, "i2c-10EC5640:00")) { dai_index = i; break; } @@ -1183,7 +1194,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) snprintf(byt_rt5640_codec_name, sizeof(byt_rt5640_codec_name), "i2c-%s", acpi_dev_name(adev)); put_device(&adev->dev); - byt_rt5640_dais[dai_index].codec_name = byt_rt5640_codec_name; + byt_rt5640_dais[dai_index].codecs->name = byt_rt5640_codec_name; } /* @@ -1275,7 +1286,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) sizeof(byt_rt5640_codec_aif_name), "%s", "rt5640-aif2"); - byt_rt5640_dais[dai_index].codec_dai_name = + byt_rt5640_dais[dai_index].codecs->dai_name = byt_rt5640_codec_aif_name; } @@ -1287,7 +1298,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) sizeof(byt_rt5640_cpu_dai_name), "%s", "ssp0-port"); - byt_rt5640_dais[dai_index].cpu_dai_name = + byt_rt5640_dais[dai_index].cpus->dai_name = byt_rt5640_cpu_dai_name; } From patchwork Wed May 22 03:50:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955025 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 DAB6C924 for ; Wed, 22 May 2019 05:05:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C593028751 for ; Wed, 22 May 2019 05:05:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4DE128A47; Wed, 22 May 2019 05:05:35 +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 E898F28751 for ; Wed, 22 May 2019 05:05:34 +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 4488C1891; Wed, 22 May 2019 07:04:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4488C1891 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501533; bh=0MA8+VGKJ674JJcYLs7yqQDCU6YnbczTRK3KYSZZkm8=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Un3ctCtvnWatjmfKLnRGQFD4U08ghx0vYx0MQNoklqW9RaE6BDFLiXSZA9tT996EZ ZFTLNFGRcp3Qxbj99o3vTh9Nl1RmJkTauCLxIKQuD0WFjEkg6NLBe3BQ6Mk4q2IoUw DGgtgVilEVqLEbBS2T3qo5Kz9Ygb2UtV/qqB4V1Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 57D30F899B3; Wed, 22 May 2019 05:50:30 +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 AA4A8F899B5; Wed, 22 May 2019 05:50:28 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 732E4F899B3 for ; Wed, 22 May 2019 05:50:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 732E4F899B3 Date: 22 May 2019 12:50:24 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16627979" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:50:24 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 363364009405; Wed, 22 May 2019 12:50:24 +0900 (JST) Message-ID: <87mujfi2jy.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 129/145] ASoC: Intel: cht_bsw_rt5645: 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 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/intel/boards/cht_bsw_rt5645.c | 42 ++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index 32dbeaf..2f293ef 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@ -425,48 +425,56 @@ static const struct snd_soc_ops cht_be_ssp2_ops = { .hw_params = cht_aif1_hw_params, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(media, + DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai"))); + +SND_SOC_DAILINK_DEF(deepbuffer, + DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai"))); + +SND_SOC_DAILINK_DEF(ssp2_port, + DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port"))); +SND_SOC_DAILINK_DEF(ssp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5645:00", "rt5645-aif1"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform"))); + static struct snd_soc_dai_link cht_dailink[] = { [MERR_DPCM_AUDIO] = { .name = "Audio Port", .stream_name = "Audio", - .cpu_dai_name = "media-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &cht_aif1_ops, + SND_SOC_DAILINK_REG(media, dummy, platform), }, [MERR_DPCM_DEEP_BUFFER] = { .name = "Deep-Buffer Audio Port", .stream_name = "Deep-Buffer Audio", - .cpu_dai_name = "deepbuffer-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .ops = &cht_aif1_ops, + SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, /* CODEC<->CODEC link */ /* back ends */ { .name = "SSP2-Codec", .id = 0, - .cpu_dai_name = "ssp2-port", - .platform_name = "sst-mfld-platform", .no_pcm = 1, - .codec_dai_name = "rt5645-aif1", - .codec_name = "i2c-10EC5645:00", .init = cht_codec_init, .be_hw_params_fixup = cht_codec_fixup, .nonatomic = true, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &cht_be_ssp2_ops, + SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), }, }; @@ -567,8 +575,8 @@ static int snd_cht_mc_probe(struct platform_device *pdev) /* set correct codec name */ for (i = 0; i < ARRAY_SIZE(cht_dailink); i++) - if (!strcmp(card->dai_link[i].codec_name, "i2c-10EC5645:00")) { - card->dai_link[i].codec_name = drv->codec_name; + if (!strcmp(card->dai_link[i].codecs->name, "i2c-10EC5645:00")) { + card->dai_link[i].codecs->name = drv->codec_name; dai_index = i; } @@ -578,7 +586,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) snprintf(cht_rt5645_codec_name, sizeof(cht_rt5645_codec_name), "i2c-%s", acpi_dev_name(adev)); put_device(&adev->dev); - cht_dailink[dai_index].codec_name = cht_rt5645_codec_name; + cht_dailink[dai_index].codecs->name = cht_rt5645_codec_name; } /* @@ -649,7 +657,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) sizeof(cht_rt5645_codec_aif_name), "%s", "rt5645-aif2"); - cht_dailink[dai_index].codec_dai_name = + cht_dailink[dai_index].codecs->dai_name = cht_rt5645_codec_aif_name; } @@ -661,7 +669,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) sizeof(cht_rt5645_cpu_dai_name), "%s", "ssp0-port"); - cht_dailink[dai_index].cpu_dai_name = + cht_dailink[dai_index].cpus->dai_name = cht_rt5645_cpu_dai_name; } From patchwork Wed May 22 03:50:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955027 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 12959912 for ; Wed, 22 May 2019 05:06:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0175728B2C for ; Wed, 22 May 2019 05:06:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9C0628B3C; Wed, 22 May 2019 05:06:08 +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 10F2E28B2C for ; Wed, 22 May 2019 05:06:07 +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 5E6AD176E; Wed, 22 May 2019 07:05:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5E6AD176E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501566; bh=FOLJCeTG5+bpWdgGD5OQg/tcLF/XaZiOThzzi4f6TD0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZHP5sFJloxZCQvS8WETiCNVT6yMfARoWCXwZeB3bCLhoz+onWkT5otQtTuN1+MhWb HnekT9vuXGUtmxPoPb6ySgNSlSzGGQ4z1/DcDkuTr7Y9Xl16w/lOmQgXvrIuYUK3ih S+UvCaWsKt+YDOBXvmJH7AJbp52SH1Skm5MLxBqg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 59D83F899B8; Wed, 22 May 2019 05:50:36 +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 BC885F899B9; Wed, 22 May 2019 05:50:34 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id D24D7F899B6 for ; Wed, 22 May 2019 05:50:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D24D7F899B6 Date: 22 May 2019 12:50:30 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425900" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:50:30 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 8FD934009405; Wed, 22 May 2019 12:50:30 +0900 (JST) Message-ID: <87lfyzi2jr.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 130/145] ASoC: Intel: cht_bsw_max98090_ti: 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 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/intel/boards/cht_bsw_max98090_ti.c | 32 +++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c index c0e0844..fb775ed 100644 --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c @@ -337,41 +337,48 @@ static struct snd_soc_aux_dev cht_max98090_headset_dev = { .codec_name = "i2c-104C227E:00", }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(media, + DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai"))); + +SND_SOC_DAILINK_DEF(deepbuffer, + DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai"))); + +SND_SOC_DAILINK_DEF(ssp2_port, + DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port"))); +SND_SOC_DAILINK_DEF(ssp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-193C9890:00", "HiFi"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform"))); + static struct snd_soc_dai_link cht_dailink[] = { [MERR_DPCM_AUDIO] = { .name = "Audio Port", .stream_name = "Audio", - .cpu_dai_name = "media-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &cht_aif1_ops, + SND_SOC_DAILINK_REG(media, dummy, platform), }, [MERR_DPCM_DEEP_BUFFER] = { .name = "Deep-Buffer Audio Port", .stream_name = "Deep-Buffer Audio", - .cpu_dai_name = "deepbuffer-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .ops = &cht_aif1_ops, + SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, /* back ends */ { .name = "SSP2-Codec", .id = 0, - .cpu_dai_name = "ssp2-port", - .platform_name = "sst-mfld-platform", .no_pcm = 1, - .codec_dai_name = "HiFi", - .codec_name = "i2c-193C9890:00", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .init = cht_codec_init, @@ -379,6 +386,7 @@ static struct snd_soc_dai_link cht_dailink[] = { .dpcm_playback = 1, .dpcm_capture = 1, .ops = &cht_be_ssp2_ops, + SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), }, }; From patchwork Wed May 22 03:50:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955035 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 910D3112C for ; Wed, 22 May 2019 05:06:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80B6528B2C for ; Wed, 22 May 2019 05:06:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 754BA28B3C; Wed, 22 May 2019 05:06:47 +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 B19B628B2C for ; Wed, 22 May 2019 05:06:46 +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 07796188F; Wed, 22 May 2019 07:05:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 07796188F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501605; bh=yxDagQv8sVq20NCHARTmvcHTCSN++tQVZlysukV6vVg=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dOs4xZKe/Xu2MfiUSIj0UymRqFFMGusv/DCtR6qFuzmv5Hj/B5gTyaqmmhepjWx2Y f/h5Tn/VeL3FwHnQCUjcw8LGHxCG3+GjxK953rePTk8YOvZ+ghIncQCmUl9p6HzCgO p+a0kHUFUAld/ak+BFT+ZVWehWdCbax8bpditjQA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7D8A9F899BD; Wed, 22 May 2019 05:50:41 +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 EB37AF899BE; Wed, 22 May 2019 05:50:39 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id DEEC4F899BB for ; Wed, 22 May 2019 05:50:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DEEC4F899BB Date: 22 May 2019 12:50:36 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425903" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:50:36 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 68D844003EC2; Wed, 22 May 2019 12:50:36 +0900 (JST) Message-ID: <87k1eji2jm.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 131/145] ASoC: Intel: cht_bsw_rt5672: 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 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/intel/boards/cht_bsw_rt5672.c | 37 ++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c index 0f77708..92ffc1a 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -295,32 +295,44 @@ static const struct snd_soc_ops cht_be_ssp2_ops = { .hw_params = cht_aif1_hw_params, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(media, + DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai"))); + +SND_SOC_DAILINK_DEF(deepbuffer, + DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai"))); + +SND_SOC_DAILINK_DEF(ssp2_port, + DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port"))); +SND_SOC_DAILINK_DEF(ssp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5670:00", + "rt5670-aif1"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform"))); + static struct snd_soc_dai_link cht_dailink[] = { /* Front End DAI links */ [MERR_DPCM_AUDIO] = { .name = "Audio Port", .stream_name = "Audio", - .cpu_dai_name = "media-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &cht_aif1_ops, + SND_SOC_DAILINK_REG(media, dummy, platform), }, [MERR_DPCM_DEEP_BUFFER] = { .name = "Deep-Buffer Audio Port", .stream_name = "Deep-Buffer Audio", - .cpu_dai_name = "deepbuffer-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .ops = &cht_aif1_ops, + SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, /* Back End DAI links */ @@ -328,17 +340,14 @@ static struct snd_soc_dai_link cht_dailink[] = { /* SSP2 - Codec */ .name = "SSP2-Codec", .id = 0, - .cpu_dai_name = "ssp2-port", - .platform_name = "sst-mfld-platform", .no_pcm = 1, .nonatomic = true, - .codec_dai_name = "rt5670-aif1", - .codec_name = "i2c-10EC5670:00", .init = cht_codec_init, .be_hw_params_fixup = cht_codec_fixup, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &cht_be_ssp2_ops, + SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), }, }; @@ -417,9 +426,9 @@ static int snd_cht_mc_probe(struct platform_device *pdev) "i2c-%s", acpi_dev_name(adev)); put_device(&adev->dev); for (i = 0; i < ARRAY_SIZE(cht_dailink); i++) { - if (!strcmp(cht_dailink[i].codec_name, + if (!strcmp(cht_dailink[i].codecs->name, RT5672_I2C_DEFAULT)) { - cht_dailink[i].codec_name = drv->codec_name; + cht_dailink[i].codecs->name = drv->codec_name; break; } } From patchwork Wed May 22 03:50:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955039 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 3B542924 for ; Wed, 22 May 2019 05:07:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BE1B28B3B for ; Wed, 22 May 2019 05:07:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 202E428B47; Wed, 22 May 2019 05:07:31 +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 2302328B3B for ; Wed, 22 May 2019 05:07:26 +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 6DED81894; Wed, 22 May 2019 07:06:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6DED81894 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501644; bh=epohaKksCzFey3j1wsRV4iRKFZYiQxP8btijQgLZ6NY=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=nKNjWGJfCkhW7t7xZ9vKAj9jFl2ELIQG0iXRYOTjWvBrYucTvEfpfBthV9gwtxX9o 60IGC2YIAFFfQ+Y5WpwD8zTofHk2Cm81j4zE/mopq8zRIOB+84Ynh7871dYpHPNALI L2bYPHHbe33hDw4Ib2LHcUKixhRA7Hls+r/qjXSQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 63221F899C2; Wed, 22 May 2019 05:50:45 +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 12E85F899C3; Wed, 22 May 2019 05:50:44 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 383E7F899C0 for ; Wed, 22 May 2019 05:50:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 383E7F899C0 Date: 22 May 2019 12:50:40 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425920" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:50:40 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B1F7041728C4; Wed, 22 May 2019 12:50:40 +0900 (JST) Message-ID: <87imu3i2jh.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 132/145] ASoC: Intel: cht_bsw_nau8824: 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 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/intel/boards/cht_bsw_nau8824.c | 41 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/sound/soc/intel/boards/cht_bsw_nau8824.c b/sound/soc/intel/boards/cht_bsw_nau8824.c index 02c2fa2..5165e5d 100644 --- a/sound/soc/intel/boards/cht_bsw_nau8824.c +++ b/sound/soc/intel/boards/cht_bsw_nau8824.c @@ -175,51 +175,59 @@ static const struct snd_soc_ops cht_be_ssp2_ops = { .hw_params = cht_aif1_hw_params, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(media, + DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai"))); + +SND_SOC_DAILINK_DEF(deepbuffer, + DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai"))); + +SND_SOC_DAILINK_DEF(compress, + DAILINK_COMP_ARRAY(COMP_CPU("compress-cpu-dai"))); + +SND_SOC_DAILINK_DEF(ssp2_port, + DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port"))); +SND_SOC_DAILINK_DEF(ssp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10508824:00", + NAU8824_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform"))); + static struct snd_soc_dai_link cht_dailink[] = { /* Front End DAI links */ [MERR_DPCM_AUDIO] = { .name = "Audio Port", .stream_name = "Audio", - .cpu_dai_name = "media-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .dpcm_capture = 1, .ops = &cht_aif1_ops, + SND_SOC_DAILINK_REG(media, dummy, platform), }, [MERR_DPCM_DEEP_BUFFER] = { .name = "Deep-Buffer Audio Port", .stream_name = "Deep-Buffer Audio", - .cpu_dai_name = "deepbuffer-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", .nonatomic = true, .dynamic = 1, .dpcm_playback = 1, .ops = &cht_aif1_ops, + SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, [MERR_DPCM_COMPR] = { .name = "Compressed Port", .stream_name = "Compress", - .cpu_dai_name = "compress-cpu-dai", - .codec_dai_name = "snd-soc-dummy-dai", - .codec_name = "snd-soc-dummy", - .platform_name = "sst-mfld-platform", + SND_SOC_DAILINK_REG(compress, dummy, platform), }, /* Back End DAI links */ { /* SSP2 - Codec */ .name = "SSP2-Codec", .id = 1, - .cpu_dai_name = "ssp2-port", - .platform_name = "sst-mfld-platform", .no_pcm = 1, - .codec_dai_name = NAU8824_CODEC_DAI, - .codec_name = "i2c-10508824:00", .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBS_CFS, .init = cht_codec_init, @@ -227,6 +235,7 @@ static struct snd_soc_dai_link cht_dailink[] = { .dpcm_playback = 1, .dpcm_capture = 1, .ops = &cht_be_ssp2_ops, + SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), }, }; From patchwork Wed May 22 03:50:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955049 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 1508C112C for ; Wed, 22 May 2019 05:08:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02F4928B2C for ; Wed, 22 May 2019 05:08:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E958528B3C; Wed, 22 May 2019 05:08:07 +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 042A028B2C for ; Wed, 22 May 2019 05:08:07 +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 5C24D189C; Wed, 22 May 2019 07:07:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5C24D189C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501685; bh=DKzuFziNPUu8C2HjmYUzvhmENXlxAouaQ2XihVv9miA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OaSVNVDc0dShc1cOoNpiZ46iSQHc2uDwfEV9sJBByYqgEKdxNTHj0tlucYrZH/BfR wsXAxJy4P+gVmudnSCt/xk9/L/NKjNcEq7JmxYA5EJhtWQ8x9Ty1viOtuLMdW6pxkh bX8hOGwmJvCibbMJqEtrKbZ8gGc+grOZ5zDcCQCQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 37997F899C4; Wed, 22 May 2019 05:50:50 +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 986DDF899C8; Wed, 22 May 2019 05:50:48 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 68A4AF899C6 for ; Wed, 22 May 2019 05:50:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 68A4AF899C6 Date: 22 May 2019 12:50:45 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425923" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:50:45 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id E8D1041728C4; Wed, 22 May 2019 12:50:44 +0900 (JST) Message-ID: <87h89ni2jd.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 133/145] ASoC: Intel: kbl_rt5660: 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 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/intel/boards/kbl_rt5660.c | 83 +++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 36 deletions(-) diff --git a/sound/soc/intel/boards/kbl_rt5660.c b/sound/soc/intel/boards/kbl_rt5660.c index 3255e00..74fe1f3 100644 --- a/sound/soc/intel/boards/kbl_rt5660.c +++ b/sound/soc/intel/boards/kbl_rt5660.c @@ -317,78 +317,101 @@ static const struct snd_soc_ops kabylake_rt5660_fe_ops = { .startup = kbl_fe_startup, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi3, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin"))); + +SND_SOC_DAILINK_DEF(ssp0_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin"))); +SND_SOC_DAILINK_DEF(ssp0_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC3277:00", KBL_RT5660_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(idisp3_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin"))); +SND_SOC_DAILINK_DEF(idisp3_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3"))); + /* kabylake digital audio interface glue - connects rt5660 codec <--> CPU */ static struct snd_soc_dai_link kabylake_rt5660_dais[] = { /* Front End DAI links */ [KBL_DPCM_AUDIO_PB] = { .name = "Kbl Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &kabylake_rt5660_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_CP] = { .name = "Kbl Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, .ops = &kabylake_rt5660_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI3_PB] = { .name = "Kbl HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, /* Back End DAI links */ @@ -396,11 +419,7 @@ static struct snd_soc_dai_link kabylake_rt5660_dais[] = { /* SSP0 - Codec */ .name = "SSP0-Codec", .id = 0, - .cpu_dai_name = "SSP0 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = "i2c-10EC3277:00", - .codec_dai_name = KBL_RT5660_CODEC_DAI, .init = kabylake_rt5660_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | @@ -410,39 +429,31 @@ static struct snd_soc_dai_link kabylake_rt5660_dais[] = { .ops = &kabylake_rt5660_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { .name = "iDisp1", .id = 1, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 2, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi2_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 3, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi3_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; From patchwork Wed May 22 03:50:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955051 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 DF60E924 for ; Wed, 22 May 2019 05:08:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCA0B28B44 for ; Wed, 22 May 2019 05:08:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0C8628B49; Wed, 22 May 2019 05:08:58 +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 95E8A28B44 for ; Wed, 22 May 2019 05:08:57 +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 E22B8169E; Wed, 22 May 2019 07:08:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E22B8169E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501736; bh=eMD3m2bCRqKTKGeLw4sZ+9uayZQBDucG9ch0mfe1BCA=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SCFgRcT/O4Bp2mkBfbtYwcRgJBHEeGHt2I0jtKktdjMHInCMX2lIpsTZKG/a5BeUF 0byhePiLTB+B/kGEMwKTVIL+kypMWarMb3XIXWtRGLXusbgQgR06YuTtBt/6WpdhgI StsQGYnlXlnJLqMyU8u//yyIo3oxS7a8CmyZt+wg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 41EC9F899D1; Wed, 22 May 2019 05:50:56 +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 A3266F899D1; Wed, 22 May 2019 05:50:55 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 5F674F899CB for ; Wed, 22 May 2019 05:50:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5F674F899CB Date: 22 May 2019 12:50:49 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16628033" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:50:49 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 6E25141728CF; Wed, 22 May 2019 12:50:49 +0900 (JST) Message-ID: <87ftp7i2j8.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 134/145] ASoC: Intel: kbl_rt5663_max98927: 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 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/intel/boards/kbl_rt5663_max98927.c | 185 +++++++++++++-------------- 1 file changed, 86 insertions(+), 99 deletions(-) diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c index d714752..aeed285 100644 --- a/sound/soc/intel/boards/kbl_rt5663_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c @@ -246,17 +246,6 @@ static struct snd_soc_codec_conf max98927_codec_conf[] = { }, }; -static struct snd_soc_dai_link_component max98927_codec_components[] = { - { /* Left */ - .name = MAXIM_DEV0_NAME, - .dai_name = KBL_MAXIM_CODEC_DAI, - }, - { /* Right */ - .name = MAXIM_DEV1_NAME, - .dai_name = KBL_MAXIM_CODEC_DAI, - }, -}; - static int kabylake_rt5663_fe_init(struct snd_soc_pcm_runtime *rtd) { int ret; @@ -590,127 +579,164 @@ static struct snd_soc_ops skylake_refcap_ops = { .startup = kabylake_refcap_startup, }; + +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(system2, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin2"))); + +SND_SOC_DAILINK_DEF(echoref, + DAILINK_COMP_ARRAY(COMP_CPU("Echoref Pin"))); + +SND_SOC_DAILINK_DEF(reference, + DAILINK_COMP_ARRAY(COMP_CPU("Reference Pin"))); + +SND_SOC_DAILINK_DEF(dmic, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi3, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin"))); + +SND_SOC_DAILINK_DEF(ssp0_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin"))); +SND_SOC_DAILINK_DEF(ssp0_codec, + DAILINK_COMP_ARRAY( + /* Left */ COMP_CODEC(MAXIM_DEV0_NAME, KBL_MAXIM_CODEC_DAI), + /* Right */ COMP_CODEC(MAXIM_DEV1_NAME, KBL_MAXIM_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(ssp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin"))); +SND_SOC_DAILINK_DEF(ssp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5663:00", + KBL_REALTEK_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(dmic01_pin, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin"))); +SND_SOC_DAILINK_DEF(dmic01_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi"))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(idisp3_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin"))); +SND_SOC_DAILINK_DEF(idisp3_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3"))); + /* kabylake digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link kabylake_dais[] = { /* Front End DAI links */ [KBL_DPCM_AUDIO_PB] = { .name = "Kbl Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .init = kabylake_rt5663_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &kabylake_rt5663_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_CP] = { .name = "Kbl Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, .ops = &kabylake_rt5663_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_HS_PB] = { .name = "Kbl Audio Headset Playback", .stream_name = "Headset Audio", - .cpu_dai_name = "System Pin2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(system2, dummy, platform), }, [KBL_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture", - .cpu_dai_name = "Echoref Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .capture_only = 1, .nonatomic = 1, + SND_SOC_DAILINK_REG(echoref, dummy, platform), }, [KBL_DPCM_AUDIO_REF_CP] = { .name = "Kbl Audio Reference cap", .stream_name = "Wake on Voice", - .cpu_dai_name = "Reference Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, + SND_SOC_DAILINK_REG(reference, dummy, platform), }, [KBL_DPCM_AUDIO_DMIC_CP] = { .name = "Kbl Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &kabylake_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI3_PB] = { .name = "Kbl HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, /* Back End DAI links */ @@ -718,11 +744,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { /* SSP0 - Codec */ .name = "SSP0-Codec", .id = 0, - .cpu_dai_name = "SSP0 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codecs = max98927_codec_components, - .num_codecs = ARRAY_SIZE(max98927_codec_components), .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -730,16 +752,13 @@ static struct snd_soc_dai_link kabylake_dais[] = { .be_hw_params_fixup = kabylake_ssp_fixup, .dpcm_playback = 1, .ops = &kabylake_ssp0_ops, + SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { /* SSP1 - Codec */ .name = "SSP1-Codec", .id = 1, - .cpu_dai_name = "SSP1 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = "i2c-10EC5663:00", - .codec_dai_name = KBL_REALTEK_CODEC_DAI, .init = kabylake_rt5663_max98927_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -748,51 +767,40 @@ static struct snd_soc_dai_link kabylake_dais[] = { .ops = &kabylake_rt5663_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { .name = "dmic01", .id = 2, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:1f.3", .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic01_pin, dmic01_codec, platform), }, { .name = "iDisp1", .id = 3, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 4, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi2_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 5, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi3_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; @@ -801,58 +809,46 @@ static struct snd_soc_dai_link kabylake_5663_dais[] = { [KBL_DPCM_AUDIO_5663_PB] = { .name = "Kbl Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &kabylake_rt5663_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_5663_CP] = { .name = "Kbl Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, .ops = &kabylake_rt5663_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_5663_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [KBL_DPCM_AUDIO_5663_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, /* Back End DAI links */ @@ -860,11 +856,7 @@ static struct snd_soc_dai_link kabylake_5663_dais[] = { /* SSP1 - Codec */ .name = "SSP1-Codec", .id = 0, - .cpu_dai_name = "SSP1 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = "i2c-10EC5663:00", - .codec_dai_name = KBL_REALTEK_CODEC_DAI, .init = kabylake_rt5663_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -873,28 +865,23 @@ static struct snd_soc_dai_link kabylake_5663_dais[] = { .ops = &kabylake_rt5663_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { .name = "iDisp1", .id = 1, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = kabylake_5663_hdmi1_init, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 2, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:1f.3", .init = kabylake_5663_hdmi2_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, }; From patchwork Wed May 22 03:50:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955055 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 29192112C for ; Wed, 22 May 2019 05:09:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17B1428B3B for ; Wed, 22 May 2019 05:09:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C19828B44; Wed, 22 May 2019 05:09:31 +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 1AE5F28B3B for ; Wed, 22 May 2019 05:09:30 +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 7369418A0; Wed, 22 May 2019 07:08:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7369418A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501768; bh=z4qS10sqQqa8BZ5IKd76v/4mMoGqbpD2bQQ29lPQwN0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VPGINuIEfETYz0fY5+DGCeGYxqAFE8GnRWdmmGo34C2l17zBwtZdEAipAxVNXvrga 9Kdd+GSvtNaBqeI1zBpOZG5Z7bpBHtXBa1KngIcHqB4Lvx4YZFXoR1i01NBASEXKuB iPNi1BhtmZfEEYNNOPRQpBODhXUzO7oVi6KysG5g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 312D2F899D2; Wed, 22 May 2019 05:51:01 +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 874F1F899D5; Wed, 22 May 2019 05:50:59 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 0CF49F89781 for ; Wed, 22 May 2019 05:50:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0CF49F89781 Date: 22 May 2019 12:50:53 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425937" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:50:53 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id B15E34003EC0; Wed, 22 May 2019 12:50:53 +0900 (JST) Message-ID: <87ef4ri2j4.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 135/145] ASoC: Intel: kbl_rt5663_rt5514_max98927: 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 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 --- .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 126 +++++++++++---------- 1 file changed, 64 insertions(+), 62 deletions(-) diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c index 879f142..a22749e 100644 --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c @@ -145,20 +145,6 @@ static struct snd_soc_codec_conf max98927_codec_conf[] = { }, }; -static struct snd_soc_dai_link_component ssp0_codec_components[] = { - { /* Left */ - .name = MAXIM_DEV0_NAME, - .dai_name = KBL_MAXIM_CODEC_DAI, - }, - { /* Right */ - .name = MAXIM_DEV1_NAME, - .dai_name = KBL_MAXIM_CODEC_DAI, - }, - { /*dmic */ - .name = RT5514_DEV_NAME, - .dai_name = KBL_REALTEK_DMIC_CODEC_DAI, - }, -}; static int kabylake_rt5663_fe_init(struct snd_soc_pcm_runtime *rtd) { @@ -430,108 +416,136 @@ static struct snd_soc_ops kabylake_dmic_ops = { .startup = kabylake_dmic_startup, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(system2, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin2"))); + +SND_SOC_DAILINK_DEF(echoref, + DAILINK_COMP_ARRAY(COMP_CPU("Echoref Pin"))); + +SND_SOC_DAILINK_DEF(spi_cpu, + DAILINK_COMP_ARRAY(COMP_CPU("spi-PRP0001:00"))); +SND_SOC_DAILINK_DEF(spi_platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("spi-PRP0001:00"))); + +SND_SOC_DAILINK_DEF(dmic, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(ssp0_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin"))); +SND_SOC_DAILINK_DEF(ssp0_codec, + DAILINK_COMP_ARRAY( + /* Left */ COMP_CODEC(MAXIM_DEV0_NAME, KBL_MAXIM_CODEC_DAI), + /* Right */COMP_CODEC(MAXIM_DEV1_NAME, KBL_MAXIM_CODEC_DAI), + /* dmic */ COMP_CODEC(RT5514_DEV_NAME, KBL_REALTEK_DMIC_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(ssp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin"))); +SND_SOC_DAILINK_DEF(ssp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC(RT5663_DEV_NAME, KBL_REALTEK_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3"))); + /* kabylake digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link kabylake_dais[] = { /* Front End DAI links */ [KBL_DPCM_AUDIO_PB] = { .name = "Kbl Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .init = kabylake_rt5663_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &kabylake_rt5663_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_CP] = { .name = "Kbl Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, .ops = &kabylake_rt5663_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_HS_PB] = { .name = "Kbl Audio Headset Playback", .stream_name = "Headset Audio", - .cpu_dai_name = "System Pin2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(system2, dummy, platform), }, [KBL_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture", - .cpu_dai_name = "Echoref Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .capture_only = 1, .nonatomic = 1, + SND_SOC_DAILINK_REG(echoref, dummy, platform), }, [KBL_DPCM_AUDIO_RT5514_DSP] = { .name = "rt5514 dsp", .stream_name = "Wake on Voice", - .cpu_dai_name = "spi-PRP0001:00", - .platform_name = "spi-PRP0001:00", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", + SND_SOC_DAILINK_REG(spi_cpu, dummy, spi_platform), }, [KBL_DPCM_AUDIO_DMIC_CP] = { .name = "Kbl Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &kabylake_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, /* Back End DAI links */ /* single Back end dai for both max speakers and dmic */ @@ -539,11 +553,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { /* SSP0 - Codec */ .name = "SSP0-Codec", .id = 0, - .cpu_dai_name = "SSP0 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codecs = ssp0_codec_components, - .num_codecs = ARRAY_SIZE(ssp0_codec_components), .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -552,15 +562,12 @@ static struct snd_soc_dai_link kabylake_dais[] = { .dpcm_playback = 1, .dpcm_capture = 1, .ops = &kabylake_ssp0_ops, + SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { .name = "SSP1-Codec", .id = 1, - .cpu_dai_name = "SSP1 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = RT5663_DEV_NAME, - .codec_dai_name = KBL_REALTEK_CODEC_DAI, .init = kabylake_rt5663_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -569,28 +576,23 @@ static struct snd_soc_dai_link kabylake_dais[] = { .ops = &kabylake_rt5663_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { .name = "iDisp1", .id = 3, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 4, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi2_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, }; From patchwork Wed May 22 03:51: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: 10955059 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 2A5B8112C for ; Wed, 22 May 2019 05:10:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 165C328A5D for ; Wed, 22 May 2019 05:10:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0ADEC28B44; Wed, 22 May 2019 05:10:11 +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 4983E28A5D for ; Wed, 22 May 2019 05:10:09 +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 A3E0418AD; Wed, 22 May 2019 07:09:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A3E0418AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501807; bh=TyP0s+YeJ5zFs8W7NTP51oec7AlIZFpd5X3CmpJHVn0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=XpQDchAiCt8hVlU/t9XLJJEf0ZkKw9R4KDyTnvkKQzlIoGCYExlg/Fwd25FtkPzOx S4Nac0gT1TDl2pqn9NJNQozVBpv9sFkuyORQhDJCkKqyFJI0HlMfms/4SukyjNMCe6 UHxGiCGBbblBbQC6oLHzM5hn+xEzlIq7kP5XDOZI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1C259F89781; Wed, 22 May 2019 05:51:08 +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 40984F899D8; Wed, 22 May 2019 05:51:06 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 706AAF89781 for ; Wed, 22 May 2019 05:51:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 706AAF89781 Date: 22 May 2019 12:51:00 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16628052" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:51:00 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 2FCE941728DF; Wed, 22 May 2019 12:51:00 +0900 (JST) Message-ID: <87d0kbi2iy.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 136/145] ASoC: Intel: kbl_da7219_max98927: 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 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/intel/boards/kbl_da7219_max98927.c | 212 ++++++++++++--------------- 1 file changed, 90 insertions(+), 122 deletions(-) diff --git a/sound/soc/intel/boards/kbl_da7219_max98927.c b/sound/soc/intel/boards/kbl_da7219_max98927.c index 1efe7fd..2afcaad 100644 --- a/sound/soc/intel/boards/kbl_da7219_max98927.c +++ b/sound/soc/intel/boards/kbl_da7219_max98927.c @@ -595,19 +595,6 @@ static struct snd_soc_codec_conf max98373_codec_conf[] = { }, }; -static struct snd_soc_dai_link_component max98927_ssp0_codec_components[] = { - { /* Left */ - .name = MAX98927_DEV0_NAME, - .dai_name = MAX98927_CODEC_DAI, - }, - - { /* For Right */ - .name = MAX98927_DEV1_NAME, - .dai_name = MAX98927_CODEC_DAI, - }, - -}; - static struct snd_soc_dai_link_component max98373_ssp0_codec_components[] = { { /* Left */ .name = MAX98373_DEV0_NAME, @@ -621,110 +608,148 @@ static struct snd_soc_dai_link_component max98373_ssp0_codec_components[] = { }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(echoref, + DAILINK_COMP_ARRAY(COMP_CPU("Echoref Pin"))); + +SND_SOC_DAILINK_DEF(reference, + DAILINK_COMP_ARRAY(COMP_CPU("Reference Pin"))); + +SND_SOC_DAILINK_DEF(dmic, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi3, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin"))); + +SND_SOC_DAILINK_DEF(system2, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin2"))); + +SND_SOC_DAILINK_DEF(ssp0_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin"))); +SND_SOC_DAILINK_DEF(ssp0_codec, + DAILINK_COMP_ARRAY( + /* Left */ COMP_CODEC(MAX98927_DEV0_NAME, MAX98927_CODEC_DAI), + /* For Right */ COMP_CODEC(MAX98927_DEV1_NAME, MAX98927_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(ssp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin"))); +SND_SOC_DAILINK_DEF(ssp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7219:00", + KBL_DIALOG_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(dmic_pin, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin"))); +SND_SOC_DAILINK_DEF(dmic_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi"))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(idisp3_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin"))); +SND_SOC_DAILINK_DEF(idisp3_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3"))); + /* kabylake digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link kabylake_dais[] = { /* Front End DAI links */ [KBL_DPCM_AUDIO_PB] = { .name = "Kbl Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .init = kabylake_da7219_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &kabylake_da7219_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture", - .cpu_dai_name = "Echoref Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .capture_only = 1, .nonatomic = 1, + SND_SOC_DAILINK_REG(echoref, dummy, platform), }, [KBL_DPCM_AUDIO_REF_CP] = { .name = "Kbl Audio Reference cap", .stream_name = "Wake on Voice", - .cpu_dai_name = "Reference Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, + SND_SOC_DAILINK_REG(reference, dummy, platform), }, [KBL_DPCM_AUDIO_DMIC_CP] = { .name = "Kbl Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &kabylake_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI3_PB] = { .name = "Kbl HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, [KBL_DPCM_AUDIO_HS_PB] = { .name = "Kbl Audio Headset Playback", .stream_name = "Headset Audio", - .cpu_dai_name = "System Pin2", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .nonatomic = 1, .dynamic = 1, @@ -732,21 +757,18 @@ static struct snd_soc_dai_link kabylake_dais[] = { .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .ops = &kabylake_da7219_fe_ops, - + SND_SOC_DAILINK_REG(system2, dummy, platform), }, [KBL_DPCM_AUDIO_CP] = { .name = "Kbl Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, .ops = &kabylake_da7219_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, /* Back End DAI links */ @@ -754,11 +776,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { /* SSP0 - Codec */ .name = "SSP0-Codec", .id = 0, - .cpu_dai_name = "SSP0 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codecs = max98927_ssp0_codec_components, - .num_codecs = ARRAY_SIZE(max98927_ssp0_codec_components), .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -767,16 +785,13 @@ static struct snd_soc_dai_link kabylake_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, .ops = &kabylake_ssp0_ops, + SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { /* SSP1 - Codec */ .name = "SSP1-Codec", .id = 1, - .cpu_dai_name = "SSP1 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = "i2c-DLGS7219:00", - .codec_dai_name = KBL_DIALOG_CODEC_DAI, .init = kabylake_da7219_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -784,52 +799,41 @@ static struct snd_soc_dai_link kabylake_dais[] = { .be_hw_params_fixup = kabylake_ssp_fixup, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { .name = "dmic01", .id = 2, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", .init = kabylake_dmic_init, - .platform_name = "0000:00:1f.3", .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 3, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 4, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi2_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 5, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi3_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; @@ -839,96 +843,75 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { [KBL_DPCM_AUDIO_PB] = { .name = "Kbl Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .init = kabylake_da7219_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &kabylake_da7219_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture", - .cpu_dai_name = "Echoref Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .capture_only = 1, .nonatomic = 1, + SND_SOC_DAILINK_REG(echoref, dummy, platform), }, [KBL_DPCM_AUDIO_REF_CP] = { .name = "Kbl Audio Reference cap", .stream_name = "Wake on Voice", - .cpu_dai_name = "Reference Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, + SND_SOC_DAILINK_REG(reference, dummy, platform), }, [KBL_DPCM_AUDIO_DMIC_CP] = { .name = "Kbl Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &kabylake_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI3_PB] = { .name = "Kbl HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, /* Back End DAI links */ @@ -936,11 +919,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { /* SSP0 - Codec */ .name = "SSP0-Codec", .id = 0, - .cpu_dai_name = "SSP0 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codecs = max98927_ssp0_codec_components, - .num_codecs = ARRAY_SIZE(max98927_ssp0_codec_components), .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -949,52 +928,41 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, .ops = &kabylake_ssp0_ops, + SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec), }, { .name = "dmic01", .id = 1, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", .init = kabylake_dmic_init, - .platform_name = "0000:00:1f.3", .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 2, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 3, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi2_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 4, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi3_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; From patchwork Wed May 22 03:51:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955063 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 CC290924 for ; Wed, 22 May 2019 05:11:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBC7828AFC for ; Wed, 22 May 2019 05:11:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFE2D28B55; Wed, 22 May 2019 05:11:00 +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 CB84F28AFC for ; Wed, 22 May 2019 05:10:59 +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 36A7A18B7; Wed, 22 May 2019 07:10:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 36A7A18B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501858; bh=RHzgDYawx+H88oZGd/DfO2OlXDKQbKs1guZ1dAQb0HQ=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rMbEg5ltxPCnDmR622//I716nsHFUC4luxjzAixEiEtFOHL2ydrHnxlCMM+uhs1y1 VJNGmMTpnJtpDYwdqg8aR9Nc29/il6KTFG9FqgsIAQwM31xS7Ex5brZQKrZvHrCcrd B2QGiEpRWbB6337DzTKBIH2NLkTx9Tn/agt/Q9x8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 30B81F899E3; Wed, 22 May 2019 05:51:12 +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 51221F899DB; Wed, 22 May 2019 05:51:09 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id C4FADF8962F for ; Wed, 22 May 2019 05:51:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C4FADF8962F Date: 22 May 2019 12:51:04 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425968" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:51:04 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 86FB44172C12; Wed, 22 May 2019 12:51:04 +0900 (JST) Message-ID: <87blzvi2it.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 137/145] ASoC: Intel: kbl_da7219_max98357a: 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 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/intel/boards/kbl_da7219_max98357a.c | 114 +++++++++++++++----------- 1 file changed, 66 insertions(+), 48 deletions(-) diff --git a/sound/soc/intel/boards/kbl_da7219_max98357a.c b/sound/soc/intel/boards/kbl_da7219_max98357a.c index 07491a0..707f324 100644 --- a/sound/soc/intel/boards/kbl_da7219_max98357a.c +++ b/sound/soc/intel/boards/kbl_da7219_max98357a.c @@ -350,92 +350,128 @@ static const unsigned int ch_mono[] = { 1, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(dmic, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi3, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin"))); + +SND_SOC_DAILINK_DEF(ssp0_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin"))); +SND_SOC_DAILINK_DEF(ssp0_codec, + DAILINK_COMP_ARRAY(COMP_CODEC(MAXIM_DEV0_NAME, + KBL_MAXIM_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(ssp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin"))); +SND_SOC_DAILINK_DEF(ssp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7219:00", + KBL_DIALOG_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(dmic_pin, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin"))); +SND_SOC_DAILINK_DEF(dmic_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi"))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", + "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(idisp3_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin"))); +SND_SOC_DAILINK_DEF(idisp3_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3"))); + /* kabylake digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link kabylake_dais[] = { /* Front End DAI links */ [KBL_DPCM_AUDIO_PB] = { .name = "Kbl Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .init = kabylake_da7219_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &kabylake_da7219_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_CP] = { .name = "Kbl Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, .ops = &kabylake_da7219_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [KBL_DPCM_AUDIO_DMIC_CP] = { .name = "Kbl Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &kabylake_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [KBL_DPCM_AUDIO_HDMI3_PB] = { .name = "Kbl HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, /* Back End DAI links */ @@ -443,27 +479,20 @@ static struct snd_soc_dai_link kabylake_dais[] = { /* SSP0 - Codec */ .name = "SSP0-Codec", .id = 0, - .cpu_dai_name = "SSP0 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = MAXIM_DEV0_NAME, - .codec_dai_name = KBL_MAXIM_CODEC_DAI, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { /* SSP1 - Codec */ .name = "SSP1-Codec", .id = 1, - .cpu_dai_name = "SSP1 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = "i2c-DLGS7219:00", - .codec_dai_name = KBL_DIALOG_CODEC_DAI, .init = kabylake_da7219_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -471,51 +500,40 @@ static struct snd_soc_dai_link kabylake_dais[] = { .be_hw_params_fixup = kabylake_ssp_fixup, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { .name = "dmic01", .id = 2, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:1f.3", .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 3, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 4, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi2_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 5, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:1f.3", .init = kabylake_hdmi3_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; From patchwork Wed May 22 03:51:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955065 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 039E2112C for ; Wed, 22 May 2019 05:11:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7C2628847 for ; Wed, 22 May 2019 05:11:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC76328B55; Wed, 22 May 2019 05:11:39 +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 DF8BA28B0A for ; Wed, 22 May 2019 05:11:38 +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 249D818B8; Wed, 22 May 2019 07:10:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 249D818B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501897; bh=+s12Dtwc8sFBFF5b0IijGrY1kADkfp1VQ9IAgx850F0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aVnGh8Ojib08GyP1tI2IWtXeXOaAvilzVxS1RXjUK+IRYwmkP5OKIO2uRmACO2I2K /A/oy2Bcdyo7rGZUpSRujfZDcNr0g8T2v98ZpZ0K5xY8pYw3W++TdpS8P4Iphli9BC iJepAKsMpMkPVnUGNuUFLDXYOlg34yuopojc2hU8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AB49CF899E8; Wed, 22 May 2019 05:51:15 +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 6007AF899E8; Wed, 22 May 2019 05:51:14 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id B8D19F899E1 for ; Wed, 22 May 2019 05:51:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B8D19F899E1 Date: 22 May 2019 12:51:09 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16628069" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:51:09 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 8177941717B3; Wed, 22 May 2019 12:51:09 +0900 (JST) Message-ID: <87a7ffi2io.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 138/145] ASoC: Intel: skl_nau88l25_ssm4567: 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 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/intel/boards/skl_nau88l25_ssm4567.c | 132 ++++++++++++++------------ 1 file changed, 69 insertions(+), 63 deletions(-) diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c index 8433c52..4c9f2c5 100644 --- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c +++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c @@ -164,17 +164,6 @@ static struct snd_soc_codec_conf ssm4567_codec_conf[] = { }, }; -static struct snd_soc_dai_link_component ssm4567_codec_components[] = { - { /* Left */ - .name = "i2c-INT343B:00", - .dai_name = SKL_SSM_CODEC_DAI, - }, - { /* Right */ - .name = "i2c-INT343B:01", - .dai_name = SKL_SSM_CODEC_DAI, - }, -}; - static int skylake_ssm4567_codec_init(struct snd_soc_pcm_runtime *rtd) { int ret; @@ -453,105 +442,140 @@ static const struct snd_soc_ops skylake_refcap_ops = { .startup = skylake_refcap_startup, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(reference, + DAILINK_COMP_ARRAY(COMP_CPU("Reference Pin"))); + +SND_SOC_DAILINK_DEF(dmic, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi3, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin"))); + +SND_SOC_DAILINK_DEF(ssp0_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin"))); +SND_SOC_DAILINK_DEF(ssp0_codec, + DAILINK_COMP_ARRAY( + /* Left */ COMP_CODEC("i2c-INT343B:00", SKL_SSM_CODEC_DAI), + /* Right */ COMP_CODEC("i2c-INT343B:01", SKL_SSM_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(ssp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin"))); +SND_SOC_DAILINK_DEF(ssp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10508825:00", SKL_NUVOTON_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(dmic01_pin, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin"))); +SND_SOC_DAILINK_DEF(dmic01_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi"))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(idisp3_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin"))); +SND_SOC_DAILINK_DEF(idisp3_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3"))); + /* skylake digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link skylake_dais[] = { /* Front End DAI links */ [SKL_DPCM_AUDIO_PB] = { .name = "Skl Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .init = skylake_nau8825_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &skylake_nau8825_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [SKL_DPCM_AUDIO_CP] = { .name = "Skl Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, .ops = &skylake_nau8825_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [SKL_DPCM_AUDIO_REF_CP] = { .name = "Skl Audio Reference cap", .stream_name = "Wake on Voice", - .cpu_dai_name = "Reference Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, + SND_SOC_DAILINK_REG(reference, dummy, platform), }, [SKL_DPCM_AUDIO_DMIC_CP] = { .name = "Skl Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [SKL_DPCM_AUDIO_HDMI1_PB] = { .name = "Skl HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [SKL_DPCM_AUDIO_HDMI2_PB] = { .name = "Skl HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [SKL_DPCM_AUDIO_HDMI3_PB] = { .name = "Skl HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, /* Back End DAI links */ @@ -559,11 +583,7 @@ static struct snd_soc_dai_link skylake_dais[] = { /* SSP0 - Codec */ .name = "SSP0-Codec", .id = 0, - .cpu_dai_name = "SSP0 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codecs = ssm4567_codec_components, - .num_codecs = ARRAY_SIZE(ssm4567_codec_components), .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -572,16 +592,13 @@ static struct snd_soc_dai_link skylake_dais[] = { .be_hw_params_fixup = skylake_ssp_fixup, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { /* SSP1 - Codec */ .name = "SSP1-Codec", .id = 1, - .cpu_dai_name = "SSP1 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = "i2c-10508825:00", - .codec_dai_name = SKL_NUVOTON_CODEC_DAI, .init = skylake_nau8825_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -590,51 +607,40 @@ static struct snd_soc_dai_link skylake_dais[] = { .ops = &skylake_nau8825_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { .name = "dmic01", .id = 2, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:1f.3", .ignore_suspend = 1, .be_hw_params_fixup = skylake_dmic_fixup, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic01_pin, dmic01_codec, platform), }, { .name = "iDisp1", .id = 3, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = skylake_hdmi1_init, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 4, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:1f.3", .init = skylake_hdmi2_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 5, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:1f.3", .init = skylake_hdmi3_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; From patchwork Wed May 22 03:51:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955069 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 9676B924 for ; Wed, 22 May 2019 05:12:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85B3528B04 for ; Wed, 22 May 2019 05:12:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A46C28B56; Wed, 22 May 2019 05:12:18 +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 82D6E28B04 for ; Wed, 22 May 2019 05:12:17 +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 D401C18BF; Wed, 22 May 2019 07:11:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D401C18BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501935; bh=v6wO45vi/Lc672nL25XC7mBJSAXWEEAQm1wWqZnHnqg=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OG9hGBEtF5ZWPU5ut6oRUIaxA524HkHY0ruVmESH5zRfP9ocwIIlKNKVH1RUFXSxX lygiDJO2xYPAs5GlzKFl3qZ1UnOK3VbycgX10Vfy/10cWf/2uzmbk2XKa94PMQAiqV xjzcVtaOa0QLnL9MhiE8IAxRnIU0UbIa7QkSLfPU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CD147F899E7; Wed, 22 May 2019 05:51:18 +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 031F0F899ED; Wed, 22 May 2019 05:51:17 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id A94BAF899E7 for ; Wed, 22 May 2019 05:51:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A94BAF899E7 Date: 22 May 2019 12:51:14 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16628077" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:51:14 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 360244003EC0; Wed, 22 May 2019 12:51:14 +0900 (JST) Message-ID: <878suzi2ik.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 139/145] ASoC: Intel: skl_rt286: 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 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/intel/boards/skl_rt286.c | 118 ++++++++++++++++++++----------------- 1 file changed, 65 insertions(+), 53 deletions(-) diff --git a/sound/soc/intel/boards/skl_rt286.c b/sound/soc/intel/boards/skl_rt286.c index 0e1818d..61abe94 100644 --- a/sound/soc/intel/boards/skl_rt286.c +++ b/sound/soc/intel/boards/skl_rt286.c @@ -291,18 +291,66 @@ static const struct snd_soc_ops skylake_dmic_ops = { .startup = skylake_dmic_startup, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(deepbuffer, + DAILINK_COMP_ARRAY(COMP_CPU("Deepbuffer Pin"))); + +SND_SOC_DAILINK_DEF(reference, + DAILINK_COMP_ARRAY(COMP_CPU("Reference Pin"))); + +SND_SOC_DAILINK_DEF(dmic, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi3, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin"))); + +SND_SOC_DAILINK_DEF(ssp0_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin"))); +SND_SOC_DAILINK_DEF(ssp0_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-INT343A:00", "rt286-aif1"))); + +SND_SOC_DAILINK_DEF(dmic01_pin, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin"))); +SND_SOC_DAILINK_DEF(dmic01_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi"))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(idisp3_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin"))); +SND_SOC_DAILINK_DEF(idisp3_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3"))); + /* skylake digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link skylake_rt286_dais[] = { /* Front End DAI links */ [SKL_DPCM_AUDIO_PB] = { .name = "Skl Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .nonatomic = 1, .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .init = skylake_rt286_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, @@ -310,100 +358,79 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { }, .dpcm_playback = 1, .ops = &skylake_rt286_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [SKL_DPCM_AUDIO_DB_PB] = { .name = "Skl Deepbuffer Port", .stream_name = "Deep Buffer Audio", - .cpu_dai_name = "Deepbuffer Pin", - .platform_name = "0000:00:1f.3", .nonatomic = 1, .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST }, .dpcm_playback = 1, .ops = &skylake_rt286_fe_ops, - + SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, [SKL_DPCM_AUDIO_CP] = { .name = "Skl Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .nonatomic = 1, .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST }, .dpcm_capture = 1, .ops = &skylake_rt286_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [SKL_DPCM_AUDIO_REF_CP] = { .name = "Skl Audio Reference cap", .stream_name = "refcap", - .cpu_dai_name = "Reference Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(reference, dummy, platform), }, [SKL_DPCM_AUDIO_DMIC_CP] = { .name = "Skl Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [SKL_DPCM_AUDIO_HDMI1_PB] = { .name = "Skl HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [SKL_DPCM_AUDIO_HDMI2_PB] = { .name = "Skl HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [SKL_DPCM_AUDIO_HDMI3_PB] = { .name = "Skl HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, /* Back End DAI links */ @@ -411,11 +438,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { /* SSP0 - Codec */ .name = "SSP0-Codec", .id = 0, - .cpu_dai_name = "SSP0 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = "i2c-INT343A:00", - .codec_dai_name = "rt286-aif1", .init = skylake_rt286_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | @@ -425,51 +448,40 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { .ops = &skylake_rt286_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { .name = "dmic01", .id = 1, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:1f.3", .be_hw_params_fixup = skylake_dmic_fixup, .ignore_suspend = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic01_pin, dmic01_codec, platform), }, { .name = "iDisp1", .id = 2, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:1f.3", .init = skylake_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 3, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:1f.3", .init = skylake_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 4, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:1f.3", .init = skylake_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; From patchwork Wed May 22 03:51:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955081 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 8F78C924 for ; Wed, 22 May 2019 05:13:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7998228A93 for ; Wed, 22 May 2019 05:13:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E3CE28B0C; Wed, 22 May 2019 05:13:07 +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 813BD28AFC for ; Wed, 22 May 2019 05:13:06 +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 B85B218CA; Wed, 22 May 2019 07:12:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B85B218CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558501984; bh=UPfVh7t5jaIt7VGNVbYSuYFI2uzjig8ChP9aXJq24C0=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lqAJ+jgMoe0QpbKE2ABpKtVcnKWntkr/8VpDwEl1R6groMDNw+c6hb0YOlPfmuI12 kpkrV1QD5fTV/8mZQOzX5TfP/1F/NRX78jZX16ynbgtuJdI/NZTbps383X0j34MAJ9 BhojRetg+ccnjTZvmzfEw4/hdxrDzCu06nI9Ymq0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DDA6FF899F7; Wed, 22 May 2019 05:51:24 +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 41B77F899F8; Wed, 22 May 2019 05:51:23 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id EB541F899F6 for ; Wed, 22 May 2019 05:51:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EB541F899F6 Date: 22 May 2019 12:51:18 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425994" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:51:18 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 6D2F74003EC0; Wed, 22 May 2019 12:51:18 +0900 (JST) Message-ID: <877eaji2if.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 140/145] ASoC: Intel: skl_nau88l25_max98357a: 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 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/intel/boards/skl_nau88l25_max98357a.c | 120 ++++++++++++++---------- 1 file changed, 68 insertions(+), 52 deletions(-) diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c index 0922106..8722231 100644 --- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c +++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c @@ -404,105 +404,139 @@ static const struct snd_soc_ops skylake_refcap_ops = { .startup = skylake_refcap_startup, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(reference, + DAILINK_COMP_ARRAY(COMP_CPU("Reference Pin"))); + +SND_SOC_DAILINK_DEF(dmic, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi3, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin"))); + +SND_SOC_DAILINK_DEF(ssp0_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP0 Pin"))); +SND_SOC_DAILINK_DEF(ssp0_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("MX98357A:00", SKL_MAXIM_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(ssp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin"))); +SND_SOC_DAILINK_DEF(ssp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10508825:00", + SKL_NUVOTON_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(dmic_pin, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin"))); +SND_SOC_DAILINK_DEF(dmic_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi"))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(idisp3_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin"))); +SND_SOC_DAILINK_DEF(idisp3_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3"))); + /* skylake digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link skylake_dais[] = { /* Front End DAI links */ [SKL_DPCM_AUDIO_PB] = { .name = "Skl Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .init = skylake_nau8825_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .ops = &skylake_nau8825_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [SKL_DPCM_AUDIO_CP] = { .name = "Skl Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:1f.3", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, .ops = &skylake_nau8825_fe_ops, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [SKL_DPCM_AUDIO_REF_CP] = { .name = "Skl Audio Reference cap", .stream_name = "Wake on Voice", - .cpu_dai_name = "Reference Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, + SND_SOC_DAILINK_REG(reference, dummy, platform), }, [SKL_DPCM_AUDIO_DMIC_CP] = { .name = "Skl Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [SKL_DPCM_AUDIO_HDMI1_PB] = { .name = "Skl HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [SKL_DPCM_AUDIO_HDMI2_PB] = { .name = "Skl HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [SKL_DPCM_AUDIO_HDMI3_PB] = { .name = "Skl HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:1f.3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, /* Back End DAI links */ @@ -510,27 +544,20 @@ static struct snd_soc_dai_link skylake_dais[] = { /* SSP0 - Codec */ .name = "SSP0-Codec", .id = 0, - .cpu_dai_name = "SSP0 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = "MX98357A:00", - .codec_dai_name = SKL_MAXIM_CODEC_DAI, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ignore_pmdown_time = 1, .be_hw_params_fixup = skylake_ssp_fixup, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { /* SSP1 - Codec */ .name = "SSP1-Codec", .id = 1, - .cpu_dai_name = "SSP1 Pin", - .platform_name = "0000:00:1f.3", .no_pcm = 1, - .codec_name = "i2c-10508825:00", - .codec_dai_name = SKL_NUVOTON_CODEC_DAI, .init = skylake_nau8825_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -539,51 +566,40 @@ static struct snd_soc_dai_link skylake_dais[] = { .ops = &skylake_nau8825_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { .name = "dmic01", .id = 2, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:1f.3", .be_hw_params_fixup = skylake_dmic_fixup, .ignore_suspend = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 3, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .init = skylake_hdmi1_init, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 4, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:1f.3", .init = skylake_hdmi2_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 5, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:1f.3", .init = skylake_hdmi3_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; From patchwork Wed May 22 03:51:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955085 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 05609924 for ; Wed, 22 May 2019 05:13:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA7E428B01 for ; Wed, 22 May 2019 05:13:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF74728B56; Wed, 22 May 2019 05:13:43 +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 EF48F28847 for ; Wed, 22 May 2019 05:13:42 +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 363481844; Wed, 22 May 2019 07:12:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 363481844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558502021; bh=SDhkTe72V04S8n9WvaGxQufYRXZeb/dd8es04a3r/30=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=LOfDBQkmj9obVjApVGc8GTjpRk7zPTlCu01rJm3MtO20TKIi8Bf8F78/2koLwmV3L ZRnZfubJO47TsXmj7cXT9x9NrpjGwHd4GXBRP68awfSroa5r3uaphdyIgscdU3h+E6 zbG3yPEW9etED/TTup4btfzk1GV7BxQqZkzcIHJ8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 694F0F899F8; Wed, 22 May 2019 05:51:27 +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 58CC9F899FB; Wed, 22 May 2019 05:51:26 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 4548FF899F6 for ; Wed, 22 May 2019 05:51:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4548FF899F6 Date: 22 May 2019 12:51:22 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16425998" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:51:22 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B0AD74172C12; Wed, 22 May 2019 12:51:22 +0900 (JST) Message-ID: <875zq3i2ib.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 141/145] ASoC: Intel: skl-pcm: 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 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/intel/skylake/skl-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index 9735e24..edc5ecf 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -1085,7 +1085,7 @@ static int skl_platform_open(struct snd_pcm_substream *substream) struct snd_soc_dai_link *dai_link = rtd->dai_link; dev_dbg(rtd->cpu_dai->dev, "In %s:%s\n", __func__, - dai_link->cpu_dai_name); + dai_link->cpus->dai_name); snd_soc_set_runtime_hwparams(substream, &azx_pcm_hw); From patchwork Wed May 22 03:51:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955087 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 A4394112C for ; Wed, 22 May 2019 05:14:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91C31289AA for ; Wed, 22 May 2019 05:14:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85C4728B01; Wed, 22 May 2019 05:14:22 +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 A536428A93 for ; Wed, 22 May 2019 05:14:21 +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 DAC1518BD; Wed, 22 May 2019 07:13:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DAC1518BD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558502060; bh=SoppMImSPTeC36qUIQNg2LCMvAuYGBY+41rLVJGVX/4=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=U/GtbO1mLPOEadCfqa91+Msesco5jhLWxdNgoiuypt/42A6C/rrGriMiNosS4Co63 5TZFlXxW3BM/t6qEILP0fUh66WZ7sVY6IpX7lBmnjMAgH7AIxvk1UYi7HRnxBoI1lT Qe6y5bGldRFRtl8s5g7UbWRjUh6bClzDISrZ+yrU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 740DAF899FC; Wed, 22 May 2019 05:51:33 +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 3A706F899FE; Wed, 22 May 2019 05:51:32 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 4B26AF899FC for ; Wed, 22 May 2019 05:51:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4B26AF899FC Date: 22 May 2019 12:51:28 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16628101" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 May 2019 12:51:28 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 0B0F34003EC0; Wed, 22 May 2019 12:51:28 +0900 (JST) Message-ID: <874l5ni2i6.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 142/145] ASoC: Intel: skl_hda_dsp_common: 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 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/intel/boards/skl_hda_dsp_common.c | 66 +++++++++++++++++----------- sound/soc/intel/boards/skl_hda_dsp_generic.c | 4 +- 2 files changed, 43 insertions(+), 27 deletions(-) diff --git a/sound/soc/intel/boards/skl_hda_dsp_common.c b/sound/soc/intel/boards/skl_hda_dsp_common.c index 8b68f41..1fc5547 100644 --- a/sound/soc/intel/boards/skl_hda_dsp_common.c +++ b/sound/soc/intel/boards/skl_hda_dsp_common.c @@ -39,77 +39,93 @@ int skl_hda_hdmi_add_pcm(struct snd_soc_card *card, int device) return 0; } +SND_SOC_DAILINK_DEFS(idisp1, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin")), + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEFS(idisp2, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin")), + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEFS(idisp3, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin")), + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(analog_cpu, + DAILINK_COMP_ARRAY(COMP_CPU("Analog CPU DAI"))); +SND_SOC_DAILINK_DEF(analog_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D0", "Analog Codec DAI"))); + +SND_SOC_DAILINK_DEF(digital_cpu, + DAILINK_COMP_ARRAY(COMP_CPU("Digital CPU DAI"))); +SND_SOC_DAILINK_DEF(digital_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D0", "Digital Codec DAI"))); + +SND_SOC_DAILINK_DEF(dmic_pin, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin"))); + +SND_SOC_DAILINK_DEF(dmic_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi"))); + +SND_SOC_DAILINK_DEF(dmic16k, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC16k Pin"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:1f.3"))); + /* skl_hda_digital audio interface glue - connects codec <--> CPU */ struct snd_soc_dai_link skl_hda_be_dai_links[HDA_DSP_MAX_BE_DAI_LINKS] = { /* Back End DAI links */ { .name = "iDisp1", .id = 1, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1), }, { .name = "iDisp2", .id = 2, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2), }, { .name = "iDisp3", .id = 3, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3), }, { .name = "Analog Playback and Capture", .id = 4, - .cpu_dai_name = "Analog CPU DAI", - .codec_name = "ehdaudio0D0", - .codec_dai_name = "Analog Codec DAI", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(analog_cpu, analog_codec, platform), }, { .name = "Digital Playback and Capture", .id = 5, - .cpu_dai_name = "Digital CPU DAI", - .codec_name = "ehdaudio0D0", - .codec_dai_name = "Digital Codec DAI", - .platform_name = "0000:00:1f.3", .dpcm_playback = 1, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(digital_cpu, digital_codec, platform), }, { .name = "dmic01", .id = 6, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:1f.3", .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "dmic16k", .id = 7, - .cpu_dai_name = "DMIC16k Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:1f.3", .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic16k, dmic_codec, platform), }, }; diff --git a/sound/soc/intel/boards/skl_hda_dsp_generic.c b/sound/soc/intel/boards/skl_hda_dsp_generic.c index fc52d3a..9ed68eb 100644 --- a/sound/soc/intel/boards/skl_hda_dsp_generic.c +++ b/sound/soc/intel/boards/skl_hda_dsp_generic.c @@ -69,7 +69,7 @@ skl_hda_add_dai_link(struct snd_soc_card *card, struct snd_soc_dai_link *link) int ret = 0; dev_dbg(card->dev, "%s: dai link name - %s\n", __func__, link->name); - link->platform_name = ctx->platform_name; + link->platforms->name = ctx->platform_name; link->nonatomic = 1; if (strstr(link->name, "HDMI")) { @@ -142,7 +142,7 @@ static int skl_hda_fill_card_info(struct snd_soc_acpi_mach_params *mach_params) card->num_dapm_routes = num_route; for_each_card_prelinks(card, i, dai_link) - dai_link->platform_name = mach_params->platform; + dai_link->platforms->name = mach_params->platform; return 0; } From patchwork Wed May 22 03:51:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955091 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 B5285112C for ; Wed, 22 May 2019 05:15:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4837205F6 for ; Wed, 22 May 2019 05:15:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9911C28B5D; Wed, 22 May 2019 05:15:00 +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 9E909205F6 for ; Wed, 22 May 2019 05:14:59 +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 F31CE1868; Wed, 22 May 2019 07:14:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F31CE1868 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558502098; bh=2sDeRxzo/fwBVr2hBQRUQn+RuNDzybLB7W177JlBb2w=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=K4cTw8vz+mzosxE9DQ8hffBj+J3eWhM8sWIydj+ueStTqY66NUo0OzEmVX7anIZUm KAjGyqrUh7wfRgnUVzHHZ1ELtcZaCa95X8eM85kTLf63OyZMjoRXWdHvgl1jDxtROJ zArQcdwLOJEo1vD5dwMOa7VIyaRO7jWUlx0hRcgQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AC2D1F89A00; Wed, 22 May 2019 05:51:39 +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 DB3DBF89786; Wed, 22 May 2019 05:51:37 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 88BCAF89A00 for ; Wed, 22 May 2019 05:51:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 88BCAF89A00 Date: 22 May 2019 12:51:32 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16426012" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:51:32 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 48805400E512; Wed, 22 May 2019 12:51:32 +0900 (JST) Message-ID: <8736l7i2i2.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 143/145] ASoC: Intel: glk_rt5682_max98357a: 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 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/intel/boards/glk_rt5682_max98357a.c | 137 +++++++++++++++----------- 1 file changed, 77 insertions(+), 60 deletions(-) diff --git a/sound/soc/intel/boards/glk_rt5682_max98357a.c b/sound/soc/intel/boards/glk_rt5682_max98357a.c index 6b677b5..93bc989 100644 --- a/sound/soc/intel/boards/glk_rt5682_max98357a.c +++ b/sound/soc/intel/boards/glk_rt5682_max98357a.c @@ -318,152 +318,180 @@ static const struct snd_soc_ops geminilake_refcap_ops = { .startup = geminilake_refcap_startup, }; +SND_SOC_DAILINK_DEF(dummy, + DAILINK_COMP_ARRAY(COMP_DUMMY())); + +SND_SOC_DAILINK_DEF(system, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin"))); + +SND_SOC_DAILINK_DEF(system2, + DAILINK_COMP_ARRAY(COMP_CPU("System Pin2"))); + +SND_SOC_DAILINK_DEF(echoref, + DAILINK_COMP_ARRAY(COMP_CPU("Echoref Pin"))); + +SND_SOC_DAILINK_DEF(reference, + DAILINK_COMP_ARRAY(COMP_CPU("Reference Pin"))); + +SND_SOC_DAILINK_DEF(dmic, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin"))); + +SND_SOC_DAILINK_DEF(hdmi1, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI1 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi2, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI2 Pin"))); + +SND_SOC_DAILINK_DEF(hdmi3, + DAILINK_COMP_ARRAY(COMP_CPU("HDMI3 Pin"))); + +SND_SOC_DAILINK_DEF(ssp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP1 Pin"))); +SND_SOC_DAILINK_DEF(ssp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC(MAXIM_DEV0_NAME, + GLK_MAXIM_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(ssp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("SSP2 Pin"))); +SND_SOC_DAILINK_DEF(ssp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5682:00", + GLK_REALTEK_CODEC_DAI))); + +SND_SOC_DAILINK_DEF(dmic_pin, + DAILINK_COMP_ARRAY(COMP_CPU("DMIC01 Pin"))); +SND_SOC_DAILINK_DEF(dmic_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi"))); + +SND_SOC_DAILINK_DEF(idisp1_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp1 Pin"))); +SND_SOC_DAILINK_DEF(idisp1_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1"))); + +SND_SOC_DAILINK_DEF(idisp2_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp2 Pin"))); +SND_SOC_DAILINK_DEF(idisp2_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2"))); + +SND_SOC_DAILINK_DEF(idisp3_pin, + DAILINK_COMP_ARRAY(COMP_CPU("iDisp3 Pin"))); +SND_SOC_DAILINK_DEF(idisp3_codec, + DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3"))); + +SND_SOC_DAILINK_DEF(platform, + DAILINK_COMP_ARRAY(COMP_PLATFORM("0000:00:0e.0"))); + /* geminilake digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link geminilake_dais[] = { /* Front End DAI links */ [GLK_DPCM_AUDIO_PB] = { .name = "Glk Audio Port", .stream_name = "Audio", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:0e.0", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .init = geminilake_rt5682_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [GLK_DPCM_AUDIO_CP] = { .name = "Glk Audio Capture Port", .stream_name = "Audio Record", - .cpu_dai_name = "System Pin", - .platform_name = "0000:00:0e.0", .dynamic = 1, - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(system, dummy, platform), }, [GLK_DPCM_AUDIO_HS_PB] = { .name = "Glk Audio Headset Playback", .stream_name = "Headset Audio", - .cpu_dai_name = "System Pin2", - .platform_name = "0000:00:0e.0", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .dpcm_playback = 1, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(system2, dummy, platform), }, [GLK_DPCM_AUDIO_ECHO_REF_CP] = { .name = "Glk Audio Echo Reference cap", .stream_name = "Echoreference Capture", - .cpu_dai_name = "Echoref Pin", - .platform_name = "0000:00:0e.0", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", .init = NULL, .capture_only = 1, .nonatomic = 1, + SND_SOC_DAILINK_REG(echoref, dummy, platform), }, [GLK_DPCM_AUDIO_REF_CP] = { .name = "Glk Audio Reference cap", .stream_name = "Refcap", - .cpu_dai_name = "Reference Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &geminilake_refcap_ops, + SND_SOC_DAILINK_REG(reference, dummy, platform), }, [GLK_DPCM_AUDIO_DMIC_CP] = { .name = "Glk Audio DMIC cap", .stream_name = "dmiccap", - .cpu_dai_name = "DMIC Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .init = NULL, .dpcm_capture = 1, .nonatomic = 1, .dynamic = 1, .ops = &geminilake_dmic_ops, + SND_SOC_DAILINK_REG(dmic, dummy, platform), }, [GLK_DPCM_AUDIO_HDMI1_PB] = { .name = "Glk HDMI Port1", .stream_name = "Hdmi1", - .cpu_dai_name = "HDMI1 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi1, dummy, platform), }, [GLK_DPCM_AUDIO_HDMI2_PB] = { .name = "Glk HDMI Port2", .stream_name = "Hdmi2", - .cpu_dai_name = "HDMI2 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .dpcm_playback = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi2, dummy, platform), }, [GLK_DPCM_AUDIO_HDMI3_PB] = { .name = "Glk HDMI Port3", .stream_name = "Hdmi3", - .cpu_dai_name = "HDMI3 Pin", - .codec_name = "snd-soc-dummy", - .codec_dai_name = "snd-soc-dummy-dai", - .platform_name = "0000:00:0e.0", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dpcm_playback = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, + SND_SOC_DAILINK_REG(hdmi3, dummy, platform), }, /* Back End DAI links */ { /* SSP1 - Codec */ .name = "SSP1-Codec", .id = 0, - .cpu_dai_name = "SSP1 Pin", - .platform_name = "0000:00:0e.0", .no_pcm = 1, - .codec_name = MAXIM_DEV0_NAME, - .codec_dai_name = GLK_MAXIM_CODEC_DAI, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, .ignore_pmdown_time = 1, .be_hw_params_fixup = geminilake_ssp_fixup, .dpcm_playback = 1, + SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { /* SSP2 - Codec */ .name = "SSP2-Codec", .id = 1, - .cpu_dai_name = "SSP2 Pin", - .platform_name = "0000:00:0e.0", .no_pcm = 1, - .codec_name = "i2c-10EC5682:00", - .codec_dai_name = GLK_REALTEK_CODEC_DAI, .init = geminilake_rt5682_codec_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -472,51 +500,40 @@ static struct snd_soc_dai_link geminilake_dais[] = { .ops = &geminilake_rt5682_ops, .dpcm_playback = 1, .dpcm_capture = 1, + SND_SOC_DAILINK_REG(ssp2_pin, ssp2_codec, platform), }, { .name = "dmic01", .id = 2, - .cpu_dai_name = "DMIC01 Pin", - .codec_name = "dmic-codec", - .codec_dai_name = "dmic-hifi", - .platform_name = "0000:00:0e.0", .ignore_suspend = 1, .be_hw_params_fixup = geminilake_dmic_fixup, .dpcm_capture = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 3, - .cpu_dai_name = "iDisp1 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi1", - .platform_name = "0000:00:0e.0", .init = geminilake_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, { .name = "iDisp2", .id = 4, - .cpu_dai_name = "iDisp2 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi2", - .platform_name = "0000:00:0e.0", .init = geminilake_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, { .name = "iDisp3", .id = 5, - .cpu_dai_name = "iDisp3 Pin", - .codec_name = "ehdaudio0D2", - .codec_dai_name = "intel-hdmi-hifi3", - .platform_name = "0000:00:0e.0", .init = geminilake_hdmi_init, .dpcm_playback = 1, .no_pcm = 1, + SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, }; From patchwork Wed May 22 03:51:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955097 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 37613112C for ; Wed, 22 May 2019 05:15:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26DE028847 for ; Wed, 22 May 2019 05:15:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B20928B04; Wed, 22 May 2019 05:15:51 +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 2D30428847 for ; Wed, 22 May 2019 05:15:50 +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 849C618D0; Wed, 22 May 2019 07:14:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 849C618D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558502148; bh=V8PKhYOGRwT/M1Fnb7UrFUduuDlZyalkpTKN2pVv4yM=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DpoNPNsnEll5KQDBc+gpK5Vu9SiTsiDiPcPn+S8FTrSECN26RwF92tEeSkcHJyt+S QVwwAF0YyM4qSO4fNME9tAZIKCtKCsEIb+jSqp+dtPreYosPoz73ca268+2OmPkPBf Iwe+tNV8To539vh3XkZ5U7Wx9TOx0eiqkdLTM6DM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 196C1F89A0A; Wed, 22 May 2019 05:51:42 +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 4FB12F89786; Wed, 22 May 2019 05:51:40 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 18893F89785 for ; Wed, 22 May 2019 05:51:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 18893F89785 Date: 22 May 2019 12:51:36 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16426016" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:51:36 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 935E94003EC2; Wed, 22 May 2019 12:51:36 +0900 (JST) Message-ID: <871s0ri2hx.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 144/145] ASoC: Intel: sof_rt5682: 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 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/intel/boards/sof_rt5682.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index e441dc9..cd41f07 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -338,12 +338,15 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, int hdmi_num) { struct snd_soc_dai_link_component *idisp_components; + struct snd_soc_dai_link_component *cpus; struct snd_soc_dai_link *links; int i, id = 0; links = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link) * sof_audio_card_rt5682.num_links, GFP_KERNEL); - if (!links) + cpus = devm_kzalloc(dev, sizeof(struct snd_soc_dai_link_component) * + sof_audio_card_rt5682.num_links, GFP_KERNEL); + if (!links || !cpus) goto devm_err; /* codec SSP */ @@ -363,11 +366,13 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].dpcm_playback = 1; links[id].dpcm_capture = 1; links[id].no_pcm = 1; + links[id].cpus = &cpus[id]; + links[id].num_cpus = 1; if (is_legacy_cpu) { - links[id].cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, + links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "ssp%d-port", ssp_codec); - if (!links[id].cpu_dai_name) + if (!links[id].cpus->dai_name) goto devm_err; } else { /* @@ -380,10 +385,10 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, * It can be removed once we can control MCLK by driver. */ links[id].ignore_pmdown_time = 1; - links[id].cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, + links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", ssp_codec); - if (!links[id].cpu_dai_name) + if (!links[id].cpus->dai_name) goto devm_err; } id++; @@ -396,9 +401,11 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, goto devm_err; links[id].id = id; - links[id].cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, + links[id].cpus = &cpus[id]; + links[id].num_cpus = 1; + links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "DMIC%02d Pin", i); - if (!links[id].cpu_dai_name) + if (!links[id].cpus->dai_name) goto devm_err; links[id].codecs = dmic_component; @@ -426,9 +433,11 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, goto devm_err; links[id].id = id; - links[id].cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, + links[id].cpus = &cpus[id]; + links[id].num_cpus = 1; + links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "iDisp%d Pin", i); - if (!links[id].cpu_dai_name) + if (!links[id].cpus->dai_name) goto devm_err; idisp_components[i - 1].name = "ehdaudio0D2"; @@ -465,18 +474,20 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].nonatomic = true; links[id].dpcm_playback = 1; links[id].no_pcm = 1; + links[id].cpus = &cpus[id]; + links[id].num_cpus = 1; if (is_legacy_cpu) { - links[id].cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, + links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "ssp%d-port", ssp_amp); - if (!links[id].cpu_dai_name) + if (!links[id].cpus->dai_name) goto devm_err; } else { - links[id].cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, + links[id].cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", ssp_amp); - if (!links[id].cpu_dai_name) + if (!links[id].cpus->dai_name) goto devm_err; } } From patchwork Wed May 22 03:51:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10955101 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 9FB5C112C for ; Wed, 22 May 2019 05:16:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E9D228847 for ; Wed, 22 May 2019 05:16:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8278028AF2; Wed, 22 May 2019 05:16:26 +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 7AE2228847 for ; Wed, 22 May 2019 05:16:25 +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 C336D18CD; Wed, 22 May 2019 07:15:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C336D18CD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1558502183; bh=bHroRMufgqkZs56Ym5buMf1d3cfNqPFJRNceLf1/v10=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=nAUQLB6x0xOsGALyZXwpDMznVTwkAmN5n0A3wYBKoAn7oewDM2J3hJqAK2OzW8O6A bMVEZDZYNFB0kio30ydejIMjNiQqU13rNVN4NETJKBhe2EAa4N8gWkQJ8QaMSpyOqE V3Dl+vSb7Gso88miZi1PTAaUuCnKKg2OIubupTTc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D9D27F89A0B; Wed, 22 May 2019 05:51:46 +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 2EDD6F89A0E; Wed, 22 May 2019 05:51:45 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 39F6AF89A0B for ; Wed, 22 May 2019 05:51:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 39F6AF89A0B Date: 22 May 2019 12:51:40 +0900 X-IronPort-AV: E=Sophos;i="5.60,497,1549897200"; d="scan'208";a="16426018" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 22 May 2019 12:51:40 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B9F33400E514; Wed, 22 May 2019 12:51:40 +0900 (JST) Message-ID: <87zhnfgnxd.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: <87sgt7p3zo.wl-kuninori.morimoto.gx@renesas.com> References: <87sgt7p3zo.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 145/145] ASoC: soc-core: remove legacy style dai_link 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 From: Kuninori Morimoto All drivers switched to modern style dai_link (= struct snd_soc_dai_link_component). Let's remove legacy style dai_link. Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 65 ++------------------ sound/soc/soc-core.c | 165 +++------------------------------------------------ 2 files changed, 12 insertions(+), 218 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 0fa79b8..055e6d0 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -901,77 +901,33 @@ struct snd_soc_dai_link { const char *stream_name; /* Stream name */ /* - * cpu_name - * cpu_of_node - * cpu_dai_name - * - * These are legacy style, and will be replaced to - * modern style (= snd_soc_dai_link_component) in the future, - * but, not yet supported so far. - * If modern style was supported for CPU, all driver will switch - * to use it, and, legacy style code will be removed from ALSA SoC. - */ - /* * You MAY specify the link's CPU-side device, either by device name, * or by DT/OF node, but not both. If this information is omitted, * the CPU-side DAI is matched using .cpu_dai_name only, which hence * must be globally unique. These fields are currently typically used * only for codec to codec links, or systems using device tree. */ - const char *cpu_name; - struct device_node *cpu_of_node; /* * You MAY specify the DAI name of the CPU DAI. If this information is * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node * only, which only works well when that device exposes a single DAI. */ - const char *cpu_dai_name; - struct snd_soc_dai_link_component *cpus; unsigned int num_cpus; /* - * codec_name - * codec_of_node - * codec_dai_name - * - * These are legacy style, it will be converted to modern style - * (= snd_soc_dai_link_component) automatically in soc-core - * if driver is using legacy style. - * Driver shouldn't use both legacy and modern style in the same time. - * If modern style was supported for CPU, all driver will switch - * to use it, and, legacy style code will be removed from ALSA SoC. - */ - /* * You MUST specify the link's codec, either by device name, or by * DT/OF node, but not both. */ - const char *codec_name; - struct device_node *codec_of_node; /* You MUST specify the DAI name within the codec */ - const char *codec_dai_name; - struct snd_soc_dai_link_component *codecs; unsigned int num_codecs; /* - * platform_name - * platform_of_node - * - * These are legacy style, it will be converted to modern style - * (= snd_soc_dai_link_component) automatically in soc-core - * if driver is using legacy style. - * Driver shouldn't use both legacy and modern style in the same time. - * If modern style was supported for CPU, all driver will switch - * to use it, and, legacy style code will be removed from ALSA SoC. - */ - /* * You MAY specify the link's platform/PCM/DMA driver, either by * device name, or by DT/OF node, but not both. Some forms of link * do not need a platform. */ - const char *platform_name; - struct device_node *platform_of_node; struct snd_soc_dai_link_component *platforms; unsigned int num_platforms; @@ -1033,13 +989,6 @@ struct snd_soc_dai_link { /* Do not create a PCM for this DAI link (Backend link) */ unsigned int ignore:1; - /* - * This driver uses legacy platform naming. Set by the core, machine - * drivers should not modify this value. - */ - unsigned int legacy_platform:1; - unsigned int legacy_cpu:1; - struct list_head list; /* DAI link list of the soc card */ struct snd_soc_dobj dobj; /* For topology */ }; @@ -1699,15 +1648,11 @@ int snd_soc_fixup_dai_links_platform_name(struct snd_soc_card *card, if (!name) return -ENOMEM; - if (dai_link->platforms) - /* only single platform is supported for now */ - dai_link->platforms->name = name; - else - /* - * legacy mode, this case will be removed when all - * derivers are switched to modern style dai_link. - */ - dai_link->platform_name = name; + if (!dai_link->platforms) + return -EINVAL; + + /* only single platform is supported for now */ + dai_link->platforms->name = name; } return 0; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ab974bc..47fb304 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1047,167 +1047,18 @@ static void soc_remove_dai_links(struct snd_soc_card *card) } } -static int snd_soc_init_cpu(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_link) -{ - struct snd_soc_dai_link_component *cpu = dai_link->cpus; - - /* - * REMOVE ME - * - * This is glue code for Legacy vs Modern dai_link. - * This function will be removed if all derivers are switched to - * modern style dai_link. - * Driver shouldn't use both legacy and modern style in the same time. - * see - * soc.h :: struct snd_soc_dai_link - */ - /* convert Legacy platform link */ - if (!cpu) { - cpu = devm_kzalloc(card->dev, - sizeof(struct snd_soc_dai_link_component), - GFP_KERNEL); - if (!cpu) - return -ENOMEM; - - dai_link->cpus = cpu; - dai_link->num_cpus = 1; - dai_link->legacy_cpu = 1; - - cpu->name = dai_link->cpu_name; - cpu->of_node = dai_link->cpu_of_node; - cpu->dai_name = dai_link->cpu_dai_name; - } - - if (!dai_link->cpus) { - dev_err(card->dev, "ASoC: DAI link has no CPUs\n"); - return -EINVAL; - } - - return 0; -} - -static int snd_soc_init_platform(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_link) -{ - struct snd_soc_dai_link_component *platform = dai_link->platforms; - - /* - * REMOVE ME - * - * This is glue code for Legacy vs Modern dai_link. - * This function will be removed if all derivers are switched to - * modern style dai_link. - * Driver shouldn't use both legacy and modern style in the same time. - * see - * soc.h :: struct snd_soc_dai_link - */ - /* convert Legacy platform link */ - if (!platform) { - platform = devm_kzalloc(card->dev, - sizeof(struct snd_soc_dai_link_component), - GFP_KERNEL); - if (!platform) - return -ENOMEM; - - dai_link->platforms = platform; - dai_link->num_platforms = 1; - dai_link->legacy_platform = 1; - platform->name = dai_link->platform_name; - platform->of_node = dai_link->platform_of_node; - platform->dai_name = NULL; - } - - /* if there's no platform we match on the empty platform */ - if (!platform->name && - !platform->of_node) - platform->name = "snd-soc-dummy"; - - return 0; -} - -static void soc_cleanup_legacy(struct snd_soc_card *card) -{ - struct snd_soc_dai_link *link; - int i; - /* - * FIXME - * - * this function should be removed with snd_soc_init_platform - */ - - for_each_card_prelinks(card, i, link) { - if (link->legacy_platform) { - link->legacy_platform = 0; - link->platforms = NULL; - } - if (link->legacy_cpu) { - link->legacy_cpu = 0; - link->cpus = NULL; - } - } -} - -static int snd_soc_init_multicodec(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_link) -{ - /* - * REMOVE ME - * - * This is glue code for Legacy vs Modern dai_link. - * This function will be removed if all derivers are switched to - * modern style dai_link. - * Driver shouldn't use both legacy and modern style in the same time. - * see - * soc.h :: struct snd_soc_dai_link - */ - - /* Legacy codec/codec_dai link is a single entry in multicodec */ - if (dai_link->codec_name || dai_link->codec_of_node || - dai_link->codec_dai_name) { - dai_link->num_codecs = 1; - - dai_link->codecs = devm_kzalloc(card->dev, - sizeof(struct snd_soc_dai_link_component), - GFP_KERNEL); - if (!dai_link->codecs) - return -ENOMEM; - - dai_link->codecs[0].name = dai_link->codec_name; - dai_link->codecs[0].of_node = dai_link->codec_of_node; - dai_link->codecs[0].dai_name = dai_link->codec_dai_name; - } - - if (!dai_link->codecs) { - dev_err(card->dev, "ASoC: DAI link has no CODECs\n"); - return -EINVAL; - } - - return 0; -} +static struct snd_soc_dai_link_component dummy_link = COMP_DUMMY(); static int soc_init_dai_link(struct snd_soc_card *card, struct snd_soc_dai_link *link) { - int i, ret; + int i; struct snd_soc_dai_link_component *codec; - ret = snd_soc_init_cpu(card, link); - if (ret) { - dev_err(card->dev, "ASoC: failed to init cpu\n"); - return ret; - } - - ret = snd_soc_init_platform(card, link); - if (ret) { - dev_err(card->dev, "ASoC: failed to init multiplatform\n"); - return ret; - } - - ret = snd_soc_init_multicodec(card, link); - if (ret) { - dev_err(card->dev, "ASoC: failed to init multicodec\n"); - return ret; + /* default Platform */ + if (!link->platforms || !link->num_platforms) { + link->platforms = &dummy_link; + link->num_platforms = 1; } for_each_link_codecs(link, i, codec) { @@ -2054,7 +1905,7 @@ static void soc_check_tplg_fes(struct snd_soc_card *card) card->dai_link[i].name); /* override platform component */ - if (snd_soc_init_platform(card, dai_link) < 0) { + if (!dai_link->platforms) { dev_err(card->dev, "init platform error"); continue; } @@ -2103,7 +1954,6 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card) /* remove and free each DAI */ soc_remove_dai_links(card); soc_remove_pcm_runtimes(card); - soc_cleanup_legacy(card); /* remove auxiliary devices */ soc_remove_aux_devices(card); @@ -2860,7 +2710,6 @@ int snd_soc_register_card(struct snd_soc_card *card) ret = soc_init_dai_link(card, link); if (ret) { - soc_cleanup_legacy(card); dev_err(card->dev, "ASoC: failed to init link %s\n", link->name); mutex_unlock(&client_mutex);