From patchwork Thu May 25 01:17:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685675 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 7E52DC77B7E for ; Thu, 25 May 2023 04:57:04 +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 D5D42850; Thu, 25 May 2023 06:56:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D5D42850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990621; bh=X3jrfTcX9sZ0mJfA334R2cRnau6nF+rMqe41lrrJZG4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Hw98F2BrWIgHpyFIKj7cSwCmcRpVPeJPbStKzqgqJv1NyNror4XgW/F4FjZjKXfv7 XJ2SFXZRQgPp/fPVs2TvxaBE4RwlFwEAl1zb+TY/hDg1cSD9EBYDv9TT5iPK0dPFx/ etirxqzfdjw5d8BWzHJfCYpU22zeYgLggUIMLtb8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3D992F8055C; Thu, 25 May 2023 03:17:51 +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 01A1CF805BA; Thu, 25 May 2023 03:17:51 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 50AAAF805B4; Thu, 25 May 2023 03:17:48 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20720.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::720]) (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 BA2DAF805B1 for ; Thu, 25 May 2023 03:17:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BA2DAF805B1 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=iGBjJ1Xn ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IUihALbc7gDF8OUQ6j0Ezvo5/+OFj0nCXU5OqUwYp4d2etnC0Qp3qk8mfBIzL6+Lf6FIgwoadBfSEmXd1swCGXui+BCfUpI+CpQJPrAerL9gXD1Q0ZDfNX0Ob1lIvXpEjqZVDYbhy5E5Chl6/FPBuE1rqj2w306PSfmnQbBUquNpHq51j1+7DNOlrp8woJuTUNJd5MldrKI+euOKVzplydFox+jTbLhdFkC0C4MBMXN9NWP/7FVtYXg3YtN+ZupyIGFfp/+OaKK5LcxiNg3Q2NGD1xoFBlNqcAn6SjiBp0RrhAvf0mdQMp1+z7moSId824LuyK+c5EVMlS4qyYJgdQ== 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=DcGT3aG4jCHW0zmifrgnFgdO6mu9JHx+TpmKcWKAM7A=; b=lmNRnZ4RFP/ishwDZtlK6aqG/QFYNu4pB6x3DzvMN00rVNHHanWhamg1xLtEfkdQKQyJKJ170O8l0RR/rTqZv8JfB9eOuMrrigCfg2ZtXfxtKlD2tO1QpyfvGh+khn4X6RsmJM48leZ4fiMdj/Ezfx5CU83zKpW9esRijklLOmNDLRoa4SxP1Af1rzUnXTqZf7+7794YwN7B8Q/okuhoN3jRViOUg0J6KpLHksa8FOdZjkGeAhhH9dXqlK2KhHYaCYy6tWhvUOWdVjqiY6g5jDCUB2aqnocAqAkJRF4oA1PrCbMyIhFIZWvBwlejkJdXOglLeXbN5VCu6yBIqBctfg== 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=DcGT3aG4jCHW0zmifrgnFgdO6mu9JHx+TpmKcWKAM7A=; b=iGBjJ1Xno9EIWaVt20r6zYJxKJwaEGUgBiA0lcSgle3KsOa4mAfubehA4q+63JCDfzv6zSIjo5vfh28CyLhZn++ZgiW/eY+5KjwWyJryj1IUd1u/7KdBVQB4vfIXQmBo92C9jynau4yzMTQ5Y0ASTvzmeqsn0E7t/516OIp06zs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB8485.jpnprd01.prod.outlook.com (2603:1096:400:156::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:17:38 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:17:38 +0000 Message-ID: <87sfblgqfh.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 01/21] ASoC: soc-pcm.c: indicate error if stream has no playback no capture User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:17:38 +0000 X-ClientProxiedBy: TYAPR01CA0099.jpnprd01.prod.outlook.com (2603:1096:404:2a::15) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB8485:EE_ X-MS-Office365-Filtering-Correlation-Id: d619da73-95ef-4409-155b-08db5cbdd45f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Qg1cU34Qur41ha9CmdK6ijWIC3UAF0/9wQ26+QVzh8gGmbTJSQFO5tgjbiyPzUwpxtEWl/Dffa9xdNI8Xh2PDSv1XlbRiwAd4zgVJBXNAu6mSkCzJC/2VCVCn1IIh9/BhBv0JuIvT5GX5T+gm72Oaenq8DaXS8yTOPRIsVNUR1aQvzwzUM2lxm2t7OgzEggqg6Yw1X2mIuPY1LT/wWSDgeFsvQaWSpAqN1/I5h4AUYoIZigRheH9Ch+LxVBNRglol8aCKNXp9udAYZd8B2efv6lYuw5H6Qq0dILVp/M+GVrIGU1jwr5VYcaeLJpdSc3cDaaGqTEOWXLYV1BgrgIiVGrZOhy3C2NBFdKAuITKBibzpHDFAS/k8ope1l30HM5Ut7JQj/ZwIbQJheb5yS9Pu9Eobka+X9KOJyqKSwzTjKW5wVDj1eVNDwNeaxX1Wsdk89HofIXDLE9UmzWxCj5FFIcZPPk9LdzG/Uz3EHN6uH0uAuIb80WZ733xE0a6qhZInLsgvXb7AwXe0vqNlWdZQciaZqhfIKmQyri5XQZvHM1dSnYPDrhxd3jG2K90iHOjWxETa4fasLdRJ46699vUrG1wDd0mL4kUoA0DiR6rDKGHZccBQsC28Z12/NOqV0Rx X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(136003)(376002)(39860400002)(366004)(346002)(451199021)(66574015)(4326008)(83380400001)(66556008)(52116002)(66476007)(66946007)(6486002)(110136005)(2616005)(6512007)(26005)(6506007)(186003)(86362001)(2906002)(478600001)(8676002)(8936002)(5660300002)(36756003)(38350700002)(41300700001)(38100700002)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?HWfzAS3tXTgG6OqnZhXdD8Z?= =?iso-8859-2?q?hVoXWXEH97FgY47J5g3vWqdkVBmObIWsGs1DrZxUJXUdvM9mqAOHu1j8hTpG?= =?iso-8859-2?q?oV712zoPgoNhv31ioeVYQpAdLz9dOLmwTbReFFggInFHOqRx3E87S12CwOz0?= =?iso-8859-2?q?LnS0FKN83dg2k+tL8A3uiBvX8RtV1rgMokeGaswsWVNifhfKpVqXZpRY9jkm?= =?iso-8859-2?q?PrE3Wthb+t/f3QFLOOdfe6Vt/6Ctic5LhV7aHxsLWYCI7vipIxaYdHJltuKs?= =?iso-8859-2?q?97k0+HkgLPaqmqRJZsznT3GGmqBG/b8n+K6QQrU2Ot1+RRk5c/9PMdWps03m?= =?iso-8859-2?q?Ql8bGeeIIb60Enz/Ku2VCIKWN9ycISb9iUjl4ojiCPgWfaMuc2KMKuF+DDjE?= =?iso-8859-2?q?W4HfvYQWOK2nFQsC5ZpNFvNUjhsi2+1uxzc7eQV3tkt6ErGSRAIE8PgLdy3X?= =?iso-8859-2?q?2owtK0v1W+Fhe+n3cPVQzQ1KnrlL2rw32QWobMflFXJpspEeOteXG1QW1VF0?= =?iso-8859-2?q?0uVioM8blQ8eVYFno7NVammoJ2w07On4JxL/UbWUn56RRuDS2+YOu8eVy25S?= =?iso-8859-2?q?C3QDPSqpXn9FIg9GvrmUA+/x5Py+Hhu2yoEm6bNm7mZJBcI/NGjTlq7B5gHw?= =?iso-8859-2?q?h0IfwDe26WELanAvpXz7Sg34WHjdzNai0ucqjT132nSRty34DlTHKhaf/f4p?= =?iso-8859-2?q?5ZAqo/x2lbw5usIGleul4bSNSh4rl5BE6CE9xoyemX7mvHS4qKnsWXK2Hx9W?= =?iso-8859-2?q?bCpxAqnCCO4q2MJQ9IMXoq+WdUq4z9DCMJeY5tIzLWJBDPpTMuHCrxPpd+c+?= =?iso-8859-2?q?beUHd9lVQOoBMNOrhcjH1cNlta8OFoE+PyQtLNLVZxlogzxfBG/tji8YDMhF?= =?iso-8859-2?q?PMx967Wq0YV5dARiBgP2S/BaNGz4/+SreK8dMrqd0Ky304yro/bpkO8UNdng?= =?iso-8859-2?q?z6Re4SSIp9zvjHgPNDCKw85lkyKDMvcuvUKXlqsvukpRjAN3V+4aFdVAwljM?= =?iso-8859-2?q?TC7PhHi7bvQXkygpGLgdmtlWLxZuHLounYgHUWfSKxPCfRC90+cy4AmunTag?= =?iso-8859-2?q?5vjk0lfEBy7QxuDk1A3xz6FNxu+R4kiwq6REz5zkst+FKgLE+4OZXLIr7O8R?= =?iso-8859-2?q?dZWOCeMBcuc1SgFNOUojxZu9hs1+ndhMtPBqr0o9txdkxkFAM/lEDYUyWl7U?= =?iso-8859-2?q?f6o/R2HCpftE9gxKfDmFkCC30cHTbzAE9VfIJ8dzjlG136QWgVfc/1mwruu8?= =?iso-8859-2?q?LXyG5STa79tF6ZoT6iN95kI2tK3HHP/FKb34JByL+ZdsP3/vyTR4sORWkqgO?= =?iso-8859-2?q?Yg11utj85IKRDfvIWQCXN7KeOTUlDB33tNNDWrG29zUcPiPS6L3oLOKds8I3?= =?iso-8859-2?q?1Fb6m8OfT0iwyPMa8dq1IiI7Sj89zKzcBNZDFPgWKatjXJZe5LOLdYZFbo6w?= =?iso-8859-2?q?Fs+0OJnjOIrsAOBMuwwayXZst5OQZMhetDQoX7z8t7T+JD3IjzU7ca+EhASH?= =?iso-8859-2?q?u7/3zyfzpwY0NVOwyy82wWJfLV7tHznozqr46BHR2+fWxtTmEheZD51t0b6n?= =?iso-8859-2?q?KMgfULFxW7f7t75dsEv3UmaxK/H6h9/RWCdNS7n2mTcmWiHQ64l0MpCbnEko?= =?iso-8859-2?q?StD09G4xwKIXSIttbaYC8hEU/SWZ+J2AE9QJ1b6TzyUvdh6UoaRcQDwDxOPs?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d619da73-95ef-4409-155b-08db5cbdd45f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:17:38.6484 (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: CjV5fEs/tr+GaJbcKxEbw2bJqvTv6/5Rlc7irVtOhyWSNiuK0LHXPW7LsmYN+PQtBZUQCSfLtjfICLK4+HOLtEZ5m0QdkQy+rvpbx7K+Yb3LgUoMpMJzSDw/sYA1VaLR X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8485 Message-ID-Hash: 5AAZSQ5HDC3KS2ZZJVWRMU6ME7FUOTPS X-Message-ID-Hash: 5AAZSQ5HDC3KS2ZZJVWRMU6ME7FUOTPS 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.8 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() (A) returns number of substreams for playback/capture (B). ASoC will probe the Sound Card and mapps CPU<->Codec pair. (A) static int soc_get_playback_capture(..., (B) int *playback, int *capture) { ... if (rtd->dai_link->playback_only) { *playback = 1; *capture = 0; } if (rtd->dai_link->capture_only) { *playback = 0; *capture = 1; } (C) return 0; } But it might be no playback no capture if it returns playback=0, capture=0. It is very difficult to notice about it. This patch indicates error at (C) then. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-pcm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 7247f44faa1c..fe65994485f8 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2815,6 +2815,13 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, *capture = 1; } + if (!*playback && !*capture) { + dev_err(rtd->dev, "substream %s has no playback, no capture\n", + rtd->dai_link->stream_name); + + return -EINVAL; + } + return 0; } From patchwork Thu May 25 01:17:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686443 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 C9FF9C77B7A for ; Thu, 25 May 2023 04:56:35 +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 ED9E3857; Thu, 25 May 2023 06:55:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ED9E3857 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990594; bh=TvTYotcr4ZOu144Ecmw/NtiyUw1IkWxrJ0GVFOaUoro=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XjsfPRnknrzwSuFHSvlgce+pznm34IiE4omb6aHmX5UnRTHGXceHF3RWYo/jOcUa+ FdOfPCsyUV3wKYon9Ek2KnJNqbMn1xeY4Lzr4JarEXN0GFYfpdvhZZ8nY2XUeEFsMG 32sz1mYrDGaCa2+3xITrI20xlV70A1CGG1KX+fW4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id DFFC5F805C1; Thu, 25 May 2023 03:18:06 +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 5C5E1F805C4; Thu, 25 May 2023 03:18:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3C983F805C3; Thu, 25 May 2023 03:18:03 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20724.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::724]) (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 C8B99F805C1 for ; Thu, 25 May 2023 03:17:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C8B99F805C1 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=j1uwySpI ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h10wQIdLebIBi23nSN12A314HNXyc4MOescWI12E8KbS2FpVnkiD6E5B7EKcOEeAp7ttrX6F/hqnQ5MoAjEqG8TWdfbzTURTJzvcDhTbmZMjAodHxYkVQfJ5xEcyONHvftnDLbtn5ZOCK66acK9jxurvS6q+u9um3iYX0hBDu9a4Vx2Y0lXh3iFRxZ/SxCDJg3Av3FfLTHn7j4eWduep3y3CYsDHmqZnPszHB9kQf+fFhIS13ZZpWH2hXEQPKa1FPz05hNXYJ7vgRgTGy4gth7Y6u2KZQQxbtb7nKK92XUih1pd9/RK23USk1jY5SNpUKzRavr48ZxceEwtJPNvOHQ== 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=tbeDTQB35tZm8Y9PzzEs450v5znSklXmzYkAjOadlco=; b=HVH63swkuIAg5EKGO3owTRndhNFOSazieC98nsOpuHYGnhOF5FR4QoroJ7zlYaybo/A9/B8/PJuDZVMrAPeV3qAEfi+kW6jWM2nvzh7pxZ2jA6ZYethYnMTrNudRkSMMtfx3niKs0uSJ66kJD9AMLKP1aU7/wKRH9iNR//q8yA5OVvmPkD6Du2arVWOKQ5EPqdJ6mBMSHS9jiWqikduE2qXLlAwBF+fRjizvTTN+eriodtzvgO+3oETT0rQfcjz+GSrTRX3w0R/UnPzIZTpL5ebhLCPGpF768fRDHa7OH+EjR9TzG3VwhJ6lOL2mNx/0foTxXs2fA1mlhIL8TcDe5w== 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=tbeDTQB35tZm8Y9PzzEs450v5znSklXmzYkAjOadlco=; b=j1uwySpIGe4w5qvwVjmOl9NjY9zM1+tpqE/q/41pz/zepH0u9oavM3C2hlaoSRaGq1AaRmF2nBZ2DZL/ufLPpUU3vEEHEpBNGYIShRe31Mv/aNCAs88Y3V6ocMj9uhyOz6pPktQXSQnOvm9Clff4TLxDnh36KfrAIhA4Y8OkJX8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB8485.jpnprd01.prod.outlook.com (2603:1096:400:156::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:17:55 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:17:55 +0000 Message-ID: <87r0r5gqf1.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 02/21] ASoC: soc-pcm.c: use dai_link on soc_get_playback_capture() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:17:55 +0000 X-ClientProxiedBy: TYAPR01CA0062.jpnprd01.prod.outlook.com (2603:1096:404:2b::26) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB8485:EE_ X-MS-Office365-Filtering-Correlation-Id: c4d3601f-9aca-4bca-a4fb-08db5cbdde42 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3wBGiwvq/KsLE9RK+RTLr4uKtT4Po3xZLqvE4cmFgVkVbZIO0JHp2xn3lpO/IivrwJhpzAO/uPx5LmQVNnf0mkRfQaeTEDn8KDDDJCxGyveavm51aTIP1QGg6nyvOBop8NhbdgRBEkn6Z0bv0k5bpLKBC9MnYLXq5VxjnrmGEEd4ZMh9VYy3I5T/mAgyBb22y8R5HWXo/7XingNdseEAa1hhbrzNpBUKXWrODQ61as81+28y9mJLcKFrtPK8UvwGv2RkYY7k2JK4ieX/OSs2JTwAd7VYZOdb9r02zhuqWxmZfUgrV2HueG2je17jvJ2/aGSHSmSeT3U1Doi2xA1C6Y+4qW/+lPgas7B4A9N2z0IeS0uPQWCxFtKZ/JLJI2v59cwsq9xK8/QLv1i00bgIVW7SivxUhIy6H3yE5IYe585z8AJfP1ZvVU6vG5RePAvOpMG5yzDuSa5Ev2s0FVNf4r5tvyOR91yEKWIAkILPJLfKY/+qv9TcyeHWOQuVBOHGZX/Ws8ZNE4TEuhJoEnrISG/iOwyyWnx1fuTyPL1Jtw187lzvEjamlcXPC4MPLb2JIJYbHf4QmNhABMcvvyTXdqsWAQzJtx357hsrEZpNrDWY8vIw2aRwiNQ10T8hdHD6XK6dy1o3iLmXJ/duA1uY2A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(136003)(376002)(39860400002)(366004)(346002)(451199021)(4326008)(83380400001)(66556008)(52116002)(66476007)(66946007)(6486002)(110136005)(2616005)(6512007)(26005)(6506007)(186003)(86362001)(2906002)(478600001)(8676002)(8936002)(5660300002)(36756003)(38350700002)(41300700001)(38100700002)(316002)(21314003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?YqlKAzyK7okoiiVRfF6Nqhx?= =?iso-8859-2?q?5gd42IO1sxjm3ycg6if1/9BgzFehadKLwKX5gxsgDwFYuja5qY9qRPnj+MKF?= =?iso-8859-2?q?RWhYf7Qk9qMO2ALfT7mQHkPosZ8syCdDJQ2T6b9sz9EAARyZhiCArumb50MM?= =?iso-8859-2?q?Hu1IVj82DrelbKKKU/4H5DeamB9CNOdMe5VEMfn3qKpFW0jJKf0bUxc+Uyv5?= =?iso-8859-2?q?GczlJ/ZcHekeXsZiBIC0Kj/iQvf5UvfQXQBsJtwAafXL3npwlz8epigNQ5GG?= =?iso-8859-2?q?hFa4JDH+NcHntPWeaY4w7ZoB0+CY77XEfJfgrPsYzVW83TpW2fJrGBLK9LJ+?= =?iso-8859-2?q?7/mkhY5liR0nFmdDJkOcOFXoJlnHiBB4kdzPy7ZZXRpFzd0BewNR6PBSJqhC?= =?iso-8859-2?q?QhkR6wYQuKxFvBmjDXS52PKubCIAHXtbETMkmpk67gkcHsK9/KOl0QKFqWFI?= =?iso-8859-2?q?O7Zy71k0JT42Sm0WIztomlISBl9ewyNyfQO1YtsLNBNXemSlzYew4nrH0M28?= =?iso-8859-2?q?/dgfsopleeQArBzcpFZF9x2fWw2L2kPPiwLl4R1ZJ9iH+yxuH0fRdtvGpO4/?= =?iso-8859-2?q?VyqKtEE/fWBW7zP5jZw55NNoDS/aw05ZENmTxA+G3E5qROFCTe5PrVoqcyuy?= =?iso-8859-2?q?CaTPWKlZAVpERIrHB38acJK+9wT+cQPgVIyCRcPH1KhDIIiKrYVQBGoteoNU?= =?iso-8859-2?q?4P9ITYx+MqWVcaWevJx4XQPE4ePI3LSNNaW2YMUK8nERhUpVXSVdkFQoUCMZ?= =?iso-8859-2?q?ydZit22GS8QAS1dYwwWL7KstQWKs06HTioLyFRCC+rFglF2czwl1IuxlEKes?= =?iso-8859-2?q?03yOOlKpTvFF/zY3o/N2GyuKwow/ShJxLjQp+5d9Kpp5dlG83qNGoDr66jfH?= =?iso-8859-2?q?pgHwqMS5tCs3N8YvaBKp1Xgvv7fcr5KjKRDQifFQw1PxDEEd6EkryLVSxGd5?= =?iso-8859-2?q?rmnQarKjccz4UhLdBAyGeujCIK/WI4KbeA5uEc7HSUfn09H/2nrh5lZQHb7s?= =?iso-8859-2?q?gM4BOC3hS0xhXzTKnQCtMqYLFa1tJCLJFqEHx/sj1PRFoZgZUgQFPaXIuVE8?= =?iso-8859-2?q?pwUrtY6YlOMkZQmXEkct5OORIfcp8MUPed83CpU/4uxEfFoMy3F3TekVxS/N?= =?iso-8859-2?q?e6OjTt0khhtNSmwH67uVmQQ5MJNXVAG14kyXuWLLe65aXOSkqWJoFqBOUpHs?= =?iso-8859-2?q?CeeDQpZBOidrk6TzxHxkHh/MjuYaq/tOVU5uGpDkxodrUR0D7X+w5wub0c1F?= =?iso-8859-2?q?I6gC56TEm4QaismEb2+auMfi3o/Ef7MEJXgO/pgZOSWYpmxx3XkFNgnMIGGh?= =?iso-8859-2?q?S7lNCeqTpYg/KdZM0ZXIH8VF7VHOaJIZlNatisDXhZEUFjYct5ppvFDsgOe3?= =?iso-8859-2?q?fEpJ/xiLdB/SoDrp2v2EWeIWjI1qnIPhe6es07p6Ww6UF6w/Y8/xvkX3DRe9?= =?iso-8859-2?q?0UU6K3MMVWGXQ8k9ejQLRaY1RneSZf9JrtMNne/lCpG/yGuKI912xPYJ51Vr?= =?iso-8859-2?q?vGW+Wwfil0ncUDA1WKmYjwOApdAOkFNqlmrQHVjKBFinfg0mhiEv0JWEOsc3?= =?iso-8859-2?q?+C7u3opKVSVgJvoHbKRHBkeorOpTdOJ162Iv1LhP9ruCVSjsBXiMcZR7fNQQ?= =?iso-8859-2?q?f4QxYzFr+Z8TPJUY5Z1TwUKsUQrdSgDSgEE66j9comfq9ae5Ms9U5M91AB6E?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4d3601f-9aca-4bca-a4fb-08db5cbdde42 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:17:55.1806 (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: hBZkj2c+/b+HS/crXLaNic477mQFlbvY4DxMEXO+E+8gZEEjDJ+TUfRAv6EuY5PHQb8ZTFX0vpLj1tjFKWpByMLEaCVQYAuFAnLe/Ar6aBk03LlwpRlgVinHXZAH/+tA X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8485 Message-ID-Hash: PSXA5QU3ZGNPAMPXEHIALSJMLN6FFZFF X-Message-ID-Hash: PSXA5QU3ZGNPAMPXEHIALSJMLN6FFZFF 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.8 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() (A) is using rtd->dai_link->xxx everywhere. Because of that, 1 line is unnecessarily long and not readable. (A) static int soc_get_playback_capture(...) { if (rtd->dai_link->dynamic ...) { ^^^^^^^^^^^^^ ... } else { int cpu_capture = rtd->dai_link->c2c_params ? ^^^^^^^^^^^^^ ... } if (rtd->dai_link->playback_only) { ^^^^^^^^^^^^^ ... } ... } This patch uses variable "dai_link" to be clear code. Nothing changes the meanings. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-pcm.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index fe65994485f8..db3fbe1af2ce 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2731,19 +2731,20 @@ static int dpcm_fe_dai_open(struct snd_pcm_substream *fe_substream) static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, int *playback, int *capture) { + struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_dai *cpu_dai; int i; - if (rtd->dai_link->dynamic && rtd->dai_link->num_cpus > 1) { + if (dai_link->dynamic && dai_link->num_cpus > 1) { dev_err(rtd->dev, "DPCM doesn't support Multi CPU for Front-Ends yet\n"); return -EINVAL; } - if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { + if (dai_link->dynamic || dai_link->no_pcm) { int stream; - if (rtd->dai_link->dpcm_playback) { + if (dai_link->dpcm_playback) { stream = SNDRV_PCM_STREAM_PLAYBACK; for_each_rtd_cpu_dais(rtd, i, cpu_dai) { @@ -2755,11 +2756,11 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, if (!*playback) { dev_err(rtd->card->dev, "No CPU DAIs support playback for stream %s\n", - rtd->dai_link->stream_name); + dai_link->stream_name); return -EINVAL; } } - if (rtd->dai_link->dpcm_capture) { + if (dai_link->dpcm_capture) { stream = SNDRV_PCM_STREAM_CAPTURE; for_each_rtd_cpu_dais(rtd, i, cpu_dai) { @@ -2772,7 +2773,7 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, if (!*capture) { dev_err(rtd->card->dev, "No CPU DAIs support capture for stream %s\n", - rtd->dai_link->stream_name); + dai_link->stream_name); return -EINVAL; } } @@ -2780,15 +2781,15 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *codec_dai; /* Adapt stream for codec2codec links */ - int cpu_capture = rtd->dai_link->c2c_params ? + int cpu_capture = dai_link->c2c_params ? SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE; - int cpu_playback = rtd->dai_link->c2c_params ? + int cpu_playback = dai_link->c2c_params ? SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; for_each_rtd_codec_dais(rtd, i, codec_dai) { - if (rtd->dai_link->num_cpus == 1) { + if (dai_link->num_cpus == 1) { cpu_dai = asoc_rtd_to_cpu(rtd, 0); - } else if (rtd->dai_link->num_cpus == rtd->dai_link->num_codecs) { + } else if (dai_link->num_cpus == dai_link->num_codecs) { cpu_dai = asoc_rtd_to_cpu(rtd, i); } else { dev_err(rtd->card->dev, @@ -2805,19 +2806,19 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, } } - if (rtd->dai_link->playback_only) { + if (dai_link->playback_only) { *playback = 1; *capture = 0; } - if (rtd->dai_link->capture_only) { + if (dai_link->capture_only) { *playback = 0; *capture = 1; } if (!*playback && !*capture) { dev_err(rtd->dev, "substream %s has no playback, no capture\n", - rtd->dai_link->stream_name); + dai_link->stream_name); return -EINVAL; } From patchwork Thu May 25 01:18:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686444 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 15A06C7EE31 for ; Thu, 25 May 2023 04:56:17 +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 4F31586F; Thu, 25 May 2023 06:55:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4F31586F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990569; bh=jVO+YGsbwRnAzy9jREUYpNMZuswwebg6ihl8fGfpDtQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DW1ptfjD8ryVcEJyy1jpOBUfwsIg/mCiBh3YGi5k4i3BGcjICF3tH7u32n4B+rj1r i/Tg+1gyqjXG/dIRKgcz5YwMVBkcwj5pdRbNJ6hQhlgow3DkeussTT0WUpYHCY/Uld btsxAlQMbw66wVcGviRpdXXIjDp2F9xDChutveic= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E3507F805DF; Thu, 25 May 2023 03:18:13 +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 AAC1FF805D4; Thu, 25 May 2023 03:18:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D597FF805D4; Thu, 25 May 2023 03:18:10 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20728.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::728]) (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 D7C87F805C7 for ; Thu, 25 May 2023 03:18:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D7C87F805C7 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=Y+fXljOz ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QzGAfcZINUNNi9U/e2LDQbJhsuGp3Wm9+QSYlZrT5lCah0h7i6A71w8KU29ESOvJzRlXEluOlgYnxUh6jHLkT8dtaUzYumjrUSyu2duR5/PvRuE5cpz92Z1xcZeANj7H6BZ5EVqBHArI2ogcaSD09DAy9AxwDV3VG3O+NEd2VSLt3lef3vcI/ABlJ7DrV5QCFtkvuZFKQo6eTXoKsgs3hDvbgZNgqmVGrbGwXAE2rMbQg/toxDWXBzS+djQQzo84BTwGdxvwq1mt7uaK2n/YZBXgaFhiYBGlPdZIoXQSivyMLBsvQ7qmavAo7BRMheKzJzFte/5FRf0NiUhVO0m0sQ== 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=kmQ6mb3JrwoxbGRKGzZ43ikrzMM7iiARHn29Pvf66OE=; b=IG4HXbDy3nciU+ufUjxSOi043XXQffXIEJ2YE9uDMJ2J5NQ/0P4shZmZUMkkIU+gp5ubGEsw+Y7xArPS8fvWaICIusG+9YKEijC+5B30oQn5YenShbq1mY7nFdctL4VsZYzhpxRISUj35rVBZmvYYM2/ZgQaIoUJyInv9Gk9CG5Bklrki3k/sEg9hjcDr3CCRdelFOeumKRc7Lxbwx9riaxiLkFw5128Sdg+Y4RHo8cqKvKb0oKkiDTIUyfIf1J7Vg9c3B7rYrEq4drQFQ93hsoaB/8Tbm8IhJ6IbmdnvFkTWlVbRwMvETFbin1Tab1QjuKgL+4geJrI7jTGGO0Bsg== 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=kmQ6mb3JrwoxbGRKGzZ43ikrzMM7iiARHn29Pvf66OE=; b=Y+fXljOznIxbfcTTAIjmIajgEEaifshfFOK3NwEVHr//8n+jqwT3UNUFhNFDJBFCmmHsg0l/kRln1P0lLtPolp5bcFD5z+bTuusG6ytlAG3MFnpJSEgyg3EFi+TOc0CzAzXnYY7Rcm1fiLm3yXHPYjBTqj1PiW8rdOdZqk7+Ch4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB8485.jpnprd01.prod.outlook.com (2603:1096:400:156::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:18:03 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:18:03 +0000 Message-ID: <87pm6pgqet.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 03/21] ASoC: soc-pcm.c: cleanup soc_get_playback_capture() error User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:18:03 +0000 X-ClientProxiedBy: TYXPR01CA0045.jpnprd01.prod.outlook.com (2603:1096:403:a::15) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB8485:EE_ X-MS-Office365-Filtering-Correlation-Id: 86db84e0-91c4-49d3-f85e-08db5cbde31e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3FWh4iWDNS1wmFYeHDURfC2UDvGoFxcWLo+JVtIsz/70SQM7SiMqHUPUMgDUXKCj1v/RJ5Tip3QTB5cfk6NPJn2g0Hzq/SlAjx9axtfViiC9j1whka575uNme+RAASdYIOOoEWrWgLLVwmUV9gpxoGO3TJ27/Eq27HjKtm5RwA47XakM9tGPz2hN5AZwharFHJktQHlVD1jCD6A1oG7Je59hDn1m8q0nMk8pjazlml0CKLLAhJ0w9jjTMytO/4gDYjcU0Y28xIhbpAJ3ggSat5RXVkixvzwMrCxKpgCER9DoTxLJIIjxm1TBRlqRh7ZZmF01zP7yYnAMGcHhblskGbJd2YJ2YKU+eY78huUqzlxCPldnntL7LSnaaTqYVANsGJJMn85/85e83PLXnSvqIh+Vl7b1aONdP8SmhVhoTJ0cBjMFsYUq1Hq91S44EYTKNGAKwTl4/yKSKKoGxA6wtMCU9Cj3aacPIhgzSMjy9S5Sxe41jqVtmlIMY0R1d91U24xgGoENmG49JWO/Xf8Ak0Cy3xHXAdLEByO9tvPKvrfxjSON70Kd6oIjLMvIQTxzh97bwGI6dV+40ezrQC0XZu9Qai2sU9pS1DGCR4mmECsUDQiYicmpihc/xVtTDa/Z X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(136003)(376002)(39860400002)(366004)(346002)(451199021)(4326008)(83380400001)(66556008)(52116002)(66476007)(66946007)(6486002)(110136005)(2616005)(6512007)(26005)(6506007)(186003)(86362001)(2906002)(478600001)(8676002)(8936002)(5660300002)(36756003)(38350700002)(41300700001)(38100700002)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?66BFLKZUa8c4ARn42qqMnRT?= =?iso-8859-2?q?dHtcyzxApe8ldCuTtqve79m5lPYgJVM93m9nIs9CKl9H3YXWS0Fc1afkebuy?= =?iso-8859-2?q?3PFJJwJr0YKiyDx8dX3R7ybB6G68sdSqa+2pmidO1+s7vfvFuNer3eu9VayN?= =?iso-8859-2?q?fvre5YPfYBtWr+NTkxvEPnH6kMzdUpMwJinqvsSr/MeCsq8hn/GYwYEqpmbk?= =?iso-8859-2?q?Bsar2coq5rpwxOIHMZPCaEIduc358E+yuvcsYNLfVzwKLs5lV4JsTw8PISua?= =?iso-8859-2?q?URRz8VW0bDTR8rXRt1pabhkIFrJFtfMhkZkivFGT9tVYKt6xG6vuE4p0rtFv?= =?iso-8859-2?q?Rq+EwLZjHkFaTFqLp+D4xKWJVxFbDXDXztEuHjXEdl7JKubpES9r9VnjCUCM?= =?iso-8859-2?q?RnNEqwC6WQekTCAZ8HkIE9BYcZUrqVRNB8DuRTJ5LWqPNgVR8tHlkDzKCBid?= =?iso-8859-2?q?w9Riw3CA2VR8XpBHQ6vSZcB/8ZvQUfyCoCa6q6ClQWj+5VT6eoTUAnguK2dw?= =?iso-8859-2?q?lLH540fa2PW42fWOselMevoJo8VTmviPz6v7+KJXJGuF0w6pkd3vtkmRj9iM?= =?iso-8859-2?q?Lp69hGihZY0H1qgt+kcMVoLtGwhTNtwD/4mDwULdFElzwmKOVusKuYOq/Pb6?= =?iso-8859-2?q?Yo9oERRS4xnYSqYt/FbVD8o+R7cUdy+vzZ7nDrsCSDSFXeDNoGu+XHutHyRd?= =?iso-8859-2?q?mzaqLF4lyFRgop71STfArhm1QYyYNOOpIn32eOn42SXfBnieAloCbJDDF4Ie?= =?iso-8859-2?q?iWY8x9MK0iNjSJ2wu2ga8pAk3Yl932P9eESkEq7SXxuNazkksAwZElmCN/4l?= =?iso-8859-2?q?T+1k5f0T0IUzRU/K2aFZ4iNjk5DlG543as/IqBxbfncM/nfmZ7d/Wj4592f+?= =?iso-8859-2?q?1clWz0FXy81zqDztlAkwkM8aIrjUTXmOIe7hBnMaT6WCK19I4QD2bIE/65dc?= =?iso-8859-2?q?zgUY1V9nCPqP7AFEXw5cuYGkdX4g4F5+LXDhPK2NNoGHuT/3IN9d9cuik7MX?= =?iso-8859-2?q?u/Gysrn2wFefr0ogpB3J/p/OiXbPxfFl6TZyueUY/e1Dzf0E7rC9ebXEzbzd?= =?iso-8859-2?q?pWY08RuWAmNLFskciV5jAqRY0GFiUEtukRKkRnskw9hiCtFUSdvWsI4BBose?= =?iso-8859-2?q?o9ssJLLYziaHhJfwfdbky0k+DFMLsOqVLRBnf6V2/wAYw+Md3fk/wXV4sEnE?= =?iso-8859-2?q?toaE0eUD5ZMNDo+Lxi6KPhhALpNdSnmz8G27PdhqbnWagIywOIiZiFfAm+Wp?= =?iso-8859-2?q?p8Qx2GAZE52L+hEkh/3AX25KmW9T4p3JeLn/df5UZe5ikcZ+p04VgcSuwUUR?= =?iso-8859-2?q?7wAfg06+VS6MJYmRBmqP/lS5ibi0YNNehgjHEoyxy4wS1qOI6XmDHby5vQfE?= =?iso-8859-2?q?GpPAKpkVoQ6/bJnts/NP/A+N6+m61EWRtpezSreA0wxaYVOYq/fA/fOXfTBa?= =?iso-8859-2?q?iTWEWYzYI6MXnPKUaUIHZdhW8lGG29xnCfgaFkrp5Qw9dLU6tVOQ8sWvnwWk?= =?iso-8859-2?q?HfO7DLJxJDqL5sahcTHmnXV/B6caVHkFBNIFi7zeblidRH4UioXUbtsfRL6n?= =?iso-8859-2?q?851b9yaaoCT1QKlL4T6n7wnkDapR8ppY7alWwoH0+3/Z2TXi9nNOrpWf8czn?= =?iso-8859-2?q?249JPH1JJ3JzKhTcc7ea/+sofVMVbjj+ZtC72wG0K6y2nfZ/MkNpJRYkYrBw?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86db84e0-91c4-49d3-f85e-08db5cbde31e X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:18:03.3375 (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: 8u277nOZN8cAmgQR3ZjWlitKookZH7BUVCf9MLQx/1GZezwxs7EFsKDW/IhXoUtCGiCWiBLwu9+9LsCReMf+VffQPvudR4JaPaiQJScPzcICykY15mEhbF1+pgXW8PFI X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8485 Message-ID-Hash: AVOR5ESNTMLKTFOLC5OTMPCRSKMEFAB4 X-Message-ID-Hash: AVOR5ESNTMLKTFOLC5OTMPCRSKMEFAB4 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.8 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() (A) checks dai_link status, and indicate error if it was not matching (B). (A) static int soc_get_playback_capture(...) { ... ^ if (dai_link->dynamic && dai_link->num_cpus > 1) { | dev_err(rtd->dev, (B) "DPCM doesn't support Multi CPU for Front-Ends yet\n"); | return -EINVAL; v } ... } We can use 100 char for 1 line today. This patch cleanup error code line. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-pcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index db3fbe1af2ce..47da3be0ff46 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2736,8 +2736,7 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, int i; if (dai_link->dynamic && dai_link->num_cpus > 1) { - dev_err(rtd->dev, - "DPCM doesn't support Multi CPU for Front-Ends yet\n"); + dev_err(rtd->dev, "DPCM doesn't support Multi CPU for Front-Ends yet\n"); return -EINVAL; } From patchwork Thu May 25 01:18:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686441 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 C47BDC77B7E for ; Thu, 25 May 2023 04:57:20 +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 4B0B3A4B; Thu, 25 May 2023 06:56:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4B0B3A4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990638; bh=ZuNMos54AIJNlqmD0jq22TXyOPV/7yJ53PYTpNN2gro=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=c7Rk1vyAgIFeeuptn6JM0eDJ/zqCexaCnkClVBix7hgT+Gkd5dgZqkijtnMWgi2Dx OKhpY5laDxGfqGjp6la6S2ekCQ9aoGyoDBuqxofPPEdM2IN9PADlaNI5Qpr/kMpYgF 8ffzRedz9VXROqSDYiwpOkOoqSVITpWwL4+by5eA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B4CA5F805F0; Thu, 25 May 2023 03:18:22 +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 4A26AF805E9; Thu, 25 May 2023 03:18:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A70ACF805E9; Thu, 25 May 2023 03:18:19 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20718.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::718]) (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 14694F805E7 for ; Thu, 25 May 2023 03:18:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 14694F805E7 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=hjpVvaSG ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j7lTJJdOVrWTT/JNgAcw4PhSholXkGNyblFBsl/yln+QQ577lMzGJHL57cZOv/dygkgdz/KsJor2yBuajku3I1qixRxVgRt8YwY+H3brf/qJDW2wgVwU5Mlc73YLR2XVhgzqLMF3YDxfo7m13MR/cLKpdS3CpD7EEsbVjF8HyiWHRHSHsPJjdwhL4ywhPiYUr6z4Do/JDi2uAeX7RXt4DLgVA3b1iDVdyYE//lXtjMOXLvSTF+848adr54TJtsmqhhZmKoGSmbpk+3xiplPI1o6xNZu07OOIP6a6uRx03g/d+Od6bbnzxcE4IpQVExZKMlTTB+qo09k7bjrdyzFgIw== 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=+oOkqhKbkTL/3SiEEeyds8HkZVDM28kI07WMjcz5kLc=; b=HyQERASeJV8iWHfkFokaqPGcaDnCS/bf05AkOHSuLy+QG02EHRV9sW9c8XJU6AjqkwXxkgTVmSPxIaJG8z+k+GtDStcaxIh3nF+1MuVmPYS+KoueysyzYXFZPrKL8R3NBihY6M4emlirrrQWE1Y9BVSpPAAP193dnYjpyK4mNoEE1gzMJUrCg3hDC7lKE55oM2u613nPb9TraaKnRbgn4VlmhV7ZDEM/3NiwFFZhOnbkrR9fXv4cOVUnJm4FJGVTphWZaCakOQ1aC5dksAmUz8DfwuWH5SBTLxci8BPgsVxZ5SYS2F0U2sPT1sD1U8LoS1QBOvvj+SQFXkSBY0k3Cg== 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=+oOkqhKbkTL/3SiEEeyds8HkZVDM28kI07WMjcz5kLc=; b=hjpVvaSGde+ZlJIMCII4qSWtjaM3J43pj7MALZ/Hif4xGDk4yFuTTyCLtnI6LwXiklP5cH6MqchAqLrv8g6vKbN06S7WeoJhC9Frmj9w1lnFfIWbhORtSA6iMAFnCLqhbo92PsDJzjJc4EuJTNT+FIHmhrzr9UW+QvVItnIZnKY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB8485.jpnprd01.prod.outlook.com (2603:1096:400:156::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:18:11 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:18:11 +0000 Message-ID: <87o7m9gqek.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 04/21] ASoC: soc-pcm.c: use temporary variable at soc_get_playback_capture() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:18:11 +0000 X-ClientProxiedBy: TYBP286CA0021.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:ce::33) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB8485:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a05eb87-6579-4dc8-bcf2-08db5cbde82f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s4qL+axKsbrMQUwE87liaoEjnAP/OA5RL0iq6F8P+oXjDXUSjSQzrbKVofAaMREgTU7bE1mR6mYDH+V/Oylb5ocdj6dvxyK/VAFZ4Ly0524yHVZblcuNy56oD2bcZ0JnkNn9+2JO76ESnEmX1BPboLXrcPfdhrTysRWlCyPkN3R2HjeJBmFz8pswL9+X9Faut/b322WDJxZ5nwZGymb16wBJdkwWlUU+5GTom+437I1G2jTDdAjJmAEJRKEhCx90GN9Vr/K5FA7f5czcgNZWyEoE2gAoImKP56svtre6qtf3Ny1LLZsxr0XfeKtde4gArs+acCW6MsItlPBn9Yskcqsuqxk0KNGCjr+qO5aE2adNdo3x8Wtutfadx02iJ0cFyjkkDlCFZrvjteMjLE0tQqwet5CKl/cM2HBuPt7bjeVpTxvO/0qxMmWR4mJS3To5Wfebt5v/P+Mm8gBvTEG5PgtdQJdDb8FCYa2Q944uzBs5Q30hZojCfwNfEuj2197Pldb9ovmpg0G61Bd3olvWVdjznYd9N1yKhcAAuzYyjb6leiPJxchB4iuKTJxY2tH8b/I1l0S+zM51dUugpxxlXl5aARHqwtmYF76zmeB+x+uIwCV9knQBaZ6cIlkvN2uokbCtEXsxqqpb10Daoyz03w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(136003)(376002)(39860400002)(366004)(346002)(451199021)(4326008)(83380400001)(66556008)(52116002)(66476007)(66946007)(6486002)(110136005)(2616005)(6512007)(26005)(6506007)(186003)(86362001)(2906002)(478600001)(8676002)(8936002)(5660300002)(36756003)(38350700002)(41300700001)(38100700002)(316002)(21314003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QzYlNKtV0NCkLWrFS27Nk0IktMo6t5MKipNi6U23G/X0Z6n22UQKfPgjtPHi1bgtYIjEP3f9BNcFpLZCkbS7DqSDUk7jD8nuP62vGW5+8fpz/rKArZUQd1vbF5cutTauY/qDLZg11gSvxJYVc7SQp0FjjzskXJMbuIMYhohZKVoVst0s8G2SOU09878KdzFzfSI/KSt8JaPmbHicbzyjp7Y6cwmmUZsYeX+e66TAi+JTlDneVSlnrFzW8BPCSH17xlA6Yy3KCngGlYdG1oI5ittIEVz7IVJ/UZgYGPvRET2cSb3mI4oSfE6j9HrXJnOjVLpJ+8if7bIrBhWfVzuSbB0LV2N6aCOEfXF7my1e4jPZEyjg/b6BB6s1uVM94cDFo3OBdSyiyvzdD5SRrglX2hH33shAIrBp4XigPEouPhspZjmnjx4gL1KLcH3yUTrllAh3zY4Z+VdAUvB4d8PsOGnnOxFqKhalXfLQ4LPWKcs6ZeRN5cVTogz7+OU12HHRS+W3cnPrf63Frizc2M3EtSrYgOQ3bd8VSYnGnSfYhDxO9IZnw4F7yKT4Ch3L+WnhR44l4/+VW8rcUmWrrNziKExTh1pcnz/wZe0QXqQpPJX79TUFZC877omP8ySv/pMdI1awTe8qWcV8KV+RdzIwRJAe5VP/S5xUfP61ag8X9pyCvUUTqW/iOiP4ZkpgxhGg7+cQDoBcURXebC8wzBja6VvnX8CNgr7lgI1+qbfOOpOiMWN5xuOwstlyNRLVeWuy0OF7KOGBgv+ZRsQR7OTfubZtTs3MXy0LktA9Wv4v+yDwSd8vuj8T0OoKC9tStNmrpBeVz4r3Xbr7/OFZ4hDP/NcXIm0k9eawEJB4xXtxhberfoa21p9Lcd47+Vu5eFPxJvCDIO9ChzLhK0hQqe5tp0e88YMOkcFxk7nrc8ytcKOp3juDDbEBwfY2SLPi/lOIvtNCGwHUN0GZOAP1FwzHixsRfJ+opqAVIgL8x1TtXdNQHRCxXohrBWQLhAR/G7W/o2EsWLwAWvwsxqYApgGEf464yMXoU2x5izt/MOKWBAZtz/IeihwpoTkMJhfgAGBKH6GDXvK8Mf8himTRCZXQhLRxDJKvADrsEd8ePptCRv8aQl7F7DoNS0hFGZ7cdYXGjOoDFDUHdhi/iSjaQMUQ0RsvnV6N2V4X/8ub2TmVtqw0lHanrsCRjAN++0NpiX4oVNjNHY1cRL2ObkHMeZHR7ky1IWsj9uO32bltBnkQz42VpM2Bl3j9mY0wFA3uj7k+GzBiB0jwuwI2el6qaBEUviVLzLUYJUCEO3IFdrSlKE44YCy/ivcNmEgG5eyelBzXgpoF+EJJYPOqLHsNou+AsIgt/+S6rPOdHpxSgdAdkICfq8L7aC9JGeW8PcbCp9fV0aQ3BgrONG9VJWQB1bv35/vG9ysE6uCRIyk25anKA7EcTSxjcT5F/WXUjViCvX4apbpxM+QLiqs+nuP9daXfGF92AywoR4Ml0BXVN807kOiYcFAj6tvdcjTyGk5fjOjH6eDQxoy95//NqF6/POKAdVRlyvJc4pw/BjTsgNYDY/PtaTv7rzh3xTkOw4+FiGHKYGCUoqS73dVtsT0Y4sTPktWxmhJZ/CkBgalBHXFFMAU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a05eb87-6579-4dc8-bcf2-08db5cbde82f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:18:11.8230 (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: JKARucaGk9lFZOUe1Aqr2Em8fuUwot0UwB86EJNJOl44jR/nd8wMcGsMIX0/ycDfB7/WLil+mau/jvK+4p8g5BIvLdIEWSbEtcJxD0wVCdZP6UmCF1iRDLghWS4sW2U6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8485 Message-ID-Hash: HTTG6CKOBFK22CTCWVT3RZMZCRFIV2QU X-Message-ID-Hash: HTTG6CKOBFK22CTCWVT3RZMZCRFIV2QU 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.8 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() (A) returns number of substreams for playback/capture (B). (A) static int soc_get_playback_capture(..., (B) int *playback, int *capture) { ... for_each_xxx(...) { if (xxx) return -EINVAL; => *playback = 1; ... => *capture = 1; ... } ... } But, it is directly updating playback/capture which is the result of this function even though it might be error. It should be updated in case of succeed only. This patch updates it. Signed-off-by: Kuninori Morimoto --- sound/soc/soc-pcm.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 47da3be0ff46..b3d569e7ba61 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2733,6 +2733,8 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, { struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_dai *cpu_dai; + int has_playback = 0; + int has_capture = 0; int i; if (dai_link->dynamic && dai_link->num_cpus > 1) { @@ -2748,11 +2750,11 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, for_each_rtd_cpu_dais(rtd, i, cpu_dai) { if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - *playback = 1; + has_playback = 1; break; } } - if (!*playback) { + if (!has_playback) { dev_err(rtd->card->dev, "No CPU DAIs support playback for stream %s\n", dai_link->stream_name); @@ -2764,12 +2766,12 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, for_each_rtd_cpu_dais(rtd, i, cpu_dai) { if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - *capture = 1; + has_capture = 1; break; } } - if (!*capture) { + if (!has_capture) { dev_err(rtd->card->dev, "No CPU DAIs support capture for stream %s\n", dai_link->stream_name); @@ -2798,30 +2800,33 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && snd_soc_dai_stream_valid(cpu_dai, cpu_playback)) - *playback = 1; + has_playback = 1; if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) && snd_soc_dai_stream_valid(cpu_dai, cpu_capture)) - *capture = 1; + has_capture = 1; } } if (dai_link->playback_only) { - *playback = 1; - *capture = 0; + has_playback = 1; + has_capture = 0; } if (dai_link->capture_only) { - *playback = 0; - *capture = 1; + has_playback = 0; + has_capture = 1; } - if (!*playback && !*capture) { + if (!has_playback && !has_capture) { dev_err(rtd->dev, "substream %s has no playback, no capture\n", dai_link->stream_name); return -EINVAL; } + *playback = has_playback; + *capture = has_capture; + return 0; } From patchwork Thu May 25 01:18:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686442 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 8BF09C7EE31 for ; Thu, 25 May 2023 04:56:56 +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 A66E99F6; Thu, 25 May 2023 06:56:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A66E99F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990613; bh=eXkDvqezi7ERAGj77f83+BFDRaBmKx1vpn1imIQSQqc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=RkF77eO28lZiqNeoODcIt/8xlhLk0pWG70O8tuAwtynSTPqNo12pr/1coyAs6HVHG HGKuGEmBzmEC7Hh9DPCPb9NcOHRf7V6MJn2ojgs0Cv3Pxg8koTqtnAZ82H4D/OnrQB O3064pG2z4w0OGiHSV9M5dMVf9XA7R5bY/Cqm1FM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0C7E4F805F4; Thu, 25 May 2023 03:18:30 +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 A77E4F805F3; Thu, 25 May 2023 03:18:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EFC27F805F3; Thu, 25 May 2023 03:18:27 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20731.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::731]) (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 5E864F805F1 for ; Thu, 25 May 2023 03:18:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5E864F805F1 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=ARGWOVQo ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U2CB5YHyr5OM0CQujogt9prON3pJtIclm3t3UkwAp2rvZSN7LMvmPSMVZstW+dlqEDZ1zdT1eXrQBniAcjzYwq0xersJ4OsnFGWMMy46iDclPIItPjDow+819JSElBlhGUq9KuyN6jphxL2KewyPdQL22emHzWdNpwNmMAPEnDi8Oz3qTpj82y+fR9jl/KrK3UGB3GNpAFrz/97LGDYSwt51rFzm7JjVOvlbI4l/MxRUAEpFgvdSPwLoPNw0j1cDJDMQfypY0qZlTAZa79zP2ksY2vSiUCgz582XOpD0Lb36HDn+sX2HLURk0xdnxaNjnyIOpqLs0AZkkYunX5CAfQ== 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=URYLGPDTAxi+1oEIac+j4tw5WMwXWhid+7elBPBpCKA=; b=Cfi94kwLvXdyUtQi75NYsgBpio2QzWQWCTgNPXPwE624mmjGA4PQtkyeDW2/QUSxLDL3tOleqskWf5KVQxOZbIH9m9Z7rM+e+CmVo/WFPfr6yduYwF60pKvR/G3SCZRn4GLrtPnMG8hNpE+MMSkjQJuR3Citp4L5UFAyOBwMlqlD7rkqfWQnAX+XUU4LdTXagx2JO65jtsrfe4wQecCSdugtqNjZ62nRn8qtzQIhJu+EJ5eFC5SVszSYwLn++uQjtiR/EwvH8qykFaa6luHDRprE/pjWyCNvuSIbKLFif4o61zhU++mVv2qvL5CJ4My62HIIvs/+hBuWfm1PAKM2Dg== 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=URYLGPDTAxi+1oEIac+j4tw5WMwXWhid+7elBPBpCKA=; b=ARGWOVQoSiqE6jSWw3DNj/Pc+Tjj8s8B33A8Dp240vLzScfv7ozqJYbz7zhsFpYltYL1B6xKJ+38fbJBgODa09uvTQ6smeVuzeHh4mnDCPhkHkEboX2Ifsh+/3LgI+plg7q4We2HSXlP8TkKJWJjvv8+pitsljLSQDaAJWmDbpw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB8485.jpnprd01.prod.outlook.com (2603:1096:400:156::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:18:19 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:18:19 +0000 Message-ID: <87mt1tgqec.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 05/21] ASoC: soc-pcm.c: tidyup playback/capture_only at soc_get_playback_capture() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:18:19 +0000 X-ClientProxiedBy: TYCP286CA0330.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3b7::19) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB8485:EE_ X-MS-Office365-Filtering-Correlation-Id: e10ac641-9345-49e3-d73b-08db5cbdecf1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rTo9YABORz3I/q9d8Hb09FPRLfkzgztju+JdedFPrqtRJacsQXXgGR/qa08UCOXCEx19XWn6svVG+3jeI1dmiRf+1wp2ZC9Xt8aPKT/nZjmL0QLbKOW2KEw1Jl8VJScjGNdIITpwYMt9O9zLwN/2rwFHCswkrThNTxwVzYSY8dfOwO4WvQjWI8FtdUjAIVAMHA9w8XVsonUBmQzodpr4XJkKY54qIcCkgH9pIaHQfc/NZj6ndJgvcNnpu/4+Qk6icbZ8ulpQ+I7hpsgc55wTcZPhL2VA+6a1yS2yS4n/F2wCc05byruKuMhoaAK1NcMSQbVuUfwoiMVr/10zMA/Agq+9zu+TbD+se+5sua1Z0TBk8jk90rihI7Dm9EC21FMMabnV7ZQrxeC46pZS8is3ZqsR77eqQhkkagxU5Sw1ggVPhHWRH3eQRf4jV95Fqi1Xyuf/YedU4N0Q0aZOK/a8UX3ChyEcIO0PspqwzQxtGtbSpWgg4cTmDsQYvd1UhKY/Kqbo8/E+mcPxyfsoHOhkx12t8sXVNs/BHTrf8/+lE90tT1NtyApbGggS4cCLKS7o2LX2EpnkIdNMCek18Ef/9su+k106AY2MR7lHAkNjh7UcLZuFyzhRHMbutGRxr/2u X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(136003)(376002)(39860400002)(366004)(346002)(451199021)(4326008)(83380400001)(66556008)(52116002)(66476007)(66946007)(6486002)(110136005)(2616005)(6512007)(26005)(6506007)(186003)(86362001)(2906002)(478600001)(8676002)(8936002)(5660300002)(36756003)(38350700002)(41300700001)(38100700002)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?JQe5Nq/m3B+EwTwa9F/tS1h?= =?iso-8859-2?q?9i8uMHs0oNE6RzxR0CbyWbQYgj5OZFIfWmTchmGANQJ0XBCk3UmoGBjP+rV/?= =?iso-8859-2?q?sB91+XxlCfLC38TEfvLtbH0XUhl5saL1z8egIRSJ/qwwhBKKsDztOHWgq2mb?= =?iso-8859-2?q?rgj+dzN3lh0eq3wvzGMFbXAQlWwFsEsxwJyUEmmgZdeiZOYh1s4c+TLRdRI/?= =?iso-8859-2?q?7GwAakhrxonl00nHCW0DMMJzupxT15LbUiF/ibYFMJRY3HRY3s/kgq7XVFNq?= =?iso-8859-2?q?5Om/Oy9f/SRNyqnIDEpzTtnwb04Do0tFvZlptK9p2aWfskuxgv0QaKi3kBi+?= =?iso-8859-2?q?oaUtBMM97bc2mxBq2tVGAVfwRjJ/s1cXdjSrZCbA8d3Q0JP5Dw79MTy/10Bb?= =?iso-8859-2?q?Tja4K0hVK6IFu+geNG9TpSadecz1uLNN/KNIMDQJ88dA1y+fppK051ZsAQW4?= =?iso-8859-2?q?Rc5xwQL6yYEBcBPDBetX8s7sO0+Qc/Uc8RD6il5cu0M9IHu5KbuAxRcWDx7v?= =?iso-8859-2?q?iNy4AuxuQNNJvCzQUx5AtB8r/jy3xRfQh53++o73MYJvuOQ4mMuYOtVqLidH?= =?iso-8859-2?q?8sf7/IFgaNEaygOdglQqk2OxBWTGp7CvKkb8AcJs57yHjxRJjyJ77nmnx/SD?= =?iso-8859-2?q?MSSJPPZ8rM76dni4xe0pmpbWqo6AexJuRRGQOlumhCcjSlfeUrjm/9hdcMJi?= =?iso-8859-2?q?HLzvr20y1LsU97UlT5GNJ5QuKxC7/Oe+l6QY1CRBGd95hLoJiQbuC6kq3djn?= =?iso-8859-2?q?FF2BMj5h/z9Q4cIH8HiNiFvsdk3aqizzFpbYtmVbq9d6PvccPBTd+w4mo3R0?= =?iso-8859-2?q?gKLpfajx+aQ6szACxTW/HaIQoPuKp6UQGO77c61RwvcloFHydQrS84lJOcsZ?= =?iso-8859-2?q?AyXEG8fN1foex4+XO4vjRHq1SGnZnSwCJc9GgKr2vAMBBUWIeFbNEWV+Z6Pd?= =?iso-8859-2?q?rYASyNYrKeLQXj3m1DBsxV5NgwHUiFQuqBEE3XkqM9YTvi+rEwXIGMUzK2ON?= =?iso-8859-2?q?dn0cUpNShi+eEY/rrJtljJj1Vyqofu3o4rS/0Fo7dWjFlyySL1nV7TPdoqtv?= =?iso-8859-2?q?kDXGFwcGcEgDk8wsvtmAFkq7F+Wxu0AHdXjd8Qfo3JfFXRcfD9N5MmXO23XK?= =?iso-8859-2?q?UDX6n8pMS/ApKfoVF3oTsEK5kMOrG9DIVErO7ySJEnrkddUSleJ8tK+y+rA1?= =?iso-8859-2?q?m5geeE/j9lcmS3PVFFd5Xcz30up2Xk0GhUsbFV+fDQXnTDzaMLVAh0t7xpYY?= =?iso-8859-2?q?Cuw6CyW/BiQBZs0R4NKeVhtGrWF5GSOYaSOvHZIJt7gmuUK1WuMX7Q4JmKqK?= =?iso-8859-2?q?vcYyVNfAm0EA1kCRe8yaZM9ElUvQeyRjyTZBk5BFpg3fQEVeXwxPyhYhZxYs?= =?iso-8859-2?q?o+wpdRgBh+kTTzrhLrTJjHMUCK7FFI3zIx7R327adioGlZ7FtiF7hYCERUL+?= =?iso-8859-2?q?WKFSidj4upMOugLrEG3/f3fPVjrhQ/qXtUM15jmg2ndbTOpnj2qddJ0Um903?= =?iso-8859-2?q?wn5HpX4SE2YZ6iodH9OAh+7s2mnHKGCHvlY6Kf8GHALnM60NwZyjJ0ezUrJi?= =?iso-8859-2?q?nOfrp7BopoSys8MCnsuFzWKTzn33OWIBf/TeRbl3xwMrXD3Baukn3IrFVnHU?= =?iso-8859-2?q?gepvrcgaRPlPuSa9JB2fWegf/Q02bd27CAtGFisDOsqgKXOYiW2jCg+rWxAk?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e10ac641-9345-49e3-d73b-08db5cbdecf1 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:18:19.7988 (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: nYwF4j/Wdvp1Shx8TxsdvmfkzMCDvj4NmUHjfBSNMtxy+Te+iGA2/jze5liZ9aXKw5BC1GfNC6vIHBpAbcoZ6G2rS0+SGxI/mGWACL9QHCGk5OS7dY3egICi6qFD3avp X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8485 Message-ID-Hash: IUHIPQ556W73FMHTRPW2JF3UKKQGDPYN X-Message-ID-Hash: IUHIPQ556W73FMHTRPW2JF3UKKQGDPYN 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.8 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() (A) returns number of substreams for playback/capture, and then, we can use playback/capture_only flag (X)(Y). (A) static int soc_get_playback_capture(...) { ... (X) if (dai_link->playback_only) { (*) *playback = 1; *capture = 0; } (Y) if (dai_link->capture_only) { *playback = 0; (*) *capture = 1; } ... } But this flag should not have effect to opposite side stream (*). This patch tidyup it. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-pcm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index b3d569e7ba61..159670612de3 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2807,15 +2807,11 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, } } - if (dai_link->playback_only) { - has_playback = 1; + if (dai_link->playback_only) has_capture = 0; - } - if (dai_link->capture_only) { + if (dai_link->capture_only) has_playback = 0; - has_capture = 1; - } if (!has_playback && !has_capture) { dev_err(rtd->dev, "substream %s has no playback, no capture\n", From patchwork Thu May 25 01:18:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685676 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 917D6C7EE32 for ; Thu, 25 May 2023 04:56:56 +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 A5D77843; Thu, 25 May 2023 06:56:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A5D77843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990613; bh=YiI3tRn85eD6KpplZsDhUwiwfnCxv5kel7AB17xB5wE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=J21EQiIto02OFrLBcRDDu63rPnY+AMKx7leg5bZZZfQFqJkBQJ0odz+SjVI8ayway giBEs9HNt9wWZKw6GjrRh3bHePrMBlPs68wXdbHcC4DKfqpszBXvfxZka5h8K/2lIg LfhP+WxRJzcff0G+hidyjztjsJSprWQgY19OMgy8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0B056F80602; Thu, 25 May 2023 03:18:42 +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 68A0AF805FA; Thu, 25 May 2023 03:18:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7E2E3F805FE; Thu, 25 May 2023 03:18:38 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20716.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::716]) (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 21CD4F805FA for ; Thu, 25 May 2023 03:18:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 21CD4F805FA 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=GCp6Dn82 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ffUBf/QW7+sfjBfoB1QJAIJlRq0tAa/kBvlfTiYCp3lyPn5upZK9shko9Qh7Pe0d2rkYhsNesQ0U5EIekoP2669suJ21WA3HOAS5G0NpRMuPE9/KHqrIqEgEbbqrFOZU+wg8c+Nqz/Osb96EoCB7fcQ+FkN97ERVuAd+pOS04AlPlhfOnhQVh34JJlx//66wvOqwtcx3zZUvMa1OdAixzA/vh5LtmSlkldg3cGYuT87gJ0L17QtyrsAHWHUNmsmT8+Pcb5onuIkz5VT3GSzOvNvh8+GmiVgAs7XDU9oM+8oA02hoNYsc2QZ80MJk84jvpecI5a4ht09ZvINP7jZnxw== 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=itmeBOoEMeNqWziCPjkXUADA7QwjNWbFTHTwQH2AXQ4=; b=IY7zGpj07TurU4rDjgNve//IUXNAOwY2dMSTW/SUe7dUG+s3kCk00891A61jR652OwAR8R0P51030aPnqWt2SLSNh1gj2ZQjf+IMHmhqt7WqPvhDE7uQFnRrXpq4dochL3I6vP48/5eYKvB49HYiMQJjEoeNWNHrkfqHWC0yhcxddRdyyUXPtpFwRlrCHrFZsW/YKxv2d+t60exaCOSI7v7IYYNRerqaCKd/9LrHbEUr/ATel+DSNyNBuLzpFHbQVCH1SuLyx/99d5BkV56NjCGUKQdzgj8dSrMtLue6OfzNlxh4sETI9hEfCSpiWdvQqi69sI0Epkw/ZdoIBZ+fMA== 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=itmeBOoEMeNqWziCPjkXUADA7QwjNWbFTHTwQH2AXQ4=; b=GCp6Dn82PhP+O7t7oETXkL3Sn9klUF9c7hIurFrqnkt3CjnEML6OW3IAThbCj9TOTEReZh5uARIGIeleSViWClF90BN6kMiVBJav/V6lqJL4ElHYzGsUYRYoWGDrRvldlZDXjBvRwKUm154K940lWaXT213cdAhIhVAYiWUPLoY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB8485.jpnprd01.prod.outlook.com (2603:1096:400:156::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:18:29 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:18:29 +0000 Message-ID: <87lehdgqe3.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 06/21] ASoC: soc-pcm.c: cleanup normal connection loop at soc_get_playback_capture() part1 User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:18:29 +0000 X-ClientProxiedBy: TYAPR01CA0188.jpnprd01.prod.outlook.com (2603:1096:404:ba::32) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB8485:EE_ X-MS-Office365-Filtering-Correlation-Id: 8013b3c8-ca48-45c5-dd9d-08db5cbdf28c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wkM1xxifyDluPwoCeGp6ZwwQ4ObimKeUZYM8uIksAwDD/SGN/WazaTh+JVt7yVlyfXQ71arUKz3/oIzzLWPvR5LTHeQ2PffdNshFqntySLfGF1oga8595PDX+/daqnX4qnOh99nwJG8nqM9ZM0wWUdbSDufXamLE8l/TVuHbXBPxjG+W5tHMyWqaXbJ6fwtyrfyEvkzk7E2gkjfdaShdb+wPp52lWn0N81m0cvAYzZstzu5jsYZVW56Tbb0ayesCbZWyIyB0QW6yZIEJVXsJPqqekklvLp390zoSSmmJkx5roy7rjYc7uQWZv2fEyLRMH1SbZINrE4hvp1XpB+ycYK4L5Rb371KRjK4jNtdux8wQbbWlly0L9c8RJOyj5I1pYIS/FuFLSoCcGdzkNfbsz68bkYEOEGSyMVq800zztu/+A4NFROl4Y+A/lR5MS7dhNBKxxwLDrgYaWoy/xDnvnqmS9lHCNOVlHBDqYjoKAVECxJA2kCSNXmy3wgAo7Q3UrMQgrQUeTp1S2fF1OsvMsm/8QqdTnZVwsEq7ZaNMm2fYR5KdR/IkFuHFEtedifdrmX9gV4RUPor8uDwy4C4xNQIG6mXXcYJ15wSIPJZFOxwkC58lWh10BLhnU3PuAxLPJMWl6qSLG8XhIItMstMomQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(136003)(376002)(39860400002)(366004)(346002)(451199021)(4326008)(83380400001)(66556008)(52116002)(66476007)(66946007)(6486002)(110136005)(2616005)(6512007)(26005)(6506007)(186003)(86362001)(2906002)(478600001)(8676002)(8936002)(5660300002)(36756003)(38350700002)(41300700001)(38100700002)(316002)(21314003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?7fMDjpZ6aZXHbcJgIcT+Xid?= =?iso-8859-2?q?AB8a/xJEtEQifKspe9p+Y7dBd7rvz1121NEMBW12RLTHeajQB8D9UH9R9jM6?= =?iso-8859-2?q?t2KINzPJXdr3N/7RJN+Ep9XVb55Y4beyOj5f3BloeeakCRU49LqpENOGmADM?= =?iso-8859-2?q?0BZORKuhC0tx/+TWS9SP42dKMZ9Rflnw9RZxXKSo/vcedONLlzFHFB1kg4YG?= =?iso-8859-2?q?EG1CEyHzIAR86LWCE68O4hp61jOgLCIZbJVA0jX3JkKZ90/NRB4G6gpuh0xU?= =?iso-8859-2?q?Irqtjrfgef26ycaFqr6gIEbVy66IbeIQg4zY0vSR/p/ss5ijJsW1VZTL7o/i?= =?iso-8859-2?q?/WsLiXSskcFuPsYLQVVzham6DvCjxT2Lu2Dtmx/0B7FZmjewzfz5tetZsfh3?= =?iso-8859-2?q?kLyY6BvfZFlS3IiHihsU1rU1xsvK1Nvf+6tUil6fkO1+FG70ROt3OHKpknYS?= =?iso-8859-2?q?+BHBoH6eBnfdR4HBitkkUFAkofkHWwNxtV1y9CRcr/fO5TsbcPb5B3ueIcwo?= =?iso-8859-2?q?2RNwWuEyrokAgKNFGsQ9F0qGg+XJfFOwHWO2MDVsOwWzKrOwucEApYAd0ENe?= =?iso-8859-2?q?d+jafHTY59Hg58v6yCrfko8TJjTyZfOPNcFephZcAPUy+BECc1UO+IWHotmR?= =?iso-8859-2?q?L4R3SHymJ1HlNHsSRYda6vFL4/xuKjkAzZD1juilrgqiFyZc+5MjBXEUWuow?= =?iso-8859-2?q?dHzd0pMefHf6VFuNeOuBfSZ8S5x842g1DHVXv3dCZICbtG6x/pmGnsRNb6rH?= =?iso-8859-2?q?IxJ5OpIsWheNAKx7/uh96WtECI1MfSoHbLjEhgC3qVAH6922231GswFqZYuG?= =?iso-8859-2?q?F7KW665q5/OhtRzEC/9sXpplArDrIsgEFoAQ9xZ5wm3g9UjVGoONAj8ms224?= =?iso-8859-2?q?pwLAQAYmusnsIu2n5oN9mFn2/uAHIa0PyIiAHed55hHngwD72JsQV9NvxdrC?= =?iso-8859-2?q?9UoQrBEcRXR+/mM+SffGw00mFx0g5dsJZEO+lgDZhD2qwTfPZHQiomUqAESZ?= =?iso-8859-2?q?kx9oExxEbSr2ok2U8N5SoItfb2U3sYCFxS/9JW5GrHWTGouUCJrsic3ohWjF?= =?iso-8859-2?q?8XF36HK3aUNBkdbeGwSTHoaVBV2Zf68GqMJxbrOpsa779zifMmsCyJhwHhqc?= =?iso-8859-2?q?tOamZFRr4bC3tDDn2/vopL0S+8uO3vvFchaHeeF1L6gQUDyMZ5cuk4Zto4UC?= =?iso-8859-2?q?Ac/RC+qcWgZOQnzWeD2nLO2UZckIKWQ8FH8yFBqAZGvJZ83bUqPxTpj9BoDZ?= =?iso-8859-2?q?9yv7sUjKjVxmNoh7uYcPLEd6015j/T+Nj3hBpxFkVDe6J638Tv+q/+csDVdV?= =?iso-8859-2?q?RTxXE4m1o1PpnyFZ+VhntvR8L9aZeuM6K/cnWxZIp1yuOv74+zp+88rEXowU?= =?iso-8859-2?q?GEy+zQc3Y6RLTRpMj0+DOZBELhw7Iv1y0yNNkqa2KQrDzcHMQ+rwSRXCMpWl?= =?iso-8859-2?q?sFO7POmIV12Zm1MoLhrUxRz9rnH5Q0mJE0mTp40YhGoO059OfUnk/mUkpTE5?= =?iso-8859-2?q?Q/aFEaNsKVTwVUMx3TMCBk9gHYXRymQzO/ROJ2n95UN8DuOqukkINaq8nQ4W?= =?iso-8859-2?q?/soJ9bD14lvzpOoXirGUCjFaqbugrP6PfF6cTXekvqjRWvYj8txhnZmG076S?= =?iso-8859-2?q?oIIKgF4xEJ3HAaLpbCUQRgHeyvje+7HjTL/WahU6gUj6/L8Hcq+xQVrW3FVo?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8013b3c8-ca48-45c5-dd9d-08db5cbdf28c X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:18:29.2589 (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: KumGboTpzwjxYxmXcXHcZVfSYEE6g2U7A1WKgirBMgattN2xFQB/C1yZSTMja0r18kLQv3+Ptr6F5fWGU1AoGub8A/VevrtXRBAjrHkP57ujj8ahVAFB3KKpMAnBmIoG X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8485 Message-ID-Hash: CQEKONN36YHCMR2KDFUAFB6PVEW33CYE X-Message-ID-Hash: CQEKONN36YHCMR2KDFUAFB6PVEW33CYE 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.8 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() (A) is handling both DPCM (X) / Normal (Y) connection. (A) static int soc_get_playback_capture(...) { ... ^ if (dai_link->dynamic || dai_link->no_pcm) { (X) ... v ^ } else { | ... |(@) for_each_rtd_codec_dais(rtd, i, codec_dai) { | if (dai_link->num_cpus == 1) { |(a) cpu_dai = ... (Y) } else if (dai_link->num_cpus == dai_link->num_codecs) { |(b) cpu_dai = ... | } else { |(c) dev_err(...); | } | ... | } | ... v } ... } In Normal connection case (Y), it is checking number of CPU / Codec. (a) is for Single CPU case (b) is for Multi CPU case (c) is for other case (error) Because this loop (@) is not related to dai_link->num_xxx, we can judge (c) before entering this loop. And it is needed not only for Normal connection case (Y), but DPCM connection case (X) too. This patch moves (c) to top side. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-pcm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 159670612de3..c95adf59cfe8 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2742,6 +2742,12 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, return -EINVAL; } + if (dai_link->num_cpus != dai_link->num_codecs) { + dev_err(rtd->dev, "%s: %d cpus to %d codecs link is not supported yet\n", + dai_link->name, dai_link->num_cpus, dai_link->num_codecs); + return -EINVAL; + } + if (dai_link->dynamic || dai_link->no_pcm) { int stream; @@ -2792,10 +2798,6 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, cpu_dai = asoc_rtd_to_cpu(rtd, 0); } else if (dai_link->num_cpus == dai_link->num_codecs) { cpu_dai = asoc_rtd_to_cpu(rtd, i); - } else { - dev_err(rtd->card->dev, - "N cpus to M codecs link is not supported yet\n"); - return -EINVAL; } if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && From patchwork Thu May 25 01:18:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685678 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 595C1C77B7E for ; Thu, 25 May 2023 04:55:54 +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 6607E820; Thu, 25 May 2023 06:54:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6607E820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990549; bh=gcIKwYrRMQ4qMItEAdRF4hYLNz1wlUbuVlb1E5AjHr8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=hrJjxTnW43mp8uPM4mdWNI+RFHkdQstzEUVH9OSJLK+yqy51yrJ1eHLFvlhMKcnIQ 5gZOQK56BmROsiHaBP3ghs7A+4iM9F65hLOYVHNQM+YH2/I1SDx/GJxb0M1xtUQejf jM+5i/h9QmfMev1eBDRwwnZXmiLVsmgRCtCc7A9E= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 85E7EF80612; Thu, 25 May 2023 03:18:45 +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 09501F80609; Thu, 25 May 2023 03:18:45 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F3528F805FE; Thu, 25 May 2023 03:18:39 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20716.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::716]) (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 D393BF805FB for ; Thu, 25 May 2023 03:18:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D393BF805FB 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=mdERlwcy ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qttrwvj13rPJZ0B8Gtj/EavxvLlAgRKgu7HTg1YOpuSh8UKZRWRPmkRhURPB+zZTt/hY1c5hW/zu+MzKgt+hJTcd14fmvlD/F0NMWZ/JGKR9k+kRJ6KkXjg1slahLjH9a3SXLbRuBD0Vnw013Z+/vrVvYZP4UflnUdqHHPzDoKyeVleRjaAYm2osPLQJTTx8XEIAR+ceAgCsRRE9DlSCKKkft63ahvISkcyb1V2GoJ1gEdbTlvZKue6K0UE/djE+EY/7XPQZJphqBA33JuLFYV/MT9ywdHNR2ibwOiqgJCjpatZqCUZBgJS34eKP0yGPHFUlBdBFoC5Lnz/llwEVGw== 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=2/UiBlKAyMuxYlsSkDYoNqnpynO7dVwmkDwhqHKiuu4=; b=cYToP0g+6Y+Ufrb3FAJRN21CxMQTejknyVRtbxZ2jgDgcc+SYdNcqvO2K2khskMWOCTRw4lSZgOUmX1PqD+wADIflBzrDqrXgt47tTY/cYVGW+/TtFVFoikEZVcMG0AzJN5YTEbOpoBVImjxe8xbkA7+VXNzKNcXv3bZp57wGkMhWN9UpvpxxC1Vqpv2ZMn0v7iUKzcwo9fFXi0eRYo1l5A9behB3T5o7mTUCwHjBEd2S7lveLO9FR+4jWjzg87NDJCHiry8IQXSr2ozHnQ8h/KW/iVrNgOvDEuoOIV70k444fhXa+XcwX9LnuWxiHf9lOkQVShJSNJBuXhJkV+BoA== 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=2/UiBlKAyMuxYlsSkDYoNqnpynO7dVwmkDwhqHKiuu4=; b=mdERlwcydsJrx1uw5MECU+0pHivnqDKlzWz+iEvNXGtGYXY5u8iEU9pLWzg5VY3XlaTAm6gFXU/BWxq9FZhkF/pDK+xEQP72CSR7qzsGR0AWxUmjbiV5aTWX7Mzbonuto6LBhQambVQKTJUAjbbex/WflqbxrWQHK08DA+SCbug= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYCPR01MB8485.jpnprd01.prod.outlook.com (2603:1096:400:156::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:18:36 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:18:36 +0000 Message-ID: <87jzwxgqdw.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 07/21] ASoC: soc-pcm.c: cleanup normal connection loop at soc_get_playback_capture() part2 User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:18:36 +0000 X-ClientProxiedBy: TYCP286CA0344.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38e::16) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYCPR01MB8485:EE_ X-MS-Office365-Filtering-Correlation-Id: 56794a33-2a14-4f0f-5086-08db5cbdf6e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3pKUxICSIwee2BgMLvVsf0Ya7vqeq4zJNd1HDPgWJrBcEFHE4l9Q92rVvhRs9sQr/0qnG1+HzunzrispHAL9i/Kw2AYYLACReTveUmABJByMGwLzu7N4MygaA4hi2dhmqWSbpL3/AONdHjwmIbwIwGcInUtOwsxY4NrLpiTI5QkiwTiX0VdLjxVfYG++C7Ym+Uzp9E/4OZLNKHeBn/hWg9tZFcLAdRWVvydDFuKvot5e0rKjmckI1msPhmpsL8xbibkS38/f86PmUhu8TMXoC8MFXCizC9kxQtadnKBPeCpqgMW2yperef0ItmYnt/cIN+1QZqS/rXQZw+5RBx/R3K2yQxuMbrrulVt0i8+f+kKcLKqrBHpObYlsDvUIZN0nG4sq3C6fBwRiHKrYQRvA2nx2zf5YlVlyLqSrRFQmtSXbkKY0i2kMsX8QFLsk8vcMlPpfQtALgQauP5fApEC23R85cjcoLdz4HFZr/LwA1LKq2Z9YwCNsvJn8Pu0UijpmM0GhTZH+/rIUXfk66XN2Po6gTZgyAWMKqx7tLKIEsmgDmzprVSLcN1r8Y3LmmAiFP3zLzZ0ZcsbHAWdVZC5x65MMFGnKFSwmGsR+XOmJOnBeZxrA/oA5H5V9JnLRizt3 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(136003)(376002)(39860400002)(366004)(346002)(451199021)(4326008)(83380400001)(66556008)(52116002)(66476007)(66946007)(6486002)(110136005)(2616005)(6512007)(26005)(6506007)(186003)(86362001)(2906002)(478600001)(8676002)(8936002)(5660300002)(36756003)(38350700002)(41300700001)(38100700002)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?+fwOsGFDCeHqo4/5zUQaU7n?= =?iso-8859-2?q?ZV0q+mdXprMuMwOt47hZ6L49Nkv6oCfatw6F0+tcCrfmbhA0+sG+uYTkz+Pk?= =?iso-8859-2?q?aPKHSTB7RpO3WPaqiYbdaIFcECx8zAuSf2EayFxTk1kLU/4BxTzTTE8YSZmH?= =?iso-8859-2?q?xUUgXKWQgHC5IY4YZTKA3qD8qPdSTQLxNCdQNMUxuApazs8B0BUbHsffvR96?= =?iso-8859-2?q?ON6uDVRiCzjrByyfhRmtx/mFSOHZUaUMI2SidgTHcRcAr5kAPORlMZZf01Wo?= =?iso-8859-2?q?9Oj6JR2Y3ZHIjMR6NSaLwL/mi94FxdpeUl7MqF140b+ZtMz2wtpcvimBJDpt?= =?iso-8859-2?q?hAZHnvDhv7wNmqWzW7Yky9eEaH7GDBvVlFz0imjLotHTvTwbKZTO6yXZbX6L?= =?iso-8859-2?q?e4T6KfueUQ4eNpsjQT260//WvjY6yAF2eO2f6uZmN0Vhd/XY5Bq9FE57qopa?= =?iso-8859-2?q?h3HI9znjvUL/PyPhzIMwtWS+ehkNQgwHBgxiyRXOThqhNS3NobFewdWsSZRP?= =?iso-8859-2?q?U0cl9s/PkJUbbjjUil8qTF+xJzNy4ktY1kiWIepORvNQMw96HRDGeXeli+CH?= =?iso-8859-2?q?fBFLX3YWD4tAR28/SNLDO98dLp5g9yNqGnG3XSlEYV6IznJvrMZ9iueSzNAX?= =?iso-8859-2?q?shYvQItPj6daVsuAotkF0hywS9LayDRkrp0L/LDH4QHsojfw29by/3YRVgrq?= =?iso-8859-2?q?a9SRLoJKLLkAMW0m0PNZ5/hDFBufrb6rSt10l8e9syquXopMTWeCIzTarzqH?= =?iso-8859-2?q?USChC1CtjUEY8cXlWRxEPj9Z2s9ExINaolqxOXDAhhNMraKPncnJIUrYC7n8?= =?iso-8859-2?q?LgMAQrQgijTgQtS2q1eS0hBLbElKY2xD8EsCPyD5I8Cp1PiKakCfSMsoyL7N?= =?iso-8859-2?q?YKSJJZ/QV8I2KmAvdVQEYYavx6bpp7YS9AzJnGT+3gj3cEDihFNcvndgX+sv?= =?iso-8859-2?q?BEhQByC8gKdw8ayRFpw/cI9fduBxr0I0pk2N7lw4uiQgSvlea86EtDfXiiVs?= =?iso-8859-2?q?ZDwNmOy1V7CHa6ZwJ6OjYvMMZfVCVvZz+xuUqEXqQKKlhDldCUcX2TJxlSee?= =?iso-8859-2?q?mYsPxfBYl4WD8gFwWdodfYQVG8ggtKSbcM9thyTHtXdlb7fTK+RvKwQM9v4x?= =?iso-8859-2?q?EhOAjA3omg6lbDhZbFghLqOeR+OxzmRsCAyThvkrBCM6BcQp4cAPW9q6HukC?= =?iso-8859-2?q?jwxLpzuZaapdpMhy6JomQZ1SEobj2/8JTLvM7KLentS8HCekVkburU6EBhhG?= =?iso-8859-2?q?ha13smqIitVi7tW8VK9peF5TPwaOSMyk4ck/c4Hyj35Y1fTn7tLHDlJISbIB?= =?iso-8859-2?q?BjS0Uwn7KcKmIMRf8qDq9vnIqwem5cWIzKd+dtpAlRu/D7XxIssRravxaeCb?= =?iso-8859-2?q?LPqtA13KT0mMIbXPT9ZwIWMUgrMVCywM9gEVjmJwGGmg9uZknpFHq0XZI24f?= =?iso-8859-2?q?b8oKkoQ6QHja/Bpmy4yBWLkloIDwk+adag+B18LdRWrIwlV9TU1A+Rya0s8x?= =?iso-8859-2?q?ObbZdKnxa3wqXaLwdDUZXNVlB00y/Etx1SuG6PI6ojpHVJp6v/X5eYiPm5kU?= =?iso-8859-2?q?EmsAqH7N9HtXeixKRw2jns9pUL680cCH6H0CGfGNSvnhDtEvXY9WxnzOs9ho?= =?iso-8859-2?q?9EiKO2BV2L6v/pBI9G8emQn+Kusl+gHJmVvIXaT5I/tmvqdKR9LvOaI6c3KM?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56794a33-2a14-4f0f-5086-08db5cbdf6e1 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:18:36.4828 (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: WuXAI4EFZQsexvZqBPvma7iH/WAEFKLn4CglcbwyIEZhUPO2+qDtLS5yAyyFkRNcKH81dsnYe1TFLJW9wOkTdG1uGFfR3SXG+txKYzk1ssnkt/ZDbX6cwybXzwNz8Qo8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8485 Message-ID-Hash: 2NWRYLZRLYLS4QTP3RZMMEMCWZHSDXFA X-Message-ID-Hash: 2NWRYLZRLYLS4QTP3RZMMEMCWZHSDXFA 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.8 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() (A) is handling both DPCM (X) / Normal (Y) connection. (A) static int soc_get_playback_capture(...) { ... ^ if (dai_link->dynamic || dai_link->no_pcm) { (X) ... v ^ } else { | ... | for_each_rtd_codec_dais(rtd, i, codec_dai) { | if (dai_link->num_cpus == 1) { |(a) cpu_dai = ... (Y) } else if (dai_link->num_cpus == dai_link->num_codecs) { |(b) cpu_dai = ... | } | ... | } | ... v } ... } In Normal connection case (Y), it is checking number of CPU / Codec. (a) is for Single CPU case (b) is for Multi CPU case We can simply merge (a) and (b). Because it is doing same judgement, same operation. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-pcm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index c95adf59cfe8..77552543dcb1 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2794,11 +2794,7 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; for_each_rtd_codec_dais(rtd, i, codec_dai) { - if (dai_link->num_cpus == 1) { - cpu_dai = asoc_rtd_to_cpu(rtd, 0); - } else if (dai_link->num_cpus == dai_link->num_codecs) { - cpu_dai = asoc_rtd_to_cpu(rtd, i); - } + cpu_dai = asoc_rtd_to_cpu(rtd, i); if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && snd_soc_dai_stream_valid(cpu_dai, cpu_playback)) From patchwork Thu May 25 01:19:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686440 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 22815C77B7A for ; Thu, 25 May 2023 05:00:57 +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 00B8E84A; Thu, 25 May 2023 07:00:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 00B8E84A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990855; bh=9f1ANpzzJ21vAJ6sznL97tr4erk6gKsNwL3dxVu9fo4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JYLRLgeS1Qlo7fOSUINOauqA7+bxmeIBApkeaUbl9eqmy2gxeTWk5kdv88kLMqGik hwqQ/AjXstt4AtSsDa+nLKEWnf43DNpkbhb333hwGBNe35OuE0gjABWAkoSEDjKEQV QQmii3GKSlaN+TEU3EKdS+z3dqyg2h2GD4zyX+5M= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 792A2F80613; Thu, 25 May 2023 03:19:28 +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 E4682F80616; Thu, 25 May 2023 03:19:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 35E7BF80616; Thu, 25 May 2023 03:19:25 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20715.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::715]) (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 936EEF80611 for ; Thu, 25 May 2023 03:19:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 936EEF80611 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=J74x/c0e ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ecLZsT1kVPsTOzyVal8+eK+4bcokfHZs0S4+ak9DxjEaKJGGOzl7yhsQLF153JwYZIjsX/2C4TAxyUbnLtbSLTngyHYWXGH4E1ZRtswCInakIZa9scSOnHddFBaiuDts/OKSbP+b/pk0DvCgyOc/fTqMOSmrNHUPB0akKbEV231OgMptfYOsAW7yyvgAxsGZaxiMAyvnn/1Q4IXKW3ftAJ6O0/sSikqRao9EoQfUArP9P2+au/73vnopjqcki79IVCk4e17i/AQ3pE6aZ3v6bo8PpaDPP2IZqvt0uJpaShnfWe/TjuxDIFYX5P9eJ7SFGhE9JtcmTC6aXKS7QdgBKQ== 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=quTzPI+DXYL8qTYW5B2BaitNPeeX4VG0sCugxSp3cIQ=; b=MCxnDHWmzIL7Fq+R/rwZFqgBKXnC2QjZ/YvosU5ORdIm3QAPU63QK0Qn4dNBaxDSBdFvdxmoQoM6begvf9Gr/UrRhjAuXckULoPXrE8orcoN8B5ARDmv8l1wBSq14Dz+IoKO7+eoVt220Y+zcjDjXuqIIcM0vYRIkL1AUYjBwUAZ1AqprC9vWGCJPFbxRt+vEuZjnTcFadCj3lncq3WxhHU3dGaI3yATPaF4V75e1C/L4hdwJ+lK7YM2pksReWRoUycTzK5kOCZB1UXN2GaO0E8k2jQG5fniDFUfQiMwMcyUbLZ+vqnlCMpD3JfZXjJ7ZvkB2Wb+NCBkO8BIqXgANw== 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=quTzPI+DXYL8qTYW5B2BaitNPeeX4VG0sCugxSp3cIQ=; b=J74x/c0ewMLC0Hlwmj/409QIsS9bY5FF7ziH33XumBwWWbKV2E4i0exdyR7CKiyW8Vr+A2VOuDrF5FddrzFsfauVuHJ9QfWmbn/eS4T2fZLTsFvVv5vSo/sjVPeOOyXiy9927p1jCl52VjQn/DJ5HgbrgS4B6hP3zn4JGTZMSP8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB10982.jpnprd01.prod.outlook.com (2603:1096:400:397::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:19:13 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:19:13 +0000 Message-ID: <87ilchgqcu.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 08/21] ASoC: soc-pcm.c: cleanup soc_get_playback_capture() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:19:13 +0000 X-ClientProxiedBy: TYAPR01CA0149.jpnprd01.prod.outlook.com (2603:1096:404:7e::17) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB10982:EE_ X-MS-Office365-Filtering-Correlation-Id: ff8d277e-4b32-442a-a869-08db5cbe0d0a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kL8Ra5dhOs6Ui0d+geRdHyGa2hc06PGqDNG9Lva3mPMGvFAKS5InjC76bynvYvDlkL71XD6iXRPP4miaZaZ5kitF7ukJxJQHAAzo4b/t4KM/owTT4rCi6kIMU7T2qSF2xRrHM0EYNNhQ567sgGwpx9Ijzz8nZ8MGGA7K5Kd7i9OIBIZccFTzZhePZe4BMNOSHSCzUHncC7chOJK1agyMHNs6UlSmBFqOrXghirbFbR4qN++E5yyqrPn0TfcL9q1AqKLWD7Ckk5+YcCAvHSc1U53e+VW9ZFmNo8ZUmK+61eotusfatabkNGliyIBkNwSs9OPp9X7vuVZ4ejDb3DZd9hNGU8aYFRHnYpWOge51henZdMoWXP/3OYjK49qqcgg8iHPdsvhAsCw+TgF8hNCQZn1vNZGbkg3cQI4vwbCjsw5cWYEqTPZ4ZROQmjSoW5/NmyBZ8FQSc9S2sEjLTp8kg2tyDE1ilWzEvDpUZnwbjQrnDQl6iUOvhJ4GbWtsmIeGTzf7PgWd2akXyu88umBG0QgC82m2ziNhwZ2FrzjBr9+72/5i898gua8gLFq7Qwp2PeOZ5BjDbAxbUBtjBow+DzLnwxxwXBNA3M7lRJ6wKA513MmtYlxKcRyvIM9vJE9/ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(451199021)(52116002)(478600001)(6486002)(6512007)(186003)(6506007)(2616005)(26005)(38350700002)(38100700002)(4326008)(66574015)(83380400001)(66476007)(36756003)(66556008)(110136005)(8676002)(316002)(5660300002)(2906002)(66946007)(8936002)(41300700001)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?58L3JbVye5EJJzukn+3ZaFx?= =?iso-8859-2?q?hTwq72tmzusfs7+g0pSvGKT78dflMm9Czcb8F8/vFtkDvf4CEeGERbSv6TtA?= =?iso-8859-2?q?DXxYR5qfGr4sEg4kjYUaVnrncgBLItcvfyOhsCihkhKFEnPnjJLZCSLKmOGY?= =?iso-8859-2?q?9TGWYRw+K7wmMm4T9bocU64tdvlk5WCo0s8GUWw06cE40Ah91BJfDiqB2/2l?= =?iso-8859-2?q?ZNXQZJNNM8Lshf6ZgIINZI7K+tYYysUeFkkFyYCwKTFgj7k78x5lYjII2Pui?= =?iso-8859-2?q?E9rUzP0aOMiJTCdYemx7GNWVdBaJleirbvRrciKUVhURAxmjBNMa121r96xA?= =?iso-8859-2?q?cIyo7CSlVI+HjH0smyi4S6JaFyG8YlIF3u3WSuAT6bmOMjdgY3/D9e5u9ZDt?= =?iso-8859-2?q?VirrOoOi0nMUVdprcPFZoIlsL3pobPclBJ4qSc85qfudt8qB6EMOWTDpAlEJ?= =?iso-8859-2?q?FrdKlgvm9qNKRn078Cs7vxxziukxlLIuXHj2ViqEb9iEe8/USyLlBOIsPNwW?= =?iso-8859-2?q?ZjLuCr7A32seWoy3YqGgcDT+reeWwtYw5LSsyOw2aPyK5Am/k13Wfdh7DO7J?= =?iso-8859-2?q?3vyG3+wuCJI2fmrbkf9717gepSUgvmowDm2MdNmWfS6SbwRatW4tAjKN0+hh?= =?iso-8859-2?q?g4AxZgttoqWSFfFA+v7WIn6yiCfI9apix4aV7irRHLupSC/KK8RFbLDUWtgI?= =?iso-8859-2?q?p638Rg/FtBDXRUu05z2sESrmTGDFdZcG9UcOemo9C5RkqnAvOeq6LKCzOYw7?= =?iso-8859-2?q?HbFNFDb/hHPnw7+ZGV+5VOu4NzIvTDhOxFcP/qGqYIDQWWPU9SzAx5Uc4OXG?= =?iso-8859-2?q?8XzaZ4N4sSXrPEolOamHf/wKFZBMFbvBQtmyAKK4CP5Y7IWRnrnk3nuKwgLP?= =?iso-8859-2?q?ZBm7LWyaynqbeuoJUHDPXYzDPGvGk55+cgU47pY63S1gZzkiCl4HEkkLxf4L?= =?iso-8859-2?q?V/CD3cIh9YuS1PKJosv/PYJ93RljxJoqpIsdcyKmvb6KwtOpc4ZIRPHNW4Mf?= =?iso-8859-2?q?BGjO4pQa0x0Sui3xoHOkXIQ+TlesilAWFv4Cdmr0U2FFARJJy5/phKTOd4yJ?= =?iso-8859-2?q?wxoSPbdZ8sABYk5YbPaFAES/WYOwJP6iA5H0VihIzdAtve1sDEw93bpvg3PZ?= =?iso-8859-2?q?kH9jkE58gMblTCevHcEeXiczv8tmiVvP+ObzYCegsWo3ZgcNLiEJyFuqvEYe?= =?iso-8859-2?q?KW+UBEvCUb1Br7IYhUJPecoJw9qosAXATIjvgsda2ZNqK0lmKx3guQBvLYDp?= =?iso-8859-2?q?EKgiQF0k6aN4E3/svwMUm9f9T/u4ir2b2LQ12YRLMtvBms6jk772Iv8Pvj/W?= =?iso-8859-2?q?flShi4MYuv5AhVeqFWdE9Qg9Tt7137bO19tpv9FydhwOpWZejf8+XuN/8XPJ?= =?iso-8859-2?q?Xz6Wa4SMOOwzrpfbKwMbmB0ISHtvEIx0iH6m4pIKWepm8QeUq8Ge7QNdo5Ji?= =?iso-8859-2?q?FgBvQL7/4KI0PJ54xbCxbznVjzVW+hgsmX+yB97BKzdGJHOMzWCNXsKZaXyf?= =?iso-8859-2?q?rlS9Dkv1QBSt9JbFr96F93VbYZpYptXs6tpHPo9BWz6pxPJ/gwCD1mKIJkoZ?= =?iso-8859-2?q?RD/rGcfzD8G8DIMFB3/ewHtTkJl0O3fcPeCUTWxCfZAw2P5uSIhBsVWWmnel?= =?iso-8859-2?q?HsVBd5JRv4Dz66NqnaIQF9Y//F0N/9oIUJSrzTl2TYvoFEI6z9u/yjpU5uzE?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff8d277e-4b32-442a-a869-08db5cbe0d0a X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:19:13.6465 (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: syVSOzDYFECctKLoFxO9dNzk3OHbSReAHQOeOuCx/eAkF79LzcBPDzvpdbg66o5Vka4RdhKZZEq5pZtujmwjdDUwkNrOSf4MzHJU/p0YsOc8P3e1k1YoBTw3bk+ZH/QX X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10982 Message-ID-Hash: EZ5T5BKTQ7OHQFLNA3WWSRVEBYJYXJ64 X-Message-ID-Hash: EZ5T5BKTQ7OHQFLNA3WWSRVEBYJYXJ64 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.8 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: Current soc_get_playback_capture() (A) is checking playback/capture availability for DPCM (X) / Normal (Y) / Codec2Codec (Z) connections. (A) static int soc_get_playback_capture(...) { ... ^ if (dai_link->dynamic || dai_link->no_pcm) { | ... |(a) if (dai_link->dpcm_playback) { | ... | ^ for_each_rtd_cpu_dais(rtd, i, cpu_dai) { |(*) ... | v } | ... (X) } |(b) if (dai_link->dpcm_capture) { | ... | ^ for_each_rtd_cpu_dais(rtd, i, cpu_dai) { |(*) ... | v } | ... v } } else { ^ ^ /* Adapt stream for codec2codec links */ |(Z) int cpu_capture = ... | v int cpu_playback = ... (Y) | ^ for_each_rtd_codec_dais(rtd, i, codec_dai) { |(*) ... v v } } ... } (*) part is checking each DAI's availability. At first, (X) part is for DPCM, and it checks playback/capture availability if dai_link has dpcm_playback/capture flag (a)(b). But we are already using playback/capture_only flag. for Normal (Y) and Codec2Codec (Z). We can use this flags for DPCM too. Before After dpcm_playback = 1; => /* no flags */ dpcm_capture = 1; dpcm_playback = 1; => playback_only = 1; dpcm_capture = 1; => capture_only = 1; This patch enables both flags case, but dpcm_playback/capture flags will be removed if all driver were switched to new playback/capture_only flags. Here, CPU <-> Codec relationship is like this DPCM [CPU/dummy]-[dummy/Codec] ^^^^ ^^^^^ Normal [CPU/Codec] ^^^^^^^^^^^ DPCM part (X) is checking only CPU DAI, and Normal part (Y) is checking both CPU/Codec DAI Here, validation check on dummy DAI is always true. We want to expand validation check to all cases, but unfortunately DPCM BE Codec validation check will breaks compatibility on some devices. This patch ignore it with comment. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-pcm.c | 80 ++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 52 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 77552543dcb1..b1288553f6f6 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2732,7 +2732,10 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, int *playback, int *capture) { struct snd_soc_dai_link *dai_link = rtd->dai_link; + struct snd_soc_dai *codec_dai; struct snd_soc_dai *cpu_dai; + int cpu_capture = SNDRV_PCM_STREAM_CAPTURE; + int cpu_playback = SNDRV_PCM_STREAM_PLAYBACK; int has_playback = 0; int has_capture = 0; int i; @@ -2748,61 +2751,34 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, return -EINVAL; } - if (dai_link->dynamic || dai_link->no_pcm) { - int stream; - - if (dai_link->dpcm_playback) { - stream = SNDRV_PCM_STREAM_PLAYBACK; + /* Adapt stream for codec2codec links */ + if (dai_link->c2c_params) { + cpu_capture = SNDRV_PCM_STREAM_PLAYBACK; + cpu_playback = SNDRV_PCM_STREAM_CAPTURE; + } - for_each_rtd_cpu_dais(rtd, i, cpu_dai) { - if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - has_playback = 1; - break; - } - } - if (!has_playback) { - dev_err(rtd->card->dev, - "No CPU DAIs support playback for stream %s\n", - dai_link->stream_name); - return -EINVAL; - } - } - if (dai_link->dpcm_capture) { - stream = SNDRV_PCM_STREAM_CAPTURE; + /* REMOVE ME */ + if (dai_link->dpcm_playback && !dai_link->dpcm_capture) + dai_link->playback_only = 1; + if (!dai_link->dpcm_playback && dai_link->dpcm_capture) + dai_link->capture_only = 1; - for_each_rtd_cpu_dais(rtd, i, cpu_dai) { - if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - has_capture = 1; - break; - } - } + for_each_rtd_cpu_dais(rtd, i, cpu_dai) { + codec_dai = asoc_rtd_to_codec(rtd, i); /* get paired codec */ - if (!has_capture) { - dev_err(rtd->card->dev, - "No CPU DAIs support capture for stream %s\n", - dai_link->stream_name); - return -EINVAL; - } - } - } else { - struct snd_soc_dai *codec_dai; - - /* Adapt stream for codec2codec links */ - int cpu_capture = dai_link->c2c_params ? - SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE; - int cpu_playback = dai_link->c2c_params ? - SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK; - - for_each_rtd_codec_dais(rtd, i, codec_dai) { - cpu_dai = asoc_rtd_to_cpu(rtd, i); - - if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) && - snd_soc_dai_stream_valid(cpu_dai, cpu_playback)) - has_playback = 1; - if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) && - snd_soc_dai_stream_valid(cpu_dai, cpu_capture)) - has_capture = 1; - } + /* + * FIXME + * + * DPCM BE Codec has been no checked before. + * It should be checked, but it breaks compatibility. + * It ignores BE Codec here, so far. + */ + if (snd_soc_dai_stream_valid(cpu_dai, cpu_playback) && + (dai_link->no_pcm || snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK))) + has_playback = 1; + if (snd_soc_dai_stream_valid(cpu_dai, cpu_capture) && + (dai_link->no_pcm || snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE))) + has_capture = 1; } if (dai_link->playback_only) From patchwork Thu May 25 01:19:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686435 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 EFD16C7EE2C for ; Thu, 25 May 2023 05:03:37 +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 C9314DF3; Thu, 25 May 2023 07:02:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C9314DF3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684991015; bh=8jMztwyRwd+lRhOw/Ajg1Tivj5TkIUZMFJ41RlmjPLE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=cpZIxQ2bdWy17Ged196jvaeGZebXrPYJt0eHsz+f0j+in+eT0I9yHOCsGFgM1DUof uCz2ZWx091fsPVO7DPfuS6hDzt2kNXtyiJfmbjZ+o1mgcC2GpUpS7cxwbMqr/+xDef FA21TsJxstrb4dudJ9TUVYZ69D0mEV1kzgJ5nv8k= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 37058F8061E; Thu, 25 May 2023 03:19:38 +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 5F781F8061F; Thu, 25 May 2023 03:19:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B87B3F8061E; Thu, 25 May 2023 03:19:35 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20710.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::710]) (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 5E6E1F80611 for ; Thu, 25 May 2023 03:19:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5E6E1F80611 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=Jj9ipHe0 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DDfBis+zm+mPv1YHtHlKemhChjla++BUW6cJ7L1ULTInG3Z7iVvnipkEwIwGEywHPsF8KQUJUTRKMOd7VmxY3C9RmcMwvIIhJV0TiMtkID/18EWwieej5awc50PNezm+Gbxu69hlLLUJvWufiiVhepwQlzoYkKPHZduDexOo4reKYgA4/tbzwzlSBw5f6Sqja0uA13E1Lb4qQpjU2vYojgkinBvK1iqyBGzxWNMIhv6BzA8b/3c6IU9SNJ9FFuHf2RA08yOrr3AmXlqi8/sTghe3evIb+G5w8m+WhXYqiOrMPmtP/z/OObBgXKcbZgxI1QEZSzbjjvmdIsmslBC/HQ== 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=md0Fm1eajLDgX1+Cl2L1J8rabgMiGhtyYADTrQZisW8=; b=GY4fuEI35Sg1K6N+kXdJvWxDo5ZVRugQPTXsp384AtTZc1o9fiKsYPnrTopmHt6DAlyiqJ8MS1b/BQBJqFB7XPcmDL5jATBIf6ohRRGbtODJ6QF4g+UTOyLyfd4r1gHuxBFc/47cq3NtJk64JPIogDEdEpyaUw2NmM8x1gteBNGifkERDAtB4INjWe2gdhppYeDEadIEkqpH1Ejp5AiaoocWVY+x8j6e3lbNFwORlydoVWkMQFxMAj5zo/2k8BCLThdFEgLB4yb+cdbQEHkxzYdQZJ7P7SRXmaczh+FWbvRA6HOJnGYjE9FkjRPVjmqninLDR0JSBdtin1wfoze/Mg== 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=md0Fm1eajLDgX1+Cl2L1J8rabgMiGhtyYADTrQZisW8=; b=Jj9ipHe0dCqcxVJyBmSUqmWFt8p+XUjvpfXVsmXQj336PqSud0MbWbHzdlQtPyn1wILL5YtpLKYdY5M4MYu53nWkEWKxmDWnNTVSCn0nbTFBuMyITc33h05KaWFonqtPN9B4gKB1LK34bw/PNGf0jzHNPmAO+d1E2Vk3CiXdP5c= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB10982.jpnprd01.prod.outlook.com (2603:1096:400:397::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:19:23 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:19:23 +0000 Message-ID: <87h6s1gqck.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai , Vijendar Mukunda Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 09/21] ASoC: amd: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:19:23 +0000 X-ClientProxiedBy: TYXPR01CA0047.jpnprd01.prod.outlook.com (2603:1096:403:a::17) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB10982:EE_ X-MS-Office365-Filtering-Correlation-Id: 3e3d40c0-8069-47e1-0a30-08db5cbe12e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qs6y6MH7dqLxTdhcBShq+KUiBSk3Vh64djmjwL4lNexecY046Ve8lLCFacGSfGvqB5y6hWMFEA5EMMSOrcJYe6W5HPovSi4RsRX8PR+10N6JnoT5nipU4OmX4n1sycFO8xIk60aS+C0BumzRSfs6KLdv7wFrYW2V39HgeXTyk6vFSI7cdLGKp7GT58gjAlmuHDi/lKj+5KJdAEJKeBeF0+uC55odT0ppQAB0VXOBSov4X33XFr2iKl5xu7bZ89B0nWmjhk6fz6VxzD44ikk6Qt2NXjxFeLOOi4LRgpIEsHPmSoddOgWm5MUmgvdcTKEzbT7RPXAhh9M4JC8MgqvqgcKkdSqAFotsCLhjHGg4O2x/WHjzurgPiYLco3tRj1o/WRXxDI23hUCzkyY1+7qarPKCqNDs3a/YLGN5bHBAfEVqNrR4zCaAGoFo7hYXoeVk+TC1RSJI9DrLlPlcIR3R5RlXb6nCaZDGJ5GbKabP+5VLN3c7PteK8MfNOCBw5ho5L2wQv1PLL7NHn7KxZzkI+SwvOQZwIM/XgJmHSk5Ra5img6alLLRaWxHMXVcYiy0KFgBbJTVa5fs8yFFYQelY6ySGdgRppCIA/KOfcDFdVWDcX025LSiMZa7k+Ym+mNO8 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(451199021)(52116002)(478600001)(6486002)(6512007)(186003)(6506007)(2616005)(26005)(38350700002)(38100700002)(4326008)(83380400001)(66476007)(36756003)(66556008)(110136005)(8676002)(316002)(30864003)(5660300002)(2906002)(66946007)(8936002)(41300700001)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RHr81TPQOAKt2iLeGQp8L5Pq4ITGKOhOPTI1ovyG5vUDdDmwHgn/4Z2xuaDGb7nbLn0A6cN5YgGT19n7sfqbGsGg/Bl91ajQSO6e1TfldqKp1BR29E6TbZeH6KM43qJD8y2cOajXdK2qb3TwPUxMkNz8M1RW2Xeojwb6LGmkcvzlqYu8hwQhbeDKGM9HIZiZETsuDuGCMSr5ckbS7jliJ+tK7ytZLQIZbR1ybFpxV/rXW6v2S9vK+tzRdZgvtzEuqtI8/bzAad/30pThEbvkREgqVUBF8WV8TzdZqMoHuYFxhOFrziKOamk6lYfQCXLOY0KYma/cQl1g02Q728+oPLoIabVhZeBBbGmEqPJLWy1tqzsFcmaJdQc/K4C3y47uUVh9kwuLkRB0bu3IUxIHs5RJKOsGOSZIHnmceKidzEVjPU5kF+Qj4tK5gfx3ApAkPfjgocqHfmF7eq1TCY8hz4ZjddRXTJAFxva5j098KgFltlWOHzo1SsdlNBRUoBQN2Z7+BNhigaw1/pWlIPLOmK9znB3mFrfZ44QPfdmI3pav58fePSvWLSToU2+/iV8APqeeXusXWliiXDtDrIcsO1E1IKFKzb2peng9eIBNN0rAg08swjRNS4CYK4YmUpbVqm/g3TuLW45KxyjyzBLq3d0HD3seyQzZfVHgoscAepme/Lk8Fc5jLCVLVsrQvU5JHw4LJudxuaDX8EcrjnTPanBMVXHYSd9OGuuy81/cuCwyvf4DEaN/jBKrGgAmYKGp4QSf40MhDsJedDME3DWsOVBubY8FlYz+IZXmjlLcfWk5eQCjOPn3LIxXfVTKcj8wfOVhaB/uL8QdaSLWmaCbfLlSKl+BNkE/Bs4OZMrlOrnXQFedB2CMREFd8BKKqwIAMDFraLZX+b+s2BPkE5LcOdPgZTXepu7fm9SMvKZQxhsjHitwTSs2VB4jmjcm+zH9LxStCdgsLDMu/tbaqtuXINpd1ho5mRGSOONiDuop197z8EPADCCkGWWWYaKZj0eii51ZBrY/gUTh2aMnLdSIMZdQl0+uFXQW4SU6WMe7nXO0nXc3mpkxcidjpcxyYL/0ZAhFip8xLHlRLQBqSG39UqoFgFrqnwv9ZJhuPBbq4OFT/AzGp3UHLbUoY5FRrc6hySAHNrTS0InKOJKgKcsyt3lWju3PNGy5FD8SZ0335xIZRMib821g+Mcq1TGJ9GbaQ7e5aZ0qYHIaPKhYbEQ8wJ6ws+Fumeq0WEdkeXdkrcExNkxsTG11lQYWJV655bfFSxd37ucPVW6kzERFLjOHaGNrLhm7j8/GPa2bwhz07EwAReI68iyk9K6vljiiWQsj62k3uf1dN+xl40L5j0uwPOXiBiGzp7kVb0v6Oh4qMyJxkmteh//3p/cEyjpSsdSA0UrhAQZsS067JWRezgJUFR9XJfF5TtXnKjrZ6Peso01mVH9j6Dqo0sQW0eLHKT80O12y+uHb5czFnJqHjLyRsxFgX9NGAEL7x7D7vB91Vxpn+jQhMVElg9Ty+8darv/WdJDILcoTHG/aTfckejo0zzr3KCyO8IrziUxd7eUcDpAzUP+Pgl8eNBPzwaA061ucaKfkpnft5KeKdFmToZ/FIsb/6UQenacrD4l6QSjF3/Q= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e3d40c0-8069-47e1-0a30-08db5cbe12e6 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:19:23.4845 (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: hjsgDr2J7WAZ16J1UC3sCHfwUNxP5zsTRDORUQ7WnfS/o1NRpdEiJzO1KuPpljmkaNrthgje9llXb9jN3HVQOPALzhcHPlOJsglD67INo6fZO/b8FM/PKofSDkIXyT9w X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10982 Message-ID-Hash: I765UVSHABSPGIN34IRAHDUXLVBQ7GWL X-Message-ID-Hash: I765UVSHABSPGIN34IRAHDUXLVBQ7GWL 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.8 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/amd/acp-da7219-max98357a.c | 20 ++++++++++---------- sound/soc/amd/acp-es8336.c | 2 -- sound/soc/amd/acp/acp-mach-common.c | 20 ++++++-------------- sound/soc/amd/acp3x-rt5682-max9836.c | 6 ++---- sound/soc/amd/vangogh/acp5x-mach.c | 3 --- 5 files changed, 18 insertions(+), 33 deletions(-) diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c index 375417bd7d6e..7b20c25388ac 100644 --- a/sound/soc/amd/acp-da7219-max98357a.c +++ b/sound/soc/amd/acp-da7219-max98357a.c @@ -523,7 +523,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, .init = cz_da7219_init, - .dpcm_playback = 1, + .playback_only = 1, .stop_dma_first = 1, .ops = &cz_da7219_play_ops, SND_SOC_DAILINK_REG(designware1, dlgs, platform), @@ -533,7 +533,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = { .stream_name = "Capture", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_capture = 1, + .capture_only = 1, .stop_dma_first = 1, .ops = &cz_da7219_cap_ops, SND_SOC_DAILINK_REG(designware2, dlgs, platform), @@ -543,7 +543,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = { .stream_name = "HiFi Playback", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_playback = 1, + .playback_only = 1, .stop_dma_first = 1, .ops = &cz_max_play_ops, SND_SOC_DAILINK_REG(designware3, mx, platform), @@ -554,7 +554,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = { .stream_name = "DMIC0 Capture", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_capture = 1, + .capture_only = 1, .stop_dma_first = 1, .ops = &cz_dmic0_cap_ops, SND_SOC_DAILINK_REG(designware3, adau, platform), @@ -565,7 +565,7 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = { .stream_name = "DMIC1 Capture", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_capture = 1, + .capture_only = 1, .stop_dma_first = 1, .ops = &cz_dmic1_cap_ops, SND_SOC_DAILINK_REG(designware2, adau, platform), @@ -579,7 +579,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, .init = cz_rt5682_init, - .dpcm_playback = 1, + .playback_only = 1, .stop_dma_first = 1, .ops = &cz_rt5682_play_ops, SND_SOC_DAILINK_REG(designware1, rt5682, platform), @@ -589,7 +589,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = { .stream_name = "Capture", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_capture = 1, + .capture_only = 1, .stop_dma_first = 1, .ops = &cz_rt5682_cap_ops, SND_SOC_DAILINK_REG(designware2, rt5682, platform), @@ -599,7 +599,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = { .stream_name = "HiFi Playback", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_playback = 1, + .playback_only = 1, .stop_dma_first = 1, .ops = &cz_rt5682_max_play_ops, SND_SOC_DAILINK_REG(designware3, mx, platform), @@ -610,7 +610,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = { .stream_name = "DMIC0 Capture", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_capture = 1, + .capture_only = 1, .stop_dma_first = 1, .ops = &cz_rt5682_dmic0_cap_ops, SND_SOC_DAILINK_REG(designware3, adau, platform), @@ -621,7 +621,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = { .stream_name = "DMIC1 Capture", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_capture = 1, + .capture_only = 1, .stop_dma_first = 1, .ops = &cz_rt5682_dmic1_cap_ops, SND_SOC_DAILINK_REG(designware2, adau, platform), diff --git a/sound/soc/amd/acp-es8336.c b/sound/soc/amd/acp-es8336.c index 89499542c803..982db7d9cd17 100644 --- a/sound/soc/amd/acp-es8336.c +++ b/sound/soc/amd/acp-es8336.c @@ -150,8 +150,6 @@ static struct snd_soc_dai_link st_dai_es8336[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, .stop_dma_first = 1, - .dpcm_capture = 1, - .dpcm_playback = 1, .init = st_es8336_init, .ops = &st_es8336_ops, SND_SOC_DAILINK_REG(designware1, codec, platform), diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c index 6da17140beea..3df2f7733b32 100644 --- a/sound/soc/amd/acp/acp-mach-common.c +++ b/sound/soc/amd/acp/acp-mach-common.c @@ -899,8 +899,6 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card) links[i].num_cpus = ARRAY_SIZE(sof_sp); links[i].platforms = sof_component; links[i].num_platforms = ARRAY_SIZE(sof_component); - links[i].dpcm_playback = 1; - links[i].dpcm_capture = 1; links[i].nonatomic = true; links[i].no_pcm = 1; if (!drv_data->hs_codec_id) { @@ -930,8 +928,6 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card) links[i].num_cpus = ARRAY_SIZE(sof_hs); links[i].platforms = sof_component; links[i].num_platforms = ARRAY_SIZE(sof_component); - links[i].dpcm_playback = 1; - links[i].dpcm_capture = 1; links[i].nonatomic = true; links[i].no_pcm = 1; if (!drv_data->hs_codec_id) { @@ -961,7 +957,7 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card) links[i].num_cpus = ARRAY_SIZE(sof_sp_virtual); links[i].platforms = sof_component; links[i].num_platforms = ARRAY_SIZE(sof_component); - links[i].dpcm_playback = 1; + links[i].playback_only = 1; links[i].nonatomic = true; links[i].no_pcm = 1; if (!drv_data->amp_codec_id) { @@ -993,7 +989,7 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card) links[i].num_cpus = ARRAY_SIZE(sof_hs_virtual); links[i].platforms = sof_component; links[i].num_platforms = ARRAY_SIZE(sof_component); - links[i].dpcm_playback = 1; + links[i].playback_only = 1; links[i].nonatomic = true; links[i].no_pcm = 1; if (!drv_data->amp_codec_id) { @@ -1027,7 +1023,7 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *card) links[i].num_cpus = ARRAY_SIZE(sof_dmic); links[i].platforms = sof_component; links[i].num_platforms = ARRAY_SIZE(sof_component); - links[i].dpcm_capture = 1; + links[i].capture_only = 1; links[i].nonatomic = true; links[i].no_pcm = 1; } @@ -1065,8 +1061,6 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card) links[i].num_cpus = ARRAY_SIZE(i2s_sp); links[i].platforms = platform_component; links[i].num_platforms = ARRAY_SIZE(platform_component); - links[i].dpcm_playback = 1; - links[i].dpcm_capture = 1; if (!drv_data->hs_codec_id) { /* Use dummy codec if codec id not specified */ links[i].codecs = &asoc_dummy_dlc; @@ -1099,8 +1093,6 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card) links[i].platforms = platform_component; links[i].num_platforms = ARRAY_SIZE(platform_component); } - links[i].dpcm_playback = 1; - links[i].dpcm_capture = 1; if (!drv_data->hs_codec_id) { /* Use dummy codec if codec id not specified */ links[i].codecs = &asoc_dummy_dlc; @@ -1128,7 +1120,7 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card) links[i].num_cpus = ARRAY_SIZE(i2s_sp); links[i].platforms = platform_component; links[i].num_platforms = ARRAY_SIZE(platform_component); - links[i].dpcm_playback = 1; + links[i].playback_only = 1; if (!drv_data->amp_codec_id) { /* Use dummy codec if codec id not specified */ links[i].codecs = &asoc_dummy_dlc; @@ -1163,7 +1155,7 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card) links[i].platforms = platform_component; links[i].num_platforms = ARRAY_SIZE(platform_component); } - links[i].dpcm_playback = 1; + links[i].playback_only = 1; if (!drv_data->amp_codec_id) { /* Use dummy codec if codec id not specified */ links[i].codecs = &asoc_dummy_dlc; @@ -1207,7 +1199,7 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card) links[i].num_platforms = ARRAY_SIZE(platform_component); } links[i].ops = &acp_card_dmic_ops; - links[i].dpcm_capture = 1; + links[i].capture_only = 1; } card->dai_link = links; diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5682-max9836.c index 0543dda75b99..154170f353ec 100644 --- a/sound/soc/amd/acp3x-rt5682-max9836.c +++ b/sound/soc/amd/acp3x-rt5682-max9836.c @@ -304,8 +304,6 @@ static struct snd_soc_dai_link acp3x_dai[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, .init = acp3x_5682_init, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &acp3x_5682_ops, SND_SOC_DAILINK_REG(acp3x_i2s, rt5682, platform), }, @@ -314,7 +312,7 @@ static struct snd_soc_dai_link acp3x_dai[] = { .stream_name = "HiFi Playback", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, + .playback_only = 1, .ops = &acp3x_max_play_ops, .cpus = acp3x_bt, .num_cpus = ARRAY_SIZE(acp3x_bt), @@ -326,7 +324,7 @@ static struct snd_soc_dai_link acp3x_dai[] = { .stream_name = "Capture DMIC0", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_capture = 1, + .capture_only = 1, .ops = &acp3x_ec_cap0_ops, SND_SOC_DAILINK_REG(acp3x_bt, cros_ec, platform), }, diff --git a/sound/soc/amd/vangogh/acp5x-mach.c b/sound/soc/amd/vangogh/acp5x-mach.c index e5bcd1e6eb73..9d8bb9c0efe5 100644 --- a/sound/soc/amd/vangogh/acp5x-mach.c +++ b/sound/soc/amd/vangogh/acp5x-mach.c @@ -273,8 +273,6 @@ static struct snd_soc_dai_link acp5x_8821_35l41_dai[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &acp5x_8821_ops, .init = acp5x_8821_init, SND_SOC_DAILINK_REG(acp5x_i2s, nau8821, platform), @@ -285,7 +283,6 @@ static struct snd_soc_dai_link acp5x_8821_35l41_dai[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, .playback_only = 1, .ops = &acp5x_cs35l41_play_ops, SND_SOC_DAILINK_REG(acp5x_bt, cs35l41, platform), From patchwork Thu May 25 01:19:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685670 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 1B32CC77B7E for ; Thu, 25 May 2023 05:02:44 +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 22E5884A; Thu, 25 May 2023 07:01:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 22E5884A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990962; bh=gjEtTOuwdHygB00M0mSD28h7HCIjauQDLvcJrmQxA18=; h=From:To:Cc:In-Reply-To:References:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=AONnAZziraywBJCErthBRI49+2HFpf4RGSP8Bue5GVLYBMHjL3htPGayy/pB/SL6x 4l27N0RIQNIf9EtGkrkyQzMM61fNIU0RXx5BE9ivu8HoDRh6fbgYfYFnzhGQ0o2zFG jhRwt2t1GSihsRcQvXtoijl7huurM+z6i7IL3gTE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E216BF80640; Thu, 25 May 2023 03:20:11 +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 236A7F80636; Thu, 25 May 2023 03:20:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CB1FEF80638; Thu, 25 May 2023 03:20:07 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2072d.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::72d]) (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 5D81FF80636 for ; Thu, 25 May 2023 03:19:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5D81FF80636 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=Z41XBf2M ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dHm9GToDJh/fKRA7p2RDuZJ4gM8sgavesRnqcW4QJfLWUgzkndoYZ+L/1BXWcmE1S9V4P6U1VChE3ASoztFWXEiGmlerjMHOShLixDp5wx/EIYWNSOhfbA4qP9o2MLwS70H6aLYd/HmVvNR9osdNs0HeAqgOn1Xd0DwyrjvTQ0cKmhucz9ImyybxKJEvJF5QOKjLEA1KZu+f3avZI6V2MNbPmXQfaMSjAvjwh497d6uJICOCCRBJd9z4hpPdA/eaKuF8EL0VHM5baYTJE+3bOZYXclw0KIEHff0hNqoZckqX5H0AtN+4RK8tbFC5oWqBdhBY0YwTxnOJDlLS+aSg8w== 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=ZHDmF0ep9pmzKKDyiOJ8g9YRx3vltGoaH3tV5Fj4OYA=; b=O1bjlgsZZNHv4DGrD0uB7GR7Ht1qhtEidxULG0SasTO6McPVIegOmrnSzpi0djBnkBEZJS2t7C65dmSvhDwTOQ38UYu2q5SZTNWBFyStBXBwFDiV/4Dd+VQZhv1eJ1XGAeVRMrXWIFDP3DDGsRoW8OQmABYjLl1gOTTm7VK1gxUxGrgMKayTbJ/srcy2F0xBKxeljAKjdLM+bweZi+Rt33II0C016fSEFWRwCFkJw6HGyXG417UBeukJDsyeFxO/nTK4tKBWlGd5PcX97Rany51BBBhqaO47YZHbKcfKUyo5W32W+vyWJKW9efLvM94RQIBmv8/tdVMGFhpBilIyKw== 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=ZHDmF0ep9pmzKKDyiOJ8g9YRx3vltGoaH3tV5Fj4OYA=; b=Z41XBf2M0QTElqHZdxE96PfIglwF39UaZpCKVmftkPPVcDKfmZ6OWdAtXSzvzdshXXMgAQDVjAbgF8e2PfvqZ6W9Q30OOHq4MLyz4t6ffv4p1lpS/bW60VsZQhM7PsloAndUDV2Dh+3pdd1SFbql50w9KYxR44aRdlXh1D/pvrs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB10982.jpnprd01.prod.outlook.com (2603:1096:400:397::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:19:53 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:19:53 +0000 Message-ID: <87fs7lgqbq.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Sascha Hauer , Shawn Guo , Shengjiu Wang , Takashi Iwai , Xiubo Li Cc: Fabio Estevam , Nicolin Chen , Shengjiu Wang , alsa-devel@alsa-project.org In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH v2 10/21] ASoC: fsl: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Thu, 25 May 2023 01:19:53 +0000 X-ClientProxiedBy: TYAPR03CA0015.apcprd03.prod.outlook.com (2603:1096:404:14::27) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB10982:EE_ X-MS-Office365-Filtering-Correlation-Id: 67e36de8-6f3f-4564-d0c7-08db5cbe24bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DMCHoGSEjt3geRsEaIiw5hUZmSXKFaQVfJE113WJvsSBu0BonrVqPJKPXVCI6pCIL83FtSCDlySttWK7PHiMcDms2Gu3CYgu0axVcNdbqTotrYKEkAnqVfJD+Vcv4fRohqZxg+O8z82nMcCZ1GuLYLPk8mvLjqum5TMuhskkBX6+W/llPVoc16IQO4SU252vBM+0ZHse2HysfdsCaZaAWVbCTrGgpglgzjiva/R7gHtTVaQOycSEi7cBsIBKogmbT0ZAh8yc3zvd2/aKr8dvx8HM742IcJX1lj6Yx5Je2izwiY2l4uQwYFf3g3+dqgVqjHZvBODxSmIzlUtmYilNyaFUQwQfo6J41BXQzs2CeM6tRY9X8PnobJAV7E5fCoV13j4UPsg02AOCVBJYuX3kPX1UZbXgwjLuPqEM7DyaJlVdoifZTPRbeI+ekak2nTW6pLivR8VGvwyeEzL03cRRt3+MVXGZXRl5v6QyodLzTNeZsvMQnHABeohf1vZkuMsJ32FpM5p06+XfJaVz7fQSvLTJkB+qnW/Wk9B22CdzZ2Q0Cuagt1ZZs+PPiV3PTuDVdkEu8TavOjV7YHqrva/XHgRnRH7Ad7r3tf/zA/3BE5GxRjGVc9uga8Oln6l4U0RZ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(451199021)(52116002)(478600001)(6486002)(6512007)(186003)(6506007)(54906003)(2616005)(26005)(38350700002)(38100700002)(4326008)(83380400001)(66476007)(36756003)(66556008)(110136005)(8676002)(316002)(5660300002)(2906002)(66946007)(7416002)(8936002)(41300700001)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ifyeL9+MrNpBbnGf4sDSlaS1iISXr08ma6lhQ4LMQrOy6uTZOOgH5yqkObPkIEPU1l3NPY7yRsl6aBW2UmH9ZmPQ8y0yeQCT0QFyopximd4cb97R4w7wSB4cGtKuo4U8SlII2+NQoPLcf0Q7SRkeor/ATXbsqnSJ3N1kWrMXNvuOIY43fSyij38N419h4uXPQItdV9nDTLZTvaUmdfG2sVn86jDwowNkCF+rMxB6Q5B450vXT4qo7FZeZbvODDmsQy8l7YXE7SUsznuOAPM+IjU81A+KAPen9xBiqxRZUkbwJ+gLgQuvE1Lx8AcK9fy2EKhtHEcThodI8e0sbmsrQBJSG3DQC7Ew1XJ2tPGmuQuDWSdt2139K1xjzdbRZd+tJ7gkHyFdjcQJ6dLAPd8h4Xzxy7T6GJ643amBDKwBoerwGJRC8aIsUIl9KEBodA8vnzOty+G00RpEf47haRKiF5PK62cHe2PypzE199rO+tLoyh7LD1zRHM88uGAxSosmnwKOKR0u0M4qL2f0OnbZrT12lTOraCVzn3BuYh4kZTpqffCI91VPIB9rLk6+x7nzF90LjxFna3FJXqSBKOu2Z6raWh6SVZUV3f/pGKczsoIHw72/AsqOdXe1cRgLdaOgbZS2XJOsVxLn01lc9RptLsWxck7oTvOQwe+2hfb3377fw8Icjw7IfZ6zLtUDMYyRBZoUkI5uXsxvYkTR2vgYmsjsRT2gs3BfT6caXL79ZtVzx65dMOQ4VBeAfHXrUsr2xm+3XGhlLNs7/agyT+jO7vRdMr5EORwY2X3WoFs3ZcpUfCloXIq93ehflCbw/VdJp3bW6AIAutmKGhnOETe8ExtH0LnyyHlo1MnwWTx+4kYdtsmyHcPNx0Ja/6HPhZTcP1lbsLr1Xb3us5R9oA42e8K+M0y+Dxzc2dJQfLJt5WNRls9tDGIM9xfqDldSvKWwr/DMD1xiHU+b5wAgbj7IuB+GWxfVWuzHXYiFulc3CiBf+iOCHNT/gyo7Jy5DsVQgGtVum/g11iMK1WxF/PGuzTFvch4bJpMWcUC2Uay8a1WGSr8eK2LIs6jtW/bcvyM/6vdMmadjb3L1mLqDopPrvP2kL8N8p57ANLhAq1VLVECRcBFmDsXdCNP4I1FI7K/2Ndgl7s8kieiV/OwZ1PULOGqCP+OXzx0N+sm71/WkvycAKHCMNnp79bT9AmGT4pmpF17JQoDcdasaWkBxJW5jjDDLtPylVj3zOzJh1eUsQ+CbfrwQlqAE13oBhl3wWwTlRdqKlxNyeYQl5IVz53t+BSmsYWRswbSF1xkKgS0v4gx+Gzvhup6DTyZYnLm+PQ4dBbuuFv9Sf1UBfrk5ky3p8J/J9FPUWCk80mPOgOunX9aCD3fg47MAV1RYrrGoeEP+pFj8tmv0FGZ8VHIZHz0xS9jdcI+Xey0y6NY9LIBJgHtEnHnRvg2ysYkY7g5z+Z0iM8khsuRRRUY/ehvoJcUmy1qdgdTv0O24ycHntDcKlal+VqW085TJD5zS5/1HCF4GiIZjP9OfapwDkf7+XObdI65RFnjnBciGG4KPA6jhWwLb/qGY42fDBNSvRpjbras9Vsdc5GWjrNQhHSiaevgLtXcUCDyvzZlr/vAeRpgJ87s= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67e36de8-6f3f-4564-d0c7-08db5cbe24bf X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:19:53.4611 (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: YF0DwridZeQuk7PQCV43ltKiBlF//3dwphXzc+58CZK9OIQnFjw3I6tYY8tx/MY/MtNIHRWV0M105NEBKONAGy6F4eGXRa0/RxsOgYcMHAtj4rtPSxtOiU+blfvHrbAS X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10982 Message-ID-Hash: BXXDQPMHK5H5ZLJSUIGKPDQTCAV3OYZK X-Message-ID-Hash: BXXDQPMHK5H5ZLJSUIGKPDQTCAV3OYZK 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.8 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 40870668ee24..917d9da5c57f 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -311,8 +311,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), }, @@ -321,8 +319,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), }, @@ -633,8 +629,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; @@ -660,15 +656,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 efbcd4a65ca8..5cf7bb861698 100644 --- a/sound/soc/fsl/imx-audmix.c +++ b/sound/soc/fsl/imx-audmix.c @@ -255,10 +255,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, @@ -278,8 +278,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 78e2e3932ba5..6e3ce0817478 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -826,8 +826,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; } } } From patchwork Thu May 25 01:20:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685672 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 0BF76C77B7A for ; Thu, 25 May 2023 05:01:04 +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 70ABE850; Thu, 25 May 2023 07:00:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 70ABE850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990861; bh=/gGvoWNPIXjOCug9Dlvk31kLtLZT+m9PcFiEzCiHFes=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=YmpKT4D2NgrPgUOAGXUxUzvrjdCXZpXacpxJQbEerLHVa1OxQL7nh7z1YgdT4TUPY frjai8P6oq3UzSJmKAPbQYo2eXxDUIUDAhXQAlkLXyPVCmN87WKnXPO/0R31GL3D6R SGOizwfj2A0tB50XUlpyV4IS92pXhH22RxOu2+Ys= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2343DF80654; Thu, 25 May 2023 03:20:22 +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 9D0A7F8064F; Thu, 25 May 2023 03:20:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 621BEF80649; Thu, 25 May 2023 03:20:18 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20723.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::723]) (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 96936F8063E for ; Thu, 25 May 2023 03:20:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 96936F8063E 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=lza9RfUV ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dEmUdB3OZsH984h8akAgrRADVTDtw5UxQlyyugc299l+k1gbnBRmOSYFuNDEqA8RdtxDIW8GvPS0/o3WRHPRdNGaFRQX+L3SIMxltnH7Jd2hr4xvCUkhVEb/oDTm9LkEJlmVSeCdG+wmBJeQUIF6M59BMCIqgRsg6je6C5yYpwIT+o+kZhy4El5I1vDBG5C3kxakzThklhC9lA2uINPpTYx/pGvxOrZ3aXItVyPEaciVD7DL51lLoitrKHb9dpTGXviE6n0s8chGskXlmSs/Rv3os3pCs/5V3AzweNbtfbFGxDd+kxsRhneSbokuml62su6EcqK3gcCdMl/3uAyK+Q== 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=EKh20u7Mb5lE9ujkhgksEQ9tTPv+/CEs1v2IJf2fFM8=; b=TKwM0QsU7TNpsMfk7mf42QGixrW/takrv221krVd+kcFZ23U+QTZpEOGPBjgOLB2Qbvu2gwWNLrrktIB+tGDYzgM27rqEAyYMt9Th9heC68xrI6qVDmhf1O3CPZZWYIQEgJ8niDZgFYxYZS859cdQJAbwkkUaxq7CtmGsExQ251/YKpAVll1+lQZ/oUwK2CL1eNVGlam5A8AzJXf58/CVEAHLVAf90OEG8R24Z8tQIJoanEyKCmXv57rmIPQDpmqfGjBD/5UkXiBuwTKjrUrzhxC/Jr3xvTonkDEPvLvMmkR2Ac+WYNaChd9yenw/znLsOA5Un9S0eEq5VEgeZjkJA== 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=EKh20u7Mb5lE9ujkhgksEQ9tTPv+/CEs1v2IJf2fFM8=; b=lza9RfUVulwUSdaPtg9ADvwm3WGsoFW2NkRtiCFzawouayoPTWvDAWANb7ywLik9ljl8rb39meHBE4CiKsA69BJQZt3O5JyM4+XeBumz30cLiPNxcrRg+qnluyS+84aKm6uWllMBCksB7N9KdzK4ArKujJHqPOLt69+I437XlsQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB10982.jpnprd01.prod.outlook.com (2603:1096:400:397::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:20:08 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:20:08 +0000 Message-ID: <87edn5gqbb.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Bard Liao , Daniel Baluta , Jaroslav Kysela , Liam Girdwood , Mark Brown , Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Takashi Iwai Cc: Kai Vehmanen , alsa-devel@alsa-project.org Subject: [PATCH v2 11/21] ASoC: sof: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:20:08 +0000 X-ClientProxiedBy: TYAPR01CA0228.jpnprd01.prod.outlook.com (2603:1096:404:11e::24) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB10982:EE_ X-MS-Office365-Filtering-Correlation-Id: 6571b9ac-2853-4b8b-0ad2-08db5cbe2de7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 75/WvqlIVsOyPIWMCbqOMzu0bfutCxgQxvSv32ihs2RpRnv/S2M7wV2XaQvoqDyoLtVFQMFZi3jaU3pdWv/k4hph7R+EksbgoAfYoiLK8lfAXfY7CVnLdRObTbfMuz/YIl5G5lz0zmVTaFsnh+JJVVvMHQUPiI7yFA0r1uFM3xw+vaEvHwkWj1Uy37tczb2Xx/nKNxXdtHi9lDkoUu9QVdhYCWlIeZdWGZCPQ9edTr3M/fVAAv3fASGYd4rhReEKJzrLxafs9uN9IhCh4/dyEgFQ64ic4+vttcbzQHzYoC8H39c4n7Owepwx5538XcgOVfLJ8xCXvEtHgexSMkkgnfmhC2O53DZYVIDdkufb2UsnWwCgJKstySUp0QUM6gHwhLpS1TKYBwO5GPLN1LEFBCDLBM7S6rEQHvbZqdEeaDZMp1MSfB+v3vLsQxT3qiGtrKLGC9/JCmpqi6BbcoKEGVBnsvmMh/PHYH/GIW7IPcn1AhqXwin3vq/pBp94qBzGh7sR5fGtjnmMywX/5/5jOX6vgHgCIcNSxcrHUN2NhCM3Zv8TbCJ1skfyAVi4L8HEL75M5DX3T80HDlukSbAzu55y7tED8dvHC5gAt0kOixUmLi6g9c00WtGy+vMQpQsz X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(451199021)(52116002)(478600001)(6486002)(6512007)(186003)(6506007)(2616005)(26005)(38350700002)(38100700002)(4326008)(83380400001)(66476007)(36756003)(66556008)(110136005)(8676002)(4744005)(316002)(5660300002)(2906002)(66946007)(7416002)(8936002)(41300700001)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Grgv74oigv/vbyl46dEXaAE8yzLkV6p6mXerCIL8TQZ5/J4jyfNimEoerKwvHlSuO3iSqy5AvecSo6WlnXS7rpJt367foUqQz3+RIlK5fR4xKADQxhp0BV8GTX/+E9fFDZki9Iv3V67JLZjj9ayixc5jGN80TZb6ei8Mto3Wdi+Iws4J4njwTRhD7qjiPDOpd616OUNqOq4EhwWn5yeMZvscRPi9ZyQuH0umbe1jkNAzkFWORizAWT8fZKfDtgwhVGN0yz1HQKoWQfRlgbwkzQ2jQs8oyA4oVIAhj9LWNnLk8JUfwBK1+CqDUPrP8i0gURvIfPqmKMFyq9sTWMRdQJTobopGdi23jUKlKPdK6AsuyqUe+v5LD+gV8cpNkXF8Q5URegIkytKtZ3gtK0/Bd3On3f0Yr2m057/iHcfsP6sZ+NQyoK6fiIyBI+lRgLtQk2p+L/K0wPJYVoYkJuxQI2dKQUHmEDsB3/jBCWVjZhxxTKhrvmpKuy5SZa912kLCR670mlaT9TCM7iKyy0xC2NJnFD5+Kx6s97XoYGatBQkIY4nDx8eFSRCQfPjbEGJERAf0oHvquSFEfVT59SYQ47hqd9lZqbD8dpCn1UKhVW8YTtJJ8+2a7AwrcMlldC6VEFX9lKdqDDP6y87BnnvhYv7G8qBKJkxgHRXbRvUZcQQUq2HaeHye6K3DngoxEHVRQKmZKe4c7qE4aFFq/ZETAnRZVQPtJ7U7+4ZsYxFz5DEUYmHjsVHGM1MTFWb6JFndQPtOr2L/AKXzpyZtaLLNj8IBqDxhW7O78BcauUm/B6WExQ6hqlr3nie2d0JhcWbON9opyQP3dNRSTAlWsmQU8NZOTOyCdUw7HFRzfo8vwmBB5TRNTIJeOXYRm2XZMntvCzYJXhehv7lZquv27kUg2B71+j537K1MhMxjFoWNyB7dACH3Q7JMAWtXRl9KR7zXGmxcLPvYuBDOCDKgiwG/z2auMK+W1zDA+weXCCRtuujMsA+B4Lh23SUVfWsHHTZm96vUJ/vHt8lc8DyXivR1265LH73cP78p4NDS2Nf1vuWvMmeCGzV5aVegwyVqh90HNBbGx6qInDH2vA9hVHP2HrCDQ10lsI3ch7lKSh7tkn7kVaLq5r0FTYgABTVptUFYFyAHO522a7NwRAR+kL07kNVNzYgF6+Mej8kC6ry8GoxFe8raT5jaV0WffEY1QD8KsEyp+37QQP9uonIZCjNuoBvJiSho2PfpGpq+6BB9Lq0/dyRR0nP7dWdKAjXhTHWC9cWGsqaEuwULsFuBZoGfoR4oT5wyHW9lTMB68IBZkErJkcyS7zuClXt6pXltGOH3ZfIh8Kpe0j28vjjjLSZpoCCb3uZHu6udptF8UxobxNUMVT5xrJ+D9rSqQjW4Tym3GW07ikrOT2qTDsFS+4ambHNXJB4DHR3G7jZ6cwsRGQPx0SeUiEDTDTGwJSctfnEy15s0P6cL8Jev7kVDnEYMSl+w5vz/f8gQ6WUjvKR20jQOpE1u1WCFnQknJAr9/QLFxXWn04Nv61NFlg68Z2pw4etNaaIM0wJN6o83jNMrv6QGSvcRhNKI4ok/XFSk9td++U7en2S3TSQJUfA7sI04G97Dtm4SNmOfdoLv9K3aFa4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6571b9ac-2853-4b8b-0ad2-08db5cbe2de7 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:20:08.8144 (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: xzpekD1Z7wEshWsUnnu8HeUDkDSkASLzGJqNMOaCf9V0wz11gq0Uv/zH0TKXXPlHjc2FnuEbB/+JksWXS3lzMi7/p3/FzxppCk6cWnRBiCTd6TozhQOG/EOgP9M1gD58 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10982 Message-ID-Hash: 35DTLX2NGNZ4OP4FE44AKKXTMOPYISXA X-Message-ID-Hash: 35DTLX2NGNZ4OP4FE44AKKXTMOPYISXA 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.8 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/sof/nocodec.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/soc/sof/nocodec.c b/sound/soc/sof/nocodec.c index 7c5bb9badb6c..51a51a26a74f 100644 --- a/sound/soc/sof/nocodec.c +++ b/sound/soc/sof/nocodec.c @@ -55,10 +55,6 @@ static int sof_nocodec_bes_setup(struct device *dev, links[i].no_pcm = 1; links[i].cpus->dai_name = drv[i].name; links[i].platforms->name = dev_name(dev->parent); - if (drv[i].playback.channels_min) - links[i].dpcm_playback = 1; - if (drv[i].capture.channels_min) - links[i].dpcm_capture = 1; links[i].be_hw_params_fixup = sof_pcm_dai_link_fixup; } From patchwork Thu May 25 01:20:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686437 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 C7C75C77B7A for ; Thu, 25 May 2023 05:02:41 +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 95DE3836; Thu, 25 May 2023 07:01:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 95DE3836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990959; bh=B3ftONP+YkmSQ3x01Xzt1nD+kxFPj9Y8w2brHu/tG4w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=m++SSo/KDFOvBPXiOK3/8pVzeZhOmNkYZRanfMTrtfTalkjoHKKjrjh05hoPTG4cs c3iyrD3hZpSHAoncHTuY5OoZ3mIbnj53pUsckjH2gbj57H/j0b49EYBzFT1xqGA1Mg RGG469SR2LQT1/9cKaB3m7BSdU3LYk2lN/nRE7HA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id EC982F80674; Thu, 25 May 2023 03:20:37 +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 416C6F80656; Thu, 25 May 2023 03:20:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 47E23F8065A; Thu, 25 May 2023 03:20:33 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2070b.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::70b]) (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 66A1BF80656 for ; Thu, 25 May 2023 03:20:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 66A1BF80656 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=kEXkYyks ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=koI6j9nQ+LILF6ZIxpbMxqcMfTNLAm+xKTw68BjOiePINiLnnrnMVwrEX4OSpW/ZUu2uGSv43hcovBB4i8rvvhFKX8chR/u1fJFyqD4wN4oaecc/VfwNMxMHjMzR6tdQs1g8eZ/chfUdZmoYiLpWjIJRD9pqLiN7UJvy5rl+VgyK4iQS62+zn/Siw78k4xieHhCqRvGHhSaK4VeSMzSEI+VjJwyuv8aQ0c2SBQ5eYbXzw5jpT9g+BOC4eODo+eXL4k8IqX1szDfWLGpOTT/L3Uxp/JAoVOW/NE0UT6c4yXhb2sSOmbFoyX1L1TIPyAF91GrE84xEdeLvV9pdi1lNLg== 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=+9H9iKZmrQL9EcgiIFBJwF3X4RSUHdBusJ2Ue1tVZU4=; b=Uf2LE+pBS9irIrsR8qTgNwg6CtNk2tDchZlgdTbRKH8AQjOxsFHDNKPEnfTcKZQHYVgUfG/SKE254iA4jhepLtxXqcE6+jnWsNwdT/CQNPhTMAD9IxP3wdQiRhKmMHOf17WBaJpSyjqGPNDyosVvHGlwA4RxlvNW9GQoakE5JwaZcNHdpVtFeOL2Fl3bW9kYnlYONA6i24bM/FtAcHxsQNYQpy40yceOG793EMyI9df5OM87HRhJnS3kggIlIZtLBiOge0UVa4ZTYLrBHKrUSMSeSdM0SGWAPMy5fC6CIUEHlWtu4e+wBlPs8e1j83krb0sfwe0pG9f9M15TxOTHTw== 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=+9H9iKZmrQL9EcgiIFBJwF3X4RSUHdBusJ2Ue1tVZU4=; b=kEXkYyks8wRXjhBwrDyKtVRXqx2MtGnLqOnsIBTLcqgGq17etP8BKlTR5a12e3jN9HZuchiWKLue2z1ZUU5Xlbg4iyKmGiURN2KZO/OzcZEFb8pcrNnYvi2sT6GMr+Oh/KN4kN6f5GWaW3YjRFKDRh8creIPA7jxwhBVXWQX3AE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB10982.jpnprd01.prod.outlook.com (2603:1096:400:397::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:20:23 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:20:23 +0000 Message-ID: <87cz2pgqaw.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Jerome Brunet , Kevin Hilman , Liam Girdwood , Mark Brown , Neil Armstrong , Takashi Iwai Cc: Martin Blumenstingl , alsa-devel@alsa-project.org Subject: [PATCH v2 12/21] ASoC: meson: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:20:23 +0000 X-ClientProxiedBy: TY2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:404:f6::21) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB10982:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a578a3f-edc8-49a4-fcf0-08db5cbe36c1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TOATQx8cZTq4HQQbpp5S9DZzP4d16pesYmIN8nDvLdbudIMwyC9njPbVnIuoAoNsbtI73GOPAY8mAog5+zK7m9hgaDRVpM4UApXn+Etezuxen9Bod/OA1NeVnbNRMGVZJu32EkoVXixBFlKOSXVd+hX1+lBq4SHwzcXaF33bamlVs+LheoBe2KI10wF00nTqIM4NuP7iDZwJfXqEuojbC2vHs2tLWUHzheV6W37rdpwAHJYUr6d0j/4vvbRyygGyYBYF2BDKH35Zv4uUhWBTlKLUe0vHT6zOoA7bRQJCuS1BbkEspmCQH4Cq2piqOlW5+NpU1P5AOBdRnk59JCtsmkXfC/CzzM0GZArY31YhMiwhRtzw/MdkJEpMSZNsGjA8RITan93OIoYJQsF5ZmCYTwE5VNkQPJ8lZmMq43uNIQ9Fm4kMvdw8wIUu9h4Os/AfaXP8shRcOd8kzyMw6FAGVoV7a/uXblYA1r0DC20KlYKLmzgLiaT6wxMh6W5lKX30ghnsvk2DmCarZK9W/By0niJqFs+XF3hGofnH8m+zmk8BXoZl/Q2WtspNLothwLIb3g16gvK5sY53JAjYcEluK52FkZjqnz+Dx3qsKmXPCe2OyRGuJXuSnPitHSfw7z2V X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(451199021)(52116002)(478600001)(6486002)(6512007)(186003)(6506007)(2616005)(26005)(38350700002)(38100700002)(4326008)(83380400001)(66476007)(36756003)(66556008)(110136005)(8676002)(316002)(5660300002)(2906002)(66946007)(8936002)(41300700001)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4fMb2lHuwb5Op7DPnqlhOS9aBEu3WTQ8XZSwe6cgcwP8yoP4hH2dA7SPeBzS2sROKN9lCfwJ0uxroPPWfDkvpFjmRzWT8oBwT36Syw0azmc8xjKNZOESXRReOQG24nRPfhuZ6frbGDvGreslYjKz+le90Djl9LjMeejYLHVQU2QEsIuC8L4H+c+crnkTWJkDwiCW1IBHs2/KjppR0cz3WKia9qABPt2EHdCLZ6DzM8blCEY6KOyL2/3zrl4GK0/EdlhmnJEclU+AMeBHV4oxkwEmVakfaFw6CDf+CcDL/YnyChI3D1yw674jLPd3tI9VYQyu8ZBDY5684TwvwnpnaKq7yF9crxQ4ckPsKiioU5WZFkz+fXqCKkS2umpGFxfY8yNzZYfgtTC7Qer/kt1bStTDoYOYQ8ooGbNrXiA7PLucZfs8YtfBKucc272Rav3CaOA6/UitenIZ4iWnTw89TI0aJK4lcVtFEIvMdPiK4yZZV/zLIOYq8amd0Gh6q05qWlLNRpO8XsRX4kalsPgJA8/uz3pbeFmrTC2RrvkyWAK2qTC3u+4AnxnO0HzRsUkFItDcIlTD3Aduin9MfgYDxuheRd4iW+SCIRSv2x9ZqjgtynmvhSu4wlXaLahnKf3zdUD7Z/pnV7IR3CTs+QiqR3RDpm2f5dIFB/h72Ugc/VWyk3jJY9ojuwEwJ/KfHPqAZSSLfIZhZ7ilLVsboTHceO/Kd16FqN5LtOPOi7JPP90+krLJoELScYgi2sEPpmAdwUMP8iVXZK77IRJys6cw7zwMCMNBooT4A+tPby9qGK4dS/ODsnEUYiTD0KUEnpkwk9Jd17KQb1068f3Upb2m8NrntozPIJcUsdI9mNx1cxl4BYBulRVRn5gPa0S2zomdqtoe/4w+EiL3v1qs30VupvRdQX97G8JV/qn0KxJNjPxg0R6BlorukrocBhtkrs3eyaiwytoIs7ftWCrNQVRxd5TjO3bMuBkPGOBY5k/u7zpPF3hq5MTMPCLAHSssvFTVc9qmzPIHfA9TxwOkq92kQY1OHGSUwEk4+u2vdKvCxA7Hqt3oeZ5LpwF/Gb02QzIYpXTU5dE+rNlIQ7ddj5wDthJRU1ElSYWZuVuKuTq+1KLgZtpPpI1q902ICHTIfcskAdmpGI1qFXfcBIhfNXCqfYd1SmKDoULP5Z0JblVvVy8KNOjvsWI2Zl7b5Pn2XBZs24+K5fgvEWA2HyjnCz90p0BYT2aXHpE7bQCv0T7wLXjAturH0KmmLFLt0toXMB6RmC1vj0Ik9SLV1LzgbWipOVso1ZOluN8VzCf+FBOTMoFd6EeMkR4wwm2R5j/GQyD4K9oV7wyUNs9Qdo5NZ85G3J71MC51TnpnDqPD8QlNmgKn7GHN44KltGTaJUUit+tG+w38FTs8nO7cUp23wNBcEw9awMzv+JqYypDUEprtZDQK44Sy4KafnBvD/RT+JGKPiUYohYpKYcMeVHYy+N/oMjAqSKi55eSfM2ABOE4mqhJsB276QnnLm8livXrnVgDObWfpkbL60V7MbKo8U5WONYgZpVREn8MynubQ0ly61EUnjg99LdD4CJmjdVZuef06N6hhnx4SJcaVAqbhYYxDCPekZhhwj+Od73h6KSel9lg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a578a3f-edc8-49a4-fcf0-08db5cbe36c1 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:20:23.6599 (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: Ig14VhFcF/5hBILvZjWGjZZAkSZc1E6gp4q0nTWkwluDQ5txiA0Juh6LTrRUF04MEFRY0bxzLmj6ZQMtMvFr46qJJsOlQSuolJLydoWH3joJ8XZEwErv4FP97/1ARF8b X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10982 Message-ID-Hash: KVNA4ODEWOW2QBBTETNQDF3CFLCFRPK6 X-Message-ID-Hash: KVNA4ODEWOW2QBBTETNQDF3CFLCFRPK6 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.8 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/meson/axg-card.c | 8 ++++---- sound/soc/meson/meson-card-utils.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 74e7cf0ef8d5..2d62e1ae7425 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -132,7 +132,7 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card, lb->stream_name = lb->name; lb->cpus->of_node = pad->cpus->of_node; lb->cpus->dai_name = "TDM Loopback"; - lb->dpcm_capture = 1; + lb->capture_only = 1; lb->no_pcm = 1; lb->ops = &axg_card_tdm_be_ops; lb->init = axg_card_tdm_dai_lb_init; @@ -176,7 +176,7 @@ static int axg_card_parse_cpu_tdm_slots(struct snd_soc_card *card, /* Disable playback is the interface has no tx slots */ if (!tx) - link->dpcm_playback = 0; + link->capture_only = 1; for (i = 0, rx = 0; i < AXG_TDM_NUM_LANES; i++) { snprintf(propname, 32, "dai-tdm-slot-rx-mask-%d", i); @@ -186,7 +186,7 @@ static int axg_card_parse_cpu_tdm_slots(struct snd_soc_card *card, /* Disable capture is the interface has no rx slots */ if (!rx) - link->dpcm_capture = 0; + link->playback_only = 1; /* ... but the interface should at least have one of them */ if (!tx && !rx) { @@ -275,7 +275,7 @@ static int axg_card_parse_tdm(struct snd_soc_card *card, return ret; /* Add loopback if the pad dai has playback */ - if (link->dpcm_playback) { + if (!link->capture_only) { ret = axg_card_add_tdm_loopback(card, index); if (ret) return ret; diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c index ffc5111f9e3c..8a531ec8fad4 100644 --- a/sound/soc/meson/meson-card-utils.c +++ b/sound/soc/meson/meson-card-utils.c @@ -192,9 +192,9 @@ int meson_card_set_fe_link(struct snd_soc_card *card, link->dpcm_merged_rate = 1; if (is_playback) - link->dpcm_playback = 1; + link->playback_only = 1; else - link->dpcm_capture = 1; + link->capture_only = 1; return meson_card_set_link_name(card, link, node, "fe"); } From patchwork Thu May 25 01:20:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686439 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 B7A02C7EE2C for ; Thu, 25 May 2023 05:00:58 +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 68124868; Thu, 25 May 2023 07:00:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 68124868 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990856; bh=4RPy0dDdZdLQggfTVQW0tsnOvk/Irshtn2QIoq9etu0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JMrEy2bi/f8JCS7NeiBQWw+mcIUrvWt+tEEbikeYUm1lER4njKuMy5TlxmB3QwQDP IdBBFDtkuNo/TTFuZOblkg6HJkNU1m1Q/Pw/63s+hvXrGCv5D3IdPpU5H+Ep/A/f+4 /IrTLAB5kR750zDCTUdELw23BA7eTFXT2mMaWAn0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7B381F8067B; Thu, 25 May 2023 03:21:11 +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 24520F8065E; Thu, 25 May 2023 03:21:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 49095F8067C; Thu, 25 May 2023 03:21:07 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20708.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::708]) (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 E5AC6F8065E for ; Thu, 25 May 2023 03:20:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E5AC6F8065E 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=eU7BWOIM ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dyumz6PiuBOxtgYTbU2Cd+aVgLVpc/YrsMAVjfWZh39aarJ2CaXUIIhHIhXIT5YkjvGYtw2FvnbdfVIjvhceqYR1y3qJYTWz1pxI9Ax9V0ZxHL/69C+A46SdG5kgUK+WOG9ZJb/kNccw5AHQiB3xYOq3MR7er4GluxGS713g6NOirFJqFaaP+wZEzOx7bFI/qFsXbxn40yVNGjR/m8w36TCbqHSyk1EDhUisKsgA4+1YNAnhbsmrjpAXBr4d2WSuYpfxcJzz1+1GykrX4JZhUdsyRlQw3KjxXBLXT3nDtOb9OfGdKBKN00A5fEQg2EkdqY7r6jM7mXjQnL6kqE6huA== 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=nS23yPI+YuADLQB4NhLFWnxUm7aKnkF0SlrBhyMY0MQ=; b=DAdlgVOz/BItCgD13hrxOtliqtVrFo7d/oiwp0+n63odpDkuEdGsm4XK9RzlRdeJoVzra9jYQw2QpEpUXipFOh1hRH0a/KyLN/YaG5IY2wb3gvGO4yVtArZ9Qm4gyoVVWT4i93RbU4/vd2PVLKDfbp6KRNsfpzc71R0bSNxNSoCMIj7cFkQgSdRWfWRxNFl1Ff5XFIsljtX6KpmsXwhnD04kMScNr7TJaZeaaqPmBc/EoD182rnkQgnGZ9nXuK1rOewOuCcn+znvv1hhInTnYW1Bck3k8EkdYh8meiAQMgCnwt8OoQt4DO4MQj7Lp6Vb1AZA1inkZ44YvVCe/r9i3g== 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=nS23yPI+YuADLQB4NhLFWnxUm7aKnkF0SlrBhyMY0MQ=; b=eU7BWOIMYT8uVByln/Sltp+pSH4HdUcE4UCqJJTNJ5gi/07u5gm2J9kXuIlN04bzQYDazK7JILX6YuG4zs9ouU8O1FNOAsqK3zmsQ3XRB2+myl1UPEAWi3yOxQ7hMgq/AUUJFrJxhVTHSSgESwGRngVKZXNMo4XcJ49FRMJa290= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB10982.jpnprd01.prod.outlook.com (2603:1096:400:397::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:20:41 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:20:41 +0000 Message-ID: <87bki9gqaf.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: =?unknown-8bit?q?=22Amadeusz_S=C3=85=82awi=C3=85=84ski=22_=3Camadeuszx?= =?unknown-8bit?q?=2Eslawinski=40linux=2Eintel=2Ecom=3E=2C_Bard_Liao_=3Cyung?= =?unknown-8bit?q?-chuan=2Eliao=40linux=2Eintel=2Ecom=3E=2C_Brent_Lu_=3Cbren?= =?unknown-8bit?q?t=2Elu=40intel=2Ecom=3E=2C_Cezary_Rojewski_=3Ccezary=2Eroj?= =?unknown-8bit?q?ewski=40intel=2Ecom=3E=2C_Hans_de_Goede_=3Chdegoede=40redh?= =?unknown-8bit?q?at=2Ecom=3E=2C_Jaroslav_Kysela_=3Cperex=40perex=2Ecz=3E=2C?= =?unknown-8bit?q?_Kai_Vehmanen_=3Ckai=2Evehmanen=40linux=2Eintel=2Ecom=3E?= =?unknown-8bit?q?=2C_Liam_Girdwood_=3Cliam=2Er=2Egirdwood=40linux=2Eintel?= =?unknown-8bit?q?=2Ecom=3E=2C_Mark_Brown_=3Cbroonie=40kernel=2Eorg=3E=2C_Pe?= =?unknown-8bit?q?ter_Ujfalusi_=3Cpeter=2Eujfalusi=40linux=2Eintel=2Ecom=3E?= =?unknown-8bit?q?=2C_Pierre-Louis_Bossart_=3Cpierre-louis=2Ebossart=40linux?= =?unknown-8bit?q?=2Eintel=2Ecom=3E=2C_Ranjani_Sridharan_=3Cranjani=2Esridha?= =?unknown-8bit?q?ran=40linux=2Eintel=2Ecom=3E=2C_Takashi_Iwai_=3Ctiwai=40su?= =?unknown-8bit?q?se=2Ecom=3E?= Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 13/21] ASoC: Intel: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:20:40 +0000 X-ClientProxiedBy: TYCP286CA0073.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31a::18) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB10982:EE_ X-MS-Office365-Filtering-Correlation-Id: bde3b738-5858-4b44-cbe0-08db5cbe4110 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yNroaIapgVC99vOEuAxFxMOllJTWpCPYvuw9vUtvYlQEL/WnLs+13OM+cM4r8UDhqlVBi++n5LlAr3wgp3jntYIVmJ846fiK2pDaqXXLeW3uiNWztqdS9ing/imkGiu7nMgrGP15/hYiBFMcyxE9B96IqAPx3RF5n6RPYJ6iF/KiNXaGMXEa3uWG0nIekfSon3tfFVx8OiwxGrXYtTXmLEkYMUV1XaNgnx75RPN+9GSkMOp1QnYAxruKL4PAvkByPMKLRU5ZZXcHfrv3rQPrn2qelq3sBNQNCycTdnFpRY1G3zINO0COUAi1JHf6g4cxmNKmEKzX+LELY7lICMYuqMo4VxKEazmujvjvXnaQ6kGGDx5Z0i1JRfc8Peyy4uX/2FS4hEGi4kMXdYzpngeXONHZCz5atzeC2dHGD6pAR7s1nJ/NxDgzOXFVlgmMTQ0Ot3R/vuxDr2UQdU3h2eJqTF68eWa5dG1xGoF5wnCTGZlY3hkW1YrALu76r6Mp3bbMyciFWblo/HaFXu97VQp4abNYKuQMHWnH2PhrOfUf9oMf5QNkcwcShToSidqOHtCjK0s5VckM3LP/r7gG0UVeZji7q7ZnBu+SYO/HGHw10HsHidIZlX63XQ1T0x/ZYq3tU8rgMkeX6PLjR1oGYJqFzw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(451199021)(52116002)(478600001)(6486002)(6512007)(186003)(6506007)(2616005)(26005)(921005)(38350700002)(38100700002)(4326008)(83380400001)(66476007)(36756003)(66556008)(110136005)(8676002)(316002)(30864003)(5660300002)(2906002)(66946007)(7416002)(8936002)(41300700001)(86362001)(559001)(579004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: weC96+U8Y56xpRAvMJChBhN/1ha71WTbPh3AgFBSG29OkkybWE7GvC+fCy6sHX4KsqzAquO6ekkK40BOkUv8/fTE98tQscV4VwFUhCknYdYHTGHPcuwTb0S1JuF1pMJrC/jUsmcsHqcKb8PzDi6JzfsUBwvwehrJOOtSdH1uktNrIB0uTIcjcAq1THwYjAcZ2aMhw+7gXPamhe2UxvFhAGwNYFngSW86tTLdeT6cnvqluA6jHJtGd/ZvlUs/JG8Dc/FsG+v3V0RIse8bdq3LKAzEMPVt5w5UP2p/6fZ6eumWjVfDHw5cA1fwkMdGXeV0QNcKgkEd0seLCCngpiiXKrrbsLpwZaDkSzCOflJxnHVFe16bG+kFTl5J9f/nUmuPNfPtqr+U5agUuf05y7pdoEUbKHab4xxNzDoIeWA9E7XgbakNS01mr7D0fbfpJ4M1RCJbBG0EtCJ1/pmzq2mdDOfrIyx6N7AJ2DnzsK+m+4NuY+h0jsWzP0RQ0z/dVUxS69Ax7Q1Spm8HzUBcsVoYE0iCqzTAK34wA7A2zZOcs3zvB4Gxr6cwnIMOQvScpYAiDC3k/xxZl6vg8rBkrZxqg7rSFKKc1cBeVSAVPx+U5fPDcoH3n2BveVjUeTrbSKqhsep4QFM5Ne6cfbmBwGC4hseE3pj4A2RY8RKSosoKR+yzOTj3jDV4kiLrgmgK7SeuDmveO22kOJ2xJUVPz6YjDH524ZDxfD8S1K5TcjICvUtWcZlrI2umZYbF1BY/gnNZq8D/eKHstCGBv/HSUllYk1fZoNYNJ3QzGMbBRivikOT7LK7Qj5Budo9GCKNiHtpbrM/MYW4asOoC98M7d7uCuh2M2bbeG90Yk1JsgWLby1KQTSZkhFkZfxP0KsjpnRY+VDkU8VhZce4PnJyL010w36ODn6SvX0O7vyads0fuSGXuZEJmp3i2T5qrg7ZcIQQxOCGgT3bJ2VD5joudK8L8ce2n4GCes+jNFq1TLhKNrQfV8yimKc69emsIDcc1PyZ54qhV3SQt6LjnNOPvmRfq6MCXxqlZE/Nkhjg2ak32n9hCHKQ5AHTEME26UI4WVnswQLL/8Zw65n/1LpkIO/qH+AxUyf8fFpVUt8tF58LDBGVaZvziljx3XAGDfuKbHQ2IIw8RbQZxZgcEOh3tAt5LE8l7QBMVDPFSnOC00IEQzT4q6Dkjau0a/t2PMOHsr5ZxB4erce/yhda+WUErBWMiZhpjTQjVl/pqk6Ttqb/8SCoh/HYlRE08DZvD0L7uLVtIZ5aodROxv+dOuQQMf///6JwuHgsny/8HtoXkAyy9oMZ9Ext8igvU7AAxSq/gBML6VYkpwgjI0ZjpBKhKFoz4ppKnwz8c7UbGY0Nql38NwZ2L4Av8H/g5wPeEJDnFYfYuV3mSA2cXU/CX4BlrDE5epLjM30lDfjyopa64fQ+KsYonHqMTKV53og6t/T7nFMMrlzVgqr+K4pFNLAoAA/ucvckfdutqs/Q2VQKvS8b1p9Ji6fUPBZ6+vY/MznEJDqes6M+tSnS6/PRILGhM7RfLXWofFQ37I+V3UYJN5S/0wfUP2osrvbbIRCrmDjt+WFjUkM3n2KQJNjHuq2hp8SZ7CqmiGoVNp7plkU7QmtNJxqg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: bde3b738-5858-4b44-cbe0-08db5cbe4110 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:20:41.0066 (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: wFA0QLBpPS5WZwTVgRuT42KPchdMT9ndt92JaLEOGb3eGKAAnFyfdNg7diTlYHKDQPsWr/M8UGRjMnQ5vUtfJWJ/n3BpyV+anF27wWcEgXpn65L2b5RQSwZt3QaY7jf/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10982 Message-ID-Hash: TVSYCWTVQ6E7IY3I2PFYLDURKQGCYE62 X-Message-ID-Hash: TVSYCWTVQ6E7IY3I2PFYLDURKQGCYE62 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.8 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/intel/boards/bdw-rt5650.c | 4 -- sound/soc/intel/boards/bdw-rt5677.c | 4 -- sound/soc/intel/boards/bdw_rt286.c | 10 ++-- sound/soc/intel/boards/bxt_da7219_max98357a.c | 32 ++++++----- sound/soc/intel/boards/bxt_rt298.c | 26 +++++---- sound/soc/intel/boards/bytcht_cx2072x.c | 6 +-- sound/soc/intel/boards/bytcht_da7213.c | 6 +-- sound/soc/intel/boards/bytcht_es8316.c | 6 +-- sound/soc/intel/boards/bytcht_nocodec.c | 6 +-- sound/soc/intel/boards/bytcr_rt5640.c | 6 +-- sound/soc/intel/boards/bytcr_rt5651.c | 6 +-- sound/soc/intel/boards/bytcr_wm5102.c | 6 +-- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 +-- sound/soc/intel/boards/cht_bsw_nau8824.c | 6 +-- sound/soc/intel/boards/cht_bsw_rt5645.c | 6 +-- sound/soc/intel/boards/cht_bsw_rt5672.c | 6 +-- sound/soc/intel/boards/cml_rt1011_rt5682.c | 14 ++--- sound/soc/intel/boards/ehl_rt5660.c | 14 +++-- sound/soc/intel/boards/glk_rt5682_max98357a.c | 30 +++++------ sound/soc/intel/boards/hsw_rt5640.c | 10 ++-- sound/soc/intel/boards/kbl_da7219_max98357a.c | 26 +++++---- sound/soc/intel/boards/kbl_da7219_max98927.c | 54 +++++++++---------- sound/soc/intel/boards/kbl_rt5660.c | 18 +++---- sound/soc/intel/boards/kbl_rt5663_max98927.c | 44 +++++++-------- .../intel/boards/kbl_rt5663_rt5514_max98927.c | 22 ++++---- sound/soc/intel/boards/skl_hda_dsp_common.c | 14 ++--- .../soc/intel/boards/skl_nau88l25_max98357a.c | 26 +++++---- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 26 ++++----- sound/soc/intel/boards/skl_rt286.c | 26 +++++---- sound/soc/intel/boards/sof_cs42l42.c | 12 +---- sound/soc/intel/boards/sof_da7219_max98373.c | 16 +++--- sound/soc/intel/boards/sof_es8336.c | 8 ++- sound/soc/intel/boards/sof_nau8825.c | 12 +---- sound/soc/intel/boards/sof_pcm512x.c | 8 +-- sound/soc/intel/boards/sof_rt5682.c | 12 +---- sound/soc/intel/boards/sof_sdw.c | 4 +- sound/soc/intel/boards/sof_ssp_amp.c | 11 ++-- sound/soc/intel/boards/sof_wm8804.c | 2 - 38 files changed, 206 insertions(+), 345 deletions(-) diff --git a/sound/soc/intel/boards/bdw-rt5650.c b/sound/soc/intel/boards/bdw-rt5650.c index d0682bc543c9..38bc48e64086 100644 --- a/sound/soc/intel/boards/bdw-rt5650.c +++ b/sound/soc/intel/boards/bdw-rt5650.c @@ -239,8 +239,6 @@ static struct snd_soc_dai_link bdw_rt5650_dais[] = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST }, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(fe, dummy, platform), }, @@ -256,8 +254,6 @@ static struct snd_soc_dai_link bdw_rt5650_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = broadwell_ssp0_fixup, .ops = &bdw_rt5650_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, .init = bdw_rt5650_init, SND_SOC_DAILINK_REG(ssp0_port, be, platform), }, diff --git a/sound/soc/intel/boards/bdw-rt5677.c b/sound/soc/intel/boards/bdw-rt5677.c index f3e08d258ac1..04beee7f7865 100644 --- a/sound/soc/intel/boards/bdw-rt5677.c +++ b/sound/soc/intel/boards/bdw-rt5677.c @@ -329,8 +329,6 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST }, - .dpcm_capture = 1, - .dpcm_playback = 1, .ops = &bdw_rt5677_fe_ops, SND_SOC_DAILINK_REG(fe, dummy, platform), }, @@ -356,8 +354,6 @@ static struct snd_soc_dai_link bdw_rt5677_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = broadwell_ssp0_fixup, .ops = &bdw_rt5677_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, .init = bdw_rt5677_init, .exit = bdw_rt5677_exit, SND_SOC_DAILINK_REG(ssp0_port, be, platform), diff --git a/sound/soc/intel/boards/bdw_rt286.c b/sound/soc/intel/boards/bdw_rt286.c index b7687a93a923..5cc2f1e6992b 100644 --- a/sound/soc/intel/boards/bdw_rt286.c +++ b/sound/soc/intel/boards/bdw_rt286.c @@ -133,8 +133,6 @@ static struct snd_soc_dai_link card_dai_links[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(system, dummy, platform), }, { @@ -143,7 +141,7 @@ static struct snd_soc_dai_link card_dai_links[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(offload0, dummy, platform), }, { @@ -152,7 +150,7 @@ static struct snd_soc_dai_link card_dai_links[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(offload1, dummy, platform), }, { @@ -161,7 +159,7 @@ static struct snd_soc_dai_link card_dai_links[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(loopback, dummy, platform), }, /* Back End DAI links */ @@ -177,8 +175,6 @@ static struct snd_soc_dai_link card_dai_links[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = codec_link_hw_params_fixup, .ops = &codec_link_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp0_port, codec, platform), }, }; diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c index c593995facaa..23f85d3ff728 100644 --- a/sound/soc/intel/boards/bxt_da7219_max98357a.c +++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c @@ -497,7 +497,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .init = broxton_da7219_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &broxton_da7219_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -509,7 +509,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 1, .ops = &broxton_da7219_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -520,7 +520,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &broxton_da7219_fe_ops, SND_SOC_DAILINK_REG(system2, dummy, platform), }, @@ -529,7 +529,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .name = "Bxt Audio Reference cap", .stream_name = "Refcap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &broxton_refcap_ops, @@ -540,7 +540,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .name = "Bxt Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &broxton_dmic_ops, @@ -550,7 +550,7 @@ static struct snd_soc_dai_link broxton_dais[] = { { .name = "Bxt HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -560,7 +560,7 @@ static struct snd_soc_dai_link broxton_dais[] = { { .name = "Bxt HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -570,7 +570,7 @@ static struct snd_soc_dai_link broxton_dais[] = { { .name = "Bxt HDMI Port3", .stream_name = "Hdmi3", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -587,7 +587,7 @@ static struct snd_soc_dai_link broxton_dais[] = { SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, .be_hw_params_fixup = broxton_ssp_fixup, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(ssp5_pin, ssp5_codec, platform), }, { @@ -600,8 +600,6 @@ static struct snd_soc_dai_link broxton_dais[] = { SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, .be_hw_params_fixup = broxton_ssp_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { @@ -609,7 +607,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .id = 2, .ignore_suspend = 1, .be_hw_params_fixup = broxton_dmic_fixup, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, @@ -617,7 +615,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .name = "iDisp1", .id = 3, .init = broxton_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, @@ -625,7 +623,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .name = "iDisp2", .id = 4, .init = broxton_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -633,7 +631,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .name = "iDisp3", .id = 5, .init = broxton_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, @@ -641,7 +639,7 @@ static struct snd_soc_dai_link broxton_dais[] = { .name = "dmic16k", .id = 6, .be_hw_params_fixup = broxton_dmic_fixup, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic16k_pin, dmic_codec, platform), }, @@ -824,7 +822,7 @@ static int broxton_audio_probe(struct platform_device *pdev) if (ctx->spkamp == SPKAMP_MAX98390) { broxton_dais[i].codecs = max98390_codec; broxton_dais[i].num_codecs = ARRAY_SIZE(max98390_codec); - broxton_dais[i].dpcm_capture = 1; + broxton_dais[i].playback_only = 0; } } /* DIALOG_CODEC is connected to SSP0 */ diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c index bf89fe80423d..4e306b95918e 100644 --- a/sound/soc/intel/boards/bxt_rt298.c +++ b/sound/soc/intel/boards/bxt_rt298.c @@ -394,7 +394,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .dynamic = 1, .init = broxton_rt298_fe_init, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &broxton_rt286_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -405,7 +405,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 1, .ops = &broxton_rt286_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -414,7 +414,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .name = "Bxt Audio Reference cap", .stream_name = "refcap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, SND_SOC_DAILINK_REG(reference, dummy, platform), @@ -424,7 +424,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .name = "Bxt Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &broxton_dmic_ops, @@ -434,7 +434,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { { .name = "Bxt HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -444,7 +444,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { { .name = "Bxt HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -454,7 +454,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { { .name = "Bxt HDMI Port3", .stream_name = "Hdmi3", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -472,8 +472,6 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = broxton_ssp5_fixup, .ops = &broxton_rt298_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp5_pin, ssp5_codec, platform), }, { @@ -481,7 +479,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .id = 1, .be_hw_params_fixup = broxton_dmic_fixup, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, @@ -490,7 +488,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .id = 2, .be_hw_params_fixup = broxton_dmic_fixup, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic16k, dmic_codec, platform), }, @@ -498,7 +496,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .name = "iDisp1", .id = 3, .init = broxton_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, @@ -506,7 +504,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .name = "iDisp2", .id = 4, .init = broxton_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -514,7 +512,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = { .name = "iDisp3", .id = 5, .init = broxton_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, diff --git a/sound/soc/intel/boards/bytcht_cx2072x.c b/sound/soc/intel/boards/bytcht_cx2072x.c index 9942a2de6f7a..3f54f01e599c 100644 --- a/sound/soc/intel/boards/bytcht_cx2072x.c +++ b/sound/soc/intel/boards/bytcht_cx2072x.c @@ -175,8 +175,6 @@ static struct snd_soc_dai_link byt_cht_cx2072x_dais[] = { .stream_name = "Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &byt_cht_cx2072x_aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), }, @@ -185,7 +183,7 @@ static struct snd_soc_dai_link byt_cht_cx2072x_dais[] = { .stream_name = "Deep-Buffer Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &byt_cht_cx2072x_aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -198,8 +196,6 @@ static struct snd_soc_dai_link byt_cht_cx2072x_dais[] = { | SND_SOC_DAIFMT_CBC_CFC, .init = byt_cht_cx2072x_init, .be_hw_params_fixup = byt_cht_cx2072x_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp2, cx2072x, platform), }, }; diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c index a3b0cfab17b0..47344a5fb553 100644 --- a/sound/soc/intel/boards/bytcht_da7213.c +++ b/sound/soc/intel/boards/bytcht_da7213.c @@ -174,8 +174,6 @@ static struct snd_soc_dai_link dailink[] = { .stream_name = "Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), }, @@ -184,7 +182,7 @@ static struct snd_soc_dai_link dailink[] = { .stream_name = "Deep-Buffer Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -197,8 +195,6 @@ static struct snd_soc_dai_link dailink[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, .be_hw_params_fixup = codec_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &ssp2_ops, SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), }, diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index 7a30d2d36f19..9b39420ff3b8 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -314,8 +314,6 @@ static struct snd_soc_dai_link byt_cht_es8316_dais[] = { .stream_name = "Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &byt_cht_es8316_aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), }, @@ -325,7 +323,7 @@ static struct snd_soc_dai_link byt_cht_es8316_dais[] = { .stream_name = "Deep-Buffer Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &byt_cht_es8316_aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -338,8 +336,6 @@ static struct snd_soc_dai_link byt_cht_es8316_dais[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, .be_hw_params_fixup = byt_cht_es8316_codec_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, .init = byt_cht_es8316_init, SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), }, diff --git a/sound/soc/intel/boards/bytcht_nocodec.c b/sound/soc/intel/boards/bytcht_nocodec.c index 7fc03f2efd35..94a7c022d181 100644 --- a/sound/soc/intel/boards/bytcht_nocodec.c +++ b/sound/soc/intel/boards/bytcht_nocodec.c @@ -119,8 +119,6 @@ static struct snd_soc_dai_link dais[] = { .ignore_suspend = 1, .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), }, @@ -130,7 +128,7 @@ static struct snd_soc_dai_link dais[] = { .ignore_suspend = 1, .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -144,8 +142,6 @@ static struct snd_soc_dai_link dais[] = { | SND_SOC_DAIFMT_CBC_CFC, .be_hw_params_fixup = codec_fixup, .ignore_suspend = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp2_port, dummy, platform), }, }; diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 630784b6cb6d..d2019f82d9e8 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -1505,8 +1505,6 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { .stream_name = "Baytrail Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &byt_rt5640_aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), }, @@ -1515,7 +1513,7 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { .stream_name = "Deep-Buffer Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &byt_rt5640_aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -1527,8 +1525,6 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, .be_hw_params_fixup = byt_rt5640_codec_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, .init = byt_rt5640_init, .exit = byt_rt5640_exit, .ops = &byt_rt5640_be_ssp2_ops, diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 805afaf47b29..43985721777d 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -770,8 +770,6 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = { .stream_name = "Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &byt_rt5651_aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), }, @@ -780,7 +778,7 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = { .stream_name = "Deep-Buffer Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &byt_rt5651_aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -793,8 +791,6 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, .be_hw_params_fixup = byt_rt5651_codec_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, .init = byt_rt5651_init, .ops = &byt_rt5651_be_ssp2_ops, SND_SOC_DAILINK_REG(ssp2_port, ssp2_codec, platform), diff --git a/sound/soc/intel/boards/bytcr_wm5102.c b/sound/soc/intel/boards/bytcr_wm5102.c index f2382d4cb76f..571ec2586bcc 100644 --- a/sound/soc/intel/boards/bytcr_wm5102.c +++ b/sound/soc/intel/boards/bytcr_wm5102.c @@ -320,8 +320,6 @@ static struct snd_soc_dai_link byt_wm5102_dais[] = { .stream_name = "Baytrail Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &byt_wm5102_aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), @@ -331,7 +329,7 @@ static struct snd_soc_dai_link byt_wm5102_dais[] = { .stream_name = "Deep-Buffer Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &byt_wm5102_aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -351,8 +349,6 @@ static struct snd_soc_dai_link byt_wm5102_dais[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, .be_hw_params_fixup = byt_wm5102_codec_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, .init = byt_wm5102_init, SND_SOC_DAILINK_REG(ssp0_port, ssp0_codec, platform), }, diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c index 850310de774b..e0fb44f6cab4 100644 --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c @@ -351,8 +351,6 @@ static struct snd_soc_dai_link cht_dailink[] = { .stream_name = "Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &cht_aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), }, @@ -361,7 +359,7 @@ static struct snd_soc_dai_link cht_dailink[] = { .stream_name = "Deep-Buffer Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &cht_aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -374,8 +372,6 @@ static struct snd_soc_dai_link cht_dailink[] = { | SND_SOC_DAIFMT_CBC_CFC, .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), }, diff --git a/sound/soc/intel/boards/cht_bsw_nau8824.c b/sound/soc/intel/boards/cht_bsw_nau8824.c index af2d9a78465d..2515ca7d75e0 100644 --- a/sound/soc/intel/boards/cht_bsw_nau8824.c +++ b/sound/soc/intel/boards/cht_bsw_nau8824.c @@ -193,8 +193,6 @@ static struct snd_soc_dai_link cht_dailink[] = { .stream_name = "Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &cht_aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), }, @@ -203,7 +201,7 @@ static struct snd_soc_dai_link cht_dailink[] = { .stream_name = "Deep-Buffer Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &cht_aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -217,8 +215,6 @@ static struct snd_soc_dai_link cht_dailink[] = { | SND_SOC_DAIFMT_CBC_CFC, .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), }, diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index 875bc0b3d85d..e15cfff3f6f3 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@ -449,8 +449,6 @@ static struct snd_soc_dai_link cht_dailink[] = { .stream_name = "Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &cht_aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), }, @@ -459,7 +457,7 @@ static struct snd_soc_dai_link cht_dailink[] = { .stream_name = "Deep-Buffer Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &cht_aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -471,8 +469,6 @@ static struct snd_soc_dai_link cht_dailink[] = { .no_pcm = 1, .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), }, diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c index daa630a0efc1..a8050a0937f0 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -354,8 +354,6 @@ static struct snd_soc_dai_link cht_dailink[] = { .stream_name = "Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &cht_aif1_ops, SND_SOC_DAILINK_REG(media, dummy, platform), }, @@ -364,7 +362,7 @@ static struct snd_soc_dai_link cht_dailink[] = { .stream_name = "Deep-Buffer Audio", .nonatomic = true, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &cht_aif1_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -377,8 +375,6 @@ static struct snd_soc_dai_link cht_dailink[] = { .no_pcm = 1, .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), }, diff --git a/sound/soc/intel/boards/cml_rt1011_rt5682.c b/sound/soc/intel/boards/cml_rt1011_rt5682.c index 20da83d9eece..759c1e9149fb 100644 --- a/sound/soc/intel/boards/cml_rt1011_rt5682.c +++ b/sound/soc/intel/boards/cml_rt1011_rt5682.c @@ -443,8 +443,6 @@ static struct snd_soc_dai_link cml_rt1011_rt5682_dailink[] = { .exit = cml_rt5682_codec_exit, .ignore_pmdown_time = 1, .ops = &cml_rt5682_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, @@ -452,7 +450,7 @@ static struct snd_soc_dai_link cml_rt1011_rt5682_dailink[] = { .name = "dmic01", .id = 1, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, @@ -460,7 +458,7 @@ static struct snd_soc_dai_link cml_rt1011_rt5682_dailink[] = { .name = "dmic16k", .id = 2, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic16k_pin, dmic_codec, platform), }, @@ -468,7 +466,7 @@ static struct snd_soc_dai_link cml_rt1011_rt5682_dailink[] = { .name = "iDisp1", .id = 3, .init = hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, @@ -476,7 +474,7 @@ static struct snd_soc_dai_link cml_rt1011_rt5682_dailink[] = { .name = "iDisp2", .id = 4, .init = hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -484,7 +482,7 @@ static struct snd_soc_dai_link cml_rt1011_rt5682_dailink[] = { .name = "iDisp3", .id = 5, .init = hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, @@ -496,8 +494,6 @@ static struct snd_soc_dai_link cml_rt1011_rt5682_dailink[] = { */ .name = "SSP1-Codec", .id = 6, - .dpcm_playback = 1, - .dpcm_capture = 1, /* Capture stream provides Feedback */ .no_pcm = 1, .init = cml_rt1011_spk_init, .ops = &cml_rt1011_ops, diff --git a/sound/soc/intel/boards/ehl_rt5660.c b/sound/soc/intel/boards/ehl_rt5660.c index fee80638cba2..118d72fab256 100644 --- a/sound/soc/intel/boards/ehl_rt5660.c +++ b/sound/soc/intel/boards/ehl_rt5660.c @@ -178,8 +178,6 @@ static struct snd_soc_dai_link ehl_rt5660_dailink[] = { .name = "SSP0-Codec", .id = 0, .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &rt5660_ops, SND_SOC_DAILINK_REG(ssp0_pin, rt5660_codec, platform), }, @@ -187,7 +185,7 @@ static struct snd_soc_dai_link ehl_rt5660_dailink[] = { .name = "dmic48k", .id = 1, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, @@ -195,7 +193,7 @@ static struct snd_soc_dai_link ehl_rt5660_dailink[] = { .name = "dmic16k", .id = 2, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic16k, dmic_codec, platform), }, @@ -203,7 +201,7 @@ static struct snd_soc_dai_link ehl_rt5660_dailink[] = { .name = "iDisp1", .id = 5, .init = hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, @@ -211,7 +209,7 @@ static struct snd_soc_dai_link ehl_rt5660_dailink[] = { .name = "iDisp2", .id = 6, .init = hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -219,7 +217,7 @@ static struct snd_soc_dai_link ehl_rt5660_dailink[] = { .name = "iDisp3", .id = 7, .init = hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, @@ -227,7 +225,7 @@ static struct snd_soc_dai_link ehl_rt5660_dailink[] = { .name = "iDisp4", .id = 8, .init = hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp4_pin, idisp4_codec, platform), }, diff --git a/sound/soc/intel/boards/glk_rt5682_max98357a.c b/sound/soc/intel/boards/glk_rt5682_max98357a.c index cf0f89db3e20..a9ee83dfd2be 100644 --- a/sound/soc/intel/boards/glk_rt5682_max98357a.c +++ b/sound/soc/intel/boards/glk_rt5682_max98357a.c @@ -413,7 +413,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { .init = geminilake_rt5682_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(system, dummy, platform), }, [GLK_DPCM_AUDIO_CP] = { @@ -423,13 +423,13 @@ static struct snd_soc_dai_link geminilake_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(system, dummy, platform), }, [GLK_DPCM_AUDIO_HS_PB] = { .name = "Glk Audio Headset Playback", .stream_name = "Headset Audio", - .dpcm_playback = 1, + .playback_only = 1, .nonatomic = 1, .dynamic = 1, SND_SOC_DAILINK_REG(system2, dummy, platform), @@ -438,7 +438,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { .name = "Glk Audio Echo Reference cap", .stream_name = "Echoreference Capture", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, SND_SOC_DAILINK_REG(echoref, dummy, platform), @@ -447,7 +447,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { .name = "Glk Audio Reference cap", .stream_name = "Refcap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &geminilake_refcap_ops, @@ -457,7 +457,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { .name = "Glk Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &geminilake_dmic_ops, @@ -466,7 +466,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { [GLK_DPCM_AUDIO_HDMI1_PB] = { .name = "Glk HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -477,7 +477,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { [GLK_DPCM_AUDIO_HDMI2_PB] = { .name = "Glk HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -490,7 +490,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { .stream_name = "Hdmi3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -507,7 +507,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, .be_hw_params_fixup = geminilake_ssp_fixup, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { @@ -521,8 +521,6 @@ static struct snd_soc_dai_link geminilake_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = geminilake_ssp_fixup, .ops = &geminilake_rt5682_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp2_pin, ssp2_codec_5682, platform), }, { @@ -530,7 +528,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { .id = 2, .ignore_suspend = 1, .be_hw_params_fixup = geminilake_dmic_fixup, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, @@ -538,7 +536,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { .name = "iDisp1", .id = 3, .init = geminilake_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, @@ -546,7 +544,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { .name = "iDisp2", .id = 4, .init = geminilake_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -554,7 +552,7 @@ static struct snd_soc_dai_link geminilake_dais[] = { .name = "iDisp3", .id = 5, .init = geminilake_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, diff --git a/sound/soc/intel/boards/hsw_rt5640.c b/sound/soc/intel/boards/hsw_rt5640.c index 050c53ebd6ba..4ba82d006f1d 100644 --- a/sound/soc/intel/boards/hsw_rt5640.c +++ b/sound/soc/intel/boards/hsw_rt5640.c @@ -85,8 +85,6 @@ static struct snd_soc_dai_link card_dai_links[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(system, dummy, platform), }, { @@ -95,7 +93,7 @@ static struct snd_soc_dai_link card_dai_links[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(offload0, dummy, platform), }, { @@ -104,7 +102,7 @@ static struct snd_soc_dai_link card_dai_links[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(offload1, dummy, platform), }, { @@ -113,7 +111,7 @@ static struct snd_soc_dai_link card_dai_links[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(loopback, dummy, platform), }, /* Back End DAI links */ @@ -127,8 +125,6 @@ static struct snd_soc_dai_link card_dai_links[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = codec_link_hw_params_fixup, .ops = &codec_link_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp0_port, codec, platform), }, }; diff --git a/sound/soc/intel/boards/kbl_da7219_max98357a.c b/sound/soc/intel/boards/kbl_da7219_max98357a.c index 18365ce6bcba..9665eb066cf3 100644 --- a/sound/soc/intel/boards/kbl_da7219_max98357a.c +++ b/sound/soc/intel/boards/kbl_da7219_max98357a.c @@ -453,7 +453,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .init = kabylake_da7219_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &kabylake_da7219_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -464,7 +464,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 1, .ops = &kabylake_da7219_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -472,7 +472,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "Kbl Audio Reference cap", .stream_name = "Wake on Voice", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, @@ -482,7 +482,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "Kbl Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &kabylake_dmic_ops, @@ -491,7 +491,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -502,7 +502,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -515,7 +515,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .stream_name = "Hdmi3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -533,7 +533,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { @@ -546,8 +546,6 @@ static struct snd_soc_dai_link kabylake_dais[] = { SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { @@ -555,14 +553,14 @@ static struct snd_soc_dai_link kabylake_dais[] = { .id = 2, .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 3, - .dpcm_playback = 1, + .playback_only = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), @@ -571,7 +569,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "iDisp2", .id = 4, .init = kabylake_hdmi2_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -579,7 +577,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "iDisp3", .id = 5, .init = kabylake_hdmi3_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, diff --git a/sound/soc/intel/boards/kbl_da7219_max98927.c b/sound/soc/intel/boards/kbl_da7219_max98927.c index ad4223fee0c5..fc318a979162 100644 --- a/sound/soc/intel/boards/kbl_da7219_max98927.c +++ b/sound/soc/intel/boards/kbl_da7219_max98927.c @@ -679,7 +679,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .init = kabylake_da7219_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &kabylake_da7219_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -687,7 +687,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, SND_SOC_DAILINK_REG(echoref, dummy, platform), }, @@ -695,7 +695,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "Kbl Audio Reference cap", .stream_name = "Wake on Voice", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, @@ -705,7 +705,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "Kbl Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &kabylake_dmic_ops, @@ -714,7 +714,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -725,7 +725,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -738,7 +738,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .stream_name = "Hdmi3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -747,7 +747,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { [KBL_DPCM_AUDIO_HS_PB] = { .name = "Kbl Audio Headset Playback", .stream_name = "Headset Audio", - .dpcm_playback = 1, + .playback_only = 1, .nonatomic = 1, .dynamic = 1, .init = kabylake_da7219_fe_init, @@ -763,7 +763,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 1, .ops = &kabylake_da7219_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -777,8 +777,6 @@ static struct snd_soc_dai_link kabylake_dais[] = { .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, .ops = &kabylake_ssp0_ops, @@ -794,8 +792,6 @@ static struct snd_soc_dai_link kabylake_dais[] = { SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { @@ -804,14 +800,14 @@ static struct snd_soc_dai_link kabylake_dais[] = { .init = kabylake_dmic_init, .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 3, - .dpcm_playback = 1, + .playback_only = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), @@ -820,7 +816,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "iDisp2", .id = 4, .init = kabylake_hdmi2_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -828,7 +824,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "iDisp3", .id = 5, .init = kabylake_hdmi3_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, @@ -845,7 +841,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .init = kabylake_da7219_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &kabylake_da7219_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -853,7 +849,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, SND_SOC_DAILINK_REG(echoref, dummy, platform), }, @@ -861,7 +857,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .name = "Kbl Audio Reference cap", .stream_name = "Wake on Voice", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, @@ -871,7 +867,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .name = "Kbl Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &kabylake_dmic_ops, @@ -880,7 +876,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -891,7 +887,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -904,7 +900,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .stream_name = "Hdmi3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -920,8 +916,6 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, .ops = &kabylake_ssp0_ops, @@ -933,14 +927,14 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .init = kabylake_dmic_init, .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 2, - .dpcm_playback = 1, + .playback_only = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), @@ -949,7 +943,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .name = "iDisp2", .id = 3, .init = kabylake_hdmi2_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -957,7 +951,7 @@ static struct snd_soc_dai_link kabylake_max98_927_373_dais[] = { .name = "iDisp3", .id = 4, .init = kabylake_hdmi3_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, diff --git a/sound/soc/intel/boards/kbl_rt5660.c b/sound/soc/intel/boards/kbl_rt5660.c index 2c7a547f63c9..b1f644f61232 100644 --- a/sound/soc/intel/boards/kbl_rt5660.c +++ b/sound/soc/intel/boards/kbl_rt5660.c @@ -377,7 +377,7 @@ static struct snd_soc_dai_link kabylake_rt5660_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &kabylake_rt5660_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -388,14 +388,14 @@ static struct snd_soc_dai_link kabylake_rt5660_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 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", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -406,7 +406,7 @@ static struct snd_soc_dai_link kabylake_rt5660_dais[] = { [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -419,7 +419,7 @@ static struct snd_soc_dai_link kabylake_rt5660_dais[] = { .stream_name = "Hdmi3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -440,14 +440,12 @@ static struct snd_soc_dai_link kabylake_rt5660_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp0_fixup, .ops = &kabylake_rt5660_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { .name = "iDisp1", .id = 1, - .dpcm_playback = 1, + .playback_only = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), @@ -456,7 +454,7 @@ static struct snd_soc_dai_link kabylake_rt5660_dais[] = { .name = "iDisp2", .id = 2, .init = kabylake_hdmi2_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -464,7 +462,7 @@ static struct snd_soc_dai_link kabylake_rt5660_dais[] = { .name = "iDisp3", .id = 3, .init = kabylake_hdmi3_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c index 2d4224c5b152..c9a5b6b709e8 100644 --- a/sound/soc/intel/boards/kbl_rt5663_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c @@ -687,7 +687,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .init = kabylake_rt5663_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &kabylake_rt5663_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -698,14 +698,14 @@ static struct snd_soc_dai_link kabylake_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 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", - .dpcm_playback = 1, + .playback_only = 1, .nonatomic = 1, .dynamic = 1, SND_SOC_DAILINK_REG(system2, dummy, platform), @@ -714,7 +714,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, SND_SOC_DAILINK_REG(echoref, dummy, platform), }, @@ -722,7 +722,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "Kbl Audio Reference cap", .stream_name = "Wake on Voice", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, @@ -732,7 +732,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "Kbl Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &kabylake_dmic_ops, @@ -741,7 +741,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -752,7 +752,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -765,7 +765,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .stream_name = "Hdmi3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -783,7 +783,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, - .dpcm_playback = 1, + .playback_only = 1, .ops = &kabylake_ssp0_ops, SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, @@ -798,8 +798,6 @@ static struct snd_soc_dai_link kabylake_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, .ops = &kabylake_rt5663_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { @@ -807,14 +805,14 @@ static struct snd_soc_dai_link kabylake_dais[] = { .id = 2, .be_hw_params_fixup = kabylake_dmic_fixup, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic01_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 3, - .dpcm_playback = 1, + .playback_only = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), @@ -823,7 +821,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "iDisp2", .id = 4, .init = kabylake_hdmi2_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -831,7 +829,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "iDisp3", .id = 5, .init = kabylake_hdmi3_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, @@ -846,7 +844,7 @@ static struct snd_soc_dai_link kabylake_5663_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &kabylake_rt5663_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -857,14 +855,14 @@ static struct snd_soc_dai_link kabylake_5663_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 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", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -875,7 +873,7 @@ static struct snd_soc_dai_link kabylake_5663_dais[] = { [KBL_DPCM_AUDIO_5663_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -896,14 +894,12 @@ static struct snd_soc_dai_link kabylake_5663_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, .ops = &kabylake_rt5663_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { .name = "iDisp1", .id = 1, - .dpcm_playback = 1, + .playback_only = 1, .init = kabylake_5663_hdmi1_init, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), @@ -912,7 +908,7 @@ static struct snd_soc_dai_link kabylake_5663_dais[] = { .name = "iDisp2", .id = 2, .init = kabylake_5663_hdmi2_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c index 2c79fca57b19..1c7bce63ecc5 100644 --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c @@ -575,7 +575,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .init = kabylake_rt5663_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &kabylake_rt5663_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -586,14 +586,14 @@ static struct snd_soc_dai_link kabylake_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 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", - .dpcm_playback = 1, + .playback_only = 1, .nonatomic = 1, .dynamic = 1, SND_SOC_DAILINK_REG(system2, dummy, platform), @@ -602,7 +602,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "Kbl Audio Echo Reference cap", .stream_name = "Echoreference Capture", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, SND_SOC_DAILINK_REG(echoref, dummy, platform), }, @@ -615,7 +615,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "Kbl Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &kabylake_dmic_ops, @@ -624,7 +624,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { [KBL_DPCM_AUDIO_HDMI1_PB] = { .name = "Kbl HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -635,7 +635,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { [KBL_DPCM_AUDIO_HDMI2_PB] = { .name = "Kbl HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -655,8 +655,6 @@ static struct snd_soc_dai_link kabylake_dais[] = { SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &kabylake_ssp0_ops, SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, @@ -670,14 +668,12 @@ static struct snd_soc_dai_link kabylake_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = kabylake_ssp_fixup, .ops = &kabylake_rt5663_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { .name = "iDisp1", .id = 3, - .dpcm_playback = 1, + .playback_only = 1, .init = kabylake_hdmi1_init, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), @@ -686,7 +682,7 @@ static struct snd_soc_dai_link kabylake_dais[] = { .name = "iDisp2", .id = 4, .init = kabylake_hdmi2_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, diff --git a/sound/soc/intel/boards/skl_hda_dsp_common.c b/sound/soc/intel/boards/skl_hda_dsp_common.c index e9cefa4ae56d..8e13216e16c8 100644 --- a/sound/soc/intel/boards/skl_hda_dsp_common.c +++ b/sound/soc/intel/boards/skl_hda_dsp_common.c @@ -84,51 +84,47 @@ struct snd_soc_dai_link skl_hda_be_dai_links[HDA_DSP_MAX_BE_DAI_LINKS] = { { .name = "iDisp1", .id = 1, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_cpu, idisp1_codec, platform), }, { .name = "iDisp2", .id = 2, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_cpu, idisp2_codec, platform), }, { .name = "iDisp3", .id = 3, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_cpu, idisp3_codec, platform), }, { .name = "Analog Playback and Capture", .id = 4, - .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, - .dpcm_playback = 1, - .dpcm_capture = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(digital_cpu, digital_codec, platform), }, { .name = "dmic01", .id = 6, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "dmic16k", .id = 7, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic16k, dmic_codec, platform), }, diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c index e13a5a4d8f7e..eb90017f891f 100644 --- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c +++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c @@ -474,7 +474,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .init = skylake_nau8825_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &skylake_nau8825_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -485,7 +485,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 1, .ops = &skylake_nau8825_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -493,7 +493,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .name = "Skl Audio Reference cap", .stream_name = "Wake on Voice", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, @@ -503,7 +503,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .name = "Skl Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_dmic_ops, @@ -512,7 +512,7 @@ static struct snd_soc_dai_link skylake_dais[] = { [SKL_DPCM_AUDIO_HDMI1_PB] = { .name = "Skl HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -523,7 +523,7 @@ static struct snd_soc_dai_link skylake_dais[] = { [SKL_DPCM_AUDIO_HDMI2_PB] = { .name = "Skl HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -536,7 +536,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .stream_name = "Hdmi3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -554,7 +554,7 @@ static struct snd_soc_dai_link skylake_dais[] = { SND_SOC_DAIFMT_CBC_CFC, .ignore_pmdown_time = 1, .be_hw_params_fixup = skylake_ssp_fixup, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { @@ -568,8 +568,6 @@ static struct snd_soc_dai_link skylake_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = skylake_ssp_fixup, .ops = &skylake_nau8825_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { @@ -577,14 +575,14 @@ static struct snd_soc_dai_link skylake_dais[] = { .id = 2, .be_hw_params_fixup = skylake_dmic_fixup, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 3, - .dpcm_playback = 1, + .playback_only = 1, .init = skylake_hdmi1_init, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), @@ -593,7 +591,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .name = "iDisp2", .id = 4, .init = skylake_hdmi2_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -601,7 +599,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .name = "iDisp3", .id = 5, .init = skylake_hdmi3_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c index 575604dc8936..bf4e83433baa 100644 --- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c +++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c @@ -513,7 +513,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .init = skylake_nau8825_fe_init, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .ops = &skylake_nau8825_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -524,7 +524,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .nonatomic = 1, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_capture = 1, + .capture_only = 1, .ops = &skylake_nau8825_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -532,7 +532,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .name = "Skl Audio Reference cap", .stream_name = "Wake on Voice", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_refcap_ops, @@ -542,7 +542,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .name = "Skl Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_dmic_ops, @@ -551,7 +551,7 @@ static struct snd_soc_dai_link skylake_dais[] = { [SKL_DPCM_AUDIO_HDMI1_PB] = { .name = "Skl HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -562,7 +562,7 @@ static struct snd_soc_dai_link skylake_dais[] = { [SKL_DPCM_AUDIO_HDMI2_PB] = { .name = "Skl HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, @@ -575,7 +575,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .stream_name = "Hdmi3", .trigger = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -594,8 +594,6 @@ static struct snd_soc_dai_link skylake_dais[] = { .init = skylake_ssm4567_codec_init, .ignore_pmdown_time = 1, .be_hw_params_fixup = skylake_ssp_fixup, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { @@ -609,8 +607,6 @@ static struct snd_soc_dai_link skylake_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = skylake_ssp_fixup, .ops = &skylake_nau8825_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_codec, platform), }, { @@ -618,14 +614,14 @@ static struct snd_soc_dai_link skylake_dais[] = { .id = 2, .ignore_suspend = 1, .be_hw_params_fixup = skylake_dmic_fixup, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic01_pin, dmic_codec, platform), }, { .name = "iDisp1", .id = 3, - .dpcm_playback = 1, + .playback_only = 1, .init = skylake_hdmi1_init, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), @@ -634,7 +630,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .name = "iDisp2", .id = 4, .init = skylake_hdmi2_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -642,7 +638,7 @@ static struct snd_soc_dai_link skylake_dais[] = { .name = "iDisp3", .id = 5, .init = skylake_hdmi3_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, diff --git a/sound/soc/intel/boards/skl_rt286.c b/sound/soc/intel/boards/skl_rt286.c index 4f3d655e2bfa..04f3db889d07 100644 --- a/sound/soc/intel/boards/skl_rt286.c +++ b/sound/soc/intel/boards/skl_rt286.c @@ -348,7 +348,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST }, - .dpcm_playback = 1, + .playback_only = 1, .ops = &skylake_rt286_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -361,7 +361,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST }, - .dpcm_playback = 1, + .playback_only = 1, .ops = &skylake_rt286_fe_ops, SND_SOC_DAILINK_REG(deepbuffer, dummy, platform), }, @@ -374,7 +374,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST }, - .dpcm_capture = 1, + .capture_only = 1, .ops = &skylake_rt286_fe_ops, SND_SOC_DAILINK_REG(system, dummy, platform), }, @@ -382,7 +382,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { .name = "Skl Audio Reference cap", .stream_name = "refcap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, SND_SOC_DAILINK_REG(reference, dummy, platform), @@ -391,7 +391,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { .name = "Skl Audio DMIC cap", .stream_name = "dmiccap", .init = NULL, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .dynamic = 1, .ops = &skylake_dmic_ops, @@ -400,7 +400,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { [SKL_DPCM_AUDIO_HDMI1_PB] = { .name = "Skl HDMI Port1", .stream_name = "Hdmi1", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -409,7 +409,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { [SKL_DPCM_AUDIO_HDMI2_PB] = { .name = "Skl HDMI Port2", .stream_name = "Hdmi2", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -418,7 +418,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { [SKL_DPCM_AUDIO_HDMI3_PB] = { .name = "Skl HDMI Port3", .stream_name = "Hdmi3", - .dpcm_playback = 1, + .playback_only = 1, .init = NULL, .nonatomic = 1, .dynamic = 1, @@ -438,8 +438,6 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { .ignore_pmdown_time = 1, .be_hw_params_fixup = skylake_ssp0_fixup, .ops = &skylake_rt286_ops, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { @@ -447,7 +445,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { .id = 1, .be_hw_params_fixup = skylake_dmic_fixup, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic01_pin, dmic_codec, platform), }, @@ -455,7 +453,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { .name = "iDisp1", .id = 2, .init = skylake_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, @@ -463,7 +461,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { .name = "iDisp2", .id = 3, .init = skylake_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -471,7 +469,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = { .name = "iDisp3", .id = 4, .init = skylake_hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, diff --git a/sound/soc/intel/boards/sof_cs42l42.c b/sound/soc/intel/boards/sof_cs42l42.c index e6695e77d594..402e85f08f04 100644 --- a/sound/soc/intel/boards/sof_cs42l42.c +++ b/sound/soc/intel/boards/sof_cs42l42.c @@ -328,10 +328,6 @@ static int create_spk_amp_dai_links(struct device *dev, links[*id].platforms = platform_component; links[*id].num_platforms = ARRAY_SIZE(platform_component); - links[*id].dpcm_playback = 1; - /* firmware-generated echo reference */ - links[*id].dpcm_capture = 1; - links[*id].no_pcm = 1; links[*id].cpus = &cpus[*id]; links[*id].num_cpus = 1; @@ -368,8 +364,6 @@ static int create_hp_codec_dai_links(struct device *dev, links[*id].init = sof_cs42l42_init; links[*id].exit = sof_cs42l42_exit; links[*id].ops = &sof_cs42l42_ops; - 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; @@ -420,7 +414,7 @@ static int create_dmic_dai_links(struct device *dev, links[*id].platforms = platform_component; links[*id].num_platforms = ARRAY_SIZE(platform_component); links[*id].ignore_suspend = 1; - links[*id].dpcm_capture = 1; + links[*id].capture_only = 1; links[*id].no_pcm = 1; (*id)++; @@ -476,7 +470,7 @@ static int create_hdmi_dai_links(struct device *dev, links[*id].platforms = platform_component; links[*id].num_platforms = ARRAY_SIZE(platform_component); links[*id].init = sof_hdmi_init; - links[*id].dpcm_playback = 1; + links[*id].playback_only = 1; links[*id].no_pcm = 1; (*id)++; @@ -508,8 +502,6 @@ static int create_bt_offload_dai_links(struct device *dev, links[*id].platforms = platform_component; links[*id].num_platforms = ARRAY_SIZE(platform_component); - 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; diff --git a/sound/soc/intel/boards/sof_da7219_max98373.c b/sound/soc/intel/boards/sof_da7219_max98373.c index 740aa11cb019..37ea39be3091 100644 --- a/sound/soc/intel/boards/sof_da7219_max98373.c +++ b/sound/soc/intel/boards/sof_da7219_max98373.c @@ -316,8 +316,6 @@ static struct snd_soc_dai_link dais[] = { .id = 0, .ignore_pmdown_time = 1, .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, /* IV feedback */ .ops = &ssp1_ops, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_amps, platform), }, @@ -327,15 +325,13 @@ static struct snd_soc_dai_link dais[] = { .no_pcm = 1, .init = da7219_codec_init, .ignore_pmdown_time = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(ssp0_pin, ssp0_codec, platform), }, { .name = "dmic01", .id = 2, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), }, @@ -343,7 +339,7 @@ static struct snd_soc_dai_link dais[] = { .name = "iDisp1", .id = 3, .init = hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp1_pin, idisp1_codec, platform), }, @@ -351,7 +347,7 @@ static struct snd_soc_dai_link dais[] = { .name = "iDisp2", .id = 4, .init = hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp2_pin, idisp2_codec, platform), }, @@ -359,7 +355,7 @@ static struct snd_soc_dai_link dais[] = { .name = "iDisp3", .id = 5, .init = hdmi_init, - .dpcm_playback = 1, + .playback_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(idisp3_pin, idisp3_codec, platform), }, @@ -367,7 +363,7 @@ static struct snd_soc_dai_link dais[] = { .name = "dmic16k", .id = 6, .ignore_suspend = 1, - .dpcm_capture = 1, + .capture_only = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic16k_pin, dmic_codec, platform), } @@ -422,7 +418,7 @@ static int audio_probe(struct platform_device *pdev) .name = "SSP1-Codec", .id = 0, .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_pmdown_time = 1, SND_SOC_DAILINK_REG(ssp1_pin, ssp1_m98360a, platform) }; } diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c index d6c38d8ea2ff..ff7417ca11cd 100644 --- a/sound/soc/intel/boards/sof_es8336.c +++ b/sound/soc/intel/boards/sof_es8336.c @@ -455,8 +455,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].exit = sof_es8316_exit; links[id].ops = &sof_es8336_ops; links[id].nonatomic = true; - 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; @@ -496,7 +494,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].ignore_suspend = 1; - links[id].dpcm_capture = 1; + links[id].capture_only = 1; links[id].no_pcm = 1; id++; @@ -539,7 +537,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].init = sof_hdmi_init; - links[id].dpcm_playback = 1; + links[id].playback_only = 1; links[id].no_pcm = 1; id++; @@ -569,7 +567,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].num_codecs = 1; links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); - links[id].dpcm_capture = 1; + links[id].capture_only = 1; links[id].no_pcm = 1; links[id].num_cpus = 1; id++; diff --git a/sound/soc/intel/boards/sof_nau8825.c b/sound/soc/intel/boards/sof_nau8825.c index 4fc6e1c6aef3..c439829f061b 100644 --- a/sound/soc/intel/boards/sof_nau8825.c +++ b/sound/soc/intel/boards/sof_nau8825.c @@ -378,8 +378,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].init = sof_nau8825_codec_init; links[id].exit = sof_nau8825_codec_exit; links[id].ops = &sof_nau8825_ops; - 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; @@ -416,7 +414,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].ignore_suspend = 1; - links[id].dpcm_capture = 1; + links[id].capture_only = 1; links[id].no_pcm = 1; id++; } @@ -457,7 +455,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].init = sof_hdmi_init; - links[id].dpcm_playback = 1; + links[id].playback_only = 1; links[id].no_pcm = 1; id++; } @@ -496,10 +494,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); - links[id].dpcm_playback = 1; - /* feedback stream or firmware-generated echo reference */ - links[id].dpcm_capture = 1; - links[id].no_pcm = 1; links[id].cpus = &cpus[id]; links[id].num_cpus = 1; @@ -529,8 +523,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].num_codecs = 1; links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); - links[id].dpcm_playback = 1; - links[id].dpcm_capture = 1; links[id].no_pcm = 1; links[id].num_cpus = 1; } diff --git a/sound/soc/intel/boards/sof_pcm512x.c b/sound/soc/intel/boards/sof_pcm512x.c index 9f673ccf81b5..52cb1c9a9af6 100644 --- a/sound/soc/intel/boards/sof_pcm512x.c +++ b/sound/soc/intel/boards/sof_pcm512x.c @@ -246,12 +246,12 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].init = sof_pcm512x_codec_init; links[id].ops = &sof_pcm512x_ops; - links[id].dpcm_playback = 1; + links[id].playback_only = 1; /* * capture only supported with specific versions of the Hifiberry DAC+ */ if (sof_pcm512x_quirk & SOF_PCM512X_ENABLE_SSP_CAPTURE) - links[id].dpcm_capture = 1; + links[id].playback_only = 0; links[id].no_pcm = 1; links[id].cpus = &cpus[id]; links[id].num_cpus = 1; @@ -294,7 +294,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].ignore_suspend = 1; - links[id].dpcm_capture = 1; + links[id].capture_only = 1; links[id].no_pcm = 1; id++; } @@ -341,7 +341,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].init = sof_hdmi_init; - links[id].dpcm_playback = 1; + links[id].playback_only = 1; links[id].no_pcm = 1; id++; } diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index 7f4783592668..974e2baa752c 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -647,8 +647,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].init = sof_rt5682_codec_init; links[id].exit = sof_rt5682_codec_exit; links[id].ops = &sof_rt5682_ops; - 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; @@ -701,7 +699,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].ignore_suspend = 1; - links[id].dpcm_capture = 1; + links[id].capture_only = 1; links[id].no_pcm = 1; id++; } @@ -746,7 +744,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].init = sof_hdmi_init; - links[id].dpcm_playback = 1; + links[id].playback_only = 1; links[id].no_pcm = 1; id++; } @@ -795,10 +793,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, } links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); - links[id].dpcm_playback = 1; - /* feedback stream or firmware-generated echo reference */ - links[id].dpcm_capture = 1; - links[id].no_pcm = 1; links[id].cpus = &cpus[id]; links[id].num_cpus = 1; @@ -837,8 +831,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].num_codecs = 1; links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); - links[id].dpcm_playback = 1; - links[id].dpcm_capture = 1; links[id].no_pcm = 1; links[id].num_cpus = 1; } diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index d16ceef702a7..5705f5bcca9b 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -815,8 +815,8 @@ static void init_dai_link(struct device *dev, struct snd_soc_dai_link *dai_links dai_links->num_cpus = cpus_num; dai_links->codecs = codecs; dai_links->num_codecs = codecs_num; - dai_links->dpcm_playback = playback; - dai_links->dpcm_capture = capture; + dai_links->playback_only = !capture; + dai_links->capture_only = !playback; dai_links->init = init; dai_links->ops = ops; } diff --git a/sound/soc/intel/boards/sof_ssp_amp.c b/sound/soc/intel/boards/sof_ssp_amp.c index b33f720b3e6d..e98ad72341a2 100644 --- a/sound/soc/intel/boards/sof_ssp_amp.c +++ b/sound/soc/intel/boards/sof_ssp_amp.c @@ -230,7 +230,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].num_codecs = 1; links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); - links[id].dpcm_capture = 1; + links[id].capture_only = 1; links[id].no_pcm = 1; links[id].num_cpus = 1; id++; @@ -250,9 +250,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, } links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); - links[id].dpcm_playback = 1; - /* feedback from amplifier or firmware-generated echo reference */ - links[id].dpcm_capture = 1; links[id].no_pcm = 1; links[id].cpus = &cpus[id]; links[id].num_cpus = 1; @@ -285,7 +282,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].ignore_suspend = 1; - links[id].dpcm_capture = 1; + links[id].capture_only = 1; links[id].no_pcm = 1; id++; } @@ -332,7 +329,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); links[id].init = sof_hdmi_init; - links[id].dpcm_playback = 1; + links[id].playback_only = 1; links[id].no_pcm = 1; id++; } @@ -356,8 +353,6 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].num_codecs = 1; links[id].platforms = platform_component; links[id].num_platforms = ARRAY_SIZE(platform_component); - links[id].dpcm_playback = 1; - links[id].dpcm_capture = 1; links[id].no_pcm = 1; links[id].num_cpus = 1; id++; diff --git a/sound/soc/intel/boards/sof_wm8804.c b/sound/soc/intel/boards/sof_wm8804.c index 17224d26d9d6..f3c6e344c14a 100644 --- a/sound/soc/intel/boards/sof_wm8804.c +++ b/sound/soc/intel/boards/sof_wm8804.c @@ -167,8 +167,6 @@ static struct snd_soc_dai_link dailink[] = { .name = "SSP5-Codec", .id = 0, .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ops = &sof_wm8804_ops, SND_SOC_DAILINK_REG(ssp5_pin, ssp5_codec, platform), }, From patchwork Thu May 25 01:21:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686434 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 9CBABC77B7E for ; Thu, 25 May 2023 05:04: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 CE55086E; Thu, 25 May 2023 07:03:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CE55086E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684991052; bh=3UAWpJyK9GEvSTkQzT/uVHN+RWkQFnJpy2a5VbK9LO8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HIXLNFhMUMYeHycmST7Em2V2LpeSOBQk0tT6lYnmbihbiy6kJxe6abFCku5bjvbO2 j3x8lMzEtAD8rdgHXLO/sjkq/KamaXNQHLCEkA1OBUcbA2Y2lpz1S40Tve+Mkd86Zw bou+uiuK+VRa1yzmtvqgsGNv/KL6Vt+oiGpXRkbQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BA088F8068C; Thu, 25 May 2023 03:21:17 +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 71994F8068A; Thu, 25 May 2023 03:21:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E36AFF8068E; Thu, 25 May 2023 03:21:14 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2072c.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::72c]) (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 ABC4DF80685 for ; Thu, 25 May 2023 03:21:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ABC4DF80685 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=P1Xbiw1h ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=faKFqjaFiFjsiaOaIpVuwrhBgH6+qT0Q37zovvan529bP//V3TqJnzPgvsAfs7Kh1+sEtwhbgMoB7qx+uas78P9/QyLMXCA4uL2Ilb8aTbNntlyS1uLcyiOmiFjX2BSukB1Fg7mCB6NFovcw4arAxLKm2Cx+YbTeMvWLnzBI8vOQzK2Iv253JdofuKeyuFMIxOS05/KzBH14KbOvkCygXXfqvSz06kSeoDE+y/vaUgCEfO5x7lePJkA5dyd5ruBwJ/7RbJdq//Ivujha90pO9jFg/A7wsJD0A29e3yl4UvonTfv2Xa4Hmf6L+jzLkAC48r6JZFZ6tqZ3f581azTzFg== 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=/KvGg+GtRs9ZSxrJdNNHMdnxhkoZHdRwXbE8vxwnTTQ=; b=NMwOcdJukUTK6eESgSSk3MdCsmwkF3uy3dELk3YloCKQPv4JPQlo4IxG93gZQeFCtVWUGHrXp09YDAGdJA4xrEWa7VKohr9YYsAxPQwFwp6Q6WIeRcZWzZefX/TfE3B3EYRB7T9eT9F84xNxdn2CtX2Zs53Ly62eZnRe4vd2Jcufd5mD+Em+apMweV2ScV+/F3AeisvpMSWIahsHd8Pg24aOofklf+EkBEZWa3iam0lmcecIbvG4bVtWaZLMpNpFEJq9Ly6vs1omS6E15BO4EAyC3gj5r7TWNT3uS83T7WbTlquKk1AvmuxB859f7TIg4XQ1YWQJf97Mz752rfYB5w== 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=/KvGg+GtRs9ZSxrJdNNHMdnxhkoZHdRwXbE8vxwnTTQ=; b=P1Xbiw1hS38PdsREMUMKQgu8W4TqQXUcy1ERHiQHn3BlJhhETU/9TnXrw3RM71DMKSrRD3HEi5SBlNcW1IfTsFdqtilPI3zyX2/coIKpRjgwbc4ecK68XJvvTFrC6pxsXimafeqk4G3ijh3I8ogxNwFcWbwukeyOSkAhUkOZFgE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB10982.jpnprd01.prod.outlook.com (2603:1096:400:397::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:21:04 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:21:04 +0000 Message-ID: <87a5xtgq9r.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Sylwester Nawrocki , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 14/21] ASoC: samsung: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:21:04 +0000 X-ClientProxiedBy: TYAPR01CA0119.jpnprd01.prod.outlook.com (2603:1096:404:2a::35) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB10982:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c6a34f3-90ee-4c0b-7c45-08db5cbe4f3a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mGJi14OnYeyaPnuiqELbEgIO7MM08nSx5ipt8LItWay4vTppV3/YL3gjDOm58R6RMpx7+Bl6bzIV4zEVCWbmkGcrvaQHwgAQy32D/i6+5b5eYMunv/FHVGnOzLVEcEnpdp35TGTnMRJeV15Ctv1P1qJdLAeOvx/6PbYBStNwXapaOTQf9zwrmdsmTTeI7z+FQmlxhq7Mr8RThZJw07os024ZJ54BQoRTYjqMe6c/s6xBo5sI5tCeqXYbKQRRI10NhGqgsFNePjMEJGOLBH205xLp4iskmvyJ52z1PHyJ0W1JPTBs0A4BXE+ADt7QsvfeDHh5Azn/E8yWAQZEtHl99c3Gcnf93kIeHw6kTgldDkf+5/5vZjqsDZ44gt5sVoiB0wOw9qdFLRpPAWf0wAgJb9Vh79sGzP92siAqsask6QQHO7nRjgrqZw0L+v0dZ7STeNzNL8ICkH8ye6VU497OqgHUGjdFbOuNUCUV7yX7D9s1pyA81bZgk7kXMy1YTQpHO4prHeuTgHv1xR/jU/rq00u+1Komn05T9JEntXbl6F4jPwP9hzY7UNNQ6FzhfmClVRL+TKzjzGlFXyMhnPWU+HktGaTVIgKUJ9qoxnWmPtlDQN6wupbDHdI2VMEXsRu0 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(451199021)(52116002)(478600001)(6486002)(6512007)(186003)(6506007)(2616005)(26005)(38350700002)(38100700002)(4326008)(83380400001)(66476007)(36756003)(66556008)(110136005)(8676002)(316002)(5660300002)(2906002)(66946007)(8936002)(41300700001)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: a/KyhqDuxkSPJGzpTrWWI4oFfH/KmHyweThIybpIkhRvCxrdLK6WKw+55MZ+++NEu+Z8oOJrFwNMGsCT87YfzN2eO45UNTrpn1LXfGlQ0KOylA/pdQysADJ+ZR7qkba7d2KIO0SPbROX3Y5VIqnvDRPkFLWsvMOAzEV4+xk0MalrgGWIBmA4IAXRQzMqaLu5ldp/XRABtwM4Tmdley/8vrobHbwHZORF0ZrbR6vLhoJvrr/EyBxTEgLWvcMug/1ASD+23wuxdU83fFJMRuCtMU3jNZw/4VGoekP/f2YRzyiIwWOyunhVr6OXty0tp6YM0J+dVmaxgLLnfww1UqmoCMoTAyb9ZiHPCElwXbJsOOg84c/zufcTLO4M73SxISyhEvFhu4rxXyTn5spuVfGk8OdKOZvh16JwyNuGwO7qriD87IH8bjUrapsVPrbQgSiNmroVBEmra5I474vl4GfBOflLqF4x3g2wUOM9n+vRFwsQZrBpUa44Qj2DagwQwYBYAfmRAUqo/q/17rHO2GOYuZrShgkXHEE7Ej4uQkGCg/Fhac4SG69gP+ceEFc48zXetowhIyBX3r5aSgXne1+Hu086LpW9mlunuYkKaergzuVE4Z3qZAR328vWWOXezlxOsiLUnd0owrtiLjfuzzDR4uYWsKK+dcXhsKSY949AhpFG5qp+bZJafJIG+G/BaKHvQ4O6S4/dRcN/72B9h3WNp2vIkfjfScBHw90lYsqUaeadJ0mZD4sxYgC8hgF+PygzqP5dOYRtLZa5MpELKssB1VFSG6pNpPO94gfCwuQTZJDHxfgKpsF0DE6WgWllOxtBNQA+dJEbfYBbI37v1BYvrAOPI5D7kD7I2KLmKJxELm4U7+mmWCrzSik0pl2PJ8BBvx8XNMEV1BPFpcr55dcowUUaTDUQrF8JcpD8QCKZrqF9OE3BRW5qUKxDsGmPRbvLPBwvAk67WL0PLwYBq9BEKRZyjRuAdaMD2ZKbaD0cS4hq8BJ92byFxWOLi4FOkIxafRAYlVXsM1pq8AJmMYC6Je7vVhUtwc8q7oUEOBPkth+X6rLp3BgN8qawZwXkJpnpZfZd3b9og5+RJg6PTgzcA9x9IQAPVGWmtYQKVShKzRKaKSehJgKs4gMGuhRvXEUAjJFjhYORLurL99+6JbjxvIUhSSU3+Svosekq9SvuAEeXHgKuCG+Nle/xBOSByrj/fGtsLVqrmb7eYNARz7GtfAx83X0R2PwJSfmhfZw7GW8W8/8xBxA+Qevl13lZ37x+bCWsZ+Vj8xonLo8FaFSySZhsYm5/S4b9yH5QOIDkiMNPyEGSQzaRIe25KHkQ8R58p8lOtrvAKSw0MQmunFCqCGEHvK3VwUv31dMDuQgdLPbEfkNfnQX5wyqxWckEnZVKipHgWuBgHCyUJ+AjedFVG6+yYNLy/a1E0jrQ7wuC8dg5Y64NFiFlGXJL2qVDZd3smQTzkl7B8T9EmV9smq9cyDDF6asCusZC61O6b0RJBrV5VxhIc9z7pIZZFZPEmaPlv0+oEuvgUwbsqpsrQPrYanP2/mSa9BnahY7v0/rPRZfFZzkBKaUNhcNo29/gRA2J4xLwhcwybZHjK25kLPetT9V1H3OeP3nVaNO6wNAKZ4c= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c6a34f3-90ee-4c0b-7c45-08db5cbe4f3a X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:21:04.6973 (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: nEv36NsnjwKc2eyiXk8AqD6kufkR987gD/OOi9U5w1LHwwhWUGtb97u+H5xnLpa0D/c9SXQmao2KU90uhIyo8oe00lDrEYLnPj14L1dAVfaJuk1h2JOnQZcJclLVBilB X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10982 Message-ID-Hash: JXAESSFP6DFD3RLFMMDELLO63VMH7WFS X-Message-ID-Hash: JXAESSFP6DFD3RLFMMDELLO63VMH7WFS 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.8 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/samsung/odroid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index fd95a79cc9fa..3fd6a8c2c0fe 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -173,14 +173,14 @@ static struct snd_soc_dai_link odroid_card_dais[] = { .name = "Primary", .stream_name = "Primary", .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(primary), }, { /* BE <-> CODECs link */ .name = "I2S Mixer", .ops = &odroid_card_be_ops, .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, SND_SOC_DAILINK_REG(mixer), @@ -191,7 +191,7 @@ static struct snd_soc_dai_link odroid_card_dais[] = { .name = "Secondary", .stream_name = "Secondary", .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(secondary), } }; @@ -293,8 +293,8 @@ static int odroid_audio_probe(struct platform_device *pdev) /* Set capture capability only for boards with the MAX98090 CODEC */ if (codec_link->num_codecs > 1) { - card->dai_link[0].dpcm_capture = 1; - card->dai_link[1].dpcm_capture = 1; + card->dai_link[0].capture_only = 1; + card->dai_link[1].capture_only = 1; } priv->sclk_i2s = of_clk_get_by_name(cpu_dai, "i2s_opclk1"); From patchwork Thu May 25 01:21:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685669 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 C04D4C77B7A for ; Thu, 25 May 2023 05:03:33 +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 B2A34843; Thu, 25 May 2023 07:02:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B2A34843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684991011; bh=e1oNBFvYNx13CpFzcWIhv5aiDDj5e1g46SwokPM6oKU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dSCBaa1B16X8VLth8hsMFaEHDj40uvVmwHXqxXHnKZ/voTM/xfBMU1uyKNMUOjElO V3rLs2qnejBi6DpR2wXbGnSZ1+d53A9OXoBuzI0X6OzYfR6ssjB2fjvqlS4jimlGCE HshF6UCQ8BJT3L9O/6dHAkkf0MIRK/6wx1zJNyxY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0215CF8069A; Thu, 25 May 2023 03:21:39 +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 3DFFDF8069D; Thu, 25 May 2023 03:21:39 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DDC88F80698; Thu, 25 May 2023 03:21:35 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20705.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::705]) (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 5FCC5F80695 for ; Thu, 25 May 2023 03:21:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5FCC5F80695 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=BExSORPb ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hdy7lVFNSIdoRQOC3nSPcKNgyyUprRY00MIihOAnjo/dzPyXdLr4E9CbWLcHHaLQMDnJF/mC26UqUL97HQDj++huc9hpKIGw4GC5eBwrWOLWNawkQHqFQlcT3sgdsKW9T8mOXCkN4Jus90bHbZ9e6s380iEXVKFphEr420ZpJNXRBZTAnbyOfK9IlDJVoooRbN0g3F0rXo/6jRwoMOFvzTvUEQ+X7Prs5z34iAx1lifwT+8dCs/tor3cQG7CApCF4yD7bqyoWiwXQLTMvz5dHGoHyUOvGLc/QjAd/U4474ot9rT5y3Y4B/xoqGC7wZ0yn+LQKRUnxgfqJLOkteYOqg== 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=8lYcIvZjQwNMuF9FgkZ9no/ctFvPzcapRVEZRcODqrE=; b=jaLfoTIL5aZTVhsNLCt2NneFXHIBxbE3vMVL2/ScH1JCxD9LGfNMU62nxp3GuFQA39EZQ+ZEvrz7oIKuwWv1o2imTkUDyWUWl233hb+xGHqv/N3C1OdRWtLXFDD07dZpOMVEXRwAabD1rCufH6P8UTpydlW+gInrKdDSgsstJQieejb8m/IclwjxwBpvvZr4jQL1shd63mNNI+JC1p4R6JTmQUexX3eFK3zAfvYMmoAugniwc9hHdwaKTIx7lzv1F00E2a1eoURjTIRcYYU6KwPlbNmYEgChuNOgUpxyaUf6VCWTSyoGRtLdkAwr3M3mpPGrkUVRGEfedsm3nmsY/Q== 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=8lYcIvZjQwNMuF9FgkZ9no/ctFvPzcapRVEZRcODqrE=; b=BExSORPbxHan+apFILZqNOjY1GAqmYjEQSABAg9YhW+45nBQ3m/RlyVHz2wxJEAZ6rw6Hrva8Q6aIMEMGZJWuuEujMw3S7s5TYsMWF72CvWlL7Y8huW2BpGeIPnynE8vDTAVyk38FZne1sBf0A+gw53kmNBhDVW68UgJo/ieUns= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB10982.jpnprd01.prod.outlook.com (2603:1096:400:397::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Thu, 25 May 2023 01:21:17 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:21:17 +0000 Message-ID: <878rddgq9e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: =?iso-8859-1?q?=22N=C3=ADcolas_F=2E_R=2E_A=2E_Prado=22?= , "chunxu.li" , AngeloGioacchino Del Regno , Jaroslav Kysela , Jiaxin Yu , Liam Girdwood , Mark Brown , Matthias Brugger , Takashi Iwai , Trevor Wu , Wang Yufen Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 15/21] ASoC: mediatek: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:21:17 +0000 X-ClientProxiedBy: TYCPR01CA0188.jpnprd01.prod.outlook.com (2603:1096:400:2b0::20) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB10982:EE_ X-MS-Office365-Filtering-Correlation-Id: cd365506-104d-4d62-e6b6-08db5cbe5700 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hn8Jatj6/bKC8RMn7g6AkVUxEDlkAo/IIT/bdy/5L+avtzMFUvUpU+1Wj6ZuLjyGxFf+X2S+S3+MeMkm+X4LoOP4y8jt3B0XEcDg8HBvKJGyTNsXtTXu2Wdpph5bo0/6QA8/o9rk+fXAlEvUODgrV1J1u3X/Xt4COr9QOzvvNg5cXDaw6iPLzGfxhd3EjQsIVpMQHwo/IGBy2DcSCEGb/Dg5AUdgKUb6roz6sgOvI6ObLzkpUKSXsmHPhR78y00TZtYwBY52r++pvEYirj1NIK5zCtxdIZveYbWhlL7wAK1/8VqlR7kF7Gtm8A9shTHaEuCHxdNUABgmkfhuDZZHgz3lGDbR38BGZGdS46vZHpmjJbapDIgJtZ1uH5FQh90G/XocW3Yo8eQePCDh9eZNuLOh+gOpJdQS0hpc0Uh4MNt3EYHXKuWYFJXqZNleuVkITU4IQq3TxGvi13PfKTmQZlbz/7ln2zweQbCK4psRTWHwVieXOnM9g/hQ7g/7l5q7LK/5skJvBpS0O6SUhYScNK2emCjgMypi++94EBOvj6OJgKGrQICyS0eckXXQigRHjQWww1D16AA1V+Tl1vEMpNl6w/PBqHPWO0XXwMkY9o4H8lrn0bcZczjhOcNm4p+SxhV2cqKpCC6K/q2i474g3A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(451199021)(52116002)(478600001)(6486002)(6512007)(186003)(6506007)(2616005)(26005)(921005)(38350700002)(38100700002)(4326008)(83380400001)(66476007)(36756003)(66556008)(110136005)(8676002)(316002)(30864003)(5660300002)(2906002)(66946007)(7416002)(8936002)(41300700001)(86362001)(559001)(579004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: N7uAkC0sSEp4PQskFTYCYULHwq3+t47AjPZwaBnwv47FZ/kE7H4vULhlpI2bIQzHJPfUcs0mY/Y7LyQgasKdYqF4zsyP70UTuzTHDnmwgpKgU7qHq588cj/hC1Ckr969ej6/mOD9bwvtKSAAsFU5/0CfAmgr0MrTjBtyKvgCYry5ANMLxsIoUO8YIDuyMY1M4is0ManfvFo3r3jVD0CAUcx1sBOQWmg9H2MBnFfEXrj3L1RYwwM5hdZT4B4bUg74e4RA4HBelqGUv6D2M2GI6G2Ofbk7Dr0wUSH7BA3zVmFCeWliygpFbvaNiR4R/KUuAzxeR1VpLhxsAHdSttreoDVokf+1r99nNPwURqDXQZBm5rv8taqL697E9iR67QbkcVKRheo6OsViGt15IL7jRcd2M2D11dZWb2H68JkvdE55aC8AyJqcpxU0vuVMej1x3UUFOj7E73H6e6RJpPuff14zTwJt1CvxMf2eYj6aMy/J83o1HKnwwbTaD0JAV1uBURP8K6jRDbLtoDwl7I53fY40/IGSNkvWAVIVm+hsZIX/CcTFKEh7IIS+KfC47VnFXaTVAWrcZiY53E/8Fawo99CU6LV83QCVtbFLD/0g5+6kJU/9FexNzF0usTSrlWJI6wnUwURWMEwc2IVQseJUKv1Tu1oWkK8rhNX1hYHg2QNfmi88gz8YBmYs/lIDc334UoHDs/qyBLDoefKM2xh7BzfQz5/df3cnVZu/EkHItU5z3m6p6fXE/TRkCQE7iLX67jJlyatdbJp7UIeASqXLnsGEduJRXX6z9GSS/H1pM4tC8S7N0l2KUZ4GV47yFCfdrdr6+kFemZwOQu7MiRV9CYES9MuEszCcmYWP165SvDKFRaqvRU4+AQb9krXcM1r8UvJX6vpU/tvVHB+68NT+/PzrbuzWvL7R5lpCrWCcLiwuaVZpQo1u4ytYNdWeILGAHmmEHxVyRjESXTeRG7tBbSEaItXfFdp4JpT2TxFz6hKH5okvZL9T4ZWaCSCFcGuEZsza6ecpOi0FbheIMgOJ16WC+HY9D6ZmQSK4f+frHJ1qsqFqdME9DTfGDwYLbAhBDg1pA/xadSigBE/yKOT59Ufvz9GKeCWAHLtw3267QleGZ52EaP9TSaWtTdtrsDjOidAvC3YYB/HPzrJKF/WBTz1G8cQ8fRBcgfjCEbNDRyqUczOcwgcNtQbWAuzgtxULcoU5jTnv0t8ERpfcvTth6IKv52abo4lIQNGCKnTvkdzoMg41Q9lY8OGHbLHic3g50nv3/ojGW8+HqgYhKk4MBQJLrI+OwmdhaYyeX4fG9r2naA/ph4KouCi8wa+cURzknxdsKR1GAD9pS/TUjW5pAjFSYvBBbD4/+9DYDJN6gqUznRtwrlj3vTETlatEdMbu4NOqLYXw8ww9sbgWWfiGgleVPh0lmnQ+uYfzbaa0Bz9NXLO1yZ/bSr0G76G9z1V59xUOKlZBcETmbQpoUXp9NUJPGxyIq4ViX41VAREddyu9RQ0NphfNzLtyTvXNeyztzJczkshnsJ7D3n7gCr0bBJ6q3wHq1lJSjl8VnbR+n/uWy/ZwvDXvuWVTHUDNWJQkOmrlWsP2HQIVZJCBQaFodApr3LnpDI1JX8LiwfxCE1E= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd365506-104d-4d62-e6b6-08db5cbe5700 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:21:17.7564 (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: iWTrP3Nq7X3qnSPg0jBsWBf14Pk3TjJS80lPNPhzDfYIJZNnrsmRbWKWcun3YB37mJilr2m2YGjNeETLlrbZsngyXRyxwIAsZD7ny5Voy9JT8eqIBlu4XIRW+JYc7DyM X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10982 Message-ID-Hash: GXVHQARJB2V45C5M2KQZ5GFNI6AMYJ4Y X-Message-ID-Hash: GXVHQARJB2V45C5M2KQZ5GFNI6AMYJ4Y 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.8 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/mediatek/mt2701/mt2701-cs42448.c | 20 ++--- sound/soc/mediatek/mt2701/mt2701-wm8960.c | 6 +- sound/soc/mediatek/mt6797/mt6797-mt6351.c | 24 ++---- sound/soc/mediatek/mt8173/mt8173-max98090.c | 6 +- .../mediatek/mt8173/mt8173-rt5650-rt5514.c | 6 +- .../mediatek/mt8173/mt8173-rt5650-rt5676.c | 10 +-- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 10 +-- .../mediatek/mt8183/mt8183-da7219-max98357.c | 34 +++----- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 34 +++----- .../mt8186/mt8186-mt6366-da7219-max98357.c | 86 +++++++------------ .../mt8186/mt8186-mt6366-rt1019-rt5682s.c | 86 +++++++------------ sound/soc/mediatek/mt8188/mt8188-mt6359.c | 48 +++++------ .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 78 ++++++++--------- sound/soc/mediatek/mt8195/mt8195-mt6359.c | 60 +++++++------ 14 files changed, 204 insertions(+), 304 deletions(-) diff --git a/sound/soc/mediatek/mt2701/mt2701-cs42448.c b/sound/soc/mediatek/mt2701/mt2701-cs42448.c index 08ef109744c7..e71c23ebff62 100644 --- a/sound/soc/mediatek/mt2701/mt2701-cs42448.c +++ b/sound/soc/mediatek/mt2701/mt2701-cs42448.c @@ -222,7 +222,7 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST}, .ops = &mt2701_cs42448_48k_fe_ops, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(fe_multi_ch_out), }, [DAI_LINK_FE_PCM0_IN] = { @@ -232,7 +232,7 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST}, .ops = &mt2701_cs42448_48k_fe_ops, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(fe_pcm0_in), }, [DAI_LINK_FE_PCM1_IN] = { @@ -242,7 +242,7 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST}, .ops = &mt2701_cs42448_48k_fe_ops, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(fe_pcm1_in), }, [DAI_LINK_FE_BT_OUT] = { @@ -251,7 +251,7 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(fe_bt_out), }, [DAI_LINK_FE_BT_IN] = { @@ -260,7 +260,7 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(fe_bt_in), }, /* BE */ @@ -270,8 +270,6 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .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] = { @@ -280,8 +278,6 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .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] = { @@ -290,8 +286,6 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .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] = { @@ -300,15 +294,11 @@ static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = { .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", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(be_mrg_bt), }, }; diff --git a/sound/soc/mediatek/mt2701/mt2701-wm8960.c b/sound/soc/mediatek/mt2701/mt2701-wm8960.c index a184032c15b6..24fd522d2d37 100644 --- a/sound/soc/mediatek/mt2701/mt2701-wm8960.c +++ b/sound/soc/mediatek/mt2701/mt2701-wm8960.c @@ -67,7 +67,7 @@ static struct snd_soc_dai_link mt2701_wm8960_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback), }, { @@ -76,7 +76,7 @@ static struct snd_soc_dai_link mt2701_wm8960_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture), }, /* BE */ @@ -86,8 +86,6 @@ static struct snd_soc_dai_link mt2701_wm8960_dai_links[] = { .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), }, }; diff --git a/sound/soc/mediatek/mt6797/mt6797-mt6351.c b/sound/soc/mediatek/mt6797/mt6797-mt6351.c index 784c201b8fd4..daad9544a8d4 100644 --- a/sound/soc/mediatek/mt6797/mt6797-mt6351.c +++ b/sound/soc/mediatek/mt6797/mt6797-mt6351.c @@ -78,7 +78,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_1), }, { @@ -87,7 +87,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_2), }, { @@ -96,7 +96,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_3), }, { @@ -105,7 +105,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_1), }, { @@ -114,7 +114,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_2), }, { @@ -123,7 +123,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_3), }, { @@ -132,7 +132,7 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono_1), }, { @@ -141,8 +141,6 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .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), }, @@ -152,8 +150,6 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { .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), }, @@ -161,24 +157,18 @@ static struct snd_soc_dai_link mt6797_mt6351_dai_links[] = { { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(primary_codec), }, { .name = "PCM 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm2), }, diff --git a/sound/soc/mediatek/mt8173/mt8173-max98090.c b/sound/soc/mediatek/mt8173/mt8173-max98090.c index c2b0619b6158..02a7d1370731 100644 --- a/sound/soc/mediatek/mt8173/mt8173-max98090.c +++ b/sound/soc/mediatek/mt8173/mt8173-max98090.c @@ -105,7 +105,7 @@ static struct snd_soc_dai_link mt8173_max98090_dais[] = { .stream_name = "MAX98090 Playback", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback), }, { @@ -113,7 +113,7 @@ static struct snd_soc_dai_link mt8173_max98090_dais[] = { .stream_name = "MAX98090 Capture", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture), }, /* Back End DAI links */ @@ -124,8 +124,6 @@ static struct snd_soc_dai_link mt8173_max98090_dais[] = { .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), }, }; diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c index f803f121659d..2a22a14f686d 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c @@ -128,7 +128,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5514_dais[] = { .stream_name = "rt5650_rt5514 Playback", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback), }, [DAI_LINK_CAPTURE] = { @@ -136,7 +136,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5514_dais[] = { .stream_name = "rt5650_rt5514 Capture", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture), }, /* Back End DAI links */ @@ -148,8 +148,6 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5514_dais[] = { SND_SOC_DAIFMT_CBS_CFS, .ops = &mt8173_rt5650_rt5514_ops, .ignore_pmdown_time = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(codec), }, }; diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c index 8794720cea3a..8866abee6e35 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c @@ -160,7 +160,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5676_dais[] = { .stream_name = "rt5650_rt5676 Playback", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback), }, [DAI_LINK_CAPTURE] = { @@ -168,7 +168,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5676_dais[] = { .stream_name = "rt5650_rt5676 Capture", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture), }, [DAI_LINK_HDMI] = { @@ -176,7 +176,7 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5676_dais[] = { .stream_name = "HDMI PCM", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(hdmi_pcm), }, @@ -189,14 +189,12 @@ static struct snd_soc_dai_link mt8173_rt5650_rt5676_dais[] = { SND_SOC_DAIFMT_CBS_CFS, .ops = &mt8173_rt5650_rt5676_ops, .ignore_pmdown_time = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(codec), }, [DAI_LINK_HDMI_I2S] = { .name = "HDMI BE", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(hdmi_be), }, /* rt5676 <-> rt5650 intercodec link: Sets rt5676 I2S2 as master */ diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650.c b/sound/soc/mediatek/mt8173/mt8173-rt5650.c index e05f2b0231fe..617f5dbfa6be 100644 --- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c +++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c @@ -199,7 +199,7 @@ static struct snd_soc_dai_link mt8173_rt5650_dais[] = { .stream_name = "rt5650 Playback", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback), }, [DAI_LINK_CAPTURE] = { @@ -207,7 +207,7 @@ static struct snd_soc_dai_link mt8173_rt5650_dais[] = { .stream_name = "rt5650 Capture", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture), }, [DAI_LINK_HDMI] = { @@ -215,7 +215,7 @@ static struct snd_soc_dai_link mt8173_rt5650_dais[] = { .stream_name = "HDMI PCM", .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(hdmi_pcm), }, /* Back End DAI links */ @@ -227,14 +227,12 @@ static struct snd_soc_dai_link mt8173_rt5650_dais[] = { SND_SOC_DAIFMT_CBS_CFS, .ops = &mt8173_rt5650_ops, .ignore_pmdown_time = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(codec), }, [DAI_LINK_HDMI_I2S] = { .name = "HDMI BE", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .init = mt8173_rt5650_hdmi_init, SND_SOC_DAILINK_REG(hdmi_be), }, diff --git a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c index 87bb04846991..848fcd5341bc 100644 --- a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c @@ -410,7 +410,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8183_da7219_max98357_ops, SND_SOC_DAILINK_REG(playback1), }, @@ -420,7 +420,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8183_da7219_max98357_bt_sco_ops, SND_SOC_DAILINK_REG(playback2), }, @@ -430,7 +430,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback3), }, { @@ -439,7 +439,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8183_da7219_max98357_bt_sco_ops, SND_SOC_DAILINK_REG(capture1), }, @@ -449,7 +449,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture2), }, { @@ -458,7 +458,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8183_da7219_max98357_ops, SND_SOC_DAILINK_REG(capture3), }, @@ -468,7 +468,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono), }, { @@ -477,38 +477,32 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_hdmi), }, /* BE */ { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(primary_codec), }, { .name = "PCM 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm2), }, { .name = "I2S0", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, @@ -517,7 +511,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { { .name = "I2S1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, @@ -526,7 +520,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { { .name = "I2S2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_da7219_i2s_ops, @@ -536,13 +530,13 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { { .name = "I2S3", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, }, { .name = "I2S5", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, @@ -555,7 +549,7 @@ static struct snd_soc_dai_link mt8183_da7219_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ignore = 1, diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c index ce9aedde7e1e..0a0aea9b5337 100644 --- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c @@ -430,7 +430,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8183_mt6358_ops, SND_SOC_DAILINK_REG(playback1), }, @@ -440,7 +440,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8183_mt6358_ts3a227_max98357_bt_sco_ops, SND_SOC_DAILINK_REG(playback2), }, @@ -450,7 +450,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback3), }, { @@ -459,7 +459,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8183_mt6358_ts3a227_max98357_bt_sco_ops, SND_SOC_DAILINK_REG(capture1), }, @@ -469,7 +469,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture2), }, { @@ -478,7 +478,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8183_mt6358_ops, SND_SOC_DAILINK_REG(capture3), }, @@ -488,7 +488,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono), }, { @@ -497,7 +497,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_hdmi), }, { @@ -513,31 +513,25 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(primary_codec), }, { .name = "PCM 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm2), }, { .name = "I2S0", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .ops = &mt8183_mt6358_i2s_ops, SND_SOC_DAILINK_REG(i2s0), @@ -545,7 +539,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { { .name = "I2S1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, @@ -554,7 +548,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { { .name = "I2S2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_i2s_ops, @@ -564,13 +558,13 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { { .name = "I2S3", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, }, { .name = "I2S5", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .ops = &mt8183_mt6358_i2s_ops, .init = &mt8183_bt_init, @@ -582,7 +576,7 @@ static struct snd_soc_dai_link mt8183_mt6358_ts3a227_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8183_i2s_hw_params_fixup, .ops = &mt8183_mt6358_tdm_ops, diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c index cdf54d1eb50d..b71e4c4b896f 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c @@ -567,7 +567,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -580,7 +580,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback12), }, { @@ -589,7 +589,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -601,7 +601,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -614,7 +614,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback4), }, { @@ -623,7 +623,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback5), }, { @@ -632,7 +632,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback6), }, { @@ -641,7 +641,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback7), }, { @@ -650,7 +650,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback8), }, { @@ -659,7 +659,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture1), }, { @@ -668,7 +668,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -681,7 +681,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture3), }, { @@ -690,7 +690,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -703,7 +703,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture5), }, { @@ -712,7 +712,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -724,7 +724,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture7), }, { @@ -733,8 +733,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .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), }, @@ -744,8 +742,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .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_fm), }, @@ -755,8 +751,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .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_src1), }, @@ -766,8 +760,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .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_src_bargein), }, @@ -777,7 +769,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_hw_gain_aaudio), }, @@ -787,8 +779,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .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_src_aaudio), }, @@ -796,8 +786,6 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, .init = mt8186_mt6366_init, SND_SOC_DAILINK_REG(adda), @@ -808,7 +796,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .init = mt8186_mt6366_da7219_max98357_hdmi_init, .be_hw_params_fixup = mt8186_anx7625_i2s_hw_params_fixup, @@ -817,7 +805,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "I2S0", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, .ops = &mt8186_da7219_i2s_ops, @@ -826,7 +814,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "I2S1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, .init = mt8186_da7219_init, @@ -836,7 +824,7 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "I2S2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s2), @@ -844,39 +832,31 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "HW Gain 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_gain1), }, { .name = "HW Gain 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_gain2), }, { .name = "HW_SRC_1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_src1), }, { .name = "HW_SRC_2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_src2), }, { .name = "CONNSYS_I2S", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(connsys_i2s), }, @@ -885,15 +865,13 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF, .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "TDM IN", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(tdm_in), }, @@ -901,35 +879,35 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "Hostless_UL1", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul1), }, { .name = "Hostless_UL2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul2), }, { .name = "Hostless_UL3", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul3), }, { .name = "Hostless_UL5", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul5), }, { .name = "Hostless_UL6", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul6), }, @@ -937,25 +915,25 @@ static struct snd_soc_dai_link mt8186_mt6366_da7219_max98357_dai_links[] = { { .name = "AFE_SOF_DL1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_DL1), }, { .name = "AFE_SOF_DL2", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_DL2), }, { .name = "AFE_SOF_UL1", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_UL1), }, { .name = "AFE_SOF_UL2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_UL2), }, }; diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c index 7538274641fd..523fe18cf904 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c @@ -635,7 +635,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -648,7 +648,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback12), }, { @@ -657,7 +657,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -669,7 +669,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -682,7 +682,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback4), }, { @@ -691,7 +691,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback5), }, { @@ -700,7 +700,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback6), }, { @@ -709,7 +709,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback7), }, { @@ -718,7 +718,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback8), }, { @@ -727,7 +727,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture1), }, { @@ -736,7 +736,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -749,7 +749,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture3), }, { @@ -758,7 +758,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -771,7 +771,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture5), }, { @@ -780,7 +780,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .dpcm_merged_format = 1, .dpcm_merged_chan = 1, .dpcm_merged_rate = 1, @@ -792,7 +792,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture7), }, { @@ -801,8 +801,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .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), }, @@ -812,8 +810,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .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_fm), }, @@ -823,8 +819,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .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_src1), }, @@ -834,8 +828,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .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_src_bargein), }, @@ -845,7 +837,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_hw_gain_aaudio), }, @@ -855,8 +847,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .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_src_aaudio), }, @@ -864,8 +854,6 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, .init = primary_codec_init, SND_SOC_DAILINK_REG(adda), @@ -876,7 +864,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .init = mt8186_mt6366_rt1019_rt5682s_hdmi_init, .be_hw_params_fixup = mt8186_it6505_i2s_hw_params_fixup, @@ -885,7 +873,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "I2S0", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, .ops = &mt8186_rt5682s_i2s_ops, @@ -894,7 +882,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "I2S1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, .init = mt8186_rt5682s_init, @@ -904,7 +892,7 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "I2S2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8186_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s2), @@ -912,39 +900,31 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "HW Gain 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_gain1), }, { .name = "HW Gain 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_gain2), }, { .name = "HW_SRC_1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_src1), }, { .name = "HW_SRC_2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hw_src2), }, { .name = "CONNSYS_I2S", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(connsys_i2s), }, @@ -953,15 +933,13 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF, .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "TDM IN", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(tdm_in), }, @@ -969,35 +947,35 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "Hostless_UL1", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul1), }, { .name = "Hostless_UL2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul2), }, { .name = "Hostless_UL3", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul3), }, { .name = "Hostless_UL5", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul5), }, { .name = "Hostless_UL6", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(hostless_ul6), }, @@ -1005,25 +983,25 @@ static struct snd_soc_dai_link mt8186_mt6366_rt1019_rt5682s_dai_links[] = { { .name = "AFE_SOF_DL1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_DL1), }, { .name = "AFE_SOF_DL2", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_DL2), }, { .name = "AFE_SOF_UL1", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_UL1), }, { .name = "AFE_SOF_UL2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(AFE_SOF_UL2), }, }; diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c index 919d74ea1934..224a376680a2 100644 --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c @@ -435,7 +435,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback2), }, [DAI_LINK_DL3_FE] = { @@ -446,7 +446,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback3), }, [DAI_LINK_DL6_FE] = { @@ -457,7 +457,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback6), }, [DAI_LINK_DL7_FE] = { @@ -468,7 +468,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback7), }, [DAI_LINK_DL8_FE] = { @@ -479,7 +479,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback8), }, [DAI_LINK_DL10_FE] = { @@ -490,7 +490,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback10), }, [DAI_LINK_DL11_FE] = { @@ -501,7 +501,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback11), }, [DAI_LINK_UL1_FE] = { @@ -512,7 +512,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture1), }, [DAI_LINK_UL2_FE] = { @@ -523,7 +523,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture2), }, [DAI_LINK_UL3_FE] = { @@ -534,7 +534,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture3), }, [DAI_LINK_UL4_FE] = { @@ -545,7 +545,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture4), }, [DAI_LINK_UL5_FE] = { @@ -556,7 +556,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture5), }, [DAI_LINK_UL6_FE] = { @@ -567,7 +567,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture6), }, [DAI_LINK_UL8_FE] = { @@ -578,7 +578,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture8), }, [DAI_LINK_UL9_FE] = { @@ -589,7 +589,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture9), }, [DAI_LINK_UL10_FE] = { @@ -600,15 +600,13 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture10), }, /* BE */ [DAI_LINK_ADDA_BE] = { .name = "ADDA_BE", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .init = mt8188_mt6359_init, SND_SOC_DAILINK_REG(adda), }, @@ -617,7 +615,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .ops = &mt8188_dptx_ops, .be_hw_params_fixup = mt8188_dptx_hw_params_fixup, .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(dptx), }, [DAI_LINK_ETDM1_IN_BE] = { @@ -626,7 +624,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(etdm1_in), }, @@ -636,7 +634,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(etdm2_in), }, [DAI_LINK_ETDM1_OUT_BE] = { @@ -645,7 +643,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(etdm1_out), }, [DAI_LINK_ETDM2_OUT_BE] = { @@ -654,7 +652,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(etdm2_out), }, [DAI_LINK_ETDM3_OUT_BE] = { @@ -663,7 +661,7 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(etdm3_out), }, [DAI_LINK_PCM1_BE] = { @@ -672,8 +670,6 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBC_CFC, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(pcm1), }, }; diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index 5e163e23a207..cedf838249aa 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -689,7 +689,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback1), }, { @@ -698,7 +698,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback12), }, { @@ -707,7 +707,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback2), }, { @@ -716,7 +716,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8192_mt6359_rt5682_ops, SND_SOC_DAILINK_REG(playback3), }, @@ -726,7 +726,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback4), }, { @@ -735,7 +735,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback5), }, { @@ -744,7 +744,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback6), }, { @@ -753,7 +753,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback7), }, { @@ -762,7 +762,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback8), }, { @@ -771,7 +771,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback9), }, { @@ -780,7 +780,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8192_mt6359_capture1_ops, SND_SOC_DAILINK_REG(capture1), }, @@ -790,7 +790,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8192_mt6359_rt5682_ops, SND_SOC_DAILINK_REG(capture2), }, @@ -800,7 +800,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture3), }, { @@ -809,7 +809,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture4), }, { @@ -818,7 +818,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture5), }, { @@ -827,7 +827,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture6), }, { @@ -836,7 +836,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture7), }, { @@ -845,7 +845,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture8), }, { @@ -854,7 +854,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono1), }, { @@ -863,7 +863,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono2), }, { @@ -872,7 +872,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(capture_mono3), }, { @@ -881,15 +881,13 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .trigger = {SND_SOC_DPCM_TRIGGER_PRE, SND_SOC_DPCM_TRIGGER_PRE}, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(playback_hdmi), }, /* Back End DAI links */ { .name = "Primary Codec", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, .init = mt8192_mt6359_init, SND_SOC_DAILINK_REG(primary_codec), @@ -897,29 +895,27 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "Primary Codec CH34", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(primary_codec_ch34), }, { .name = "AP_DMIC", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(ap_dmic), }, { .name = "AP_DMIC_CH34", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(ap_dmic_ch34), }, { .name = "I2S0", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s0), @@ -927,7 +923,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S1", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s1), @@ -935,7 +931,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S2", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s2), @@ -943,7 +939,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S3", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s3), @@ -951,7 +947,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S5", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s5), @@ -959,7 +955,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S6", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s6), @@ -967,7 +963,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S7", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s7), @@ -975,7 +971,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S8", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, .init = mt8192_rt5682_init, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, @@ -985,7 +981,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "I2S9", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, SND_SOC_DAILINK_REG(i2s9), @@ -994,23 +990,19 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { { .name = "CONNSYS_I2S", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(connsys_i2s), }, { .name = "PCM 1", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm1), }, { .name = "PCM 2", .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .ignore_suspend = 1, SND_SOC_DAILINK_REG(pcm2), }, @@ -1020,7 +1012,7 @@ static struct snd_soc_dai_link mt8192_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM, - .dpcm_playback = 1, + .playback_only = 1, .ignore_suspend = 1, .be_hw_params_fixup = mt8192_i2s_hw_params_fixup, .ignore = 1, diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c index ceca882ecff7..f349ba27b9d0 100644 --- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c @@ -1025,7 +1025,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_playback_ops, SND_SOC_DAILINK_REG(DL2_FE), }, @@ -1037,7 +1037,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_playback_ops, SND_SOC_DAILINK_REG(DL3_FE), }, @@ -1049,7 +1049,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_playback_ops, SND_SOC_DAILINK_REG(DL6_FE), }, @@ -1061,7 +1061,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(DL7_FE), }, [DAI_LINK_DL8_FE] = { @@ -1072,7 +1072,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_playback_ops, SND_SOC_DAILINK_REG(DL8_FE), }, @@ -1084,7 +1084,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_hdmitx_dptx_playback_ops, SND_SOC_DAILINK_REG(DL10_FE), }, @@ -1096,7 +1096,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_playback_ops, SND_SOC_DAILINK_REG(DL11_FE), }, @@ -1108,7 +1108,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(UL1_FE), }, [DAI_LINK_UL2_FE] = { @@ -1119,7 +1119,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL2_FE), }, @@ -1131,7 +1131,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL3_FE), }, @@ -1143,7 +1143,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL4_FE), }, @@ -1155,7 +1155,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL5_FE), }, @@ -1167,7 +1167,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_PRE, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(UL6_FE), }, [DAI_LINK_UL8_FE] = { @@ -1178,7 +1178,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL8_FE), }, @@ -1190,7 +1190,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL9_FE), }, @@ -1202,7 +1202,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { SND_SOC_DPCM_TRIGGER_POST, }, .dynamic = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_capture_ops, SND_SOC_DAILINK_REG(UL10_FE), }, @@ -1210,13 +1210,13 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { [DAI_LINK_DL_SRC_BE] = { .name = "DL_SRC_BE", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(DL_SRC_BE), }, [DAI_LINK_DPTX_BE] = { .name = "DPTX_BE", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_dptx_ops, .be_hw_params_fixup = mt8195_dptx_hw_params_fixup, SND_SOC_DAILINK_REG(DPTX_BE), @@ -1227,7 +1227,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(ETDM1_IN_BE), }, [DAI_LINK_ETDM2_IN_BE] = { @@ -1236,7 +1236,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_capture = 1, + .capture_only = 1, .init = mt8195_rt5682_init, .ops = &mt8195_rt5682_etdm_ops, .be_hw_params_fixup = mt8195_etdm_hw_params_fixup, @@ -1248,7 +1248,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_rt5682_etdm_ops, .be_hw_params_fixup = mt8195_etdm_hw_params_fixup, SND_SOC_DAILINK_REG(ETDM1_OUT_BE), @@ -1259,7 +1259,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(ETDM2_OUT_BE), }, [DAI_LINK_ETDM3_OUT_BE] = { @@ -1268,7 +1268,7 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, - .dpcm_playback = 1, + .playback_only = 1, SND_SOC_DAILINK_REG(ETDM3_OUT_BE), }, [DAI_LINK_PCM1_BE] = { @@ -1277,48 +1277,46 @@ static struct snd_soc_dai_link mt8195_mt6359_dai_links[] = { .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(PCM1_BE), }, [DAI_LINK_UL_SRC1_BE] = { .name = "UL_SRC1_BE", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(UL_SRC1_BE), }, [DAI_LINK_UL_SRC2_BE] = { .name = "UL_SRC2_BE", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, SND_SOC_DAILINK_REG(UL_SRC2_BE), }, /* SOF BE */ [DAI_LINK_SOF_DL2_BE] = { .name = "AFE_SOF_DL2", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_sof_be_ops, SND_SOC_DAILINK_REG(AFE_SOF_DL2), }, [DAI_LINK_SOF_DL3_BE] = { .name = "AFE_SOF_DL3", .no_pcm = 1, - .dpcm_playback = 1, + .playback_only = 1, .ops = &mt8195_sof_be_ops, SND_SOC_DAILINK_REG(AFE_SOF_DL3), }, [DAI_LINK_SOF_UL4_BE] = { .name = "AFE_SOF_UL4", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_sof_be_ops, SND_SOC_DAILINK_REG(AFE_SOF_UL4), }, [DAI_LINK_SOF_UL5_BE] = { .name = "AFE_SOF_UL5", .no_pcm = 1, - .dpcm_capture = 1, + .capture_only = 1, .ops = &mt8195_sof_be_ops, SND_SOC_DAILINK_REG(AFE_SOF_UL5), }, From patchwork Thu May 25 01:21:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685673 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 34982C77B7E for ; Thu, 25 May 2023 05:00:58 +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 2C725852; Thu, 25 May 2023 07:00:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2C725852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990856; bh=YOfXMtp4Xd7w7VTZDZzK8IKEFvxuS4daQh2h/u3zUAQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=fm9jc21juKybwqC5WPcBih5IhukH/DO53Bid01Dpi/i7cEg354B6LJhnW3koVvcFL TbM2KsbxdGJo30MXt7ayiJGbpK/WAd6K7wZdyAuW50KzcBE09emYRiBgVugXwOEV0a BpaP4atw46kMOk77b/73B8S2a9KMv22qyppOw9M0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7EDCDF806AD; Thu, 25 May 2023 03:21:47 +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 080F0F806A6; Thu, 25 May 2023 03:21:47 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F14FF806A7; Thu, 25 May 2023 03:21:43 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20726.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::726]) (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 DD533F80694 for ; Thu, 25 May 2023 03:21:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DD533F80694 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=BjEHIixb ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fTtIl5IbpAMj1la0VJVr3kkyydruV6hEKGOEtQVgd3TREcOeNvR4PhtLFETu+ktYWt95GX09C/x0cTvFMtKmFoi07zqtgRIBMb5JrTTRmapGFnUPK+Y4ZPsvUTVkrDC6sOHzt7Bn2Oxv56/fG+DRF97xaMrVafEF9x8Odd5L3YP4CLKrshtxbeRbZEfR+YH9IrNAildfFtui/+XaNml1WMm0U7r0GntLGdFfyeOY36lrWmtck7rrpVII43Miffzj3gpwdb3PKP0bsFVKTxDlmQy+YUkxKA5FtzOUqYIOkIy3ZNvovHS3I2PtmzPZUg6KSCjn1UysmtBYprXW1hq8Qw== 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=L0MBxES8G7KqJnqvndkCwJeuWMPog7wEcaBC84kjtAg=; b=V5BFLEjKCh0gMk8B2yOpKUQU6XOp3JoqrNbakFS+4tzMbMm+Ua6RLtgwfB9jeEoYK3A5MaiCMqsRjenaLrs78t8zpP56ZUD6d17Vdz48SXOZurek+/DTun6Ygt8ObVqoqtnyxAekj8TWLja5Y/oeL/LgLlBf+SNuLF8RmxqYHILqgh9XkH4yh8HBm3dW69MtuSr8hQBono4mfvvlxf9emQ6h7dWAMu19lqz9SbZKsTQ1HnKW3aoJFzZoznvZq2tLqBPHjAsbN5oVngEU53iLDGET4lXWEry9glaXseKwmrGR2tCy/bULfMr669Z9ZKj2XwwU71HBJg05lTpzRJDokQ== 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=L0MBxES8G7KqJnqvndkCwJeuWMPog7wEcaBC84kjtAg=; b=BjEHIixb95MWDohP6V3LCx6SbMsq/kZn25qy4gLIIbBJUJpphz6TvSqkyJu/5EVDrfLexBZM+r17iBeJI0ehT9Chiczo92GO4N77AyoQx70qD/PbsfbKmL87bfEmXyWy1ErFHZAOy4DdoPsz98aEtjjvYG5X3uMz71G1KrhRYZA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB9477.jpnprd01.prod.outlook.com (2603:1096:400:19a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.14; Thu, 25 May 2023 01:21:27 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:21:27 +0000 Message-ID: <877csxgq95.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 16/21] ASoC: soc-dai.c: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:21:26 +0000 X-ClientProxiedBy: TYCPR01CA0188.jpnprd01.prod.outlook.com (2603:1096:400:2b0::20) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB9477:EE_ X-MS-Office365-Filtering-Correlation-Id: 32ec425a-2fd2-4b61-db41-08db5cbe5c69 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SZNbAQSAbjU8hx2s8RKa7lnUn32X+W7ubFW182rlkuJMf5/QmDgDn3XjQpPpuTmBgNGf4FIk5eAohaDUWF6FS1iNXJQGKv4/5F650vuGs3SJe8/OZk34nNCFgpltzSDcKlCFfYFU3NT5pYFtfP6lkrHSWfvkNDsjZbq20WUjDMaYgPr05KJaVE1Xdg0ZgnykX5Ch+m4A4/YLq9O1cN6cLkeozIrobdgOc34iwbvtHvNXftekRmYxkVqEcVX/zEAAfeydWJ09eM8nnnYOmFqu/9sytJcXql4CQyEenhea3UyUZw/f/5D4RuZEy51YALkkHeQqtkZaMRsCZT7YBjXSY+VXnLisjgBas3OZPKoUhgpm8JrIaWglqRaZzl1Ah6MRbEFuZLppQQgCCciF1rxl75/EdNprueW6iTkicQEGxx2N3J/LLSxwQNyYPzL5q4o0mjFGiTxBh0h3DJicVPF8z4Sb4KbvixMS1cyToKCoNyF889AR2M4gj0XhWe6LoT4rh5JwZVENYZvDjqLfiEp505j3kzTQji8CTM/C7Z1gVkOjywH+VFT/KdGjj69Lsbya72IrHMKVS7eGCP1bzuP/SwII0w+M3CHW2B5dmRjm5Ips5CwY55bnU6Zor6AJyCsj X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199021)(38100700002)(38350700002)(6486002)(2906002)(66946007)(66476007)(4326008)(8936002)(8676002)(41300700001)(66556008)(316002)(36756003)(5660300002)(478600001)(2616005)(52116002)(110136005)(186003)(6512007)(83380400001)(86362001)(26005)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Fk8PNJOKjBxvKprcbF+WfQNBXmJ208tqxfi+j01I5kTSQgf2QEJ4tGBcg3AItWIBQ2SPCnSnoKPw9RJEin4GCez66+CkOHct8BCzX7ggVu2HS024Xhgv0EEULFWJcu/W//JZd/c4MYe4lO3iP8zviXhU6XsMIsHVpI1Nrr9UOYSMKuWVKHQ3lRTsAk6RzzNLIKOMHXtFHZ0tbcRCPmyHftwRVMYlSxVlbB25Xbo3vxN/E2VZ+Dnm0FnVcIKAz3pdXjQ3cYBXGmzj2WDDGU7a+3kY4xm2G7F5pZwo1q0+uLYZ9jKsrwDMEtSXJRjaohs3goOaUQ7hIoZwuWomkRQk4JbQcE7IHAnPCFbdWI20Khz6K2IATqbHwpKvklTRxFlZuIqKgxjkgRdfhdeBS2Vk6fDH+eKakwAa1ADJvJ3xzt+Dg6rDj/CR5tH46zf0q1Uf979z2/cGhuuXZL+rqDhpElopTOQRQvsWXrK8Pj/cqo0EOS2YDWSeAESiDruriHbXUuBOELMkW+dS+0u/xvObcJkcd0vY8zZCK/MjHg9T2T/SdxyYz0lRKw2cAi8ugdRZDmpHdo2VRjsU5Aa4MiBkYiP9cgPwQPnSajM3rPT6TtfcuypO5E1tvyk3NY18214e9C6kmOR8JdYbXp1KpOHivSMoLWeXDpWN8qcnnhGTB4fYdFJxMB/APpZyoI5X3XmHO9tdS7zXTIxpKQIN8a9OPpQLQVXaMl09hU6zr8WX/F6EI2d0KoPfbgEt5QxJBdLNeCjrjksnnsqDXB0S1iK7KyYXWami7PbD7jtMqqgSvSLNTTXAKJnW7vUr66/CHau3WwYRSQGnDNR12fWd2b+P5MDotHara1JMAXI+l5gHGaweR+HGaYDdL7aD5E9iODVSkOFLK0URfCh/4xJ2hGKRjF+ewrwbGse5xstVSw80tlR1At9XXJq7NURWGGoHexEUs8VLFl3Iu809Ai4n52ghmel8lhNQEeGoIqWLelkf9i83Xh6mIv7cpWStKz2kFM0RBolf2Rbb+S5XYZG3u92h5cfjU7Owq74v0nPgBYxtm84sIRqDsJRpYFZiTlTn1dC477M92fHZPn/9URSeNuKkeEcZm8BM9ZHyxCYRcjwiY2PPr+W33e9TcSXRMA8TUDMg5n6WW0Kb0PrROGeJ2lH7OcpTx/wdo6u8u7nSgN/Dmnl+nL0xtwbboSvgZyWOecoiMAMHQ/WSjjL81NeMXtDgsOzF7Ij8NuO7Sn/sZURCyFu6A31ImgiSvJRK4MJKSUkWV/fzafuiYUQiFuBXsHVtzPVHNunfykI4hQPJoTtu0wph0VaLUyW04rop1iMaoHGYNCJVx9NPMJBEmge5KWOxG9xx8EECB0G1z4MvdGcoO7Rqy+Ckm9PVEmJ/UBnzpLW01iyqManvmFPgGPnaCU8gYhPd/HZ6WN9gZaVcotbGRvPDggmlmbgLdp+sQss9wyZ4Q9bxsDXniWcU9w9cC0tA9xESeCzGg17HCZln5wBBbV1+71x6HEwkRT+Rv2NBqmZkgaCPb3i1S5s3TUgS5NjQalnboBKdlOopuWAY/muZTE+rfREuwOL+Z5V7z/cnmKVWzA5s9Ek1kSz0et27GqHjlxBx8dmtR30mPC892AVbYTE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32ec425a-2fd2-4b61-db41-08db5cbe5c69 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:21:27.8494 (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: ZF2UQMdqFhTKXfVvAgVi07q+JlzkViOHpNpfsmrVSokkPoYMSonLR0O1KP1KBi0QpC6b3QFQ/sCGCqN+yeK0ZX5RvC3oMAgRXYhFSH1+v9InvCW7A8KQCI8PHWHjIzZY X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB9477 Message-ID-Hash: 5SOWKAFFYY6HOPHTMQQYSSEFZDYIK4O7 X-Message-ID-Hash: 5SOWKAFFYY6HOPHTMQQYSSEFZDYIK4O7 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.8 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/soc-dai.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c index 02dd64dea179..138f71ceab3c 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -505,8 +505,10 @@ void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link *dai_link) supported[direction] = supported_cpu && supported_codec; } - dai_link->dpcm_playback = supported[SNDRV_PCM_STREAM_PLAYBACK]; - dai_link->dpcm_capture = supported[SNDRV_PCM_STREAM_CAPTURE]; + dai_link->playback_only = supported[SNDRV_PCM_STREAM_PLAYBACK] && + !supported[SNDRV_PCM_STREAM_CAPTURE]; + dai_link->capture_only = supported[SNDRV_PCM_STREAM_CAPTURE] && + !supported[SNDRV_PCM_STREAM_PLAYBACK]; } EXPORT_SYMBOL_GPL(snd_soc_dai_link_set_capabilities); From patchwork Thu May 25 01:21:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686436 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 0271FC77B7E for ; Thu, 25 May 2023 05:03:17 +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 AC05B820; Thu, 25 May 2023 07:02:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AC05B820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990995; bh=NTihPacCARdgs7ZmZ3NZZDQvL2AhsPs6k2G7lqNOfZQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=uXlCoxEN06XKVL+ECu2Ry48qWoX72HLjL8istDK+bkaI+qhEKl5kWmQJpn8odcRMn J5vwcH3Q6hluA6LpXs/D5LxzarGEmcVMZAS9HY7BglEm9mwI4yBfbEXxrIkGabMWO6 myBj7kA73Tz+2wRL/a6bT09E55Rq7gAOdRCUzVaQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 00765F806B5; Thu, 25 May 2023 03:21:49 +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 6C5E5F806A5; Thu, 25 May 2023 03:21:49 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 35A4EF806A6; Thu, 25 May 2023 03:21:46 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20715.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::715]) (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 89EE1F806A5 for ; Thu, 25 May 2023 03:21:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 89EE1F806A5 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=W52iknGp ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kxpLS2iLBu9QONvD2CPasRH+Jp0B8FByLBaAbEB+msllNRhy1/Vp83bUN8A3xvhV87vwS3VihdNmnHmYObXIbEtUoxPMXETXJTZaK1O6qkhH68Ahpwh4CosZ4P1ELzxrQ6Rcn5YO4rPowS45cG+c10e3o66cGjfQ1+kjVJqKgT18PTqGZHunE+MeUq3Q/I/UMQ0OrmHRrTIIdYfW8xUOL+ZtjlZB3svAj01lwz9gx4gpr2IYN3nGYUl8KtkKOUlKYS+fUja4vtIB0Wl+ua0KOQi5F7D8kbwAp9uIsqQg6+Bpa+eFv5ms/iEPdsymNLLzZp/Pm1mGcpFltvNP44USmA== 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=HLM11tDdg/Hyz22W+hCb+fuMD+nqtJa9WRZyjI1olr8=; b=fn6zCu8Sc/ST2/dXoL4Fb5SY1Qt1i5b9OnQSnQrcjBC1LJJ1O2DohcI1uO3sGklIm1Lhn5sya7KN2qmayXs5/+HmHj+dKAqkQjnYRlF9H+AU7ZhI0n9m/Pa3V2/6AW7a+1SwureQUvGJ79k/9vSSiNsfUAO/Ae48rGx7pv4HRZ2Ya0BIrVweEYhkTnhcOcuJguzwM4bJs3q3npS60OQoIOCJpr2mzshu/qwZx9RummacYCdsTeLonm6sxA92JlfbFX2/KHaoaLHRekDg+4ST64yLOeOJtLF9o0ggUUP17LDzUbJf9JHW49ljH90oeWoYzX/1+zvnp4hjEca5FbkCkw== 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=HLM11tDdg/Hyz22W+hCb+fuMD+nqtJa9WRZyjI1olr8=; b=W52iknGpylbFvMpKtsbxwZi+jgvQa3LT1g6s9rPg8wU+ifPK0AMmBQV9rn1ypQ4WjOKleN8eB5u8E3JNV+BZnrRny7AFWO6CiA/BmMdZtpqMpbl0QhkpzO+NCpRtmHw2amlXlED/3NU3g6ydb34n6ysvSiZreG5a6he2Ek4csy4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB9477.jpnprd01.prod.outlook.com (2603:1096:400:19a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.14; Thu, 25 May 2023 01:21:36 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:21:36 +0000 Message-ID: <875y8hgq8w.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: =?unknown-8bit?q?=22Amadeusz_S=C3=85=82awi=C3=85=84ski=22_=3Camadeuszx?= =?unknown-8bit?q?=2Eslawinski=40linux=2Eintel=2Ecom=3E=2C_Bard_Liao_=3Cyung?= =?unknown-8bit?q?-chuan=2Eliao=40linux=2Eintel=2Ecom=3E=2C_Cezary_Rojewski_?= =?unknown-8bit?q?=3Ccezary=2Erojewski=40intel=2Ecom=3E=2C_Jaroslav_Kysela_?= =?unknown-8bit?q?=3Cperex=40perex=2Ecz=3E=2C_Kai_Vehmanen_=3Ckai=2Evehmanen?= =?unknown-8bit?q?=40linux=2Eintel=2Ecom=3E=2C_Liam_Girdwood_=3Cliam=2Er=2Eg?= =?unknown-8bit?q?irdwood=40linux=2Eintel=2Ecom=3E=2C_Mark_Brown_=3Cbroonie?= =?unknown-8bit?q?=40kernel=2Eorg=3E=2C_Peter_Ujfalusi_=3Cpeter=2Eujfalusi?= =?unknown-8bit?q?=40linux=2Eintel=2Ecom=3E=2C_Pierre-Louis_Bossart_=3Cpierr?= =?unknown-8bit?q?e-louis=2Ebossart=40linux=2Eintel=2Ecom=3E=2C_Ranjani_Srid?= =?unknown-8bit?q?haran_=3Cranjani=2Esridharan=40linux=2Eintel=2Ecom=3E=2C_T?= =?unknown-8bit?q?akashi_Iwai_=3Ctiwai=40suse=2Ecom=3E?= Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 17/21] ASoC: Intel/avs: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:21:36 +0000 X-ClientProxiedBy: TYCP286CA0023.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:263::10) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB9477:EE_ X-MS-Office365-Filtering-Correlation-Id: 38f868df-c21e-4416-52e9-08db5cbe621a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3AAWJmctYJ4Pp9d5RDwC6drcdTCt6gctQVtIe6OCePzKEhRpJOfpyZUZFhamnTN4rVWe/vE0IV67alTg60MCyPFUJoVnBI5IZ9NazGtQlxrEAO8jXkpV7+m4yqG6w4SK1WB6w3H0bGKfzL/E5Kn3lpoEoDd1O+4mg2p0dTOu5toFtyFH1EuJ6PndObh4fLfQ4t1BCrDY8JPzOiUke6oMIhLcr9fJxLf4CLpUQU5QZGsw4hIVssvr7577OncjXGmDtRITzDAngR/VdBdOHBPBVj23l+n72BAAfOib/N/8uH7s04tBV++7NCItisjRemzgmXg4C5eobuD0DHCAYpi6luXgZ7laMDFZbzp0vrxg98Dn2GT24RCX9U6IAtvVisR62X7CoMUkuvLHkFl3VRr/QdgTDQGewpnF6ThYVo4oWSBwaO2hk3M5rtB4WpuLnBPfOkXelJXtZxx5YDENZy6dGiq1AsVCX5+35tfebeoiWELFeW5JY30qsvsmQfUGZ3QZoDJfqPflFGHjsgSW9SmebWLQKg+pOc36+iNO2LVWbW0geK2/Qu/xYaUCuAfiD6eQgVANbk1seaZYOc3kLk3PvjUAqquOBGg5mM+Ff3Miv2lQb4+TQT/DOH9rr3MCsBac0QU6OR+C8ngE3bFqQeW/EA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199021)(38100700002)(38350700002)(6486002)(921005)(2906002)(66946007)(66476007)(4326008)(8936002)(8676002)(41300700001)(66556008)(316002)(7416002)(36756003)(5660300002)(478600001)(2616005)(52116002)(110136005)(186003)(6512007)(83380400001)(86362001)(26005)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J9vc1a8UsRGKd1fUOSJlSRI9hjz5+GkH4k7HLRhjIB2ToKP4O+w4dIDviTWCLbnYYnIvVgZ4JoDogf8j97XjTfk91VQY/Rf2OlHW4GRnZbGAhGwymfaRH1ip6rMENJWteB8t+8mqPKDIW1qgP4d0OtnVsJpksqn/GmYBOUyoKh5CgzyKJcxmsryl+qWaTCEsc3dXQBep0IaBGGbsTrTZ2zUdLVWInns1KiizcoyWP+z4VkZcUlUeUA2gvICBFoyJ2kJHrwKBjnD8XN6jmvqOAfITQd65jdIPuDpM35mE8Escv8vHwPJoRXItv3gt925G7b0JY4LPPcNfNWuo18eLd7RegO9m7PIsfHjcVQwncVRXS2OZu0BNBr8yA2RzH1dqYC+wr38UYOrBsmrkUqH1SrnF/7l43qiyv6nXBWpo/QRsOApYUnMjf9IqKHDYVg8pHmH82s68j+3ibiEBc/HNdmZaSBzyTmg5ndU4RNXCdWh8T7/VJQUXwDXWhOH5raT5ukSsNbTLfBkSG/tUfCavbWRIrlH55fB7eC4kx4uZQbTpO8Bw2DTUKhF/OTkDA0m6zYETIvU7BendVg12CUUuJ2RfQZEktg/QGGaSUiI08fr9gBOHcnVXJQI3WDpRZdTjxeM7o6NakDu3QtEELeYscbE7TF1C9+aWck7GEtI09vFmp4g+X7KJ0Rx4+G4JtngLhp5EeKyTtrLdeyEMy9OR0/2Vb5GQtIA7UtiMWhYH5ckJLf4kX3fl3+tuAoiok565BPqUDcXTP+h3yIuq9qj/DtX+9lMMOX1wZdympfv8RaLkaS6tA/KsRurubfybdg6FaA0TlXWGr1DG3M3st30oGcNujn8dqV2dQC75YMuzlhRkSe2z2fflIrWjA62PxtprsGK3WD4XQ1KYSmR3ZsxoJe9YsBtia1efc31Ulvb9wo3eH7LPS0TuVZLJ5SFpMVLhEiCool21SvyDbVfz/EALWXlkrSDWxhaKCO7qaVHxAIzIEATf2MYcPkDSNV0dDPfl+uvaRKQyOByXRjKAcg0O1FpZLzkWK/Av4+Dgrp0leMZB4cK1hOBNBN/i/BRC0gyKHIgDfPJF/VU3eFMFRLSa6XDdVNQqIvzu8TuQaGq6OiRSAjKUwDMvCyeT4EteE3Ajvhlx/Xl0qH40voCyAt7rcqzMv12mpC2RibTVYDaBPOF91FyXv/yPMUr0B2tMGBTByzqNccvYtPrkogmuXwkhUNz69oN6qkmnb5eQIiwwJ+gW8A+SUd02TzCA7JQnodFLSULGddyLKQos5LZtDABYivUfJ38LrsfJ59oqH3M5JNKJKsJYqZkeEtv1Gcdx9mUDZlu4ixoR7bwywUITc6Dvtf/E/SxomDBbOZdRUF4RkDMiQMQC880vOFl6tZKtlJQGdoCHJhcGcaaDp2PTyOdF0JXKgXnB8/6FCgPSyN3eAMltTO6mnTtGVwCmA0DaOkQGDXE5bcFQU2sd5nIc/7Qvf+n15WJyoym/mV2MjheAeZWkPdoo+cKOwUzh1uV5FTv/hialiRNtGteRSynJ+KswzxncfRuMhahW/yEyQNwnLxWHEEJiGdd5VnMU2f0EzwsblwSdVDmfzRXx4Q5OyX+iYKTU6ByPoW7RV8x2D7gHlPI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38f868df-c21e-4416-52e9-08db5cbe621a X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:21:36.3683 (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: Ksh8ZtaVwlEO8mdewAw0a/ESeBjQ9z3P9b4uFMa0BoAj+pJehYY8dPu5QeoW7xMob5jey91lbucGbih/AC1TlSk/a/a8M/+dJex42+8wF0vFNivjpb+bHupCIc/N2Sf2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB9477 Message-ID-Hash: ISFRRHYBP7DAAQCXCGO677R55HMNG5AC X-Message-ID-Hash: ISFRRHYBP7DAAQCXCGO677R55HMNG5AC 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.8 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/intel/avs/boards/da7219.c | 2 -- sound/soc/intel/avs/boards/dmic.c | 4 ++-- sound/soc/intel/avs/boards/hdaudio.c | 4 ---- sound/soc/intel/avs/boards/i2s_test.c | 2 -- sound/soc/intel/avs/boards/max98357a.c | 2 +- sound/soc/intel/avs/boards/max98373.c | 2 -- sound/soc/intel/avs/boards/max98927.c | 2 -- sound/soc/intel/avs/boards/nau8825.c | 2 -- sound/soc/intel/avs/boards/rt274.c | 2 -- sound/soc/intel/avs/boards/rt286.c | 2 -- sound/soc/intel/avs/boards/rt298.c | 2 -- sound/soc/intel/avs/boards/rt5682.c | 2 -- sound/soc/intel/avs/boards/ssm4567.c | 2 -- 13 files changed, 3 insertions(+), 27 deletions(-) diff --git a/sound/soc/intel/avs/boards/da7219.c b/sound/soc/intel/avs/boards/da7219.c index 1a1d572cc1d0..435b3a4f7a54 100644 --- a/sound/soc/intel/avs/boards/da7219.c +++ b/sound/soc/intel/avs/boards/da7219.c @@ -173,8 +173,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->exit = avs_da7219_codec_exit; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_capture = 1; - dl->dpcm_playback = 1; *dai_link = dl; diff --git a/sound/soc/intel/avs/boards/dmic.c b/sound/soc/intel/avs/boards/dmic.c index 90a921638572..620ac4f07206 100644 --- a/sound/soc/intel/avs/boards/dmic.c +++ b/sound/soc/intel/avs/boards/dmic.c @@ -22,7 +22,7 @@ static struct snd_soc_dai_link card_dai_links[] = { { .name = "DMIC", .id = 0, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .no_pcm = 1, SND_SOC_DAILINK_REG(dmic_pin, dmic_codec, platform), @@ -30,7 +30,7 @@ static struct snd_soc_dai_link card_dai_links[] = { { .name = "DMIC WoV", .id = 1, - .dpcm_capture = 1, + .capture_only = 1, .nonatomic = 1, .no_pcm = 1, .ignore_suspend = 1, diff --git a/sound/soc/intel/avs/boards/hdaudio.c b/sound/soc/intel/avs/boards/hdaudio.c index a542a67e21d0..b2680296440e 100644 --- a/sound/soc/intel/avs/boards/hdaudio.c +++ b/sound/soc/intel/avs/boards/hdaudio.c @@ -39,8 +39,6 @@ static int avs_create_dai_links(struct device *dev, struct hda_codec *codec, int dl[i].id = i; dl[i].nonatomic = 1; dl[i].no_pcm = 1; - dl[i].dpcm_playback = 1; - dl[i].dpcm_capture = 1; dl[i].platforms = platform; dl[i].num_platforms = 1; dl[i].ignore_pmdown_time = 1; @@ -222,8 +220,6 @@ static struct snd_soc_dai_link probing_link = { .id = -1, .nonatomic = 1, .no_pcm = 1, - .dpcm_playback = 1, - .dpcm_capture = 1, .cpus = dummy, .num_cpus = ARRAY_SIZE(dummy), .init = avs_probing_link_init, diff --git a/sound/soc/intel/avs/boards/i2s_test.c b/sound/soc/intel/avs/boards/i2s_test.c index bc3065c6ceda..e89bc6ccbeaf 100644 --- a/sound/soc/intel/avs/boards/i2s_test.c +++ b/sound/soc/intel/avs/boards/i2s_test.c @@ -43,8 +43,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->id = 0; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_capture = 1; - dl->dpcm_playback = 1; *dai_link = dl; diff --git a/sound/soc/intel/avs/boards/max98357a.c b/sound/soc/intel/avs/boards/max98357a.c index 183123d08c5a..2e5ef281e222 100644 --- a/sound/soc/intel/avs/boards/max98357a.c +++ b/sound/soc/intel/avs/boards/max98357a.c @@ -79,7 +79,7 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->be_hw_params_fixup = avs_max98357a_be_fixup; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_playback = 1; + dl->playback_only = 1; *dai_link = dl; diff --git a/sound/soc/intel/avs/boards/max98373.c b/sound/soc/intel/avs/boards/max98373.c index 8e221ecd34b0..d728a171a571 100644 --- a/sound/soc/intel/avs/boards/max98373.c +++ b/sound/soc/intel/avs/boards/max98373.c @@ -131,8 +131,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->be_hw_params_fixup = avs_max98373_be_fixup; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_capture = 1; - dl->dpcm_playback = 1; dl->ignore_pmdown_time = 1; dl->ops = &avs_max98373_ops; diff --git a/sound/soc/intel/avs/boards/max98927.c b/sound/soc/intel/avs/boards/max98927.c index 7cccce99f92e..21d8957c7498 100644 --- a/sound/soc/intel/avs/boards/max98927.c +++ b/sound/soc/intel/avs/boards/max98927.c @@ -128,8 +128,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->be_hw_params_fixup = avs_max98927_be_fixup; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_capture = 1; - dl->dpcm_playback = 1; dl->ignore_pmdown_time = 1; dl->ops = &avs_max98927_ops; diff --git a/sound/soc/intel/avs/boards/nau8825.c b/sound/soc/intel/avs/boards/nau8825.c index b69fc5567135..9b983dbacd95 100644 --- a/sound/soc/intel/avs/boards/nau8825.c +++ b/sound/soc/intel/avs/boards/nau8825.c @@ -207,8 +207,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->ops = &avs_nau8825_ops; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_capture = 1; - dl->dpcm_playback = 1; *dai_link = dl; diff --git a/sound/soc/intel/avs/boards/rt274.c b/sound/soc/intel/avs/boards/rt274.c index 6a1e121f082f..7b7251a0bb07 100644 --- a/sound/soc/intel/avs/boards/rt274.c +++ b/sound/soc/intel/avs/boards/rt274.c @@ -180,8 +180,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->be_hw_params_fixup = avs_rt274_be_fixup; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_capture = 1; - dl->dpcm_playback = 1; *dai_link = dl; diff --git a/sound/soc/intel/avs/boards/rt286.c b/sound/soc/intel/avs/boards/rt286.c index 3551a05bd599..a6e1395d62a4 100644 --- a/sound/soc/intel/avs/boards/rt286.c +++ b/sound/soc/intel/avs/boards/rt286.c @@ -150,8 +150,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->ops = &avs_rt286_ops; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_capture = 1; - dl->dpcm_playback = 1; *dai_link = dl; diff --git a/sound/soc/intel/avs/boards/rt298.c b/sound/soc/intel/avs/boards/rt298.c index 2923f3805bbe..e13d2a5d5976 100644 --- a/sound/soc/intel/avs/boards/rt298.c +++ b/sound/soc/intel/avs/boards/rt298.c @@ -170,8 +170,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->ops = &avs_rt298_ops; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_capture = 1; - dl->dpcm_playback = 1; *dai_link = dl; diff --git a/sound/soc/intel/avs/boards/rt5682.c b/sound/soc/intel/avs/boards/rt5682.c index b2c2ba93dcb5..5e42e2b1b82e 100644 --- a/sound/soc/intel/avs/boards/rt5682.c +++ b/sound/soc/intel/avs/boards/rt5682.c @@ -226,8 +226,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->ops = &avs_rt5682_ops; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_capture = 1; - dl->dpcm_playback = 1; *dai_link = dl; diff --git a/sound/soc/intel/avs/boards/ssm4567.c b/sound/soc/intel/avs/boards/ssm4567.c index 2b7f5ad92aca..f9f6aaf957f2 100644 --- a/sound/soc/intel/avs/boards/ssm4567.c +++ b/sound/soc/intel/avs/boards/ssm4567.c @@ -120,8 +120,6 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in dl->be_hw_params_fixup = avs_ssm4567_be_fixup; dl->nonatomic = 1; dl->no_pcm = 1; - dl->dpcm_capture = 1; - dl->dpcm_playback = 1; dl->ignore_pmdown_time = 1; *dai_link = dl; From patchwork Thu May 25 01:21:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 686438 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 09E49C77B7A for ; Thu, 25 May 2023 05:01:49 +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 1083CA4C; Thu, 25 May 2023 07:00:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1083CA4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990907; bh=N/B4Y38hjWN36QyDhxmBfVcYZer2SdQFwlHsfgd9Bco=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=uW4uRBxZOX2W1tgHuOybuuUW+ZQ/wCcGn0WuH7FEE7HbAIyb5pPWAdb9FGG/YjCR+ vvbgDR/nQw4xUlmmUliTKTQCOpP2Bu6Omm5bQBn7Z8NIUVr/8mP+s4VC2uGzneQiD+ 0o1bvGbkEe7ncx/ULlbR0fFQmALtO5loNb2B7Pvg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F071F806D2; Thu, 25 May 2023 03:22:01 +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 3E7DCF806CB; Thu, 25 May 2023 03:22:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D42CFF806BB; Thu, 25 May 2023 03:21:56 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20708.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::708]) (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 9E1FBF806B0 for ; Thu, 25 May 2023 03:21:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9E1FBF806B0 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=B+dkmBsY ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MuF/jB+gWBWfCAqzltEgoZyUueCvxoCcg1sKZ1RYruPa+P8Lz9ddMbiQWws2SM+b7M8W9cHPKy/UH17Gz0nDTLHGB9FXd90MgP3McFGld/dH1yxb6hL7rH1GFVDwYtLGlmNeBB/DJsYGY2LQ0aCNqaNN5sAvcmIyKpnhZpmdf9gdml7XuN4bR/ABHugybb/RFlkchqLi/svXAbHKMl3nKngEh4oEhPI4ezcV3jMmJqHPY8uy0KnfGPe4ivEnoqFPu6IFTDW1Xj1xVkgaUEmtfV8AetIeOfSJs5MgfxWTC2YA6e82DO132cdHgt7yEEfVae6pkKtlV4RipRkpJeFWLw== 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=ee6ivP1wWvXZ4wj3pxJ8Yls6cXQZCmml9pEsGukaNPs=; b=MVYBym+pvlU59EWPiPtt9frCk5+c5S1qAIwYV0jbHCTTu4SlWC12fV+pTMxmNMHyHaFdeD2rdJba+UCHca0ge1ouPqltqlUlWhwSfKiQzYeCYYE+L96HSDdOAGWRGQWTTbufxeOZwHGDB47IHKhju9J2IeHuVTT0fpD80ZuaNaYleeml1HgrsE7l7QYEpU5C+WVjmI97ucLmtb3RygNWzFP3Jd4u8bp/cAKN1xYWoMlkRHvHiRv8nJzn8In79faQqzQ/Hts0IH/iGfQuJz7zDghJdqniSo3cxAVAqNtOLJdm3AB3wrm39FI+Y8mkGnwBbzqa6K11wi9+ebiK6Q8ybA== 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=ee6ivP1wWvXZ4wj3pxJ8Yls6cXQZCmml9pEsGukaNPs=; b=B+dkmBsYJlgDfvMjcOrei1+W9DssT+Y9z6wFTKplBCEVVQJgjYLCHnob7hr0+o2y2TQrfZwwG9273R1NuaBWcImAz8Zjodij8gekGXw8ugHi/L6EGsSFq1mMHiofZFW71Q5SZyF9XFtXCELvLgsimKlEWrnYdA5eWes/Jf6FAJQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB9477.jpnprd01.prod.outlook.com (2603:1096:400:19a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.14; Thu, 25 May 2023 01:21:44 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:21:43 +0000 Message-ID: <874jo1gq8p.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 18/21] ASoC: soc-core.c: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:21:43 +0000 X-ClientProxiedBy: TYCP286CA0243.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:456::17) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB9477:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d6d5201-c634-40f1-c67b-08db5cbe664f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xM0ZqBIMUFosp524smm8XF2Z6Xooyts/wuOsdc8M3EnHdZlgCnY4BVOQ4Uk5ieqpx6x+9DlPQF+H4U03A7Sb9JQd9EtE62Fchtm40jnyq9IilONpSLPd/YAbQlRGiXcadYVXw9z8bOlWqPfCCm2k/yUGa2F90XgoXrdtDkFHQKUuCyPpuYJwJTi8+jvwoR3mIv2RMZ8XfuNPr19QWudiMRTxmKfdy6qTLueYAvQanse2MBRxxAtqefTh3ODUcYxtmDugcIrX3AU4OnBqFnI3UYkE04IXKzo5w3z7w+ScpgWncxe7yvM2jBrfs+H02RxpMquiB9wLa77IOAB+pY04WgP7ra+FY2pGoTCjEhAeR/kHkIVlItqCKzNbCC7NClH4D9oAwz5yy7k5+0GljpjyjCKMwdmDOf17Kal+eV8RjiwhISMFVad/o6U++vII+aCz/nZTJVNsDqaTFWbTsJS+HCECWoa33ioQOB+5spZzCgrioBg5tnqSyev25o10l3t1Y2aDHxmBt1xVFfUWBFPGc/oD9jyq22vax7ZFTUEpNPXrSoh0qOz9N4Xt0KMlHt0oDrDPesbiD6ZC4XyuglShsmMVgFTgiKZ9ObjuDcXZD0RHGW7NSipsFDxnI6g4BQ+X X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199021)(38100700002)(38350700002)(6486002)(2906002)(66946007)(66476007)(4326008)(8936002)(8676002)(41300700001)(66556008)(316002)(36756003)(5660300002)(478600001)(2616005)(52116002)(110136005)(186003)(6512007)(83380400001)(86362001)(26005)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?UKDx8m+HC6nJBrnZ96dgNvo?= =?iso-8859-2?q?ZJVxNxKUm/wcaOhGBX9Key4GXhoS74BzAQPN8hrDDCohOJD7jbPBjBziCCg9?= =?iso-8859-2?q?9/87LODRvIVhp/GLeT0thLJBnRs23WY0vzETwwXhE264cqrkEQXj0Rfs1s/j?= =?iso-8859-2?q?D393FKmcnJhS09HlHFEi62JLG/aR1A+GbVRsLfZB33i7gCKCXLPh6Br8xJNW?= =?iso-8859-2?q?pcJhz/tM0ADZgM6HdqA36EO3bRmWscBJabnZqs63mDZpMWDTLE0Z8L0xM5Mx?= =?iso-8859-2?q?9ygdjJmsbuhuRD8L30nqyxKtFE6Tmn/lMLDzSeb2tsou/lCkfQoljf3PDP5n?= =?iso-8859-2?q?tQK9wyY4z23kfETsULk+/BCgmURk2y7kwCAv/+g8TNcNS+SS9TtfgJMU2rM1?= =?iso-8859-2?q?zuCW6wSfTkWoRbpUpdB7QdakuUtuMNX8bfhEPzN3j2SqTVjvsWP090ocDdU9?= =?iso-8859-2?q?B6AMJzVSVQHWauqM9MFGjm5tOX34jm8rofo9V00nXNx8OfbwJcKC9fqUFwym?= =?iso-8859-2?q?f5gkMMVgjuZbwQAjtzoAysLskM/bh3UQiAfI48RK0P/zqDINz5njti5gAGNJ?= =?iso-8859-2?q?wk5MTvjZgtuEHgj5uwHRI5etO+jEmg91bQ7n7uBSGB05NXsLsRvwJPRq7BZs?= =?iso-8859-2?q?bUVMbss3nikwcPua63nb3XVr/o9sFSCbwyFs+wov0J0X5nszPOdHL1fLvFyv?= =?iso-8859-2?q?TvKTw5ceVqZzJgSfOa5f7hgQW7noEoj4KKJ7vRi7M3bn68tqm7RQpEruuc10?= =?iso-8859-2?q?8hj2igbn6Sgvs54Mccg/uNBaZdo8Q5hLkJom/Se3jlszH0vRYUB71BAXMnuN?= =?iso-8859-2?q?31/Tdl3TxKDN1vSKtWqnRnPDNr96OPkQ48dFazQt5mwgwT7zAjwt1/6Bgxzl?= =?iso-8859-2?q?tV357Cz/h83SYj1ONYoCnRTuJg+nw7rcUlKokqOiILEqyrNq0qS0ys02fgjJ?= =?iso-8859-2?q?sNNHryA8LR/mCD1vG8v5kPSyigamsTCd4dpMNHzXoKcdZHw8OD6Wj3Z+zUB2?= =?iso-8859-2?q?xDxQGNb8pLF4wcneKlg10CP4XfTVQUprmWzygIC2V3rCKiFg2w3CIuR1WDQg?= =?iso-8859-2?q?uzq9gZSRYBnsgNn1NCr0AZbkF9WpwdOaB6eEvFgT0NCpsw/OuxYyg18C96sK?= =?iso-8859-2?q?hO167ZSXswaWDRMIxCuKEEUgOxHCDhqhZE7JU/f90x0E1HuI1JTpVXgFOWSm?= =?iso-8859-2?q?nGNuun1DBmjvn9pORQ2FOFmdkw5iWplRD77QKrDImNZd0CGGU0Pg+1TpuqP0?= =?iso-8859-2?q?1vFVWC6a8Ot2gV5DzGnevpqUOvnqzPiBq/V9rWmNRb8+uaX+tqHzQG4zouk4?= =?iso-8859-2?q?plUsqaMfI4BjZRRxr+f0d1A6BulNInZD39UlBUaVZ6pBfbsL5JedrGgx+LxQ?= =?iso-8859-2?q?GgZO6QzXaeJy0tSya1cBQwGHbPA9VDiJxzbh3u8bEsA7m9Whd2WMBnDuH9Xa?= =?iso-8859-2?q?zPb91OmNl2F9YKhA0FYcT7pdVxy3PlR+Vhbn67MKQf2l4sBAoLVAr7yXqTAT?= =?iso-8859-2?q?NdLB5/ERDs6J9XZmND2NEuYjw/2lX8SdEv+CGBjPOMp4i6ZsZUq8GJGIa95A?= =?iso-8859-2?q?mmBcnuCqAJ1Y6lMkSK4U1JpByMbU+uhsgrSP1f0RCopm0V/CsfnE7N5W83U+?= =?iso-8859-2?q?FAFRk3gZYe3Rm5+RUK9u60hY6Ysue19wAev+vAciuV7MTEvHP0XBsMFoiZW0?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d6d5201-c634-40f1-c67b-08db5cbe664f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:21:43.8914 (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: 9g+Otc0KRZI/4CBO1n8VSnM69U2XrBqKfcSt1ptajiPTyFhik04sxwXwTmBO6OQ6ZBF9ZBEgQXJaaSy90D2DAx/zYITM1zP3Dw/noki/5jgXMXTF9IxGJZpCFpki6SzH X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB9477 Message-ID-Hash: EQTQD7CMOAV3XHPZ7L2JAWYM6DMSJUJG X-Message-ID-Hash: EQTQD7CMOAV3XHPZ7L2JAWYM6DMSJUJG 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.8 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 Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-core.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b48efc3a08d2..f57911e4e4d5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1781,25 +1781,7 @@ static void soc_check_tplg_fes(struct snd_soc_card *card) dai_link->platforms->name = component->name; /* convert non BE into BE */ - if (!dai_link->no_pcm) { - dai_link->no_pcm = 1; - - if (dai_link->dpcm_playback) - dev_warn(card->dev, - "invalid configuration, dailink %s has flags no_pcm=0 and dpcm_playback=1\n", - dai_link->name); - if (dai_link->dpcm_capture) - dev_warn(card->dev, - "invalid configuration, dailink %s has flags no_pcm=0 and dpcm_capture=1\n", - dai_link->name); - - /* convert normal link into DPCM one */ - if (!(dai_link->dpcm_playback || - dai_link->dpcm_capture)) { - dai_link->dpcm_playback = !dai_link->capture_only; - dai_link->dpcm_capture = !dai_link->playback_only; - } - } + dai_link->no_pcm = 1; /* * override any BE fixups From patchwork Thu May 25 01:21:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685668 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 5A97BC77B7E for ; Thu, 25 May 2023 05:03:53 +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 512121FC; Thu, 25 May 2023 07:03:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 512121FC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684991031; bh=YqJpV+wa+eh/1atWvJawt5Z+jctdtUxKrhSoOn5Ob/M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Ny4aQ3velDCO9GJLkMMpYQI3tC9L4iZYRorpTwEnzMtuE1XVXePWHPOgfl5whGxGu 95RSYkwcS7N3SuX0y8Q3Qlj4VBonQ47ZPDpnXGi9vmIvWHillRGzrPSvfvpQMCpoKl 2VxS8M6ef5JvMVoGLfwevUHAq4pSq48N9FPKOXTQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AAAC8F806BF; Thu, 25 May 2023 03:21:57 +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 EA0E2F806B3; Thu, 25 May 2023 03:21:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4B881F806BA; Thu, 25 May 2023 03:21:54 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on20708.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::708]) (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 446E5F806B3 for ; Thu, 25 May 2023 03:21:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 446E5F806B3 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=QRk3+liK ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G3o8ue3YXi3bnEGxV5QXVasJgHnpIsLjAhuF+5lug14cUoKV9ZyQqM+tdGBBoV4UWLJcIPq1o8jP5yeZC5xEjZI6JUgt10A8iVQ6PiiGOZd+yryT6vDcnw7fqXqG+jjZN8Zvt9QwiZ9OYtOpjxssLec7JiPG3bq4GYtk8mzTICnmtIDv25scFSa85frjuXnrgE0lH3Ji4JtsTekG/ZIxLVenF2fE5NHQkJY5M9s88lvNSExQ8MmeKP70Y+hcDhcEgW769GJlNM8jAXb0iynjFyd5AfQF51Omeb4SWWmrhD1LZ+uQI+w6Y1J+syxcVHHRuxGFwBXE5Az3UzPBbYb+Cw== 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=hVk8l+qY3eox022LwdgTxhzFUmt3NGvSxT+SY2a5z1c=; b=ZPrGRJHBlIAFC/pgBwMlmeq11MwJyFezg6IFCSmWL9L7iO/KMDPm1sIvowznHrQrCBL3f2WISUKCd9i8+h8SmeSZTz38oBWQN+WsQgL+QQ0BxCNY1jc85skzjq91Fq3xe11ahDBZH3WVPb7ENKUFu6s9E2Xb75b7qBEJu8XjRzFiSAEMrqXfSsF6ISpB1tCFgfR+FXO9CjFciB/TyimxftZP+meGwV34wKq1rrYHAizEZOLEUvDhf4EUKQ65B2eQIXX14FiGY1F6JfnSi6PDwqo4ju6uZMealTo67hq9w+VWWBBmnDdXB2Feu1+kBjYUWQFCPht9ELkOd8ig2USfwQ== 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=hVk8l+qY3eox022LwdgTxhzFUmt3NGvSxT+SY2a5z1c=; b=QRk3+liKfYmC29iVEzdhliP/Gn11vF9vSAnYVWtuYzKZvjRc4h8h9oTbjFYgIYCEox+2ZZIP+wFlJQZUncMXyrRe8F3T5OYBdXBYBnKPmlxlScf4r0Pr2MNSVZU3GNXWqt3D489NqxJsS3iUTI577076lKY5umzV+LQSVLr/kP4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB9477.jpnprd01.prod.outlook.com (2603:1096:400:19a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.14; Thu, 25 May 2023 01:21:50 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:21:50 +0000 Message-ID: <87353lgq8i.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: =?unknown-8bit?b?IkFtYWRldXN6IFPDhYJhd2nDhYRza2kiIDxhbWFkZXVzenguc2xh?= =?unknown-8bit?b?d2luc2tpQGxpbnV4LmludGVsLmNvbT4sICAiVXdlIEtsZWluZS1Lw7Zu?= =?unknown-8bit?b?aWciICA8dS5rbGVpbmUta29lbmlnQHBlbmd1dHJvbml4LmRlPiwgSmFy?= =?unknown-8bit?b?b3NsYXYgS3lzZWxhIDxwZXJleEBwZXJleC5jej4sIExpYW0gR2lyZHdv?= =?unknown-8bit?b?b2QgPGxnaXJkd29vZEBnbWFpbC5jb20+LCBNYXJrIEJyb3duIDxicm9v?= =?unknown-8bit?b?bmllQGtlcm5lbC5vcmc+LCBUYWthc2hpIEl3YWkgPHRpd2FpQHN1c2Uu?= =?unknown-8bit?b?Y29tPg==?= Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 19/21] ASoC: soc-topology.c: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:21:50 +0000 X-ClientProxiedBy: TYWPR01CA0048.jpnprd01.prod.outlook.com (2603:1096:400:17f::18) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB9477:EE_ X-MS-Office365-Filtering-Correlation-Id: 76124991-e3b2-4be6-1637-08db5cbe6a5f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EeqaSWkHfs2N2VvzZUnUDUFq9k5iCc9gljNpKydXOPEpxONzyoWzd5QSIwQRT7WFZxrF6fgsLLQZlhThodU0oQ4CfblYtwrQndaE9zfCfD7j0Hhwv5kCtf2587wzdmmyOssjYozK3GhgWWZeuLkAqB6TSL0X1mLPofsBUYIoyUg4BfclRt8+sSO6YEa465up5Vh1/xNMXSeIHpP3wnDtAbqDSmEqk+Xs6uuWotNRyWG/kQ6DPu/7d1T79K9e1ad2Df2F/xI+BVrgGpWJxPEP3Z0hOyEdsqX7zArCCR+LiNZRRTL6yGLk3rvMZ6fTFCnC1ChHbNo4ld2TUt958KweDmd9Gxgr97k3C4VKZSfGGidRCk8QdnkkPj9wmMEZMOwsnsVFcQX5z5WcYX3A91oZ60wdpGkIlJHi0ZSAIgymAiBeCwFTGuFK63MNCMtaoxAfmrN+XxA2ZeuANQMPlgNPxwzstingDPylqWmpA7EI6R+9UuRH3Fm0DQ5B18xO2uAIyHuzH0NAfppwZSfuy/phhBz4Hf+EZgPemMPw4TZ0SdbmEAeE6S6+FAaYIcYJj5Xg8kNVqrLxL1akhy0QHj0ZtuRksUhm4srAJDLObcU77fnuSrPZRgW34JCSIfHP7r03 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199021)(38100700002)(38350700002)(6486002)(2906002)(66946007)(66476007)(4326008)(8936002)(8676002)(41300700001)(66556008)(316002)(36756003)(5660300002)(478600001)(2616005)(52116002)(110136005)(186003)(6512007)(83380400001)(86362001)(26005)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J7PT+i3XY4HL97RWAdOx/TCxVBXqVQ/ghjJaUNa1cFvsXRJdn38hXj5ejScGP1BrVz/jGzttfRbr3YQzoiptih2Ln3dQsShJBWbzLtdrygSJtAF0WmBJeHNt3aSg6TynP5Jk8k3qTO7Uim0eN7W/RU7VBhe9VEaXUxocuycFtEF3IWtUmNofgPCqpo92WWy40givtWRsZlrZ6NAEHKTBMjvJwsXySZTkcZReM4LmGtML7Sj2TMQ8icm+9ebUcZV/7Mr0hESfvjTFQroli5N9c0pLU3oQpBWXRy3DxM9aygRmQwkGqRjiQtxngwn69dnUanbf2kJ/BIfa/1rCQrFO7titnp09recpYfRU2HEJJSPosQCZfAVfvoxCliWTcbTkiB4/zPemcMimKDhEwvVG4MjDunXu3KnDEScPPYUoAeQrk6J98VcwEuvTDosApE926ncmSmoeMlSwmgtEOHT5LMw222L6DPiFll08JrQKtkXc1OVuHDWTm5E1nJlNaQvVOJZ+ukMW9pyRIH0iSWq4NQGLdKP1+wmXDFSUU0qfhK4zlOQ/4gOc+cfjElXaV5dBllcqwNKEsOWNZ747uDMVPjOq/NV9NYofJzg9Hw14a8hG5k2qrNROr/SJbbOt1W4AvM6I7ZyEv3655qQCRSMkBdMbAcm6dFaG/xAstwIhmHGoJ9WtrB3AftLFctqb1T7zbfJmFFnA1q1y1yj2jW45it1SdfohoUV+YgjUhxg7jALMAwwRw67yhQfA++sEXk0vbz84GZhVVGlEZDdUhB8Lg6T7x3yUmAeMSYFkzNNXaZh1W2VcJwTfZnQHbUeCEnRZ+mvksnDW6GksdYTjwuBe6wSJwvAhu4VQfEMgGQTeyk9PCk1Onu+5HDPMmQU0LZlH8BhxqMTqL/2DoH4l/0eJgUTGkYKSUzvPiYLlfUm5SVqP88oQ7c3j+iYhRjxCK1+xiaiAmERR8VL9ndQomCIhq4XhoDw2HZcvJ/3xrXeiVKk7maZqIHIcWkMJ8f8zPw9wVHhR8sxkSPr4SkBLP4h5oGGbBJlFK8FDrF0EKwfi2Ozk31C6OxTmR0lDsfQ95wO+muJqc1UyjBySfeoA+FSrVJSRooq40XMaehf8xryaUEawsyVegjR23b1DC9ENS0yHAthZgvtVpZ2R2biObec7kYJ1gpXuiRsFrJ8fGKX0WzFgIHkEZDmU7nORZ+bf2EKfg5N2jxnGB2ZJ12LQbWG/66wVbBwnuNCudbShcp9OC38pUpAwVgDti4G/WtgHj8fNRrrzVVqoSAmU5zWlYpDm9y4zqPPebOjOabmehM+V6SvZlJwBl1gCX8rU4A1QxIl+WYzgGp0gMowu/2gCQK8QzBRNTbIUpfMXto91BQt7NJcetdWJE/TAQeTAiDOGM4rJckVd29bKv8ePEyDctwZ3VxwDOIRal9nlr7lKOvt66gDwm5BTfIcAOm6sFb7PIeuvwYNUE7nXe3aRoHv7WPwIW0GA3W0x13Y5vyQXvFzflR71z0DLYMtFnVVJ0hxO2nsm9//XEQSTex3Vqr+Dj4DstiSip6RJVN29FFMr1TYFaD2PW970D5aGirGjBNAnIjZYRU02FID3K5rOBik8sj5+zarfMKuSZEdw9CU8XfSIMQ0= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76124991-e3b2-4be6-1637-08db5cbe6a5f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:21:50.2091 (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: XB+HEiQ9Z2nvndsKCPlkFev3h5/LWORGTgQmOsAzPcIUDWj2d7BM+Sy1wbWbTU1hIOqBUBfk9RiScj8ey0hkxZFKqee2cK3PucZSA/Y+il1VwNkbsPz+SaSyi2flKji8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB9477 Message-ID-Hash: O3NVWFPGGFV25JMI5JJKIDMRPOSNLEHX X-Message-ID-Hash: O3NVWFPGGFV25JMI5JJKIDMRPOSNLEHX 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.8 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/soc-topology-test.c | 2 -- sound/soc/soc-topology.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/soc-topology-test.c b/sound/soc/soc-topology-test.c index 2cd3540cec04..703a366e0abe 100644 --- a/sound/soc/soc-topology-test.c +++ b/sound/soc/soc-topology-test.c @@ -94,8 +94,6 @@ static struct snd_soc_dai_link kunit_dai_links[] = { .nonatomic = 1, .dynamic = 1, .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST}, - .dpcm_playback = 1, - .dpcm_capture = 1, SND_SOC_DAILINK_REG(dummy, dummy, platform), }, }; diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 47ab5cf99497..cc1f08f2f17b 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1735,8 +1735,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, /* enable DPCM */ link->dynamic = 1; link->ignore_pmdown_time = 1; - link->dpcm_playback = le32_to_cpu(pcm->playback); - link->dpcm_capture = le32_to_cpu(pcm->capture); + link->playback_only = le32_to_cpu(pcm->playback) && !le32_to_cpu(pcm->capture); + link->capture_only = le32_to_cpu(pcm->capture) && !le32_to_cpu(pcm->playback); if (pcm->flag_mask) set_link_flags(link, le32_to_cpu(pcm->flag_mask), From patchwork Thu May 25 01:21:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685671 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 227BAC77B7A for ; Thu, 25 May 2023 05:02:17 +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 B96141FE; Thu, 25 May 2023 07:01:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B96141FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990934; bh=6xB7EQYzattNpDgPEkkaA5Rf27rpG9qFS5ykOi1y318=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=lMrPoBu1E9TdPv9aYQINfI0ZkYStLJ6vu7fabW1J5WpX1lukhWNscR6rOJzqUY3eH DB/w7qUrE/G/TrnrZH2Ze6lt0GuYzinyIkpNR/GGbxphLsV9y937Tsw3aIVsB3txrj CbPA8AHAn3VMaj0p4WvCBLrVhV4IRXtfD0TK1qyQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C6140F806D3; Thu, 25 May 2023 03:22:09 +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 E8199F806CB; Thu, 25 May 2023 03:22:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4FFE6F806D4; Thu, 25 May 2023 03:22:05 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2071b.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::71b]) (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 24D77F806CE for ; Thu, 25 May 2023 03:22:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 24D77F806CE 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=HOBBI0FV ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NSxTeE2DszA9R2AwoQXiQtZ+OsB+meO3jiEVOVCGUlhAgqIPn7NJq4pjupmxkESCvw5L/R20XeiOI0h79PG8NGlWE+lvfXttygxUV0ldBb2oUTIB1utSJ1l9TqHrpvjuAc/MnIqyAx1qelB+ceraJ9mypS8jgDmiNPhf+3rfJ1/v/LFOZ1CrVf/B+3v1Q7sSZPBk7Xj2+VJUgBErwfK33breun3/967TE23pWHAxX/6Ivaao8ZBNi5EcPQdrAI8qDNlTyzuyd3VaTpO+eAUjX04uEDDf0PwvPnNRQ3netMAwLcyhddF/y/jXHg6F9cR6Z2tnXBWMAva06WmKeHV4+g== 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=UEa9MSp/pEhMaa4tNifWlD+mJo+k1OHTpkFn9Br8cNM=; b=a/VULgEK/v9RK4Z0JyFqWKdz7EKQKvaa2CCqQYjE8z+AYtCvo1lv7mrQMTl+ekBOiOOPSuK2UwyFe8zMvPGnytabhf0S0lRLmZbcP6+v0zwotx0p7twij8RPLKJTLSIgY43OJidCRiPUngk8wWJlVwiO4wwQGGoI6O57qKD3x215FFj2y+iN3D9pbKNYl0aq/CvB3xDQ6T4tF15WN8gwb2EeoLGVeCPxh+KWXtS8KuuPiTP9UjtNrM1FsZbTp8iA4+Ai0UDemX2gANwfrPLj6bJMGFG4kspTP/G+jLlwOjUAlBPexGf1msFj/lZsY//hNIdMXCHKBGq2Thv+2cRHRA== 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=UEa9MSp/pEhMaa4tNifWlD+mJo+k1OHTpkFn9Br8cNM=; b=HOBBI0FVXk/LkJIUIdx4J8NFHkV6t4zd3ieEdyVFnlWARo6SSxNT3mVhEifNtEvFi3xJSDhHob1mpwh6T15PspEcd9x3rncrTH/wtzVe8gGfgPb2Cj0r4gpalKBreCh+gFQHm1xwvXG1/1Po7MxF7AQIOz2/+JS1uMigh6EpyT4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB9477.jpnprd01.prod.outlook.com (2603:1096:400:19a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.14; Thu, 25 May 2023 01:21:56 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:21:56 +0000 Message-ID: <871qj5gq8c.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai , Vinod Koul Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 20/21] ASoC: soc-compress.c: replace dpcm_playback/capture to playback/capture_only User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:21:55 +0000 X-ClientProxiedBy: TYWP286CA0023.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:262::10) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB9477:EE_ X-MS-Office365-Filtering-Correlation-Id: f8bdce48-0bfa-47a1-7498-08db5cbe6dd3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vL5Fm9CzMITDKTqV/wHdbq0ZTrjqw/PHb8MTJABpUGB3MfYGktd9R9g46pAumcfdgxnIUt6YrCQXTM7ijkF/h/hpEoDgCqh1yUp84/uNSZriWOD8SIwyTyu7VANJscpD93xd0nvrE4xOAozSS8vUs6OAMihN/j80UU42tIIFc1+46+Zw1iuLQkb5eRJBa9+xGTe3rxG1twIzwHs3Vb9nRtSihKxKYvBOhVbmJ1+m4XC/Z9Q669WfpZhbtGNIisgppA4u8tECDzIvmxum5GyvFI5vSDSfLVPg0XYPtfY30XIeqXny9vRs4DscNPjjEIqjOa/laKCO4QYqiMJGXT5v8tS+rmf2UdQYPAyrYRQFicdxaaX8lEqyizoYQySwX4dh6c/JMr3HZSpGsQG3ikhyPrAFgmlJORSusyIzLaBcrOzvglqeuO7M0bEPDvSPeNk6PWVLj1Re6YXxZQfOMal3B0LVE7YhtweYsqcmvX7cbGzViHzn/GqsSiCrjJwyjKnLLsHNR42MmdMZAuJp562bUxDF6IrIu/6tbkD8VLNuUD66p2Lw0R3kscFYUWAlom3hJ3nDUWKWU0lG4VCTxA0XtAToKzLgtj21x2uWu/TRoI+NNIH3cF5F5ISkYyEQpvil X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199021)(38100700002)(38350700002)(6486002)(2906002)(66946007)(66476007)(4326008)(8936002)(8676002)(41300700001)(66556008)(316002)(36756003)(5660300002)(478600001)(2616005)(52116002)(110136005)(186003)(6512007)(83380400001)(86362001)(26005)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?uP5oI4IpvRzD5UAm1P4HqOG?= =?iso-8859-2?q?WsCIWq0TWj5xrAKX4MJko+erAVC1Gyj5tIYRlp05euLG9mgMyMf3hBJN6KcC?= =?iso-8859-2?q?2XBrhPdBCWvzPYWfJOU09j/qL6jHLqIRep2pl4NuwBHJj7/xt1clD06CWtv8?= =?iso-8859-2?q?Doctruva+TXt3BgwVbPbWPezOf9/6QmqZmQ/AYoS3GcN9l6otLcaaEj8faBP?= =?iso-8859-2?q?rCJB3qSLBvb6lvreStlLS9i+AE6Iz4a8ZxIpESdzD4Zn26ADjlBm8L4swjsq?= =?iso-8859-2?q?IxCwTN7ZE3vZh1w6LiTtAIAzRII4RSVYxEeSM3y5e8rgXkoVzy0LgWZR5jo5?= =?iso-8859-2?q?Fdi7dHCCcGiieQUxhiSb+slrDO23AHb15cLq9UvrwyEHPWiVyOb1gzP67s4E?= =?iso-8859-2?q?DcYOfv9Yy9B6hO12HL0NBgYtO7w+xGECdJ9GsCGglromKqc+AgFUYbNVanDF?= =?iso-8859-2?q?4h9gMxmp8Op1pc56n4zNsJZfu1Sri8E/3g9hl7ZWl9sZBMRFmmBzcm4UdlzU?= =?iso-8859-2?q?i5C5RX3c35YmNGRzuRUtM2usY2BBVw6K0mFviLRQw2UtXEccszbY6a3PYVqB?= =?iso-8859-2?q?dpqWEAL8DxcRne2rpQydQV9XTzkkJ+27eHm4GiFyaDqs8r44pGOtXEk4NNWF?= =?iso-8859-2?q?TfoBNNHzfTI69yGjNe9bo/bonuTFTc89fTjaR81J376tHaskmR2o5pZK6RIo?= =?iso-8859-2?q?2ZsFfRCMWrVWWBlLKKuciMbKbqUsBKP2d623wvWQZS0cSdtYQKwiwLYFdjaQ?= =?iso-8859-2?q?NhAXTxegqeBMTYVOH7JWQmseS88K0pbou1ZKv+vL4Rf5AwXZ0P/Lv3H1cQnp?= =?iso-8859-2?q?I9BplT7aNF8MeNY+wxDOc397tpbjgMUiMGSsq0vruKz+l4pZxnILXXvYel9p?= =?iso-8859-2?q?npFl0MlOgerb/sgN4dKZpk0IjVpOxacpHDRPRsd7oLOIbX68z3gJ0VbiTBE5?= =?iso-8859-2?q?rxUcLpm1LrOmCxP+7lrA/aXJjQm5SyY9KdV42W1EhsjXhYFVxIo2lJtZjuGD?= =?iso-8859-2?q?1pwuJ+ZblS3fQrj8k8qMEBSnFukdbip+4KoSVv3fRlnZW6BYCQ8diICr6i2D?= =?iso-8859-2?q?dF2E2Xrrc+uz0SwsQlL92AYhLPbgHDWI6iVfT7/8tJsB1tMyiq1xr5yNJtVf?= =?iso-8859-2?q?iKsW3k/HHpQ92JnQEnySb1xxRH5ewZf0fADfCcwnUoNfE3PgcxBkqj+eNrT+?= =?iso-8859-2?q?8p36glwUhPBBUhMG1q6xKT1fyN/s/lYYjABUjDOsVNJoQlv2WJRjGjn87Vqx?= =?iso-8859-2?q?L0WVnoQ6kinnUIiWw+8GU9N4yalQugdA3EX8CP74e7vGdAKLeqmYKJpQ88nO?= =?iso-8859-2?q?Z2NGiifdmTpkipX2F1IQglTN3s7+AeEh6iT2emnAjwNzA6fRfBdbU0wArC6f?= =?iso-8859-2?q?ZdE5iqdpd2kJZb9nsxGq+ybL6Pf7sAf5uP/dqMtkNZx/e4/ljAVldgge0Hk5?= =?iso-8859-2?q?OL/oU/AstZ24GZxJB5HkblvQUw5ouulI4JNrs5jGobkBULXctxZQbdqN3F01?= =?iso-8859-2?q?fjawBXnNkkjhhghOfkZ1mtZnTi3WhxYtzVV7h/fTYhN0lGG9S/6zvfbOSrcz?= =?iso-8859-2?q?llooBb9nAP+5e5dJsbE0Y7k11q4jtbqvrWexr3PVGBhm74lvhWXGui2AxLjW?= =?iso-8859-2?q?wJIU0CEU47Ak7ICUmxAaRI48mMdBqKqN3611+uqw0HbbL4xWakLTsx3rDDSs?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8bdce48-0bfa-47a1-7498-08db5cbe6dd3 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:21:56.3017 (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: XQJRV0BJIuHZ6Cf/79hHbIKDveKk7Sy9FHJPPnxm+rPXApAoPny0S/oxdh/diE52Yqr8cQN8whXf/2WolBhop/jE+1jW/4nb7CSM6GpZdi6iFGTz2BZoAMM4CyxrdxVu X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB9477 Message-ID-Hash: B6TRXKDD2WYK4M7HH4JANM3PNZTGCCTA X-Message-ID-Hash: B6TRXKDD2WYK4M7HH4JANM3PNZTGCCTA 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.8 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 Reviewed-by: Amadeusz Sławiński --- sound/soc/soc-compress.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index d8715db5e415..cf3cab7a648f 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -602,12 +602,15 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) return -ENOMEM; if (rtd->dai_link->dynamic) { + int playback = !rtd->dai_link->capture_only; + int capture = !rtd->dai_link->playback_only; + snprintf(new_name, sizeof(new_name), "(%s)", rtd->dai_link->stream_name); + ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, - rtd->dai_link->dpcm_playback, - rtd->dai_link->dpcm_capture, &be_pcm); + playback, capture, &be_pcm); if (ret < 0) { dev_err(rtd->card->dev, "Compress ASoC: can't create compressed for %s: %d\n", @@ -620,9 +623,9 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) rtd->pcm = be_pcm; rtd->fe_compr = 1; - if (rtd->dai_link->dpcm_playback) + if (playback) be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd; - if (rtd->dai_link->dpcm_capture) + if (capture) be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd; memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops)); } else { From patchwork Thu May 25 01:22:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 685674 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 05CD8C77B7E for ; Thu, 25 May 2023 05:00:45 +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 BFBD1847; Thu, 25 May 2023 06:59:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BFBD1847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684990838; bh=duiazLdKQ9UAhKAyTc9nQ3DMycjfjr3bIsPwJR+Z9rs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UItN/UZZuNVvciKenNbwadafiB06IIBE0F5TLhGG0p+zsKi9tNVIeNmkPfXVT398l lwp83jTkrAjl+DNNe3x0CDWXJsArv5i0a7c0318eXWLMU41Fj1cFOwbPxafVKjGiJE 7TNTpWglSBm3CX2ijBVTZ2PFvhznQBzIFpRmnSaI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 97405F806DC; Thu, 25 May 2023 03:22:12 +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 E46CBF806DA; Thu, 25 May 2023 03:22:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2ED29F806D3; Thu, 25 May 2023 03:22:06 +0200 (CEST) Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2071b.outbound.protection.outlook.com [IPv6:2a01:111:f403:7010::71b]) (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 BFF7CF806CB for ; Thu, 25 May 2023 03:22:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BFF7CF806CB 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=p+T/3vV+ ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oTQdY3g0GQTY6NeL0GL5BlkdM+DC3c3gDGGROGwtZ9JYa4TNE6i7JlvL2Dh/rts6oII7RmdzjQynDmJDtU7N5Bl8LehO9skjZ7X1vZAsO5uOzbmpEIG4nhnb/HuUlfkj2woqN/PVrC9xfpxvPr1JZS6vlmV1thnkYuuu8T025p3jxAVefl+AGWwk0M/AuQDfMOT7gLHCd9qlLF6Aj+1uxGElBPae7h0bERS+EIoSRmCBm2XDW+EjkwQmrnSsl99Cn1uMtaRiXoibJxsMAAG6P3eO/25VObPLqc0wkBFoRZQ+WZG8RkgG/9IzQLUyKjTG2XGBux/uswuf3hxdgU/8Yg== 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=hVwkbycOqSeBkUtaCE2Iku2rQfjuG4f8jQU05ci+3Q4=; b=AgYLXvnYKp24vVG2ID5box1cQ+52boA/7rZpXwYWkhSRLJzm+mQdS+RzWoQF+te2KHA2PLJm8kDxiPBGvXJPsW+VeqXwKGKgfzfTS8EDQyIVclyMQg1zJagQjr09WjnxY/+4RPxGUmq1IdW5qxoR71wu9s+WH7VgK+POVAJ47KHjrW2r3xn10maJL7Vit+WDykqTVawGrSLHqjW4+xfTZd3gjouk+Jy2VDCaGfDUYiSli6uDh5KbARgCj7wJBQIej+Qanm4vKbx2MxAgRii2nWE7pVhJtdF06ucf6X6vOEIIQUXWrCupUkzCYzQUNY8zeGPf+xRzqyXPyyqQuEi6ew== 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=hVwkbycOqSeBkUtaCE2Iku2rQfjuG4f8jQU05ci+3Q4=; b=p+T/3vV+/farRDDGv7/MKFP4X7eDSlSQGgkOrkVhNMKT9bCqfs2q+/nE28Rlvh43OUfn4Oc/0y+Eq4wINlzL4ZIs15uIRrUUaMgjedpX2ThBlM7uBTpe6Xp3/DMAb6WjELi8LW+NzfEGQufFishfU1ExUCduqFsSUjZpYM1L49A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) by TYWPR01MB9477.jpnprd01.prod.outlook.com (2603:1096:400:19a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.14; Thu, 25 May 2023 01:22:02 +0000 Received: from TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7]) by TYCPR01MB8440.jpnprd01.prod.outlook.com ([fe80::6c36:5ff9:24c9:e4f7%6]) with mapi id 15.20.6433.016; Thu, 25 May 2023 01:22:02 +0000 Message-ID: <87zg5tfbnq.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH v2 21/21] ASoC: soc-pcm.c: remove dpcm_playback/capture User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> References: <87ttw1gqgn.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 25 May 2023 01:22:01 +0000 X-ClientProxiedBy: TYWPR01CA0038.jpnprd01.prod.outlook.com (2603:1096:400:17f::8) To TYCPR01MB8440.jpnprd01.prod.outlook.com (2603:1096:400:15d::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB8440:EE_|TYWPR01MB9477:EE_ X-MS-Office365-Filtering-Correlation-Id: c9525e18-7cba-45c4-f6a6-08db5cbe716d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OpaIv+J1iPisasuPVBsdPZ52uKLKqFZ3XYzgSiwnhCMdK85ljiGNNqFaGQGYUev2P5DMhrDt4r0xXIL+IzyVTxM7Mg8NbYXzwbU0mnQ5FXMCH74/eJDRXXBrBkUi2VZESYxDSgehez6JaFXYaLWCMn9L8Y4EwfnUMHx2fAjPBPw7cAVColuB6L+YuAjV7sf/HgFEosUZnKpR4xFezJ2tgzW87PQeCYU4lAdHi0sW8bccfYmslVOh/m02It/9fjDn+oqFHpw3WkL3vatRJRtBaUXpgY9GeM4m8E4n+8EPnnl2Q8g+OVccapeVT3hdZhS5vRjpB2vhq8GGmVDjeiSGlk05XR4zevbQfW+0I+Oe8OpqagQC2mZ25uYsOeYstP7bRwAHhfegEEXoDYhe3jHAyxPTsg7/3SgSZhZMoDfKB62dlIiYQZyKUiDhulZoA7QCdRAdr46LCij1yP0nnHIFzuzRN0tVwHluVqkyVn4vo4hAMICu7/nMXDmnPpN2E4gP3o7D3rhtNtL9ux0N1Bb2+268l+hdjshZIxy+bkjrLSBfxxhweX+Ah0GzRzE9S4wo2rLtBU3i75kGtfUAUU+aTLWF1Xxb/zEWJBKYWsAjEe1FYXkL6mie2omyCAhL1dzp X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB8440.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199021)(38100700002)(38350700002)(6486002)(2906002)(66946007)(66476007)(4326008)(8936002)(8676002)(41300700001)(66556008)(316002)(36756003)(5660300002)(478600001)(2616005)(52116002)(110136005)(186003)(6512007)(83380400001)(86362001)(26005)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?OlnVPdWiliI2D2ssSvArWTb?= =?iso-8859-2?q?0UtlTDz6cNddoBn7Jj48FBXqNjuhn616/AKrBTXIuTKQRYsLGZ3zJDCZixlY?= =?iso-8859-2?q?abRc681qJlwYxCoEzs9FSUNMVAsVZBsZGJSMriaF81mOREKrWlPzZ/gxHfbU?= =?iso-8859-2?q?sAAueCIYQVXYJydtAJl6KYyqbUiaF7rk/CNYvB3FCGqEn/fMXlcpvoPppUsZ?= =?iso-8859-2?q?gRWnhUb25puap/daVeVdHiUJ/D74t3gQo62ysRfvUmSxTGunXMSxHPAty3Xb?= =?iso-8859-2?q?9hCLdah4ZiDMlfhkkA6CqS3FHEgxlvwNt6UsZ9sxkAisw7AhTUum+4PW+HdK?= =?iso-8859-2?q?mHRwvSfD1qNPTeJrdQplxzkwYWWjfnmfEWQMfuqBYG2jJ0p/p40XZW7iAP2N?= =?iso-8859-2?q?GtILi/AYOZKexD2I/8pwcR3mPon7nj321NvEAUe0sRISMSjKOBxvVZnz98WJ?= =?iso-8859-2?q?XQ/wAhreOYwWnczKgutDeBtngAeqDxf2dLUS9ALv/IaOYw9/61w10evu06Uh?= =?iso-8859-2?q?XMFVvf5T4jAuxrUhuSPre5qa3B9VY5TKM4Jgs1tg38NKlVMUVXu36kGqeNsu?= =?iso-8859-2?q?dK9wp2Ihr8LkFi5HwQALfhSR25Ek7qKCaoLpBlA/K3ln0ZSvga6opr9ii7JG?= =?iso-8859-2?q?kwIeAGApu9qEn8seG8/sh0LFOfEvOLlPB0+WHUcHeMURAnmdT57sQadbrQdc?= =?iso-8859-2?q?MCopYVm+8pwZ5LTHFuVgBcM9JxsjDeZ4+ZE0wwTY28oz7mkX2Ym+mZIBJTYL?= =?iso-8859-2?q?Kuqtakp439aV8eqAYp7iyjYL/XVpR7Qe/CkrPrwZ/K5BwtGD0Y8LFns24Sv2?= =?iso-8859-2?q?o12yiSejVpOJf7DMGpAC6nPCiorPoDJ4URXMSajjhaiqKHqCkcyS14VjiMTm?= =?iso-8859-2?q?MihQgB1r2ejPTdgiH5AGVvrdV47zlrX1xxbBmcQh+BEfWTczwql6mLXXdwGL?= =?iso-8859-2?q?wBhMOuS3BxN929C70r8q1MjPATuZCMaAK0QiQ01IsgF7F04c0VbHn0/0OLyq?= =?iso-8859-2?q?9+zW8v0AGaCWkjLJct6d9MqHOzxpwWpYnOT/UeCXPLAmXjN4Ff7+SwLKLThA?= =?iso-8859-2?q?M3YXpNUUyu+mxA8YFthzqvwIi/hLcxHfGKNFZ+Ic1YZlRlg7h8bhfuloIm5t?= =?iso-8859-2?q?Blak+ESpNd9PCjmCFJw5ROLWSVWKyUO71+c5OyY76Qw8kqyjnhM6Ny6m1PXq?= =?iso-8859-2?q?xoqISHwi5DhbBwAjAdFXigVZFEY0QjK/FzSGSOKW3BZDYcP/9tBYs4L1FwEa?= =?iso-8859-2?q?aEJT0rf/BIa+41EFZ9W6HtZ9KsjRo6OH6P3C+yc9D5b7M0uNqRuCGz96Ihoc?= =?iso-8859-2?q?sVvxoVj+QQLzON75U39zIMjFQkFMrSUjBHleQfod7rMrYnFvcKZE5R95Azhl?= =?iso-8859-2?q?DAaiMr2tDV1go/ilXGSGm7DNvMtxbtgY8gw6XQXs7rOkpfHKegB+0S+fJ3TN?= =?iso-8859-2?q?FuiCbYlFsOdq1OU64ovGxAe12tpSSkbL7WAlmdMfAQaIEO8TuzC7EtpafzVU?= =?iso-8859-2?q?e6oeSNdmacW5zt3WYIFmkC1uNXQJcpDi7sZ8NB/FYG4JSNbVTc66Ujox0uPZ?= =?iso-8859-2?q?vEWUcov7hCXoYe3u7YV+OC9VioMEkqlsCcg56WBWESTg7qyeAttGo3VgwP8L?= =?iso-8859-2?q?wNIaI2FCBONtjY5PhFWU8WlfSVb5PlSJWG3XMwB71VbtnyiV4AdCie28A7TU?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9525e18-7cba-45c4-f6a6-08db5cbe716d X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8440.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 01:22:02.0639 (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: ZmeuKqtcYpFe/Dr+AmqoRsr7b0EsDFpQSREF5gD2dg6aVCtBZkIUpv9Ulj9+soNbu/ISRIvK+OARpxh/fOAdMDuJFo1E7WHVEH93sLCxTNl9plVz55RohejRu2zpE5+e X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB9477 Message-ID-Hash: EKVOAMVUQIH7YWDRNZ4OEVYUXVZS62VE X-Message-ID-Hash: EKVOAMVUQIH7YWDRNZ4OEVYUXVZS62VE 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.8 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: No driver is using dpcm_playback/capture, let's remove these. Signed-off-by: Kuninori Morimoto Reviewed-by: Amadeusz Sławiński --- include/sound/soc.h | 4 ---- sound/soc/soc-pcm.c | 6 ------ 2 files changed, 10 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 533e553a343f..b98f49037d71 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -729,10 +729,6 @@ struct snd_soc_dai_link { /* This DAI link can route to other DAI links at runtime (Frontend)*/ unsigned int dynamic:1; - /* DPCM capture and Playback support */ - unsigned int dpcm_capture:1; - unsigned int dpcm_playback:1; - /* DPCM used FE & BE merged format */ unsigned int dpcm_merged_format:1; /* DPCM used FE & BE merged channel */ diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index b1288553f6f6..db430afade50 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2757,12 +2757,6 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, cpu_playback = SNDRV_PCM_STREAM_CAPTURE; } - /* REMOVE ME */ - if (dai_link->dpcm_playback && !dai_link->dpcm_capture) - dai_link->playback_only = 1; - if (!dai_link->dpcm_playback && dai_link->dpcm_capture) - dai_link->capture_only = 1; - for_each_rtd_cpu_dais(rtd, i, cpu_dai) { codec_dai = asoc_rtd_to_codec(rtd, i); /* get paired codec */