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/xvObcJk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Sz0et27GqHjlxBx8dmtR30mPC892AVbYTE= 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);