From patchwork Thu Jun 30 06:05:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9206663 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 75131607D6 for ; Thu, 30 Jun 2016 06:05:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66AA72860B for ; Thu, 30 Jun 2016 06:05:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B7F62865A; Thu, 30 Jun 2016 06:05:13 +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 AAE8F2860B for ; Thu, 30 Jun 2016 06:05:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751223AbcF3GFM (ORCPT ); Thu, 30 Jun 2016 02:05:12 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:28856 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751052AbcF3GFK (ORCPT ); Thu, 30 Jun 2016 02:05:10 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 30 Jun 2016 15:05:08 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id B42014FBA0; Thu, 30 Jun 2016 15:05:08 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id B3B068002E; Thu, 30 Jun 2016 15:05:08 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id AC0C88002D; Thu, 30 Jun 2016 15:05:08 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id RAC18224; Thu, 30 Jun 2016 15:05:08 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="214096355" Received: from mail-sg2apc01lp0244.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.244]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 30 Jun 2016 15:05:07 +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=003V7HjmNdC8pawGbfLdmQrCP1rbb2m1m46VKd+quV0=; b=bb80giaIcoMY0OyHJduLDfWn5uYlrqQBZUygDdFVk4fAfIsvbyHqOIZzF2lgZd6qCVNQmCDd+CBbVwo85pFkIeojNnPK5orpDkQPArfIo9RAYi/VXAKpEjqCCC822slWRHna9R+JFduqDbCauCgQ8yOEoebJaeIq1OTqUDFuI7A= 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 SG2PR06MB1709.apcprd06.prod.outlook.com (10.167.82.139) with Microsoft SMTP Server (TLS) id 15.1.523.12; Thu, 30 Jun 2016 06:05:05 +0000 Message-ID: <87oa6j9q1d.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 6/6] ASoC: rsrc-card: use asoc_simple_dai instead of rsrc_card_dai User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown CC: Linux-ALSA , Liam Girdwood , Simon , In-Reply-To: <87wpl79q79.wl%kuninori.morimoto.gx@renesas.com> References: <87wpl79q79.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 30 Jun 2016 06:05:05 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR06CA0015.apcprd06.prod.outlook.com (10.164.91.25) To SG2PR06MB1709.apcprd06.prod.outlook.com (10.167.82.139) X-MS-Office365-Filtering-Correlation-Id: cf008151-6316-4db1-5d26-08d3a0ac7bbd X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 2:dnzH7TQuBPGdQ5wOxdI5ow5eO77/04BaKwHn/1wDAaM9qOWxj/p+COz8uayKXcTgpEcSKi6K3ysiclYR5tTzl99unvb63XcXhr6vqOzeeibjRQHP46Z9PO+NzAYgWtCC1uhQ7PypLWI6yQqC2PYLV5YZXWh2R+n7LEVqgqXDOKdOOC/FWYEc3voOvWwAoC2Q; 3:WLBR1p3av8GVB2pT8ZEtNkuRo43WCs9lr8tDRpxRgGDDq/y1GJUUaQSQeVJ3955z0YfA1n9wNcEJH5HCZbKMnLb/DPs6rIqe/BLvfeSZtiMSnAoj2SjUwe5p7zRc2a0t; 25:P1sEXPiYZkeFjP7RmwKzFH0Gu4ILc6w2++eqU6DtMGAt2oMz/4vbHi1pV2f9Ipk2zFHmNbOHrHdKKDzANmcddbvQroY3b7XB97CY0T42yfq5Q2xOjMQIibZpCnbOoN9RtSrpcNvPrT2E5nL09QVNJiy774cZGQvOnaxJ0hRyWaMNCFNB5kEqOkgegWCTd76PdAooQm/wqfQSmgcji+8cmPJ/rY27EIkfWZym50cE+BQQaUkkEI/+GSaLGP0tfxa4X9fF/TVHBNrm0DBSVN3raZgXcSqorID9tgcOjpRZuwCEc6dE5R8Ude7f7gDcGFmymbB25dRUlTjtfh9+wMR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ZkqN7WiYmqeX8Yeu1sHWnKZKOYAf1Mo/pykFc+QQuBGc+Xw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:SG2PR06MB1709; BCL:0; PCL:0; RULEID:; SRVR:SG2PR06MB1709; X-Forefront-PRVS: 0989A7979C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(69596002)(4001350100001)(110136002)(54356999)(97736004)(229853001)(19580395003)(92566002)(189998001)(68736007)(33646002)(7846002)(50986999)(46406003)(47776003)(36756003)(76176999)(19580405001)(586003)(50466002)(77096005)(8676002)(7736002)(106356001)(2906002)(305945005)(53416004)(2950100001)(101416001)(86362001)(23726003)(83506001)(105586002)(81156014)(6116002)(3846002)(66066001)(81166006)(42186005)(4326007)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR06MB1709; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SG2PR06MB1709; 23:DPHoI38+fPL17eXJ4jQr6h7S+Gzm4zCScbZD2NN+A?= =?us-ascii?Q?3salM+g2lwtZurKyPIO7WCI4qADJY9bhCuT0MxgJ3KBUTw1dXbzP04Utpurn?= =?us-ascii?Q?WAjeiCyuNmkJUy9jJt3hjzF6mHcYDCY8okoqaxkQ9r1hKdyvtHX7KydzEkFs?= =?us-ascii?Q?b55Yl9mTtmi3QoJ7xDZ4eh3lIvzQRQKf4H+HweAsGnRIISusUiKJ8Ym7TWym?= =?us-ascii?Q?VZ1T/ngbWajPaORSUG1QBi8jkHdpBpwUp47V4vW3M+XEe7ZY6+K1Rb4blqfw?= =?us-ascii?Q?ZU5twm5uKSqPPVlWAgK6NgZ4QKYaRM7m4tLDU2N6pXf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w3EZIMRACqlMnlCPnl4hq/cyEUEeNim7ZX+XzLZUMhITd/svsWjjDw7YEKLUQVFw60uywXECB6erDS47vcHUpQoTwJiPMD8eBXqk+P4ZJPEeJuISAEVhq4Vd0= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2016 06:05:05.4273 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1709 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 --- sound/soc/sh/rcar/rsrc-card.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c index aad8f8c..e28c9c0 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c @@ -47,22 +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; - const char *name; -}; - #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; @@ -76,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); @@ -86,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); @@ -102,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; @@ -164,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; @@ -260,7 +250,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; @@ -297,7 +287,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); @@ -364,7 +354,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;