From patchwork Mon Sep 30 02:13:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13815310 Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11010002.outbound.protection.outlook.com [52.101.228.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A11A179D2 for ; Mon, 30 Sep 2024 02:13:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.2 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727662436; cv=fail; b=Zt3yM2zuxV+1qK3AEJF4fTRI7ZcyDoAOf8k0E+B7gR6GK8rG8GkWfoDyZjFLn/VpfT20TDJUaU+tuMtgRi5yIHDY6oRlwjVxPUOBNAql7vQl55b1rYPDIsRmARGGcol8ntqzVDnDTWyM1w7lidBnCCBc+sNgmHhSWiPV9JOMKwE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727662436; c=relaxed/simple; bh=E8uRcDIYfYQ3yNKQ9ccPMOVT18z2G83yqd3OOxbR08A=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=p2TuMFeOYw+JsCwfdyttnqoB2wyZ+Z61jEE36vV0qD3LYxUAPqjyyQqczrTvWSZTFb8WJD7dSdR+N6VXdsGN0mJNowmeMILOjE3S/G9Iy6AgPjVIU2pq5C3YcH42IPanfb80XnOeBG52H8RBBK/1kke09aJnB450iq7LjVAuZ0A= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=JOORDDAo; arc=fail smtp.client-ip=52.101.228.2 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="JOORDDAo" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i5Hy3MrTDru97X/XzWxn6pBLZXmCJfxcUCov0miR8Kk46i3noCCAZD+Mre/pbn44Njg2OdVip17XX/tpzfq4EUR5ZARXOYmAtDtHy8+hFhW75gMWc1zfXR6k9cMWAbfs4iwNKUkSduMycf4stwI/mUbvGPBuS/zuC/ssINrH3iRAHeyI8JxhzOKiXg0vQiyMeGvsrQTiap/IyPGmskE+UZrBPpifQRsyQlEGsbUSMPmGxS8oul+tWueqZGW7JyBiQ9eylRoZEu1t6S30Ai4IsQI0YnOCXi96ewFTTz3p/TOt16L9bf7sgqcdZVBtXfO18y1RBn6PLFu1ajwy/0SrXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=kdqlVGjn7/8vAeXOmkLE4hLk7DgXCc56AgZdATXFRY4=; b=YDwMwdNpMCRqvsGCgCSk4zSfzXwq3ENGC6gX1vM8d9iw5MYgmPb2DZXbY4mrlKk7AVz9arH7IRRVTKAvUfVDKtikujMFsajkvqcfGdFAczHZlWV0tcoMFcz4ljAsK6LZkIA+xFORqv0icyKGNouec25w0GCdXhNeBDkhiONj5rLoSqotIyvoqXYVXhAiecQEjovFdc2e4KZWIXYT6E+Scz8z3VCfQbWIpnErNY6tT+L1V1TspaL33KJijHVtet4Ync45PuKNkCf77g+Yo2QsL91o23qxl9/QXgeGyd/5DzWQU9zQd8brWR1a/tu1gCV/MAvAGg1d0T+xZc9NsGg1fg== 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=kdqlVGjn7/8vAeXOmkLE4hLk7DgXCc56AgZdATXFRY4=; b=JOORDDAoIRuPCS9qjbNPyZ0uVVi9JvAMnIlhwP0tTAgCC66uE5l9aXfK0uqJzvM9IbxJzhMfYGQVkfU5zwy92BGp49dKRrMTe5ifUQxSjKFkvYMm653v/qexCHubfQVXlGj6Wj7L0Y/OcnAvmjNNMgmEG6s4vmLJc5+SeC9vS2o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8143.jpnprd01.prod.outlook.com (2603:1096:400:104::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 02:13:53 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 02:13:53 +0000 Message-ID: <87o745lwgu.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 02/13] ASoC: fsl: remove dpcm_xxx flags User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Mark Brown Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org In-Reply-To: <87r091lwhg.wl-kuninori.morimoto.gx@renesas.com> References: <87r091lwhg.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 30 Sep 2024 02:13:53 +0000 X-ClientProxiedBy: TY2PR02CA0015.apcprd02.prod.outlook.com (2603:1096:404:56::27) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8143:EE_ X-MS-Office365-Filtering-Correlation-Id: 347f3628-e384-4de7-7638-08dce0f5880b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: uPapkc+/6QMSv3DBAzIGWdZFjSlJ47/aZRdT4ftRxb3g/OsbxqCY8p5C4iUoeeIy/gHQQOhHYwIoGsDEJDrv5G5fN/jTEtDHr2bme022IjyWCgR/id9rG8nvlXIF12hRj5UB9aWlm+vrtOVE+gytUcrckPl2bJugARfwvtBt4zdgD82blK2CX3vJd/MLNDT0FU7w6gUVJVY1FytE71sAChHem+dB53EAF3GDzLRCJ6l/sdZ1FI99i1zRB+z6Xjn7re0CHXfonVdAkZLvK7Zz15ciLOhL38q1sHQkJFweI2qrWAxd0F42Q5zKkWJpWuGEVsAUv+wH5kk6zREPDFC/ZlUbsMTDae89zgSbPNZDfGtfvP862ncJ+LMa+AtBnrSQb3vGtRYHubuy35BTF4XaeX3Fcjq0MlORan29XcSfSYbDjL3GWkutFnauE7ER7pY0xxkrJA9A/7Cs6hCDexvLacX+0jjjLT+X8wJypQQWS/iBtJdgM5hnxmZ/HdKXt81OdoTvkepUrlSNbHkVDLqzoCz9rk+2Teq6AIn4m4PAHz6Nc1StNt7nWAdzbFqZGbhWvTw9jY1K07roapfhScaA9UBGeQhbFGSy0tGhIyX0f2i6X5SwP0qYL+sWypJyZw8K1zSH9oOfU+ShrHpJKV08bNMPJ3m0mit98wOXc+Dutt685+f+/y39kulYljXSmDNTJwdbPiEy4eham2eIq25s+ES9WOsTi8hZ3WYgQ5qC5Ohkn5Ojh0SsHXyHbRxU+ulTVr5iu0v3b3h/SmRr1cH9z04JMEHrc5PgRuujv6yOhOatupkiQMfvOJMxyd5GIDhbuCNYK/ko439z1MpcsxUVm1g9gxK9xOxNjUbvgnR5ttpQT7penHrnqkI79BHbA6EqJ/fkNxD5zYTAKd9vu/mTCezTeU6OkQhu0jQ92yDeXjWYh88YKg+kOrOW5VF134LOfEwMM3IltBAE6fqZRbmPdJXs25gbNSrUBF7io3etVKUqoGlQ41CUoojt8kyiC73SQAHvrdhBwXXXg4Fw+3kIjrFP4RHl0+K6521urkyT6pmSCqjeMSf3iodeFDVSIdjEu9BZ+rv8qkbmimDoONcb3Vql1PcYDS/NNMQ0HF30U5MBmLmFxJh1IhyU/nawgeZyWpfDJ/+pQ2P/ewUrG8Vrd40rl9PAXFYYoKIsOuMP9r3HPK/CrCy2rLB63UpRjsaUYlGoynXykx5LmiarnlMuIhsVnlCpMlnSxneh6mvPsO+yuDtLhqJEZ/Y8q7SjWRkanl75+KOYWFaio2i5OtaZjRchohb73Q7r2WXj6HoCYl7hbNyn2ZRd4YpWS+T7wtvWB4hMtShHA9CPE4swv53oC100JkpxLuVgoTXiD3VON2IvSq1ejEalpRt4lzkFmswAbuE/3Inz6X6vIqBn2FlWQg== 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:(13230040)(52116014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EPSde5nXBclAddaf80AousoxaBUBT3Qf5P3xEhYkjDEtbwOSP9cX/bjVUtPkN7TD85klz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+fOrUOHNnTQFZ0icenqs7BxheZ9XYoPLBhTXKrQcPog0cFsH42UhrjhLrRB2ndPz4GKwNynB2qOAfJ+/x6waHd16GoBYiRHAA8SJsm2upKlNtsCOHsEADmA/CsWh65G3ol/LwO1ng30n1W3MW3o6gK1MjlJYlETUED1+zYPCNcGXfItOnFIdIPUfZrdQh4TDbnlgv6jVswNGrlsdiI1xztw1q40knGI/w8oC9hprIcznJQKbvlZAnWU/3WFpkkapx4XK3gtBbf16gRGTDXxxn22x+a/YesdvPAbylg4kPwR+qFT35vQTAJiVwmp9S9Vswg4CpTyHO7uydc9XwpwhB1mbGo/C3lbxqk3m0QEVHqX/wdx3mjrLMREdi7Rul3LitgFE1Fw5jwse7j047r+kePV2lP8648t16gRyqdps/JXCmSoeJfTokuUCTW7pIJQCw7JWjXqpYkXH+cvLnXX37UTrLyw0oWz7xaVih0IAm/pMLOJut1H2Y= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 347f3628-e384-4de7-7638-08dce0f5880b X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 02:13:53.4645 (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: kKCKwDlRZeQn7xO6eVaUE7k/wPsFbxEh+00TzLRYuwF4PoJWyCy58Bco5hBTIItI2BOSmpJxhNMAXUEUC1B1LVQdH1FgYkRLMIAAJmZ0l7qbr2ZEiZiDXaBslJDSMm6C X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8143 dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to xxx_only if needed. Signed-off-by: Kuninori Morimoto --- sound/soc/fsl/fsl-asoc-card.c | 24 ++++++++++-------------- sound/soc/fsl/imx-audmix.c | 18 ++++++++---------- sound/soc/fsl/imx-card.c | 4 ++-- 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index f6c3aeff0d8ea..82ca137621cbb 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -317,8 +317,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, }, { @@ -326,8 +324,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, }, }; @@ -504,13 +500,13 @@ static int fsl_asoc_card_spdif_init(struct device_node *codec_np[], } if (priv->dai_link[0].playback_only) { - priv->dai_link[1].dpcm_capture = false; - priv->dai_link[2].dpcm_capture = false; + priv->dai_link[1].playback_only = true; + priv->dai_link[2].playback_only = true; priv->card.dapm_routes = audio_map_tx; priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_tx); } else if (priv->dai_link[0].capture_only) { - priv->dai_link[1].dpcm_playback = false; - priv->dai_link[2].dpcm_playback = false; + priv->dai_link[1].capture_only = true; + priv->dai_link[2].capture_only = true; priv->card.dapm_routes = audio_map_rx; priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_rx); } @@ -764,8 +760,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[0] = "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; @@ -791,15 +787,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[0] = "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 6fbcf33fd0dea..dcf770b55c4bd 100644 --- a/sound/soc/fsl/imx-audmix.c +++ b/sound/soc/fsl/imx-audmix.c @@ -264,11 +264,10 @@ static int imx_audmix_probe(struct platform_device *pdev) priv->dai[i].cpus->dai_name = name[1][i]; priv->dai[i].dynamic = 1; - priv->dai[i].dpcm_playback = 1; - if (i == num_dai - 1) { - priv->dai[i].dpcm_capture = 1; - priv->dai[i].dpcm_playback = 0; - } + if (i == num_dai - 1) + priv->dai[i].capture_only = 1; + else + priv->dai[i].playback_only = 1; priv->dai[i].ignore_pmdown_time = 1; priv->dai[i].ops = &imx_audmix_fe_ops; @@ -285,11 +284,10 @@ 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; - if (i == num_dai - 1) { - priv->dai[num_dai + i].dpcm_capture = 1; - priv->dai[num_dai + i].dpcm_playback = 0; - } + if (i == num_dai - 1) + priv->dai[num_dai + i].capture_only = 1; + else + priv->dai[num_dai + i].playback_only = 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 98b37dd2b9013..c4647ba912a63 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -814,8 +814,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; } } }