From patchwork Mon Apr 1 00:31:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 785958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 07E8DCD128A for ; Mon, 1 Apr 2024 00:32:14 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3319A210F; Mon, 1 Apr 2024 02:32:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3319A210F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1711931532; bh=E+Bzyzv25MKIc/iKcAN1ZwvL9ULU5WkUl7Z/Dqvkw3I=; h=To:In-Reply-To:References:From:Subject:Date:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From; b=IDsJV3lu3FLXxC8oGxo3QKFsYS/+k0Cjr7ran8JcdVF94aeyY2nVPpnj2dqdj0Lxa LIHxhOgCwHkjlxcmzenH6JWrPlMc9g29oEHzJXJQIGLivtIL+waTUY0vXaBR74554t /igk9sWRG059yqcEJbGsd3e3mDCLwFyL7aWCgRuw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 06489F805E9; Mon, 1 Apr 2024 02:31:18 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 68D14F805EB; Mon, 1 Apr 2024 02:31:18 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CB7C2F805DF; Mon, 1 Apr 2024 02:31:14 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20701.outbound.protection.outlook.com [IPv6:2a01:111:f403:2019::701]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 53322F80130 for ; Mon, 1 Apr 2024 02:31:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 53322F80130 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=JhLutqfp ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j7p2A5uZr99OPoYNyqh8RFdS8hshN07jHcr6GXn0dLXtP2IbGdMde5T9GkBPaRciYxOcyH5w5UeZteNu+SaCX2Gvkf3no1ED257DVumQlFmfQ/10rik8MJwErcRQnU6NxpJHM3D5uWVH01sN+qHX5ftSjH07urIBl2VLdDzy5eDbrgTpJfilHa74emKfbVRv9rK7bGFapNUPxiShJM2ZUAr2A+XaguCcWCe574tht0gZHE6MijaIGV3dJRm7hCiJ6adTIbbMIUv12YFCMN2fcBSPg+3bQSah1mBfx4dku6Tk9ErqHcSo2dGV/zpYb6RW9LihvcK/dxU4R2lx+Zy5uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dKzwwxP/L3scvwNLFIwZ2rhzmgTq2q83UIQ+nVP0lTo=; b=IbZnn3L6Y/XgWJ2yP7CDKE7C+6T2Bz/VIc/moAhLJkT48NFW//PVHImDCWEXL3isw6XQgarNyPrYFaILQw6wh1+joFqVRNjeJ/CrXNWqfG81CcGx36rJI00XPi9V8O1UyByF5NfEzT0EOQFAOnR3UuPC0c4DtfYilWmks8llOT4Ictc+B4Mu23a5Ndr7pWJgcxdIAY3gmA/8c1H2hjxe2uyaOpEN2+PETL3SED8nCPGn0LAg2fFVZoR7VIDNrxGU+1ouijeqrYoZYdSZZCuXuByBkxohnhct95NpqTZTEs0CTSvnW+wloPpGCY7wzmi2Lw8DkXUN3b9iwacPprwLOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dKzwwxP/L3scvwNLFIwZ2rhzmgTq2q83UIQ+nVP0lTo=; b=JhLutqfp4hYxTuCgnyuNt9EQwIjU2yOsLHWhmNR1BnLISUuAaYYu4aU9T1t0RF0f/XlpiH3c6VxZTV1iXr0SepUMWwCX2vOjNOPg+dSNUlIz64YXH8LmXWNY3rQmXlbg7D3piRUKX0tGWRsZ8ghy81L0w5cSKrrppc8fKZv0T18= Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by OS3PR01MB8258.jpnprd01.prod.outlook.com (2603:1096:604:175::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Mon, 1 Apr 2024 00:31:02 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::131e:55c0:a4a0:713b]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::131e:55c0:a4a0:713b%7]) with mapi id 15.20.7386.025; Mon, 1 Apr 2024 00:31:02 +0000 Message-ID: <87v851udo9.wl-kuninori.morimoto.gx@renesas.com> To: =?iso-8859-2?q?=22Amadeusz_S=B3awi=F1ski=22?= , Alper Nebi Yasak , AngeloGioacchino Del Regno , Banajit Goswami , Bard Liao , Brent Lu , Cezary Rojewski , Cristian Ciocaltea , Daniel Baluta , Hans de Goede , Jaroslav Kysela , Jerome Brunet , Kai Vehmanen , Kevin Hilman , Liam Girdwood , Linus Walleij , Mark Brown , Maso Huang , Matthias Brugger , Neil Armstrong , Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Sascha Hauer , Shawn Guo , Shengjiu Wang , Srinivas Kandagatla , Sylwester Nawrocki , Takashi Iwai , Trevor Wu , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-sound@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com In-Reply-To: <87zfuesz8y.wl-kuninori.morimoto.gx@renesas.com> References: <87zfuesz8y.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 03/16] ASoC: fsl: Replace dpcm_playback/capture to playback/capture_only Date: Mon, 1 Apr 2024 00:31:02 +0000 X-ClientProxiedBy: TYCP286CA0009.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:26c::11) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB8258:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U6UZVdKkSr3ofgZWDWecNKFNnkmfSkT50yuA/f9eh4UsdmDc3yu8XYPSJUVOPri4ELNNmRRQXSblzdgeYqLnU2xoDmaG91wi1XPtN+6kbRVpQ4JRIclrWkN5ii0S3LEBy0WLl2sCTJV1tIQqChYcl5thUyobEXNtkrocDttnIm0Fy999A8LZuJ01DsRGOM0JlstDXI97AwzoGCy+Stu3MuqwXKypsbD7bTTN8sjjPfsRMgwbmqxZg02L9uza/ckEPPFUxtnM8U5XqZSsCTjb25d6klBcndSsOHPYz6G0BC1s/ZTFCAVRcVMACMePPGu0P5NVo4e6BWGP89XrLMfBifhpRGTSeAp/FU4i6KkkCUdHQJA29RtZNb/Cpuso4OQUzgWMbabPWl+DQ/lSKhRsv451W5ZqtK/dNwOmMReKooeGdENVFZCa65TYHw2jT21dxtJZiclFsqgy4els6h4SiAQHhBkxgCQpCRGQt2SlSzEurbVzbMlSmlFr1OwAaG5PN7iIJXTHprtQdE0+q0A2eABO2zO70HyXtpgknTqcFJuXme39pu7g478tPucXqhXLn+ETjg1MxWL7sK3tgbItHTkDw/RSkRjQQaV7XitlxTb0mvY3UBKWMYzpp1R20Zf44IVt7DvV/9EWtShIbiCpY+0QTH5LMeflaImxSQsgmzKg0SgC+E7E/+cu3FhjLlHnQHzWeggRv304QYkTqdVFJSxHSbtxHVCpTOJKbg6AFQ4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(7416005)(376005)(52116005)(1800799015)(366007)(921011)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +4+8GDXgckIsfh97SKVRZFgDrzqWTg41HbboceX5fQ5FNNmC6UL/umjra92kM+ypwuR1nzBDi40NDKj2U30uFl5uo5fqUw53QvV0TL13Xq+jJ/t6N/jCleI/JHkg3nPvyhUWa7xBLKHhon/Qn+VVcxdsx6lJT2exLgQbSnkBeCNohn9T5LRd7wyEh4S/+4IEu2K2qynb8pV5KDKMl9KHRIw4FtNu9bZWUu3QmAVD2s1UNwiIJxyskmGfwUMBT9aF770Athq9tCUkPdLxO/GvxHGfA0xlqq7iczWfVlNXUQXi0DLabzM1a2TwD0EtfCVTwn1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ugudMhxlDGakpMiwXNY+91Mr3xjxiEpG0H1tIlKYjDS2gTMvttJlIXtdj3lWzo5O4sbRb1aXzW/z9qeC4K05GPwN1NbuWh9DL70KnJAJXMUSjrbSqwBCj6LYtJdD7GXaj7mOCxsjxqcHEZBLf2PLifrsK4hDOPcTjdCTJsFwG9hW5I0NGJ4begGnK3eXSkcrjjKlfLsPrKUkC4pz9r64M4b7wI08WvguEThDztE53umCOGjWR8jO7A3RQkALQ5oHW5KgFj8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 683abc33-aa7f-4e03-f6cc-08dc51e302d7 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2024 00:31:02.8347 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: p1lQSyHLqj04XlF9Ofu7fLJQmIbL88LNjCiJUV6PCyUVFtRtMjfwO1tXvs4SrBDdUff5xKOaz4/jstFAmlph+QF9InjjJskBcFu5BTE9teNtqCzdkAIz1A3SgPqrCuIK X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB8258 Message-ID-Hash: 3RCBCPRJR3RMEQ66GKENS7DC4BERREKB X-Message-ID-Hash: 3RCBCPRJR3RMEQ66GKENS7DC4BERREKB X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_get_playback_capture() is now handling DPCM and normal comprehensively for playback/capture stream. We can use playback/capture_only flag instead of using dpcm_playback/capture. This patch replace these. Signed-off-by: Kuninori Morimoto --- sound/soc/fsl/fsl-asoc-card.c | 16 ++++++---------- sound/soc/fsl/imx-audmix.c | 6 ++---- sound/soc/fsl/imx-card.c | 4 ++-- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index bc07f26ba303..060514743ca0 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -319,8 +319,6 @@ static const struct snd_soc_dai_link fsl_asoc_card_dai[] = { { .name = "HiFi-ASRC-FE", .stream_name = "HiFi-ASRC-FE", - .dpcm_playback = 1, - .dpcm_capture = 1, .dynamic = 1, SND_SOC_DAILINK_REG(hifi_fe), }, @@ -329,8 +327,6 @@ static const struct snd_soc_dai_link fsl_asoc_card_dai[] = { .stream_name = "HiFi-ASRC-BE", .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), }, @@ -648,8 +644,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) } else if (of_device_is_compatible(np, "fsl,imx-audio-tlv320aic31xx")) { codec_dai_name = "tlv320dac31xx-hifi"; priv->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS; - priv->dai_link[1].dpcm_capture = 0; - priv->dai_link[2].dpcm_capture = 0; + priv->dai_link[1].playback_only = 1; + priv->dai_link[2].playback_only = 1; priv->cpu_priv.sysclk_dir[TX] = SND_SOC_CLOCK_OUT; priv->cpu_priv.sysclk_dir[RX] = SND_SOC_CLOCK_OUT; priv->card.dapm_routes = audio_map_tx; @@ -675,15 +671,15 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->dai_fmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBC_CFC | SND_SOC_DAIFMT_NB_NF; - priv->dai_link[1].dpcm_capture = 0; - priv->dai_link[2].dpcm_capture = 0; + priv->dai_link[1].playback_only = 1; + priv->dai_link[2].playback_only = 1; priv->card.dapm_routes = audio_map_tx; priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_tx); } else if (of_device_is_compatible(np, "fsl,imx-audio-wm8524")) { codec_dai_name = "wm8524-hifi"; priv->dai_fmt |= SND_SOC_DAIFMT_CBC_CFC; - priv->dai_link[1].dpcm_capture = 0; - priv->dai_link[2].dpcm_capture = 0; + priv->dai_link[1].playback_only = 1; + priv->dai_link[2].playback_only = 1; priv->cpu_priv.slot_width = 32; priv->card.dapm_routes = audio_map_tx; priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_tx); diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c index 2aeb18397bcb..8fbd6fc8af76 100644 --- a/sound/soc/fsl/imx-audmix.c +++ b/sound/soc/fsl/imx-audmix.c @@ -258,10 +258,10 @@ static int imx_audmix_probe(struct platform_device *pdev) priv->dai[i].cpus->of_node = args.np; priv->dai[i].cpus->dai_name = dev_name(&cpu_pdev->dev); priv->dai[i].dynamic = 1; - priv->dai[i].dpcm_playback = 1; - priv->dai[i].dpcm_capture = (i == 0 ? 1 : 0); priv->dai[i].ignore_pmdown_time = 1; priv->dai[i].ops = &imx_audmix_fe_ops; + if (i) + priv->dai[i].playback_only = 1; /* Add AUDMIX Backend */ be_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, @@ -283,8 +283,6 @@ static int imx_audmix_probe(struct platform_device *pdev) 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].no_pcm = 1; - priv->dai[num_dai + i].dpcm_playback = 1; - priv->dai[num_dai + i].dpcm_capture = 1; priv->dai[num_dai + i].ignore_pmdown_time = 1; priv->dai[num_dai + i].ops = &imx_audmix_be_ops; diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index cb8723965f2f..5b7bdc5d6784 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -817,8 +817,8 @@ static int imx_card_probe(struct platform_device *pdev) } for_each_card_prelinks(&data->card, i, link) { if (link->dynamic == 1 && link_be) { - link->dpcm_playback = link_be->dpcm_playback; - link->dpcm_capture = link_be->dpcm_capture; + link->playback_only = link_be->playback_only; + link->capture_only = link_be->capture_only; } } }