From patchwork Mon Apr 19 02:02:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 424605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 382B1C433ED for ; Mon, 19 Apr 2021 02:03:48 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 183C8610CA for ; Mon, 19 Apr 2021 02:03:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 183C8610CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5DD17168D; Mon, 19 Apr 2021 04:02:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5DD17168D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1618797825; bh=9zgNzRtyxeMV4p253yoHmQMVfHCVroax8tnEXsY9x68=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZN2mfso+YJe7YIgZE7JWirqr5HiGBTgCwQDqj7gYNzrOKnuGzvV10isBQtOjYGlgu kqCDX80kqchTWefxunC9O7Qw4znHvO0RRzL8ig1J8O9OdmY6KfKB45oELnHfEZVV5w JUWRHLcVhHz/xs9fXIdqvc6W6BW7W/11RL8XVIfM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0222DF80256; Mon, 19 Apr 2021 04:02:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9E0D0F80276; Mon, 19 Apr 2021 04:02:28 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 5BB8FF80164 for ; Mon, 19 Apr 2021 04:02:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5BB8FF80164 Date: 19 Apr 2021 11:02:19 +0900 X-IronPort-AV: E=Sophos;i="5.82,232,1613401200"; d="scan'208";a="78473866" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 19 Apr 2021 11:02:19 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id CB333415539F; Mon, 19 Apr 2021 11:02:19 +0900 (JST) Message-ID: <87zgxv3uc4.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/6] ASoC: audio-graph: move audio_graph_card_probe() to simple-card-utils.c User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown In-Reply-To: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> References: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kuninori Morimoto audio-graph-card2 can reuse audio_graph_card_probe(). This patch moves it to simple-card-utils.c. Signed-off-by: Kuninori Morimoto --- include/sound/graph_card.h | 2 -- include/sound/simple_card_utils.h | 3 +++ sound/soc/generic/audio-graph-card.c | 19 +------------------ sound/soc/generic/simple-card-utils.c | 17 +++++++++++++++++ sound/soc/tegra/tegra_audio_graph_card.c | 2 +- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/include/sound/graph_card.h b/include/sound/graph_card.h index 013784467bec..9c2feb792742 100644 --- a/include/sound/graph_card.h +++ b/include/sound/graph_card.h @@ -9,8 +9,6 @@ #include -int audio_graph_card_probe(struct snd_soc_card *card); - int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev); int audio_graph_remove(struct platform_device *pdev); diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index e318a2d4ac44..656c7e30b6e4 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -178,6 +178,9 @@ int asoc_simple_init_jack(struct snd_soc_card *card, int asoc_simple_init_priv(struct asoc_simple_priv *priv, struct link_info *li); +int asoc_graph_card_probe(struct snd_soc_card *card); + + #ifdef DEBUG static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv, char *name, diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index c7369beee805..2d004a980f0c 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -717,23 +717,6 @@ static int graph_get_dais_count(struct asoc_simple_priv *priv, graph_count_dpcm); } -int audio_graph_card_probe(struct snd_soc_card *card) -{ - struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card); - int ret; - - ret = asoc_simple_init_hp(card, &priv->hp_jack, NULL); - if (ret < 0) - return ret; - - ret = asoc_simple_init_mic(card, &priv->mic_jack, NULL); - if (ret < 0) - return ret; - - return 0; -} -EXPORT_SYMBOL_GPL(audio_graph_card_probe); - static int graph_probe(struct platform_device *pdev) { struct asoc_simple_priv *priv; @@ -748,7 +731,7 @@ static int graph_probe(struct platform_device *pdev) card = simple_priv_to_card(priv); card->dapm_widgets = graph_dapm_widgets; card->num_dapm_widgets = ARRAY_SIZE(graph_dapm_widgets); - card->probe = audio_graph_card_probe; + card->probe = asoc_graph_card_probe; if (of_device_get_match_data(dev)) priv->dpcm_selectable = 1; diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index e1b7b30a4c8c..ed2cad6d9ac1 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -740,6 +740,23 @@ int asoc_simple_init_priv(struct asoc_simple_priv *priv, } EXPORT_SYMBOL_GPL(asoc_simple_init_priv); +int asoc_graph_card_probe(struct snd_soc_card *card) +{ + struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card); + int ret; + + ret = asoc_simple_init_hp(card, &priv->hp_jack, NULL); + if (ret < 0) + return ret; + + ret = asoc_simple_init_mic(card, &priv->mic_jack, NULL); + if (ret < 0) + return ret; + + return 0; +} +EXPORT_SYMBOL_GPL(asoc_graph_card_probe); + /* Module information */ MODULE_AUTHOR("Kuninori Morimoto "); MODULE_DESCRIPTION("ALSA SoC Simple Card Utils"); diff --git a/sound/soc/tegra/tegra_audio_graph_card.c b/sound/soc/tegra/tegra_audio_graph_card.c index 47b319504c8c..35d008b5d373 100644 --- a/sound/soc/tegra/tegra_audio_graph_card.c +++ b/sound/soc/tegra/tegra_audio_graph_card.c @@ -184,7 +184,7 @@ static int tegra_audio_graph_card_probe(struct snd_soc_card *card) return PTR_ERR(priv->clk_plla_out0); } - return audio_graph_card_probe(card); + return asoc_graph_card_probe(card); } static int tegra_audio_graph_probe(struct platform_device *pdev) From patchwork Mon Apr 19 02:02:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 424074 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C6C3C433ED for ; Mon, 19 Apr 2021 02:03:52 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2F24610CB for ; Mon, 19 Apr 2021 02:03:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2F24610CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8AAF01695; Mon, 19 Apr 2021 04:03:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8AAF01695 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1618797830; bh=x4xmEhleBOCrzq3lxK2v5yYuowZsODui5mZHCtl4Tys=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qy8vXimqgg2oi5201ov1z28C0/lT/VgPtDxBgIgnS1MMdsmgSvarJSEyt2bs1zWi0 qCLJ/6jXN7eESm4qXxqmYkNdcrj/cOFDfqiqUXZNfoRoXhAZsYuaKV7hHmvqcEtd+p Sy5qrl5PjME/q9amFuMxdp7k6mgsV4jQSn0FVVms= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 918E6F80164; Mon, 19 Apr 2021 04:02:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D53C8F8032D; Mon, 19 Apr 2021 04:02:33 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id EBE0DF8025A for ; Mon, 19 Apr 2021 04:02:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EBE0DF8025A Date: 19 Apr 2021 11:02:25 +0900 X-IronPort-AV: E=Sophos;i="5.82,232,1613401200"; d="scan'208";a="78473875" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 19 Apr 2021 11:02:25 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 61BBF40078C9; Mon, 19 Apr 2021 11:02:25 +0900 (JST) Message-ID: <87y2df3uby.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/6] ASoC: audio-graph: move audio_graph_remove() to simple-card-utils.c User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown In-Reply-To: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> References: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kuninori Morimoto audio-graph-card2 can reuse audio_graph_remove() / asoc_simple_remove(). This patch moves it to simple-card-utils.c. Signed-off-by: Kuninori Morimoto --- include/sound/graph_card.h | 2 -- include/sound/simple_card_utils.h | 2 +- sound/soc/generic/audio-graph-card.c | 10 +--------- sound/soc/generic/simple-card-utils.c | 8 ++++++++ sound/soc/generic/simple-card.c | 7 ------- sound/soc/tegra/tegra_audio_graph_card.c | 2 +- 6 files changed, 11 insertions(+), 20 deletions(-) diff --git a/include/sound/graph_card.h b/include/sound/graph_card.h index 9c2feb792742..6f10bfb0d5ee 100644 --- a/include/sound/graph_card.h +++ b/include/sound/graph_card.h @@ -11,6 +11,4 @@ int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev); -int audio_graph_remove(struct platform_device *pdev); - #endif /* __GRAPH_CARD_H */ diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 656c7e30b6e4..51b3b485a92e 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -177,10 +177,10 @@ int asoc_simple_init_jack(struct snd_soc_card *card, int is_hp, char *prefix, char *pin); int asoc_simple_init_priv(struct asoc_simple_priv *priv, struct link_info *li); +int asoc_simple_remove(struct platform_device *pdev); int asoc_graph_card_probe(struct snd_soc_card *card); - #ifdef DEBUG static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv, char *name, diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 2d004a980f0c..54e8be90b109 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -739,14 +739,6 @@ static int graph_probe(struct platform_device *pdev) return audio_graph_parse_of(priv, dev); } -int audio_graph_remove(struct platform_device *pdev) -{ - struct snd_soc_card *card = platform_get_drvdata(pdev); - - return asoc_simple_clean_reference(card); -} -EXPORT_SYMBOL_GPL(audio_graph_remove); - static const struct of_device_id graph_of_match[] = { { .compatible = "audio-graph-card", }, { .compatible = "audio-graph-scu-card", @@ -762,7 +754,7 @@ static struct platform_driver graph_card = { .of_match_table = graph_of_match, }, .probe = graph_probe, - .remove = audio_graph_remove, + .remove = asoc_simple_remove, }; module_platform_driver(graph_card); diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index ed2cad6d9ac1..fa1247f0dda1 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -740,6 +740,14 @@ int asoc_simple_init_priv(struct asoc_simple_priv *priv, } EXPORT_SYMBOL_GPL(asoc_simple_init_priv); +int asoc_simple_remove(struct platform_device *pdev) +{ + struct snd_soc_card *card = platform_get_drvdata(pdev); + + return asoc_simple_clean_reference(card); +} +EXPORT_SYMBOL_GPL(asoc_simple_remove); + int asoc_graph_card_probe(struct snd_soc_card *card) { struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card); diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 8b9964d25757..ece7dac3e8c5 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -705,13 +705,6 @@ static int asoc_simple_probe(struct platform_device *pdev) return ret; } -static int asoc_simple_remove(struct platform_device *pdev) -{ - struct snd_soc_card *card = platform_get_drvdata(pdev); - - return asoc_simple_clean_reference(card); -} - static const struct of_device_id simple_of_match[] = { { .compatible = "simple-audio-card", }, { .compatible = "simple-scu-audio-card", diff --git a/sound/soc/tegra/tegra_audio_graph_card.c b/sound/soc/tegra/tegra_audio_graph_card.c index 35d008b5d373..1f2c5018bf5a 100644 --- a/sound/soc/tegra/tegra_audio_graph_card.c +++ b/sound/soc/tegra/tegra_audio_graph_card.c @@ -244,7 +244,7 @@ static struct platform_driver tegra_audio_graph_card = { .of_match_table = graph_of_tegra_match, }, .probe = tegra_audio_graph_probe, - .remove = audio_graph_remove, + .remove = asoc_simple_remove, }; module_platform_driver(tegra_audio_graph_card); From patchwork Mon Apr 19 02:02:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 424604 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 966E6C433ED for ; Mon, 19 Apr 2021 02:04:27 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A753610CC for ; Mon, 19 Apr 2021 02:04:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A753610CC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A1FA4169A; Mon, 19 Apr 2021 04:03:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A1FA4169A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1618797865; bh=sciEh6JTENWYjzuWMzsTyg9u1n2qhxRIwioSctv5OMQ=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tvfIQujb8p3yPTZ7foEc80YHnOtDvUeqUiOWFdjDi2nySJ7bc08HSwnWX5Cv57mYQ BE8Xh9E4KY2eNVWz8fsxSSFCgFVEDezHkoEHtUTR9peP+Ybdx6Dmd6lwF/qfMqBvdI v14b7MbbEgzoNPrJXpTjM5Z2sjltqmSOGPHm9cp4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 51DF8F80424; Mon, 19 Apr 2021 04:02:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 30AAFF8032C; Mon, 19 Apr 2021 04:02:34 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id 7FC36F80164 for ; Mon, 19 Apr 2021 04:02:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7FC36F80164 Date: 19 Apr 2021 11:02:29 +0900 X-IronPort-AV: E=Sophos;i="5.82,232,1613401200"; d="scan'208";a="78473885" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 19 Apr 2021 11:02:29 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id EB4B140078BB; Mon, 19 Apr 2021 11:02:29 +0900 (JST) Message-ID: <87wnsz3ubu.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/6] ASoC: audio-graph: check ports if exists User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown In-Reply-To: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> References: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kuninori Morimoto "endpoint" and "port" are always exists, but there is no guarantee for "ports". This patch checks "ports" if exists, otherwise, it might set un-expected settings. This patch also do align to 100 char in 1 line. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 54e8be90b109..0006c71f4f69 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -182,7 +182,8 @@ static void graph_parse_convert(struct device *dev, asoc_simple_parse_convert(top, NULL, adata); asoc_simple_parse_convert(node, PREFIX, adata); - asoc_simple_parse_convert(ports, NULL, adata); + if (of_node_name_eq(ports, "ports")) + asoc_simple_parse_convert(ports, NULL, adata); asoc_simple_parse_convert(port, NULL, adata); asoc_simple_parse_convert(ep, NULL, adata); @@ -200,7 +201,8 @@ static void graph_parse_mclk_fs(struct device_node *top, struct device_node *node = of_graph_get_port_parent(ep); of_property_read_u32(top, "mclk-fs", &props->mclk_fs); - of_property_read_u32(ports, "mclk-fs", &props->mclk_fs); + if (of_node_name_eq(ports, "ports")) + of_property_read_u32(ports, "mclk-fs", &props->mclk_fs); of_property_read_u32(port, "mclk-fs", &props->mclk_fs); of_property_read_u32(ep, "mclk-fs", &props->mclk_fs); @@ -311,8 +313,8 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, "prefix"); snd_soc_of_parse_node_prefix(node, cconf, codecs->of_node, PREFIX "prefix"); - snd_soc_of_parse_node_prefix(ports, cconf, codecs->of_node, - "prefix"); + if (of_node_name_eq(ports, "ports")) + snd_soc_of_parse_node_prefix(ports, cconf, codecs->of_node, "prefix"); snd_soc_of_parse_node_prefix(port, cconf, codecs->of_node, "prefix"); } From patchwork Mon Apr 19 02:02:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 424073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25FF2C433ED for ; Mon, 19 Apr 2021 02:04:40 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94C2B610CC for ; Mon, 19 Apr 2021 02:04:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94C2B610CC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 32D3B16AA; Mon, 19 Apr 2021 04:03:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 32D3B16AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1618797878; bh=+oHkwR4bleUQHI5ltyalCKgpzQtIfWpHP37oAGOrjQY=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=B4KleU1vbjaR/0XHX4FaXZP/75ztK37NVVmpygVBqttvwX/hNvpaG2Us41leFbENv +ETfX80kGkoSpshzaVUGaAhvXTSDMwR0EuyVdU98KtiMx1juSUMKetQEo890bxLqRC dcMZjhW8c77YgaGdIQyvvcpHrlhwBF6LZ7rvevJE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0A07DF80475; Mon, 19 Apr 2021 04:02:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1CFCFF80475; Mon, 19 Apr 2021 04:02:40 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id 1F9ADF80425 for ; Mon, 19 Apr 2021 04:02:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1F9ADF80425 Date: 19 Apr 2021 11:02:34 +0900 X-IronPort-AV: E=Sophos;i="5.82,232,1613401200"; d="scan'208";a="78696725" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 19 Apr 2021 11:02:34 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 4134A40078BB; Mon, 19 Apr 2021 11:02:34 +0900 (JST) Message-ID: <87v98j3ubp.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 4/6] ASoC: audio-graph: remove "audio-graph-card, " preix support User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown In-Reply-To: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> References: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kuninori Morimoto No upstream code is using "audio-graph-card," preix, and Yaml base Document doesn't indicate it. Let's remove it. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 0006c71f4f69..029611c19c15 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -22,8 +22,6 @@ #define DPCM_SELECTABLE 1 -#define PREFIX "audio-graph-card," - static int graph_outdrv_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) @@ -181,7 +179,6 @@ static void graph_parse_convert(struct device *dev, struct device_node *node = of_graph_get_port_parent(ep); asoc_simple_parse_convert(top, NULL, adata); - asoc_simple_parse_convert(node, PREFIX, adata); if (of_node_name_eq(ports, "ports")) asoc_simple_parse_convert(ports, NULL, adata); asoc_simple_parse_convert(port, NULL, adata); @@ -311,8 +308,6 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, /* check "prefix" from top node */ snd_soc_of_parse_node_prefix(top, cconf, codecs->of_node, "prefix"); - snd_soc_of_parse_node_prefix(node, cconf, codecs->of_node, - PREFIX "prefix"); if (of_node_name_eq(ports, "ports")) snd_soc_of_parse_node_prefix(ports, cconf, codecs->of_node, "prefix"); snd_soc_of_parse_node_prefix(port, cconf, codecs->of_node, From patchwork Mon Apr 19 02:02:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 424603 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B737AC433B4 for ; Mon, 19 Apr 2021 02:05:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D59D610CB for ; Mon, 19 Apr 2021 02:05:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D59D610CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DFB9B1696; Mon, 19 Apr 2021 04:04:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DFB9B1696 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1618797913; bh=eCNB78QelM/dMTnPjYybFNKI1UU83F6eyq1JLC8BHAU=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=K+m5Abcmc/Stjd83BvKDxNh1qkfQbNfH06Q/DDKg6pou5FsyXJYILmPq90zuXL96f bbTMleb4NipaQX+EmwmoyRrNIx4Z3DUU+FDGW3Qx9HNS3RNUGPluPLs2v9fGNb2wOe 8zCymSJi0al211Bq8CZyGBH9tjHqBJiF4ooWwsCk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8FC2CF804A9; Mon, 19 Apr 2021 04:02:44 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3E9C6F804AA; Mon, 19 Apr 2021 04:02:43 +0200 (CEST) Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id F1ACCF80430 for ; Mon, 19 Apr 2021 04:02:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F1ACCF80430 Date: 19 Apr 2021 11:02:38 +0900 X-IronPort-AV: E=Sophos;i="5.82,232,1613401200"; d="scan'208";a="78473908" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 19 Apr 2021 11:02:38 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B1775415539E; Mon, 19 Apr 2021 11:02:38 +0900 (JST) Message-ID: <87tuo33ubl.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 5/6] ASoC: audio-graph: remove unused "node" from graph_parse_mclk_fs() User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown In-Reply-To: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> References: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kuninori Morimoto graph_parse_mclk_fs() has "node", but is not used. This patch removes unused "node" Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 029611c19c15..5594eab9902e 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -195,7 +195,6 @@ static void graph_parse_mclk_fs(struct device_node *top, { struct device_node *port = of_get_parent(ep); struct device_node *ports = of_get_parent(port); - struct device_node *node = of_graph_get_port_parent(ep); of_property_read_u32(top, "mclk-fs", &props->mclk_fs); if (of_node_name_eq(ports, "ports")) @@ -205,7 +204,6 @@ static void graph_parse_mclk_fs(struct device_node *top, of_node_put(port); of_node_put(ports); - of_node_put(node); } static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, From patchwork Mon Apr 19 02:02:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 424072 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0869EC433ED for ; Mon, 19 Apr 2021 02:05:22 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 32D84610CB for ; Mon, 19 Apr 2021 02:05:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32D84610CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C255F16A0; Mon, 19 Apr 2021 04:04:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C255F16A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1618797919; bh=AtrdGs8dGv+1b0Czxl1+ZaeTmMLo1pSTz9hH4X0fuPY=; h=Date:From:Subject:To:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sLK7QXtsheqo80svXPeVscgjHGgzl97JxJrs62RW8tI093i2ADvMbtwnHWSx+WJpK v+wRxLie6sqLl+wyAp3j/7kjIZBF61ZF270dFxXQKD7qIV+QeDxr0hhxBA6lufOn3F TYwroFhzAU+3GsOW91EiLzBzu85aR1kcnC0Dr4Vw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 55E7AF804AD; Mon, 19 Apr 2021 04:02:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CB0FDF804AE; Mon, 19 Apr 2021 04:02:46 +0200 (CEST) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa1.perex.cz (Postfix) with ESMTP id AA287F804AA for ; Mon, 19 Apr 2021 04:02:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AA287F804AA Date: 19 Apr 2021 11:02:43 +0900 X-IronPort-AV: E=Sophos;i="5.82,232,1613401200"; d="scan'208";a="78696753" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 19 Apr 2021 11:02:43 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 3B02C40078BB; Mon, 19 Apr 2021 11:02:43 +0900 (JST) Message-ID: <87sg3n3ubg.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 6/6] ASoC: audio-graph: remove Platform support User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 To: Mark Brown In-Reply-To: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> References: <871rb758x7.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Linux-ALSA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kuninori Morimoto Platform was one of mandatory component on ASoC before, and audio-graph-card was assuming that CPU and Platform were same driver. But it is no longer mandatory on ASoC. Current ASoC will just ignore if Platform and CPU were same or doplicated component. Of course ASoC is supporting Platform, but current audio-graph-card doesn't support detecting it from DT. This means current audio-graph-card operation for Platform so far is 100% useless. This patch removes it. We can respawn it when we need it. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 5594eab9902e..3c4915d1e528 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -223,7 +223,6 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, struct asoc_simple_dai *dai; struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0); struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0); - struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0); int ret; port = of_get_parent(ep); @@ -275,7 +274,6 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, /* card->num_links includes Codec */ asoc_simple_canonicalize_cpu(cpus, is_single_links); - asoc_simple_canonicalize_platform(platforms, cpus); } else { struct snd_soc_codec_conf *cconf; @@ -354,7 +352,6 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv, struct asoc_simple_dai *codec_dai = simple_props_to_dai_codec(dai_props, 0); struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0); struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0); - struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0); int ret, single_cpu = 0; dev_dbg(dev, "link_of (%pOF)\n", cpu_ep); @@ -405,7 +402,6 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv, dai_link->init = asoc_simple_dai_init; asoc_simple_canonicalize_cpu(cpus, single_cpu); - asoc_simple_canonicalize_platform(platforms, cpus); return 0; } @@ -621,7 +617,6 @@ static int graph_count_noml(struct asoc_simple_priv *priv, li->num[li->link].cpus = 1; li->num[li->link].codecs = 1; - li->num[li->link].platforms = 1; li->link += 1; /* 1xCPU-Codec */ @@ -644,7 +639,6 @@ static int graph_count_dpcm(struct asoc_simple_priv *priv, if (li->cpu) { li->num[li->link].cpus = 1; - li->num[li->link].platforms = 1; li->link++; /* 1xCPU-dummy */ } else {