From patchwork Wed Aug 2 00:54: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: 13337448 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 54386EB64DD for ; Wed, 2 Aug 2023 00:57:39 +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 181D3836; Wed, 2 Aug 2023 02:56:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 181D3836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1690937857; bh=BUPBfK4mkXTonz9ttoCOMQsqjxgl0XNnJFhPd10p0b8=; 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=q0Z0qE7FvoeZSSdY4MRKMGMF69zT5PhTAdin+QQLx5MR7KiFzQ0YR18c5gCAJs9jT OyNVqLJC/EEXv/ycFYKz+XbzH7S9X+723nFcjMfXULtroyUKIuREyw3wKI4OQXdfLd snrT8jGKwn62Ha+3EHpku3oEAp6dwWdwkcqHEOOc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 28DF8F8057E; Wed, 2 Aug 2023 02:54: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 645B4F8057E; Wed, 2 Aug 2023 02:54:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 77DE9F8057D; Wed, 2 Aug 2023 02:54:38 +0200 (CEST) Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on20724.outbound.protection.outlook.com [IPv6:2a01:111:f403:700c::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 251AEF80564 for ; Wed, 2 Aug 2023 02:54:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 251AEF80564 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=AeZYPTBY ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VQ/usmsBszqD8oaC8A/pFORT0wG5LKu/KBaxMA0u5gZ6DXtST7so4ev3jaXVXKeKoXhg9ZXCDGKU1LibJpDsW7BK8lNYhyjFGQ0fui+NBDqOp8fnYMd9C5Unpa+0l9SQ3nmF6c+2fdUrCrnXsAhRwmpZAFc9/qd6RNOcpEHlzdSmSc4F5z7zvEWiUDvBZHobroe/NXlG/eCBghDA9v4PCP0uKmwa9Tn9q4WhtX0ag5c12bCBivji325es2AIqny7Egr6PcGkCq5ZryrNHnFFWT25ts2pHVBhC1RrCBEIyKuu10XQeVGOtXJKoCjqyhD11KmE+jYiLrIiTFwrH/gIWw== 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=1WmiUPVojK7AZdyEKKpFFk3xWkNAqbAL7L3XFxfcgIY=; b=nT+w0cMXIePz5uUeJUW8XFoZY7fRJGgzsrZ/F12BzhsHMDQjfrczip3nb/Ha/qDIose5eZk0ZbHf7Ywvr0JtFsdl2uB7A2OlI7bePn2iwZ6xPz/K3Lz1m1GMfU2apMfn+34iTJvVS9uzUaTIhum2ZNLU3G8DLOKFETNsb+3dq8u5MRxl4139LXuxyVTyalj5qV04ei7aPKEVsVhmUNY0EUI6HRS8TtiWWBcc4XmUs10RK+CNCNMFCyr152COtS4vWA2E+ValLiF1FuBUMYTJmgkQRq2o4C2Yj8M5U3SAFK8BNB3Smnb9GTZbSmf5Tg/rpoDfQ0+hs79NH4AHWYKW4w== 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=1WmiUPVojK7AZdyEKKpFFk3xWkNAqbAL7L3XFxfcgIY=; b=AeZYPTBYZRgfBMoqN/P3LJJq1ygMnzL2Qan8b9kn77Tq7nvJxk96MaMBsJMsudBUKcUBhlkHda70I2VXVC0rtgUgq0j+itB7E0jmpHMILPWxoMbk7oZcHZvciDZL5hftocr8ab2oyysAaJHledTfZLoW3g4a69AEP6FphoOMNxc= 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 TYWPR01MB8348.jpnprd01.prod.outlook.com (2603:1096:400:177::9) 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:54:27 +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:54:27 +0000 Message-ID: <87o7jqtgal.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org Subject: [PATCH 15/38] ASoC: rsnd: merge DAI call back functions into ops User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 In-Reply-To: <87a5vauuzg.wl-kuninori.morimoto.gx@renesas.com> References: <87a5vauuzg.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 2 Aug 2023 00:54:26 +0000 X-ClientProxiedBy: TY2PR0101CA0034.apcprd01.prod.exchangelabs.com (2603:1096:404:8000::20) To OS3PR01MB8426.jpnprd01.prod.outlook.com (2603:1096:604:194::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8426:EE_|TYWPR01MB8348:EE_ X-MS-Office365-Filtering-Correlation-Id: d0a6680b-112d-4da1-8cf3-08db92f3057f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ks+6KtBSvIXm1phTRqM1e7l1U5RgCmogJeIQr5Xity8LyzXPbTgqp72l8I60VTPULBRtKf5vmISPLqkijFOvzhQk5eqHxmdN5mSsNGMcZQgeMF2Z2siRKzXt4JVkrCCtaNdnBqDiftyxaCE1tEFppjRmLrfMy6Jwu0Gm92lnCh83piuGlja/1FZN8Z1sDh6pOR9tWNQOmg/paiGAT0tRgnQHqvXKe8L2Ojh+FeqsY8pNLaCUQdjTYKXiTTYpjLbzujF5hx/Yn9HOJJHACXHyh+4NVd8fauQKzkxrWYHmGpfihDPJ4u3MIJbi0gjJhqLGzibGtQ3io86QS7NQD37Ei4coNxsce1hJOehXhUyipZBXJAc7em1EoqwHi4d2cvT+pcx6lciVkq11ujv7d1BSz37NfxyAqQFT9tEiHYLZZKBFU45ZtEaK9546JorrVB9HZ15Bj3WhK8wfiYl4UFoJlZoA+ftUKVNqaoV7lC/+nvb1flWJvFq/33gbUiRCnEtnKBzLwa2aseTi1D0NotlxaSy5ipF0A64O90WWdJhxYgxwvqcVxWW4e/cO1/YZTOIUNK5rCcCAI2v7L0eef48845m/MD9b2FFY+QolEa3CMQZzPL6vJMNfXEwCIWExn97C 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)(136003)(366004)(346002)(376002)(396003)(39860400002)(451199021)(5660300002)(8936002)(8676002)(41300700001)(316002)(4326008)(66476007)(66556008)(66946007)(2906002)(26005)(6506007)(38100700002)(2616005)(110136005)(83380400001)(6512007)(86362001)(6486002)(52116002)(38350700002)(36756003)(478600001)(186003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MNSn/Ll3PEE7O/9sdkw60PVRL/WDOBdFUvHPduRjNJ8rJQLlJ58e3XS+cB/xnv2VE+Yc8Hhb7fyzXW3e9rwctDZCFfsDBU4a/Vqz9sJMioxB/YR75Wg3YOyM0sDG5s11M6sW0tysHTamXd1GwUfIrg5jmLi+kvlxU9psDeceKynLTMzzdhXm2GVdBtbClcHKsvi8XT/0Gyi4C7VDbTHrZp1V/jfhvAKg5YuorZOIhucVTMrjORCe+wsuxpnEiIT7/ly352v9/Z8llfsHD1ejzcL8Ov5sWWzftTyWjNKmFkzYXE+rz1UChS+Ev5Xkee3GFxKW84eYp3ZK78dCuAMxzhRLwrsWIsli+PGvyc1ABPsHGy6Rsn2tOMKssmGfz4Pk0gqECF9e+8oNwe0YV6aDsxSC/LmpXQIp+bB2tS3OtR89uS7VuwqzHoMITP/vvMc4FzCnRRwqnmfnQPyQ7LKDyDIiATrVZI8ywK4ZpL428lFBk+LnUlYTKwGbdZmd5Xjx20aAM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3cPJkuIZ6XXkcJF2mMODHT+iG/4otfWF7w4l2QvP8gDQpM5fE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0a6680b-112d-4da1-8cf3-08db92f3057f 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:54:27.0991 (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: pVznqQY8M+tZp3oDQLa3H/lkR53c6Vn0dftdv0dEOXAAQYzjlWi24iEqFZ7vgDuKM3pYEmOFWarhnoOkOOI7jueorsQgPAaP2XSUTEqBrhWOXh2gK8RCzlbomPOZc0yI X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB8348 Message-ID-Hash: UP2LLQH2W265WLSH67TE7POWM3AWPXPG X-Message-ID-Hash: UP2LLQH2W265WLSH67TE7POWM3AWPXPG 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/sh/rcar/core.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 9f3d97bc177a..069add7b1b71 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1085,17 +1085,6 @@ static u64 rsnd_soc_dai_formats[] = { SND_SOC_POSSIBLE_DAIFMT_DSP_B, }; -static const struct snd_soc_dai_ops rsnd_soc_dai_ops = { - .startup = rsnd_soc_dai_startup, - .shutdown = rsnd_soc_dai_shutdown, - .trigger = rsnd_soc_dai_trigger, - .set_fmt = rsnd_soc_dai_set_fmt, - .set_tdm_slot = rsnd_soc_set_dai_tdm_slot, - .prepare = rsnd_soc_dai_prepare, - .auto_selectable_formats = rsnd_soc_dai_formats, - .num_auto_selectable_formats = ARRAY_SIZE(rsnd_soc_dai_formats), -}; - static void rsnd_parse_tdm_split_mode(struct rsnd_priv *priv, struct rsnd_dai_stream *io, struct device_node *dai_np) @@ -1353,8 +1342,7 @@ static int rsnd_preallocate_pages(struct snd_soc_pcm_runtime *rtd, return 0; } -static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd, - struct snd_soc_dai *dai) +static int rsnd_soc_dai_pcm_new(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); int ret; @@ -1380,6 +1368,18 @@ static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd, return 0; } +static const struct snd_soc_dai_ops rsnd_soc_dai_ops = { + .pcm_new = rsnd_soc_dai_pcm_new, + .startup = rsnd_soc_dai_startup, + .shutdown = rsnd_soc_dai_shutdown, + .trigger = rsnd_soc_dai_trigger, + .set_fmt = rsnd_soc_dai_set_fmt, + .set_tdm_slot = rsnd_soc_set_dai_tdm_slot, + .prepare = rsnd_soc_dai_prepare, + .auto_selectable_formats = rsnd_soc_dai_formats, + .num_auto_selectable_formats = ARRAY_SIZE(rsnd_soc_dai_formats), +}; + static void __rsnd_dai_probe(struct rsnd_priv *priv, struct device_node *dai_np, struct device_node *node_np, @@ -1409,7 +1409,6 @@ static void __rsnd_dai_probe(struct rsnd_priv *priv, rdai->priv = priv; drv->name = rdai->name; drv->ops = &rsnd_soc_dai_ops; - drv->pcm_new = rsnd_pcm_new; drv->id = dai_i; drv->dai_args = &rdai->dai_args;