From patchwork Mon Jul 11 23:58:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9224415 X-Patchwork-Delegate: geert@linux-m68k.org 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 4F67760572 for ; Mon, 11 Jul 2016 23:58:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 411AB26252 for ; Mon, 11 Jul 2016 23:58:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35C0427F7A; Mon, 11 Jul 2016 23:58:58 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5EE926252 for ; Mon, 11 Jul 2016 23:58:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751559AbcGKX65 (ORCPT ); Mon, 11 Jul 2016 19:58:57 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:59752 "EHLO relmlie4.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751365AbcGKX64 (ORCPT ); Mon, 11 Jul 2016 19:58:56 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie4.idc.renesas.com with ESMTP; 12 Jul 2016 08:58:53 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 00D7E3FB38; Tue, 12 Jul 2016 08:58:54 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id D67A98002E; Tue, 12 Jul 2016 08:58:53 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id D17898002D; Tue, 12 Jul 2016 08:58:53 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id JAE02964; Tue, 12 Jul 2016 08:58:53 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'208";a="215358777" Received: from mail-pu1apc01lp0019.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.19]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 12 Jul 2016 08:58:52 +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=zAUB5fnRCLc2m591JDTVpjEQEcBWT3WtyhRIWQz5dXc=; b=QAx/xW7U/QGoHJuJuPWpSZXrJIH+8Awi/53wXeP3cVhX1OQC1YTep7/KJBmPSD3F1x/BjbVxrdDCIUIGbcMoRWDMFVM6J51zJkbKY4sQqZRen69vUWp3BeX+xrOKm7/U71/G6lA1+dTyq+GEdQeLm11OSbOAIsFY04EWM8b/nEs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by KL1PR0601MB1445.apcprd06.prod.outlook.com (10.169.69.23) with Microsoft SMTP Server (TLS) id 15.1.539.14; Mon, 11 Jul 2016 23:58:50 +0000 Message-ID: <87a8hnn37f.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 4/7 v2] ASoC: rsrc-card: use asoc_simple_dai instead of rsrc_card_dai User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") To: Mark Brown CC: Linux-ALSA , Liam Girdwood , Simon , In-Reply-To: <87furfn3bj.wl%kuninori.morimoto.gx@renesas.com> References: <87furfn3bj.wl%kuninori.morimoto.gx@renesas.com> Date: Mon, 11 Jul 2016 23:58:50 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR06CA0022.apcprd06.prod.outlook.com (10.164.91.32) To KL1PR0601MB1445.apcprd06.prod.outlook.com (10.169.69.23) X-MS-Office365-Filtering-Correlation-Id: c966c52b-4503-4ba9-ecce-08d3a9e74e6c X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1445; 2:Nc50hOi65yXTvK0mzMulUssDpRKcKH67ohPPMSwwB17sreifWkFrTTl/F/m2LgOP84wq2yFzmuIKZbj/ZdIvOAo/nfeZ2NQk4ad4Kvyz6Wp17xyUZ/TalC0NGk0rTy1KtyQ+Hs64LhV7gZjZkWVQtD/EZELmjzZa8eFFfmx0wmi8ql7nMhqm8JhAWe4KR2Hu; 3:tUkKbMdPB8jvngZWKsEROh9lq8RdjxRuf56q/6zgV7LWPKanXM8Kb8rR86ey5uxBuaK0d+tqevrUtRrMv8RMQ++uefuUItHdpNTp/2tU5hM/OPMBbe5PTFCKohtMhtZb; 25:TwBLRljUgeTNkIojNab81DubukF6O9T/79MoSZUmfYMXF+RPIrPZcJUv4gk4ABS6RmgkeSrs5E+dThEOF6vbCxYfgChe2eNjruqFMLdKDPQXIwDe5ECuwkFuY1Igl8yYNQiUn5QlbAQ3gomQ606QTb0rzTBH8vi7rahon9RpG9RNZjyXwg2yBRPVR7QCDWuWtQgV2eQo0V4DOglsRd1TIxKnKove8wRjoH0287IVWc67rZa0BW1rgOkgWHHNCFymuw9kz3K8PKEsmjRHtrELH1+rMOGLqo4/nyX7tiODyHaUWBVUtriZxqaF4wyb1LQhiDZrEGRZkOsA+AaDurXPuQTGI67175P/yWVZMADhX/Fkhg47B0xLe5BO6oTQrdPUw6sXiz9+NXOlpJSfpDGZSSzmef+Fg18ANEN5WuVIqJM= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:KL1PR0601MB1445; X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1445; 31:dqpeeTb/z6bIwneBI4lk13ERnzhrTG0kAlETvbfV4Pt8pxsn3oVtklLjEEGAZrxB7Ofnr04aDP9Ka1Gt88EJ3WbmyBCAD6wd2Bq2fkBdVUkWJUObK+eeTg2rUUB21vn4gHgYoxdZcpPJ7RT40z+D5Wu2lI40N8mg8DHHvadgrhSJVIAJmIQI0OvHrkQhlDLlPqMQPjF1pXo2fxXswDr5Fw==; 20:E8zPKsqrW9AaRRM7hWrsx3/Ualx2EWWK0UhRy5hZZZgW+BWyzgPli4PpEG2Z9dLqfnuaxLlaIU/a2mBqPPjrvPC+1BK07/LrppW/hpLHlns34FtnpD5VLWkbu8HohcWsF6JxwHHQ+xW8X9UA3Q1H+xPu0vVI1zOAuUffTPOd1e1RU2ayUt7rj1S/rfRxI3pb+mlG0tTRv1zm1IOE/N3IaWpeJ4Jlq9ttzqDyLI4KZYhPc7PRiqM87rS+MxyEl28MtcQ6UfXzA4XaMhRbKS3Zg3f/Gbtb4n9fIV13ahYdqI7JGKgmAOq5q/FmbxuD/r33/1sRK8XSyEtdzBWPLN9XMXX+MLSxyCNfvWkeHBtLYTNUEpHc4M9zQiGygVopHEVG8GQmc60FdvhstjiGArX8YcaHHOvRQ+gww4j+MvgZQ4eaMiApFQSHTxoKJB3ymyJFiEZj28LvE+0qwRwpIr7XqxnQGepLO3CH0Pxxjo6kZmvIzHfpds6ThIjojWr6TFvx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:KL1PR0601MB1445; BCL:0; PCL:0; RULEID:; SRVR:KL1PR0601MB1445; X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1445; 4:dug1LKr/L0R1yb/t9GOKZYMgLXiQIWdpZyKxnoDTOul8xQiAndJnfyvLBJ7opKPQoHGRMOqiPEl2pvzOCidEp3uuh4ZQmqTtU6spZNm7w5W1CzIhiTfugpCoDvBQSDON/9VCe4xpmFTWxbFTBE0LQph8wwTiO05rnKxIGQaF7DMuVQts/fBheGZQgHOisLZDxKucouKE0CmvX4bcVn98RduB3RIaSa9ZVvzFapqdtKgsCvFSZRltE+mJq+ryU+NpdM4nitv1+w/1gCrdmJLadxm1PIc9pfee3ieKrGBt83IPEkXLHijcrsAgCZFpdlfH7ntoK9pAs7V/Yrxe8YSXk4aLNn31829hEOJm4THIIgtwD5voraqUVD7cIQb7gofqYAe8prMj45k91wVIBVMtdA== X-Forefront-PRVS: 00003DBFE7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(2906002)(305945005)(7846002)(7736002)(229853001)(2950100001)(106356001)(68736007)(4326007)(47776003)(586003)(19580395003)(4001350100001)(66066001)(110136002)(36756003)(77096005)(23726003)(3846002)(33646002)(6116002)(42186005)(101416001)(53416004)(19580405001)(83506001)(76176999)(189998001)(81156014)(8676002)(81166006)(92566002)(86362001)(46406003)(69596002)(50986999)(105586002)(54356999)(50466002)(97736004)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR0601MB1445; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; KL1PR0601MB1445; 23:JdF1Vmd/NAucbBMsbQsSlfzQy3FDsFOy8LTHIC8?= =?us-ascii?Q?w4ogGBPVMRrHJfJTmDmOG/RHciTM9SWLzJe1mERp16muZF5hFX0d0vbAB8Gs?= =?us-ascii?Q?9xRL2MkRGAQEuy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JYsTnj2REESllvlZXYzQC4zPfun348FX+suDeMHee1LSJLX4hNLEKjnwVYddUweBH+RFqZN1LWSqfK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1445; 20:9lkVerDmtwXOuSJ3aUpsTsuMIY+v4oTYLNE13Equ10H6JbPhmkKnaR/xXLvqaFzAeZqhxgCs6o2/FvXv4eb9t3MHTzMbFvjeRFvQVVG9JB4IWrIbgiP9zWzP6kiPmSsXFJwWfGqOzS+DzCcD6LRzdG0CgwDfk7J3MipH+UyOxKc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2016 23:58:50.1427 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB1445 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto Signed-off-by: Kuninori Morimoto --- v1 -> v2 - no change sound/soc/sh/rcar/rsrc-card.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c index 81914ca..239a13a 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c @@ -47,21 +47,12 @@ static const struct of_device_id rsrc_card_of_match[] = { }; MODULE_DEVICE_TABLE(of, rsrc_card_of_match); -struct rsrc_card_dai { - unsigned int sysclk; - unsigned int tx_slot_mask; - unsigned int rx_slot_mask; - int slots; - int slot_width; - struct clk *clk; -}; - #define IDX_CPU 0 #define IDX_CODEC 1 struct rsrc_card_priv { struct snd_soc_card snd_card; struct snd_soc_codec_conf codec_conf; - struct rsrc_card_dai *dai_props; + struct asoc_simple_dai *dai_props; struct snd_soc_dai_link *dai_link; u32 convert_rate; u32 convert_channels; @@ -75,7 +66,7 @@ static int rsrc_card_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); - struct rsrc_card_dai *dai_props = + struct asoc_simple_dai *dai_props = rsrc_priv_to_props(priv, rtd->num); return clk_prepare_enable(dai_props->clk); @@ -85,7 +76,7 @@ static void rsrc_card_shutdown(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); - struct rsrc_card_dai *dai_props = + struct asoc_simple_dai *dai_props = rsrc_priv_to_props(priv, rtd->num); clk_disable_unprepare(dai_props->clk); @@ -101,7 +92,7 @@ static int rsrc_card_dai_init(struct snd_soc_pcm_runtime *rtd) struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *dai; struct snd_soc_dai_link *dai_link; - struct rsrc_card_dai *dai_props; + struct asoc_simple_dai *dai_props; int num = rtd->num; int ret; @@ -163,7 +154,7 @@ static int rsrc_card_parse_links(struct device_node *np, { struct device *dev = rsrc_priv_to_dev(priv); struct snd_soc_dai_link *dai_link = rsrc_priv_to_link(priv, idx); - struct rsrc_card_dai *dai_props = rsrc_priv_to_props(priv, idx); + struct asoc_simple_dai *dai_props = rsrc_priv_to_props(priv, idx); struct of_phandle_args args; int ret; @@ -267,7 +258,7 @@ static int rsrc_card_parse_clk(struct device_node *np, int idx, bool is_fe) { struct snd_soc_dai_link *dai_link = rsrc_priv_to_link(priv, idx); - struct rsrc_card_dai *dai_props = rsrc_priv_to_props(priv, idx); + struct asoc_simple_dai *dai_props = rsrc_priv_to_props(priv, idx); struct clk *clk; struct device_node *of_np = is_fe ? dai_link->cpu_of_node : dai_link->codec_of_node; @@ -304,7 +295,7 @@ static int rsrc_card_dai_sub_link_of(struct device_node *node, { struct device *dev = rsrc_priv_to_dev(priv); struct snd_soc_dai_link *dai_link = rsrc_priv_to_link(priv, idx); - struct rsrc_card_dai *dai_props = rsrc_priv_to_props(priv, idx); + struct asoc_simple_dai *dai_props = rsrc_priv_to_props(priv, idx); int ret; ret = rsrc_card_parse_links(np, priv, idx, is_fe); @@ -371,7 +362,7 @@ static int rsrc_card_parse_of(struct device_node *node, struct device *dev) { const struct rsrc_card_of_data *of_data = of_device_get_match_data(dev); - struct rsrc_card_dai *props; + struct asoc_simple_dai *props; struct snd_soc_dai_link *links; int ret; int num;