From patchwork Fri May 20 10:00:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9129103 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 8FD276048B for ; Fri, 20 May 2016 10:00:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FCA2279C4 for ; Fri, 20 May 2016 10:00:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7277327BF1; Fri, 20 May 2016 10:00:43 +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 CA149279C4 for ; Fri, 20 May 2016 10:00:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753936AbcETKAl (ORCPT ); Fri, 20 May 2016 06:00:41 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:15458 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755415AbcETKAV (ORCPT ); Fri, 20 May 2016 06:00:21 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie3.idc.renesas.com with ESMTP; 20 May 2016 19:00:18 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 7FAD350DBC; Fri, 20 May 2016 19:00:18 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 5F14D8002E; Fri, 20 May 2016 19:00:18 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 594788002D; Fri, 20 May 2016 19:00:18 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id VAQ14414; Fri, 20 May 2016 19:00:18 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="211273519" Received: from mail-pu1apc01lp0019.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.19]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 20 May 2016 19:00:16 +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=sQDtmB+9rHwlaVAar0cl4eTeBye6ySKgqZtNJbsOkgQ=; b=SlVYVo0SUuJiCaFZomqlpKpiCfiIlS+XgOEbF7o6+ym0WuK7A2lUFtrf9e65hvd//Klzt8l9KLoqTXMYQhVGSRHZwScUmH61IKcEkctyfFvs7dwVSrJL2meRpu7vR+r8OHLCtQKWdatlqLT00c6Z9mVezzyUWD3iFENS9gA7uX8= 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.497.12; Fri, 20 May 2016 10:00:13 +0000 Message-ID: <8760u9qclm.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 35/49] 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: <87lh35rs8w.wl%kuninori.morimoto.gx@renesas.com> References: <87lh35rs8w.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 20 May 2016 10:00:13 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OSXPR01CA0067.jpnprd01.prod.outlook.com (10.167.144.16) To KL1PR06MB1704.apcprd06.prod.outlook.com (10.167.63.18) X-MS-Office365-Filtering-Correlation-Id: ac9d0a1f-4893-4597-e433-08d380958a62 X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1704; 2:49aa7zVS9EcnbZKORjrFvNt4mta/CyHoApwLqG+QWhADuVRwp3FTiBbYay43tF9G1Y5E2uOzp9jToeLJhAxADV3bzsmQ0NCPIKqt9sOFQdpXPdAGAcf9tUZu/ccwkmAjw0Hle9CJ1TLJa27A2N21RY8qn+g3D2l5HUtPxkOUKK6t0qxPlY8KyEFehYe8HsZD; 3:HVAWSqPStbvhVBVrB0X7I+YNTT4BwMh8i5V43KsEgQDOdPhhSISfTJbayDW9rtb90CSeWX9sc9h4Cp6Okwf3STDbmYfRTjw02ntmoRV6gq2QudO020xjl+ps2zCANemQ X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:KL1PR06MB1704; X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1704; 25:nrfgd+vv5YiV4o02BeL7ItMTYfoQKCZe/RSjCt1Z5mCxyaxz/yl0q7qXxd/D9Zxfju9GycuE8k+ZdxNwyknCeowYNFjx2SZZrm8RyBrBywyeGPrrexfPWx6+tZbF9Rev0xcCDGm36Di5jOqQ3pulGFM8FEoGoIWqncynV8d20ry6sZpLqlfHwxJS2J3HA7TjTd+RL2qOY4YJJ/b6+BhNb63XpQXVgfDHuaqIUuFR1P9k3MWZhiTpdj9ojgIWu3NKDd6z0zw2T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cvlgoGG8L1d3vZtVTN/akyBInkGYUysnKFEpwIkAR8p9G0AxG+4U+DUbpM5K9yP3AiAjLH9H4U/iT3yb8MfPi2O9KxPlcYXzGefTWHrNlwb7d2UplGkCqyVsQnxee73OqwEIya/8JNSD/FE2La95unxkYEWbGKGz9h37qPqetCispV8xRKGbqmUI3c+MH7pTvTgEUwH+2WKKI9Mv3ff9Gg2vfx4mFxkYhX+Bz9Lbk6PMxsVii4kgKqQGYbMeiXNBDlcBa4mvcsFCuQBaqdZ/qbOHo7/xZCVhYOLXuEsRj4ujqkgUqvw3A26vZnm2e0XUAX4IghiUskHpr40n98d8Uu6eTBojGgr33umYQEUSCLhnVFcSZOBKG0vqg== 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)(3002001)(10201501046)(6055026); SRVR:KL1PR06MB1704; BCL:0; PCL:0; RULEID:; SRVR:KL1PR06MB1704; X-Forefront-PRVS: 09480768F8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(2906002)(42186005)(33646002)(50466002)(4326007)(189998001)(46406003)(3846002)(83506001)(19580395003)(53416004)(19580405001)(81166006)(92566002)(54356999)(76176999)(586003)(6116002)(110136002)(50986999)(23726003)(229853001)(5008740100001)(8676002)(36756003)(66066001)(2950100001)(47776003)(86362001)(77096005)(5004730100002)(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: 1; KL1PR06MB1704; 23:TAs8/aC3iucnNjRUPhRJq0ss7sZrFea2yd3Joyv0k7eWaOVjr6fvkTv+PtPuEOT2ZthJ0TChKzFz4+lyjtNhGBnj3IS3NYrKnRa9bltTRAfLsF/QUYYLm0fb1gKVROmP4ooXAm0zBQiUx34net4DAEUY7PfQR4HHBnxT1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68n5tvGhGaVSyywFIoB9cR3Rw3r58+MwEiIHz2Y5SQYn5OQqRITJ+ICGKb7oavMsLmljcOE57vIXAxxNV6g7FYrydKR352gcKcKYJ0/uXbuImK/qZDmUU5R+rd1JSTrRXSOlaNxffrax3TW5FGdzoq5/mkBL3d9YvpunuxXY6I2yvm948b; 20:WPcVBDDplRbkZbyMsjz2CM/r5RtobWPFwpWW3g6x5FQ+/MWzo9JveJPh2lktetbC+694p7Dt25XYQeZBYtDAQ2L/CZv44KwYe5rw/yFjenNu8WNE0xnd/TNZRa5Iok4mkToXdl/JWlum+AympVETuS+znVQYjNwcTaJoym6Zt4I= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2016 10:00:13.7403 (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 e268011..fa3f02b 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c @@ -44,22 +44,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; @@ -73,7 +63,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); @@ -83,7 +73,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); @@ -99,7 +89,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; @@ -161,7 +151,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; @@ -257,7 +247,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; @@ -294,7 +284,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); @@ -361,7 +351,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;