From patchwork Wed Aug 2 00:56: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: 13337459 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 58769C0015E for ; Wed, 2 Aug 2023 01:00:51 +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 70D3F950; Wed, 2 Aug 2023 02:59:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 70D3F950 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1690938049; bh=z9r330xFjBOxtKFIuYSrv5JOeU2K1COzYNgUm3MQuWM=; 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=rYFcSd11iyzDAFaVOs3E7AGqfpNxk8KcOctQHPNZzT6wUAVF5sEaqUk/t8mI+aKUg Y5oAmhS+UGmoZUu7UNochZ/dyQ2/a1dhu/AVGY2mgwd4oFb6BrTAabb1NPyTdxyO90 1+or5yvQk1CHzLsIjJkp3mkU0A50ztPa41u1xiFs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 552E1F8053B; Wed, 2 Aug 2023 02:56: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 B8FAAF80636; Wed, 2 Aug 2023 02:56:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7CFBDF80631; Wed, 2 Aug 2023 02:56:46 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2071c.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::71c]) (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 CE07DF8062E for ; Wed, 2 Aug 2023 02:56:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CE07DF8062E 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=kyY5y40A ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GWFL1c34QONTYZd4ocOiNdX3911FRywdxrqwZTbseZHzT9hBQZrbK4QWUCHHuCRvcoHsHOjAIcLdSIpnOcQxO1CoNVwHgIVhx9kenYpFyYISPgl59HQ0cKUdB2dgREluD2ZsBKq2wUqFFEh/rnyfEJ9zkEdKe8GAzIoua54VkOero+Ux3YL6R4MBFsJcASs5shEg42HsQq/E4yT9mBcF6kJ+4RoK9S4zq8/n5udklu6Sq7VrGNFNUin5dc09ZPIBMI1GNJU4io9q6c2TegRkVxaCQlPN2+lu6/XWp9eVfcqoVCk4m8EDMX+13DhCyHbCLuzy4BSR/FIm/eUxfpUh8g== 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=ydmZ/P1vKnABLLAxksIh2R5k9rL2ZzeMrA7Fv13c6zA=; b=AT4fCOKgJY8QnzqNDDoHtXJBkgWNshG2u8E+IS+dDI0JpOII+YbbI155RLgVPhBTTM5SXaS84VUI32NSjMC2JUfN1A5OPX4OvXt7scOlzz/Cj8XTF/C5EX+5FIC/k7yeEhVQgnePPfGBcbYIfQEqAqmCiRzOLVPpQp3cxEFH0WQeiHVdzQY1kkI5S8Ft/wsDDRVkTXBWLtRDK5tPFywRTsFu0RPquVtFs1fqdUynKCcJsrxo0VauOnbOtsOjvZ5d6eaaiKzLj3rhTJa0W7Fq1P1R29AJw+M0LlEcTQRK1yAd6ZeDhshSRc06HZ5ycORBYQ5KDNCKbwIj7XD2wTsECA== 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=ydmZ/P1vKnABLLAxksIh2R5k9rL2ZzeMrA7Fv13c6zA=; b=kyY5y40AHYSHagWKGyMeLwjv7Tj3zsiXnBdTb1I5tus8aVOJ44HdHKmW6UMF5f6/iX4g+HJRlJJm3MSo45IT1Wonn9yl3xrVA1YaG3erfLcjHyvokJr1nD3cJvVL70loeqMchrnk6yC6v75CRKeA3AlUg3KdX0o2qoIVhpEmfdU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) by OS3PR01MB9381.jpnprd01.prod.outlook.com (2603:1096:604:1cd::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 00:56:40 +0000 Received: from OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::e6db:c2b4:3f89:e3a5]) by OS3PR01MB8426.jpnprd01.prod.outlook.com ([fe80::e6db:c2b4:3f89:e3a5%3]) with mapi id 15.20.6631.045; Wed, 2 Aug 2023 00:56:40 +0000 Message-ID: <878rautg6w.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Padmanabhan Rajanbabu , Sylwester Nawrocki , Takashi Iwai Cc: alsa-devel@alsa-project.org In-Reply-To: <87a5vauuzg.wl-kuninori.morimoto.gx@renesas.com> References: <87a5vauuzg.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 26/38] ASoC: samsung: merge DAI call back functions into ops User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Wed, 2 Aug 2023 00:56:40 +0000 X-ClientProxiedBy: TYAPR01CA0107.jpnprd01.prod.outlook.com (2603:1096:404:2a::23) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|OS3PR01MB9381:EE_ X-MS-Office365-Filtering-Correlation-Id: 79d564cb-56e3-4c39-f99e-08db92f3550b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FqmscHYnvlZ3VUS6cKYvKQOvRhJsLNstQnIbYzecoWEnEDCxGuNrgJwBL96OqJWcCfwlsQ/YGgKmwvJILRyEa8OfLGrXPf4V7JgdoChY+6TzVKlYb/f72Yn+XOysUdssqvzsSBW+vwBGgKvSAECTuyz54vm2jesgNVgeX89vuBIkEvL0dCC6DUvxr5MRgJGXqwjeTX0erqju34NyhButx79EbqirW9lj4/2razLzmuqN6FoewSicWmQcRBIAiNm+qpwBC22tF4+cwHjm/NQiCpcHp+tE4JozRQDXGaT+Opw/zeSEeyGenkChHJstm2ZOeqep30jdqmSyENrfJOWloBZOMcxl6mnF8+T/+xwYrV6KVR2ZYhxo4kS5mRW7cWNG138acKqZ5i/Ghlxvd3xKvesPY9ss+SzGlXUV/zb8ink+2MmDpMLQOtYjxYTqi9ICSEHPlxg/P4NfTTJmavPmyroozhWwA8ZaEcVhTpygwknBvcVHkaRz6cJeqCuUUA+mJb++vN7r88/2VxXYeXpi7z3bF8uetHhCdLa5D1gIPKPbLuQIK30WDc/oIGgEQYiRinqn5UFZeXe0d5hYHX0VU3sI/so37IwZCxR1A+iopvbxbW3LebYzBpYEwUnWOo9n X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8426.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(376002)(366004)(136003)(396003)(39860400002)(451199021)(38350700002)(66476007)(66556008)(66946007)(2616005)(83380400001)(4326008)(316002)(6486002)(52116002)(6512007)(110136005)(478600001)(186003)(6506007)(2906002)(26005)(86362001)(36756003)(41300700001)(38100700002)(5660300002)(8676002)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: h/0B5xx3Wty4lPJ5n+hLwMpEJaOxN0fG0FA9ZR+TdhTSIhIvzw8cB35KhojT7DkI7MP02ogBV6fUwIu3nmPheM18KP/mAamNBOd9XDoxcxUoJk00Ksxj3PMZMt+E9EA20U/XB4vtkUfcydHJN5G8Qdfnz549gPp1Z7Gq7msEuEW6gBLThw8mpCxcjkYRS3Ct32/eyVjP8SqddrrYDy193/RWE0S/n/UeTH1V/T9lYdp4VqZBAJJlk1Lhghx+YXXQ6PZkcICYeubvOrqVQEBko4ppGy6O09yK+6Vc+yu8+Zx0HYUODsbX/a898sgYgKkIiaCC9yuwq1050PgJz2D+y3tmSzgAZh/XnRBvGTqfJDC9TJzGGAQXTBLstb1WPjlBNbMg9xzida51vn3eoaV8QRAd13Pyg+HZBm3ZxQWGlMLX0iBqMZ/Nfxhjsnvl+bU2IZzbotISyfnMU9lQvWRjoGz042sbi36+t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OqsKTd5ZPQfxyxAccCy3MbckOAUnI4RFb78IZTq8RHCtnBHJdLHIN/LRuMdqDLESQ2XJLu/IMBlhMtOXTJIJV31LAEGBw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79d564cb-56e3-4c39-f99e-08db92f3550b X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8426.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 00:56:40.5503 (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: pakr95EYzPgVnkX/PofIbzSJHJ2JRM4D2gE0WntTQY46v1o2rqz9/G3pPm8S1ByOXvcH4f9KTEJPXA4y5lr8bkWjOSftNgvWm/ploDtkbL1U6f11mXGQ8fSrRlanr61u X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9381 Message-ID-Hash: EOK3VMXX2FWYJGMYPUEO2VKB7IFOLJKW X-Message-ID-Hash: EOK3VMXX2FWYJGMYPUEO2VKB7IFOLJKW 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: ALSA SoC merges DAI call backs into .ops. This patch merge thesse into one. Signed-off-by: Kuninori Morimoto --- sound/soc/samsung/i2s.c | 5 ++--- sound/soc/samsung/pcm.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index f3d98abd5f0d..3af48c9b5ab7 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1120,6 +1120,8 @@ static int samsung_i2s_dai_remove(struct snd_soc_dai *dai) } static const struct snd_soc_dai_ops samsung_i2s_dai_ops = { + .probe = samsung_i2s_dai_probe, + .remove = samsung_i2s_dai_remove, .trigger = i2s_trigger, .hw_params = i2s_hw_params, .set_fmt = i2s_set_fmt, @@ -1188,9 +1190,6 @@ static int i2s_alloc_dais(struct samsung_i2s_priv *priv, for (i = 0; i < num_dais; i++) { dai_drv = &priv->dai_drv[i]; - dai_drv->probe = samsung_i2s_dai_probe; - dai_drv->remove = samsung_i2s_dai_remove; - dai_drv->symmetric_rate = 1; dai_drv->ops = &samsung_i2s_dai_ops; diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index 335fe5cb9cfc..d2cdc5c8e05b 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -432,14 +432,6 @@ static int s3c_pcm_set_sysclk(struct snd_soc_dai *cpu_dai, return 0; } -static const struct snd_soc_dai_ops s3c_pcm_dai_ops = { - .set_sysclk = s3c_pcm_set_sysclk, - .set_clkdiv = s3c_pcm_set_clkdiv, - .trigger = s3c_pcm_trigger, - .hw_params = s3c_pcm_hw_params, - .set_fmt = s3c_pcm_set_fmt, -}; - static int s3c_pcm_dai_probe(struct snd_soc_dai *dai) { struct s3c_pcm_info *pcm = snd_soc_dai_get_drvdata(dai); @@ -449,11 +441,19 @@ static int s3c_pcm_dai_probe(struct snd_soc_dai *dai) return 0; } +static const struct snd_soc_dai_ops s3c_pcm_dai_ops = { + .probe = s3c_pcm_dai_probe, + .set_sysclk = s3c_pcm_set_sysclk, + .set_clkdiv = s3c_pcm_set_clkdiv, + .trigger = s3c_pcm_trigger, + .hw_params = s3c_pcm_hw_params, + .set_fmt = s3c_pcm_set_fmt, +}; + #define S3C_PCM_RATES SNDRV_PCM_RATE_8000_96000 #define S3C_PCM_DAI_DECLARE \ .symmetric_rate = 1, \ - .probe = s3c_pcm_dai_probe, \ .ops = &s3c_pcm_dai_ops, \ .playback = { \ .channels_min = 2, \