From patchwork Fri Jan 12 01:44:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10159417 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 77DB9601A1 for ; Fri, 12 Jan 2018 02:41:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 609602896F for ; Fri, 12 Jan 2018 02:41:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5525328975; Fri, 12 Jan 2018 02:41:05 +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 4DE1E2896F for ; Fri, 12 Jan 2018 02:41:04 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 590B62682D6; Fri, 12 Jan 2018 03:37:21 +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 DFC5C2682B8; Fri, 12 Jan 2018 03:37:16 +0100 (CET) Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id 669AF2680E1 for ; Fri, 12 Jan 2018 02:44:35 +0100 (CET) Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 12 Jan 2018 10:44:34 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id E07826B5E6; Fri, 12 Jan 2018 10:44:34 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.46,346,1511794800"; d="scan'208";a="269311433" Received: from mail-sg2apc01lp0243.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.243]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 12 Jan 2018 10:44:34 +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=YSQlY28fF0hapkrzBF9tgqYCbEfL76bA0fc5qrPN0ps=; b=H8pXyiq+dlb+f9wuJn7ANY22k7m7W1+AQnuzQlNvZ6uuXHr+GCk6YFId/RWwocOizxpIjs846lbLfEl+iQHPlJtVuejMoOtLyzbDZZ+hygphIYk/sGNE+VjTHCYM9I5RKKiHKbakqP/uPBHJJqTHcoisYxCg+OpCGA0datjg33I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.138) by SG2PR0601MB1888.apcprd06.prod.outlook.com (2603:1096:3:9::21) 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:44:33 +0000 Message-ID: <87bmhz7sxu.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:44:33 +0000 X-Originating-IP: [211.11.155.138] X-ClientProxiedBy: TYXPR01CA0010.jpnprd01.prod.outlook.com (2603:1096:401::20) To SG2PR0601MB1888.apcprd06.prod.outlook.com (2603:1096:3:9::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aa654928-034d-4f5a-3d47-08d5595e07c4 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020074)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:SG2PR0601MB1888; X-Microsoft-Exchange-Diagnostics: 1; SG2PR0601MB1888; 3:F0RAA3K/IKVL2Y8SncTx/VmRlmYvNNLaBxD1Gq/Rj6a1xvCCSyGp44QbhfHfO34DsbttH5VcpPLanVBFQulFAsHQ0NQ6d4F4Uw6D9pthsrwm/R2Lylfb9SRNs/thpajY4v06PNJuOStFWT3CkAi6Em5UAMHBmsG6SobAlpH3Wk+hUpKLFvcQ5kKPkR5ZPzgzguXieX78fVYCbj7K6NLd4oCncf962P+Oan16V1aBoTWipR7Wr05xjA0tLuRtb50b; 25:ovrRfXQfzIiMo2+eH3JikuUM1eyE0aP7rK8YltaXrqlGxOztBnP1iDRPurQDSvKrWur5yVKzGKbRT57gPCPx0eX3RHgD4Ek424faekGftfMx0Bsygkl80pz5LwY7tJhDi3eUqXjeDjJTGSaJcaF8s/AkiGYFnL7Uaq4KlxmzK5EgMV0oHN8F3buNglv6628BAKY34WpKIHMgkT3pulsiPnosowYo/KyUtMKpu7nb4BBJneCTfapuj0OKVG6csiFCjs3UT73nvVfYchjfHwE2hM6py0FIYleupsY1UOnh2x/uFFslhIyOLsg/R7aIdmviU52pz6gvYavp2foShz+e0w==; 31:g9Y6hepkt3n+xMBJL5ZcAKr4tLc6LWrhARExcXO3RblIAlh3Y2vnm611+GErK50h138O0iuO/kj0r6cBRPwwsEheB2raIHDMwtOC4o2oXAFpWpqUIz1rdK85Uy7VG24irKpaty5qNfNZRSegpqfrNRNXbmxyaMXZqKwjQ/hPk5FdMvT4VykWLF275eGwf1+5fDIxpUsqAMJB+cy8rzJUComlRR84HI9AEsYI5a32/gU= X-MS-TrafficTypeDiagnostic: SG2PR0601MB1888: X-Microsoft-Exchange-Diagnostics: 1; SG2PR0601MB1888; 20:ZVOZrQbOe2EGKq2au85AF/xa5GUQX7VOGtsuqENR5ntTDSLMj5+2WSlDCu8Y9CwnFHyyEhHkXKbKaMcW4pZ+ooX0PCdhsgD7CgU9SewDwNvYxx4gRzSj4w5pQwjb+6dQKbCTBa7zRMBfbwbTYdr4z2u7G3KBS+Ln5rjcLaL+jVERrY3iEApY8lE4F68iOQ0ardB6y30zpRNv+SgvTc4UyipwTsH0/74Z88TjHjStDNVhhEFT0iXjAeMJsOWANDly6n31o1Cgjr/9dj68Zun9juKZM8vurwzizisPDGNID8Cvf/BXDwz6UpPgyeoMjB9hgWZWMmKFYJEvgBbDh8kJzBqvisZvcGqd764FFft/TdU1T+rA58vEeIcO8in/DBLGfH/7PSazgsK1LbYWGWifzLfYfHqbwsv1aKgeeLtS7LD40PbqvYl46CGbsWNiXLSTRfqxGxYa6Ssl9LbjjJDNJD4rygMcPiptXTLC+ejwCscKyLyGu5FSKcAnZf6dahbJ; 4:LctgWSil2XPKFrouIKIT6sTxzwDWIFXAymPkt5udRbomy27uGQ4/v/TmduquepyOiNz+8u0itrcsCRsNd1TW/PBYCSixdjYOwRagqJ91cKB/xwRbFRgKL681eP0WJ3QdiaewKblJQH0xVJpQtUcPo2M0jEQ4Bi2CyuoX/8nXlPnTwqYzpJNH/Q7x7+W5MxBKcL1066Ijg0DIZYx48bXxy/bbtnZdx1TRPuw8UZfHgvu5fgiciWr2I+S8hkZNdSYgH0dVr2DcEy04++iSRtvyzBFyA8xWC8ajHc3n8pjuu2R7XbDPvKzmOR19lb8ws9QX 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)(3002001)(10201501046)(3231023)(944501138)(93006095)(93001095)(6055026)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011); SRVR:SG2PR0601MB1888; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:SG2PR0601MB1888; X-Forefront-PRVS: 0550778858 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(376002)(39860400002)(39380400002)(366004)(396003)(189003)(199004)(5660300001)(2906002)(2950100002)(25786009)(69596002)(6916009)(54906003)(6116002)(53936002)(3846002)(6486002)(16526018)(58126008)(16586007)(36756003)(23726003)(7736002)(47776003)(305945005)(478600001)(53416004)(4326008)(316002)(83506002)(8936002)(66066001)(7696005)(76176011)(386003)(52116002)(97736004)(8676002)(106356001)(81166006)(68736007)(81156014)(86362001)(105586002)(50466002)(21314002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR0601MB1888; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; SG2PR0601MB1888; 23:GI8SERTw60u04d7kwlqTLYY7PChEudp1QkSNzLF?= =?us-ascii?Q?ivCHc0pKXk1UvxDhOe4JiS36WgVtNAx6mdnU+s+1jSpioHVqQCMpDtLVtDEj?= =?us-ascii?Q?FJaJlQNft5bjeKXu13ntN66c/J+pml5l53Y6XLYlRrr7EJgGdSTxRZmKMp86?= =?us-ascii?Q?g7Ky0zvDJBEKiBqdBFZ+vg1wMU3H1Z+qK35UMISp3C/tSPLU0Keo/b3H8+69?= =?us-ascii?Q?9qbeFuVPCAu2rlj4r3QBog/D6M2Nim+Dj8KAVcQ6KsF5/eEFqp1jGLVLiyjX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aeyfo4FdS?= X-Microsoft-Exchange-Diagnostics: 1; SG2PR0601MB1888; 6:mW9yn6yaNCYZlZheLktvRdAOdmn4/qgN8sjcFmLgXt/UF5dA3VijDVK0arq0MANuECmDmLyMeXx/nyLQwUSf3bE5STDGi2qEAVbZ6J1YzoABPgAxtLgR/p61v+mfzCinV6QZGXE2OHeWunkupmnprCXFWvJUHDCVTZ9MJjJzrAzYkbv1cpauPNOLr7Js2QWGY/OpZjR0/S5eL1mCCh/UMOykicG09PDORUjFbGWe6w4YJvB5UsLuv9Y6Nd+MjIaLcmfL4ETcjtGDaoyByu2AYvYTpo+zOZ4tgcr/jELRcRCDSjlqw2AjBxAchGH27xLovfNwXSz8bgMr1jIlRAY5Aoxj0Ftg9aYRW7iO4YrtvWY=; 5:JiYRC4fwOSbscULSNdf4uvHk5NOCUVA8pYfDxAKeiEWfGzpBnSKWbCWdir9QRqqTU8FgbhxjyO7dc66ILEKut23wptclWy2329e3Dit1xcmpo0rnTPkShlNhBaYfj2FOj66srqe7uhmM0+6R3iws2Jlc1Zc06WmMwM2rafjvlRM=; 24:PNRHpDVG1WSUru+eqDAKl3Nr1nZS5gmJmN9tqaGn7LHcWItXo2619DLbWqIJU/QWfhsqgrJSnWeUwPKCDkveZg1wgJ/L1L9xCy0xFMdh0F0=; 7:p7lyTWYw27I7A1R+alg3lT1MGXnibFkLZZjBwHAQCwk6oyFMjjKNdSuwTpUfMcAAa2FDpxcQz2swV4sz9LsBCMHwkEeeEKecRXT0wVB3o1rZMDNkrsv8j6EbiZccXl+igyoD6FqrSxXRzMddfeq7+AUoY4uCTdtBA4lEiN3+Z3XGVyGCEhCelXzhZUgGS4MEoUPvxYsblAcsIbi4zUCQDo76Y1y7/apzcp6fBynRr5GL2ga0z+BlROofp3Gdu/5A SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SG2PR0601MB1888; 20:lmWr7OozKAZeAC++ZnJLxcsXSEWOB84FYFvLGLOOOYazHNPggW6nUjP9UbtkimCqzeZL2IV2YMw4HPeuOEeXAoAJJf/SYKhp+wAt9MSlNXP2g4JR+peEeCEvzFAYOIsFVWD8M+0DFH11+mgVIwpZQA0Dzz33h4Whxbd8Gtc1Cu8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2018 01:44:33.0361 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aa654928-034d-4f5a-3d47-08d5595e07c4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR0601MB1888 Cc: Linux-ALSA , Simon Subject: [alsa-devel] [PATCH 125/187] ASoC: spdif_transmitter: 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/spdif_transmitter.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/sound/soc/codecs/spdif_transmitter.c b/sound/soc/codecs/spdif_transmitter.c index 037aa1d..b70257c 100644 --- a/sound/soc/codecs/spdif_transmitter.c +++ b/sound/soc/codecs/spdif_transmitter.c @@ -38,13 +38,15 @@ { "spdif-out", NULL, "Playback" }, }; -static struct snd_soc_codec_driver soc_codec_spdif_dit = { - .component_driver = { - .dapm_widgets = dit_widgets, - .num_dapm_widgets = ARRAY_SIZE(dit_widgets), - .dapm_routes = dit_routes, - .num_dapm_routes = ARRAY_SIZE(dit_routes), - }, +static struct snd_soc_component_driver soc_codec_spdif_dit = { + .dapm_widgets = dit_widgets, + .num_dapm_widgets = ARRAY_SIZE(dit_widgets), + .dapm_routes = dit_routes, + .num_dapm_routes = ARRAY_SIZE(dit_routes), + .idle_bias_on = 1, + .pmdown_time = 1, + .endianness = 1, + .non_legacy_dai_naming = 1, }; static struct snd_soc_dai_driver dit_stub_dai = { @@ -60,16 +62,11 @@ static int spdif_dit_probe(struct platform_device *pdev) { - return snd_soc_register_codec(&pdev->dev, &soc_codec_spdif_dit, + return devm_snd_soc_register_component(&pdev->dev, + &soc_codec_spdif_dit, &dit_stub_dai, 1); } -static int spdif_dit_remove(struct platform_device *pdev) -{ - snd_soc_unregister_codec(&pdev->dev); - return 0; -} - #ifdef CONFIG_OF static const struct of_device_id spdif_dit_dt_ids[] = { { .compatible = "linux,spdif-dit", }, @@ -80,7 +77,6 @@ static int spdif_dit_remove(struct platform_device *pdev) static struct platform_driver spdif_dit_driver = { .probe = spdif_dit_probe, - .remove = spdif_dit_remove, .driver = { .name = DRV_NAME, .of_match_table = of_match_ptr(spdif_dit_dt_ids),