From patchwork Tue May 31 09:09:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9143929 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 3538960777 for ; Tue, 31 May 2016 09:10:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09B4127B89 for ; Tue, 31 May 2016 09:10:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2C0328185; Tue, 31 May 2016 09:10:00 +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 7036027B89 for ; Tue, 31 May 2016 09:10:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756908AbcEaJKA (ORCPT ); Tue, 31 May 2016 05:10:00 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:57949 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756819AbcEaJJ6 (ORCPT ); Tue, 31 May 2016 05:09:58 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 31 May 2016 18:09:56 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id D69236139C; Tue, 31 May 2016 18:09:56 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id D7497480A5; Tue, 31 May 2016 18:09:56 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id D0A2B480A3; Tue, 31 May 2016 18:09:56 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id UAL08335; Tue, 31 May 2016 18:09:56 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="212432364" Received: from mail-pu1apc01lp0015.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.15]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 31 May 2016 18:09:55 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=003V7HjmNdC8pawGbfLdmQrCP1rbb2m1m46VKd+quV0=; b=HQcGq4r4KwyPPQyySywuBY4U52z07MEd5Beuj0oQJtGIiJ6jNUsh3XBl8udDi7Wz+l0A9HpfJYBpIZiQgqt72KzQnGc2X/4tnJ02gcVxTQ2ChuxedzB0SLuswiE3IbovKJ/BWcO8Rb4ZnSEcC6BGcYXMay07S6xrUciQL/2kTrs= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by KL1PR06MB1704.apcprd06.prod.outlook.com (10.167.63.18) with Microsoft SMTP Server (TLS) id 15.1.506.9; Tue, 31 May 2016 09:09:53 +0000 Message-ID: <87d1o2r44g.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 27/39 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 To: Mark Brown CC: Linux-ALSA , Liam Girdwood , Simon , In-Reply-To: <87fusysjam.wl%kuninori.morimoto.gx@renesas.com> References: <87fusysjam.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Tue, 31 May 2016 09:09:53 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0006.jpnprd01.prod.outlook.com (10.161.131.144) To KL1PR06MB1704.apcprd06.prod.outlook.com (10.167.63.18) X-MS-Office365-Filtering-Correlation-Id: dad25555-0909-45fc-4a19-08d389335442 X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1704; 2:IU9ygaWD5LFlJb3hN17vw3+RJ5KpxMu9iS8QXbU716ujFKYGeJFCsbJc5Ova//oMLTry4ePGbCW/+VEaPhCNlfFTZbwR7MsU4Nq+R5Mz8wsVvxmKl4QUjtqh58m6OaGw4DBqkjG7pMEsBbinFdbolaxAOy7wIDs3IMBZK40VguxmFN5ER2fVPDurA1QeoW1Q; 3:mHxiO6bkwWcusQPI1Rw+X58LR6UPKX9G+dKQcJUnB2tNkE/1JO5XhuomcbO9dmvdgRkTBRoB0csPDX/0dp5CHTtbU0LdnpxdVRg4XZkRPRFWs7lyYhISpKWiUk/FQyiq; 25:39BSKSvhzI6LWmcrvhpD6eEUpvnSPwsGR9ikLuHodF5Ul1XRSacnIhJL0VleQGHzDNzC2nsY9IXIykEenZ1ydQshsQchMCtqZyxG8ENeoTM+cE98zYTj8Vcyi+i8jL1dC88W0mwWyIth0y40El1dI8FdjWQbaCQpckyCG1ff2jvzCA2cAh3KCg7UPTlJJMaXRFyXgb3Uoi+ZgGXZgxHOvvKViKJROn+8LIwvROKbfXSTHKd7drD/CBWIqQcxnqncG0PrVEriBPERwE1SOAJJsF+aOLVd6F/v4T1JgJLRT9BKV7GbDbOS++OY8StaIYaScSIBW+qNIpHn6k7baL5kKfeDDwoMg7MnEbRgvJnr/y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AE8n0bBFuE+Bnt598C5w== 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)(10201501046)(3002001)(6055026); SRVR:KL1PR06MB1704; BCL:0; PCL:0; RULEID:; SRVR:KL1PR06MB1704; X-Forefront-PRVS: 095972DF2F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(8676002)(81166006)(53416004)(66066001)(47776003)(42186005)(77096005)(189998001)(2906002)(586003)(23726003)(4001350100001)(2950100001)(4326007)(92566002)(86362001)(33646002)(83506001)(110136002)(19580395003)(46406003)(76176999)(229853001)(50986999)(54356999)(19580405001)(36756003)(5008740100001)(6116002)(50466002)(5004730100002)(3846002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR06MB1704; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; KL1PR06MB1704; 23:IPrxr1+DEdZNu4Hk9nb38IsI3ii8xUEGwIJdqFDVd?= =?us-ascii?Q?pXn8Ui4HYW/2f+ljk2pluh0QP/Qp8NDvfUROhmAOogPolXWuzK+B3Tuvyjvd?= =?us-ascii?Q?ZQ/wJdm9MHI4FtT4rXTQA7Kv+YnIZkpmjl67ndR32pLsZHUsA7jT7BZASzIH?= =?us-ascii?Q?I04cVV917p8fMl2BtOTZ2mgq8I5VFk8VyDebImAqi84TyC/ILjQL3MhZckEc?= =?us-ascii?Q?IpPavQARmZdny2nlIzXkdNQoI+Y5Tl2CihFuCiLbIll7A9VxaWWthZCEXuzM?= =?us-ascii?Q?LAxK8p6dwzJBSUvnVstRMPz+Vu1YM3enWCWe/nQhrlRYPJAN3DqZpc8GDZhb?= =?us-ascii?Q?nrrh2TVFc7RXaDo5N+9uoVCsn0IdZmetHM+bRVfgKK8L45iPrA1+HWmdF7IZ?= =?us-ascii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U8lYPKL9ySzm5zpYyhLz9OwKgV2qr3HydFi02JHJztBI4DZZVSwaSVYY1YW59V7nZzUa8WyJVO4BJpp9t23uGTJDZx/7NTaF8ZHgX8I9YnZ7x04OQ5QQpUMYmStDdeX6p; 20:ehSsAoTgfwN0oA6CaaOygbTQvbb+NPvB+otdNbqvZOpjiNjEBVJ2pjoq+NDZKr6N1Lw1MeHrvlxz4CpCBmRoYKcaN1EOsawsaCVR8o7bH4CuVderoHnsLp05bh6j8mxmMlakVmBaHGA/Ez+lLvXWZGmzpuA5npYVPbHqDoOOHnc= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2016 09:09:53.3089 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB1704 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;