From patchwork Wed Jul 6 01:09:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9215307 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 5682E60752 for ; Wed, 6 Jul 2016 01:10:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 448412853D for ; Wed, 6 Jul 2016 01:10:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 392B528549; Wed, 6 Jul 2016 01:10:21 +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 A0C332853D for ; Wed, 6 Jul 2016 01:10:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751326AbcGFBKF (ORCPT ); Tue, 5 Jul 2016 21:10:05 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:56738 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751076AbcGFBKD (ORCPT ); Tue, 5 Jul 2016 21:10:03 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 06 Jul 2016 10:10:01 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id BD9F0441B2; Wed, 6 Jul 2016 10:10:01 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id B188C8002E; Wed, 6 Jul 2016 10:10:01 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 6A12380030; Wed, 6 Jul 2016 10:10:01 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id LAG14155; Wed, 6 Jul 2016 10:10:01 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="214963453" Received: from mail-sg2apc01lp0248.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.248]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 06 Jul 2016 10:10:00 +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=MhvtAFuXGjaN8MpffWNJbN9otWJAPKfUcvEAlTvl0iE=; b=Jzs3gcG0S94AHmYGuNOlgjVC0NrerJ1AuTzyRjSWV3FlCYnazfq065njdQOCzedbLvcth4zrYGc3vt5U79IKBYzWddX6I2q1qx9nIYecCraTG7MqoeN6NJEUh5a/R3y/VEvrmFxhWKcDZfAoG999wGubbvsIeMPPQVCOqgL2AS4= 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.534.14; Wed, 6 Jul 2016 01:09:58 +0000 Message-ID: <87twg3lgsm.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 4/7] 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 , Liam Girdwood CC: Linux-ALSA , Simon , In-Reply-To: <87zipvlgyf.wl%kuninori.morimoto.gx@renesas.com> References: <87zipvlgyf.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Wed, 6 Jul 2016 01:09:58 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0042.jpnprd01.prod.outlook.com (10.164.162.152) To SG2PR06MB1709.apcprd06.prod.outlook.com (10.167.82.139) X-MS-Office365-Filtering-Correlation-Id: bc600001-7308-4740-8382-08d3a53a4025 X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 2:q5fGWgM4XPufS3xsgzL7eDHDFYIlllgxmgdd3uVQ0dEmn/t7mpp0iAHsAIbh2MmLJEVZgcUim0+c4TdUcwI4VdzrpSc83z7bKM3Pmlm8r4leZJ9/WK4BdnrmwfHxnatiIBs96vl6iIW8dfwzOTnTnCs8M1u27S/Qu7xSwBU7rBZe2+s8PJTeQwmbzMePUV/9; 3:ZZUHMvuwGkV9R1+h7FKGPAhOpe8hUL9vKo/eVunOMO+kml1nvtrLMPCaH9uHiuBSg0mVbLWgGtx+Sbl8kZR8yEVXP3hO6LzB6D++zn3peVu+sJc3pBQ3l1ilgu6tEMse X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB1709; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 25:m9mgd4uqIIcmlJ+z5eaQwfj4vN3Z/qiSE9VO8k/ZOEkqC3QBDPz67Vc7sIo9e5Efci0jQL76HYe5T1A2XjVAuHf0qLWTi0Pm7JcDkSooHfkJvZVtHkodfKv6SBtsyJPt6l7cZwcqMq5qsJ1kEp/r4KXPe1hc9i6rKfJ6f0Hs+/z6c1CmPtIIMy7p8BRLBhBEEnu4Le7xsd66XHxWySbnDfId/1gHiZ3U0hG3lUfwlRCr6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iZBqfPXUjaxmv0OCGqJdLpFTOhuv2CYYsf/2SRLKryc1CFY0Vn0iCtkshaLKGmNdafqHELL4DO2wD5YZoDfwRH+XkgRnvBu8xAWezCmnWGI89BsCTFxyM8VoeIy+wLyRbrdY7x7sHDgJ+ir5UGiAtKv7gv+EwFPjotoK7VrKl3Lar2IHKSQY8TZCPqhg; 4:QbLpJ8JtuIn31TSdJCq8DSZwq56q4NteANRFdo+riR9VG5JhDeIEeQa0aymgJN5F9D7MmecxEN8rwgb3mnm07XsxQf1N4haU8Z6MPWWZbq0TtaDxJmGz6Xsm3SdAKws0KWCh2U6sSpMXy+is1TxVd6sPNgBaI1Y0DtmY/lZnaEgG72L65PNkDCPhrGE5weNZfH5tIVQAAYwCt8s2GwR4zvWXKZF4PTdACehvib5oPT+qXsDsgPfUTvCvnJfi1gyxkEMFivc50P85h24PYKodWYd1dBcNsZl0PGJcRvk2Qt/f9KXypecD3XH+0LjCUIne/qe9UbXCT7oYSRhJh4twZWBhuuME2HobPaJP3nkj7SzU8j4l67d8A+TDmuF1YhbNqytwA1NCLjtVliX6m+Ct7g== 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: 0995196AA2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(19580405001)(2950100001)(54356999)(19580395003)(69596002)(50986999)(76176999)(92566002)(86362001)(46406003)(33646002)(229853001)(66066001)(47776003)(77096005)(53416004)(6116002)(3846002)(97736004)(23726003)(5001770100001)(586003)(42186005)(305945005)(4326007)(189998001)(2906002)(68736007)(50466002)(7846002)(7736002)(81166006)(101416001)(105586002)(8676002)(106356001)(4001350100001)(83506001)(81156014)(36756003)(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:BJIbYUZDcr3mBNtTuBmL7ULrGR8GMxYKIsw2CEEFU?= =?us-ascii?Q?CUVTrWSv/uCTVZReoPqnolVAkkVsEmg2F30ZjbYIJOX356GKcC5TIAyCv9cP?= =?us-ascii?Q?jQcUATORF85m5zm92/H6FGZrXEMnNNPeoPmIs1s8q3hmgEvz6lH225fbXFMs?= =?us-ascii?Q?Ylp/2y+or7qY010UvdjQPIoRVn17rfD+fLr5p9ToNWgbcoljYCmIPYRtttG1?= =?us-ascii?Q?IiIMO0DAMpS03Pk+1A9SRXrkVHlkObugsTY1SehOQa/g8NfhMZZqLxAq+xAX?= =?us-ascii?Q?o4iXsQkyHp9X0/JnjxEzsWrzVsHF6oCy5Hj0Jt+lQa0bRIhEdrcbR7DUB+uY?= =?us-ascii?Q?gL3hfbyvP4Silne4A78hwlJzIIbxGd0DhJEcChuAYgA9WvMJPkvCk3Z8IHPC?= =?us-ascii?Q?S5Ul0S3Aa3OrdisRYT9LYQtPDG6g5iAixwberWuYAeFhl7f9Toa5A+ah8IcJ?= =?us-ascii?Q?6uuFilWeWVDpe8j6/r5ZSg6J0rQBTYnn+r8biA94/yG0EFAGxvgu2dkID60b?= =?us-ascii?Q?Cusgc6gkxHkvbhgmKHm0hwh+CnAT/CWqPoM5homwl0gEyZ6T1Zmy01Nyk5Op?= =?us-ascii?Q?kwvQq2zbNm8PQH9FDt99gKIXXOZ4OMOalquO1nX7VAarj0BPMcVbSt2e0DuJ?= =?us-ascii?Q?3QroIKJ7idkiI0VPnhdEzeTQbwtZdTmEEHb63TW7lFvTb5L/ioEG2oSJcJJt?= =?us-ascii?Q?QKPz/ePjwe9P5FlyQjG1hdMyAMQQq3UpBhTmB445zWqemv5PH3dwzOFP1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9H7KFSpgobAU7QFCgUbXkFNNDU7Ax05fm0AR7pEwX1RQyhgDqd6Re68jqqk5b7DaTutvDa8pjggaLmr4y4A=; 7:K2oyIDsmIJcS5JEXS3eKIqYP16I7iHXUTR78sGMQ3aJslSGt60r19p/GhOA/U7KYbGTt/74lyp3m4gitJCraMRhrP1WMcuNHASRD87sDuCD7ae8mf5KnGRJ7zc4uxHRUR6Vo8NZ2K+GY5l6QeT93ITMsP4lP6EC9LhLo73+NKK8crKEBJxqiENArhbGGyMI6THKnf+1uMbUO/Ol7m26PGyZDgExOjUnDUN/SVcHyy5+pey9EvXKphGNeCPb9S0JM SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 20:YZbNrUz/LY3xjzTsS3u8AT1WesIXEQvnzWS/9speoexNGOciX4BX0lyzIa4Ys4N14BbJYQPiWd1uf5B9i2KIBIW66aSiUvH2suV7HVwsjunlZRXLbxY9ktltjmD4SvRKk+jT4VhXXNJPFDhTjGM8Bx+L2BeWPXUUqeMv0QORCn8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2016 01:09:58.6473 (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 | 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;