From patchwork Fri Jan 12 01:47:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10159449 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A2F8F601A1 for ; Fri, 12 Jan 2018 02:43:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C42C287B6 for ; Fri, 12 Jan 2018 02:43:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8132D28975; Fri, 12 Jan 2018 02:43:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D44F28817 for ; Fri, 12 Jan 2018 02:43:49 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0F096268334; Fri, 12 Jan 2018 03:37:34 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5E994268317; Fri, 12 Jan 2018 03:37:31 +0100 (CET) Received: from relmlie1.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa0.perex.cz (Postfix) with ESMTP id 15BE32680F1 for ; Fri, 12 Jan 2018 02:47:35 +0100 (CET) Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie1.idc.renesas.com with ESMTP; 12 Jan 2018 10:47:34 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 7CA6B6B88E; Fri, 12 Jan 2018 10:47:34 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.46,346,1511794800"; d="scan'208";a="268011170" Received: from mail-sg2apc01lp0243.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.243]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 12 Jan 2018 10:47:33 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=W2kB0Rony4VsuZXvbGk3b1E8Dcid6vth2AdF2x/Qlm4=; b=k75HFg4cGSyA76L3Cwj0qF5NKXl+JtmPUHXG+cnnx5aYBg5Qfz+VRvNsIseW9I9iLTSrTeoCq3Luhk9j2zC/ajldcyjEB+J2ksEfDpNcYBLspklswOGOxqmEZmvWlhF9yBndBmis7pXiuiAHtAhJ1aNwDLvKjc5i2DxRyG9z+kg= Received: from morimoto-PC.renesas.com (211.11.155.138) by KL1PR0601MB1880.apcprd06.prod.outlook.com (2603:1096:802:8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Fri, 12 Jan 2018 01:47:32 +0000 Message-ID: <87vag76e8e.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown In-Reply-To: <87bmhzevk9.wl%kuninori.morimoto.gx@renesas.com> References: <87bmhzevk9.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 12 Jan 2018 01:47:32 +0000 X-Originating-IP: [211.11.155.138] X-ClientProxiedBy: TY1PR01CA0149.jpnprd01.prod.outlook.com (2603:1096:402:1::25) To KL1PR0601MB1880.apcprd06.prod.outlook.com (2603:1096:802:8::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0be928ce-c76a-4bbc-1fad-08d5595e727f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020074)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:KL1PR0601MB1880; X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1880; 3:AoxGyx48xdE+NkvC0OUyXQNjaNLSZylaK/LCZ+sk+WQDnous7UanNjyBpaZqGjFXv7k//BRnpXnF9h+dVyYgTVq5dkbjeVOAmJCiUO7Fel6n4gnPv4TclQM2oXD4EBXKo15YHeLuqUROUFDkGR/foTakyccjXstWH/+92CKa1RjbpOKVDMFfrocPoEIlm7TCjdNz8HjhZNgxbD94urpOBs3IxYVylrrkNvwErpSHQOU8U23sSGDTPDO6zSRrJeJ8; 25:aUSZcWm9cEIfRJ4WO54PdwLZ9KcPYqfZr0aH2D3ZL023mlAFGolEGnAXNZmVXhBsEqmrXLj1I1NvNMhwygfa7vo+R8dMsh5h+JVVMGodgN3tTnjqZ7Vfto8W1D4A5J+PcntR39mlPfh3aDWTebgSO9y/T2SdMHC9CuN0t4sZbblU1yVRli3oP5Dh2URbwwKURNjZeSJURwoU1U9LjdbLLUbiob5kKBtqM4q3k6zvNDHjSl8A6khI77hlhMrwFFVGzSaUt3Tui41wHADrzKW8wIbl+rGkp/qB8XYrwNwN8iZVtyFzyEi55VZR5talVpMI71WLPqoR+T9aByEsY+NP+A==; 31:IFIJy8shp6a6dr4k4cpg4OST2RPyv6C+VWj1lYs14+Reg3cweHhMFDTU08+Ui0ap4qKJtOqHHlYkP+P4M1/OFKkHaAj+0iTvvi5MT2OUeeAv4gQgEzyOocqNauiS6efalU+Rh8ogADS1c6iWukJlN7v6YMcwh/qvm+xOaMeku7PHKfPXXdsMuBTmFdEGG+y4wVE3kdgwcG3BEeH9/rw7SA/8ugNE85ib/K87VRoXt44= X-MS-TrafficTypeDiagnostic: KL1PR0601MB1880: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1880; 20:ZP4RCWTH4xQ+eIAzANu4/SPrIfxKeusXssjG2LtAjarEz5sT5IPUQX4+Ykx2TT8009vNjTyxTADXlPTlib+4M1WWzZTjo1U/i9IGSWpbKOPShavgsrUZrmsZQQdCaXwCeYALsCAO/NZ8KtjKbIlnrlQZvB6qywPVuPd2+0Cc6zJpwSBmPj6UpFZxenaZymvNLZbRU+D/vrFxPDTM70T38GyR/fbj3tv03JJcNWEPqBfPfg88iugI+SS9rfZpNRseKuBeMYj7xqfCAkjN0XQSA0CUp0L9EJlimg1Ng1QwLRsA5QFASEGqA929EuNW5mH9n5Qa4FIvg2yKGe87h1sgtk6BF4heOymvWz0MuDK/T4hiFzFSmANxdAQu+P6mZ0ceojcuj6Rh3+lLfmh0aB/EVPlHNMbnwwuVwyC9/4dkx0xDOG/ahoNB+tdhkKpZeF1fnd75wnAkNUgq2vY893Ik+fqyOiJGYJhYuvOcp6md2qD3/mQa+uyBLvGaHiTA/MQi; 4:S44YOVQajLivRUrWnVvXE8Uj2xLHhsFoyt3XyEPaHFijlozv0ivvV8gRJTYYQcXNDhgRXikAmkE8s+0VImC2eS4hHr2+g6rMpNwC4U93XuyqtvJDKAw17lGUASB/Zz3sTB7bi+8h1U5BP9AxXZx4z2exmjzbR+DfQG6fwTrNPKWZuswXfrB+Vd6s+XGHQOkiPtkPXSEfTEfpAP78XSpH40zJBJShX4FGBsIS761kLjJaW87HfgJfEGsSUnI/mvutl/EfTkOppwSeoFwBTwwLPA5uN/03hq8nHxsUtJUP3ZkduXOgUCRZSklSQi/nDWy3 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231023)(944501138)(10201501046)(3002001)(6055026)(6041268)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:KL1PR0601MB1880; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:KL1PR0601MB1880; X-Forefront-PRVS: 0550778858 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39380400002)(396003)(39860400002)(376002)(346002)(366004)(199004)(189003)(6116002)(106356001)(5660300001)(3846002)(81166006)(8936002)(47776003)(81156014)(68736007)(23726003)(36756003)(6916009)(2950100002)(8676002)(53936002)(76176011)(66066001)(53416004)(4326008)(25786009)(6486002)(58126008)(386003)(16586007)(50466002)(54906003)(97736004)(16526018)(105586002)(83506002)(52116002)(2906002)(7696005)(7736002)(305945005)(86362001)(478600001)(69596002)(316002)(21314002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR0601MB1880; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; KL1PR0601MB1880; 23:QHnCa3BXwO6rexhvyUGwhs7wmzUVm4pm2YGtSVL?= =?us-ascii?Q?QUNlgxXKDWoPUV6ENYCasi8oVI8tnJ1SuNu/tx4dqXGVVjX0jx5Yg/FoKgh0?= =?us-ascii?Q?VjiIY6MeHgbg2o9dXZA+uCnfxN9W7BHQ0Y10zGaaFF6OxcNg+3wFMffGIhB5?= =?us-ascii?Q?EarsR2P7T763/pLZfsx8yt4qQgEhAx4j7d/nSHpZvX4eBxRo1uTYzE0T1PGD?= =?us-ascii?Q?9XZqCFypZkl0iH5w+iMW33wHfV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vkctCq5X1IQv2TquRIhizX?= X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1880; 6:Yap5qVZnMISz3GsB6m2ov+DLZM9Ym6hmxKgTB9dsje5WtzJBZnrDp9ZwNlWL3s1gpdIV5FLdETU4T/ih1YVgucMFOXe98izsJbMGXs1++w/RTr9175vjxuv4fZ2iYz/71F15ijpARQHiFHJIj84J0d6X23Nfo1nRCBb3aWyN7tIt2VDe/G+eOhM1gMvJb0czw3vbiZCKDd7u0qPGkDTo1eFbXByx0AS8lTZhHzM8svREtRk8VBC+F5fMa2L1nl/qV2CeEcgcqNtyHRnhDkmjHNOTovu+g+qtv4Y1drBl7hEAhIGOil/B+lG4yVzFZ+xxXuGepyxD6wN2FMbjqC11iJ8U/Js1cdZulJEE4lmJH3Y=; 5:LZfJ2EgfsxaTJTm2RHVN/w/HXFADdOn7/zgPndXxiV13AyMuZ4n5e27k0BVBAlAaes4nJvwex8SnIXCaWFwZuSBHybIfkeKSIC1IBxL85++zSzrjtLnKhkfO0ofcPbibbZErM7qiyAV+DBVkQ6Fu9weqW4JA6NzYIAIpHW3i7ho=; 24:maYBN+OW+5PD2Tl6CjMeggxOT+2FCekogu+AL/QUqMLkWxx2hhQo1KMhIpljvy4dLeM0JoIFjp2ZXLfV5krBuyW3HIRUNszxsBUjWrqDTM4=; 7:GFj19zW/9DXCYIgpya2IMkYyqiC7qjEKcZoFEUpI3BRLF2Zdpmi3Q0ouu6n33LMckmiyf7YlTXYtlO9oWKfSHthClGju4QhjgMUYHJdsK1EJERhUesWu8Px/x0FAMc40V6PgcenVLdtOyf9BqTUk8BduRaxUTHzgMuJi4nO6GZNUXcmkhMjW/4BgREpTLB93rnX+Z+srF7yrgDJqSnsL0B2moJ5JLHWa4z+NjZcQx04HvHgZgnwUyroZk8WuwEpg SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1880; 20:GOjlHgHidH2TunRfWZvKBhQICTh2HCmG7Ix/bKRJarZJqECxpteRr74CU6DQgb787aGPYuQvD7v6O51pDCPAJEQS1ox8VKYSSNix0yVsgKHY0LgEgamjjGPuRdc0tbz9fwC6M8SwrsHVfj7qAU0yse3obmtv700+Ywsh6cneZ8k= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2018 01:47:32.1149 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0be928ce-c76a-4bbc-1fad-08d5595e727f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB1880 Cc: Linux-ALSA , Simon Subject: [alsa-devel] [PATCH 136/187] ASoC: ad73311: replace codec to component X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto --- sound/soc/codecs/ad73311.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/sound/soc/codecs/ad73311.c b/sound/soc/codecs/ad73311.c index d8d86a0..426e87e 100644 --- a/sound/soc/codecs/ad73311.c +++ b/sound/soc/codecs/ad73311.c @@ -54,25 +54,21 @@ .formats = SNDRV_PCM_FMTBIT_S16_LE, }, }; -static const struct snd_soc_codec_driver soc_codec_dev_ad73311 = { - .component_driver = { - .dapm_widgets = ad73311_dapm_widgets, - .num_dapm_widgets = ARRAY_SIZE(ad73311_dapm_widgets), - .dapm_routes = ad73311_dapm_routes, - .num_dapm_routes = ARRAY_SIZE(ad73311_dapm_routes), - }, +static const struct snd_soc_component_driver soc_component_dev_ad73311 = { + .dapm_widgets = ad73311_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ad73311_dapm_widgets), + .dapm_routes = ad73311_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(ad73311_dapm_routes), + .idle_bias_on = 1, + .pmdown_time = 1, + .endianness = 1, + .non_legacy_dai_naming = 1, }; static int ad73311_probe(struct platform_device *pdev) { - return snd_soc_register_codec(&pdev->dev, - &soc_codec_dev_ad73311, &ad73311_dai, 1); -} - -static int ad73311_remove(struct platform_device *pdev) -{ - snd_soc_unregister_codec(&pdev->dev); - return 0; + return devm_snd_soc_register_component(&pdev->dev, + &soc_component_dev_ad73311, &ad73311_dai, 1); } static struct platform_driver ad73311_codec_driver = { @@ -81,7 +77,6 @@ static int ad73311_remove(struct platform_device *pdev) }, .probe = ad73311_probe, - .remove = ad73311_remove, }; module_platform_driver(ad73311_codec_driver);