From patchwork Thu Apr 18 04:15:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13634124 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2046.outbound.protection.outlook.com [40.107.113.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0BCC54743; Thu, 18 Apr 2024 04:15:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713413733; cv=fail; b=RHlpLY7wvTeEQPHK5LKSd7EmZQ47ypyycCpMYBOnTX2eWpOnahWJf80mJ7xA1q5mSkGKfxC6reZXGXI+h7hpaNe/XEa6IAGjZpLBgp1X9IznxP68IvwABa+EjGXDFZ9ALlfRXSK8T2LfbzsShywIQVuXB6G32yxD9kdXZcOZcl8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713413733; c=relaxed/simple; bh=gpSpG+U0cb9Mygwo566jjTkKPkKgSqqIclxxbdi6BFI=; h=Message-ID:To:In-Reply-To:References:From:Subject:Content-Type: Date:MIME-Version; b=neRav9BXP5/TYCr/j6nvGMFrbuKC4mTAQCXJiGas0q+AYWgYt8jLXEyFkIQJYVsxVkigsWUlzwIpljnUxWAwbo8UM8UOPPUss/eGpkgCPqIoPJu9PSrsQJauEygwLbNrFE1uvoW1Y27GQJjwTMk/yb9hVpY2JG0kcrqJ4gsgvKk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=LkHQnqkF; arc=fail smtp.client-ip=40.107.113.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="LkHQnqkF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Am0N7inAAgVWo6cc4cUQeB6W+tRewQJuMoDGB7BF0VAbaTsgUr1fZUN82HqD/NRux6kaR7YpUX4T67YKQ2jb+q5gAfxnt6eLfWs4BE96q7qp+0jr4PJ4z13Zu66SzGXYH8FlmZZ0cOrCryLZvKDesSDFGPooUCzt2cGAduct7WJ/7omAJ14cc60jmkD1DeKSCj34xO2SMIqZ7ZFl82FaMJ/+/0jlGqrlBgINygZbU3NkTaomSD4vRhYAeNaj2yow+KCChMtJwHduqpDFSP8mrDfzmzEvRMh1UVpnsXgNnMEBNde0VXYY5jX7FjDCC6cSBPPYoH0TYAKYimr0ordZhA== 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=M32q7kxBHy+CNmGy5HKB6MulJCXyj/IoK53451u9JxA=; b=OlKnbgDvD2Ty49M3vcaZxanHTheSc6dzLvHi33JjUu6een7pQduvkRmG5ApBpD8sAjfOu3UGMCkD/biDyjmoR7ZIaPt58zV7R0SVY8+NyXqC0qCl7YfgWKsuwpHKRhTqDgqu6SLpXxnWesj8iVNLwyNx9UGDRi1MST0iDngk7z3ItqpGoE9kuU2D2kx/v7BzjPdTvbnUdw5H8sEFTmOHPNgpz8W23EmxVIt0Lzh51NR7Nu1NlXRCILXa0thD9dtfT++SHYDsSc9nK5u2dOA7HXMQoDz+c5/bSGlECNIWNCNQc4xKfwuBABpPSTzf2/VTiKCUIDt83pal+GLEXlnAhA== 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=M32q7kxBHy+CNmGy5HKB6MulJCXyj/IoK53451u9JxA=; b=LkHQnqkFTmnlKOUIL4EUADHdMSaxV/0VJn49A2Ak2Yulwbw0eEHBqUM6wSpDwVsH5OL1L1GTnwZd+K6VHY+h5P/5ufFUn5P4buoGpxncWXzvZMcNiBtB0YQpEh5AILwfH3iyXd3MyR+hNJeaNfMBtZr1k8udPOW3MJTBuDr5nn4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by OSAPR01MB7397.jpnprd01.prod.outlook.com (2603:1096:604:142::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.39; Thu, 18 Apr 2024 04:15:28 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::131e:55c0:a4a0:713b]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::131e:55c0:a4a0:713b%7]) with mapi id 15.20.7472.037; Thu, 18 Apr 2024 04:15:28 +0000 Message-ID: <87mspr71cw.wl-kuninori.morimoto.gx@renesas.com> To: =?iso-8859-2?q?=22Amadeusz_S=B3awi=F1ski=22?= , Alexandre Belloni , Alper Nebi Yasak , AngeloGioacchino Del Regno , Banajit Goswami , Bard Liao , Brent Lu , Cezary Rojewski , Charles Keepax , Claudiu Beznea , Cristian Ciocaltea , Daniel Baluta , Hans de Goede , Jaroslav Kysela , Jerome Brunet , Jiawei Wang , Jonathan Corbet , Kai Vehmanen , Kevin Hilman , Liam Girdwood , Mark Brown , Maso Huang , Matthias Brugger , Neil Armstrong , Nicolas Ferre , Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Sascha Hauer , Shawn Guo , Shengjiu Wang , Srinivas Kandagatla , Sylwester Nawrocki , Takashi Iwai , Vinod Koul , Xiubo Li , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-doc@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87h6fz8g3u.wl-kuninori.morimoto.gx@renesas.com> References: <87h6fz8g3u.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 21/23] ASoC: generic: Replace playback/capture_only to playback/capture_assertion Date: Thu, 18 Apr 2024 04:15:27 +0000 X-ClientProxiedBy: TYCP301CA0039.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:380::16) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OSAPR01MB7397:EE_ X-MS-Office365-Filtering-Correlation-Id: 26e8068f-3b2f-425f-c1a9-08dc5f5e2df8 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IUag9ux0B+mtJ3Tv4G8jIhmf+bSDHPcvgZ5UBYngxkO5XxCM/l08LWl0qJmL6lzwyv7fzRJQLISdc31UD5oTObjv0ru086vAXT95poIkAKzwOX8cbfSWf1kaAeXvCsV3wTdoFncPMwV5rFW4PpVTpW8VDv1YdjMw+m3ghm//XrNwsUMt0ZcFMTZjEovraZCc3aPHqsboynB0zYW7g6/kIJSbX7GczZtgNi6c/h7ct2UDHYxtvW2wDikCs9KpILhysyt36Bb+X7ba1tNK6dQ9n85TwjBuU6n9QrI45tQJ/GQ/+A/Jn75ySyRiBfdMGpcN4vlMfqwO4aOg2X1wjvNppd29JgjJj81zD6C9bQIt7uuitJPua4gVXYEK8IEZPbL3nsS930eAoCu6NbFgtQa+e59mFsblwZnAxgf1+y982oklrrq6ylCSEM+nf2E3G5MdJe0j2kcu/Tvcg41WBusmM81m6KwyDqxYnOvqk1a6hgG/4cfAEHFtiAEKLvZGvS2wkSana+uvPIIsZyuRR+0U2hjM9sKi1XPqY+XbPCtp9PU3rgM6FdzijuHcakGw3OiP/sTT85uETjs3THRczEbll2y+32J+plRK764o7JrlK8n2VT0J5kxESFKQe13ZRYznOPzx+cYoGycG3UkMNbi2SrK0qShG9O15yEcNN0V9WPOqHWckk0wG7LQUTVKp0WuU0yPt2GwPLCCO9jcTpbSKDe4KHN8nuoDHPhdSNMSXWdI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(52116005)(7416005)(1800799015)(376005)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fNN1STNYHZaVovauQeW4DQV7Gc/fKmAGe6wN1+DK/UH4h4VBh3TwGRLdWvwUeTVh7wam25tM9Ptq1PJOuIRkYi+PXxIGQeiK6Re98fDVPm+U/RhZFTPK73RU5Wty3oud6Ij6eLzMYlDoXIqMPjKYHTYvPMn0PuEsebSd+6DM8gKDQIgCFgrE4uxeqL1EWm/cjn/MQyZIq2yraJWTpe4zIXrUeFN3Hahkl1853reer71Gd4P2a3gs+KWgt5U/QInWRpk1w+Ry+sl0kneIGSa4ldIW7LPYZtQ1cms6s8c/tW4o1/Kj/5EZoW1klRsy7fyExEza9/2WXvr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dLml9ZHbDajkuF7/7366teUAzOwrHW/tqidngqUHiRzDhx+mHw4tvQeIw/ItaNMsqiGtidZX74dKU+ZRHlzOhzj3MBKjgk5ytOGw66gGR9dcQ6CWMGS0FjUdiKRgzmJ+A7WLjAToItAMBHRVhn+R1+6zcsTi8yl7HfuPv7n7Em6ryFvDHvOKRUbon1j0smkWBd2D3sGuBX65xD7nyt0yaI8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 26e8068f-3b2f-425f-c1a9-08dc5f5e2df8 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2024 04:15:28.3576 (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: 0F1gMke9ghPbQv4ByTfS8jJQMRicOsYLy/Cc/QMQglQ6nN8iBhHyJ6D3jYrVjU3Drr5oNqOA3+CHsN3p93PveNBLtMvnUNpudERmNT23lk+UaEyh/U7fa6+ZHYHZew0T X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSAPR01MB7397 soc_get_playback_capture() is now handling DPCM and normal comprehensively for playback/capture stream in same code. This patch converts xxx_only flag to xxx_assertion. Signed-off-by: Kuninori Morimoto --- include/sound/simple_card_utils.h | 2 +- sound/soc/generic/audio-graph-card2.c | 8 ++++---- sound/soc/generic/simple-card-utils.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index ad67957b7b48..42e464090cf3 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -196,7 +196,7 @@ int graph_util_parse_dai(struct device *dev, struct device_node *ep, struct snd_soc_dai_link_component *dlc, int *is_single_link); int graph_util_parse_link_direction(struct device_node *np, - bool *is_playback_only, bool *is_capture_only); + bool *playback_assertion, bool *capture_assertion); #ifdef DEBUG static inline void simple_util_debug_dai(struct simple_util_priv *priv, diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 0d2ac4c9ba3d..3007b95eeaaa 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -759,7 +759,7 @@ static void graph_link_init(struct simple_util_priv *priv, struct device_node *ep; struct device_node *ports; unsigned int daifmt = 0, daiclk = 0; - bool playback_only = 0, capture_only = 0; + bool playback_assertion = 0, capture_assertion = 0; unsigned int bit_frame = 0; if (graph_lnk_is_multi(port)) { @@ -798,10 +798,10 @@ static void graph_link_init(struct simple_util_priv *priv, if (is_cpu_node) daiclk = snd_soc_daifmt_clock_provider_flipped(daiclk); - graph_util_parse_link_direction(port, &playback_only, &capture_only); + graph_util_parse_link_direction(port, &playback_assertion, &capture_assertion); - dai_link->playback_only = playback_only; - dai_link->capture_only = capture_only; + dai_link->playback_assertion = playback_assertion; + dai_link->capture_assertion = capture_assertion; dai_link->dai_fmt = daifmt | daiclk; dai_link->init = simple_util_dai_init; diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index b4876b4f259d..48233f410348 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -1127,7 +1127,7 @@ int graph_util_parse_dai(struct device *dev, struct device_node *ep, EXPORT_SYMBOL_GPL(graph_util_parse_dai); int graph_util_parse_link_direction(struct device_node *np, - bool *playback_only, bool *capture_only) + bool *playback_assertion, bool *capture_assertion) { bool is_playback_only = false; bool is_capture_only = false; @@ -1138,8 +1138,8 @@ int graph_util_parse_link_direction(struct device_node *np, if (is_playback_only && is_capture_only) return -EINVAL; - *playback_only = is_playback_only; - *capture_only = is_capture_only; + *playback_assertion = is_playback_only; + *capture_assertion = is_capture_only; return 0; }