From patchwork Tue May 31 09:07:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9143901 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 BF05E60757 for ; Tue, 31 May 2016 09:07:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B321627B89 for ; Tue, 31 May 2016 09:07:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7B2A27D17; Tue, 31 May 2016 09:07:37 +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 4B5DE27B89 for ; Tue, 31 May 2016 09:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756869AbcEaJHg (ORCPT ); Tue, 31 May 2016 05:07:36 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:64763 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755920AbcEaJHd (ORCPT ); Tue, 31 May 2016 05:07:33 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 31 May 2016 18:07:31 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 79BA96127B; Tue, 31 May 2016 18:07:31 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 79D4E1806F; Tue, 31 May 2016 18:07:31 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 75D281800A; Tue, 31 May 2016 18:07:31 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id UAK11432; Tue, 31 May 2016 18:07:31 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="211980840" Received: from mail-hk2apc01lp0216.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.216]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 31 May 2016 18:07:30 +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=tqqFnGU8ltrcdl1Psc1KwhYV0WMvETNgRSZi/UYKLmQ=; b=L2M9PUVpDSPTZaW4+s1usMSDoK+g5Ca3zWsgsSjpVgYq/FqF5tH/JYdb40tS5hldyVTl2URpghXXUeEsOfh+GUJ+3mJKUuXRxvjqcTJNymCV7c7C1Un+y+aj141QJULkYyV00LkNk3BSC7Vsk4xrfwSrHw23N4vIKrQtkmsUfl8= 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 HK2PR06MB1699.apcprd06.prod.outlook.com (10.167.73.13) with Microsoft SMTP Server (TLS) id 15.1.506.9; Tue, 31 May 2016 09:07:29 +0000 Message-ID: <87lh2qr48e.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 21/39 v2] ASoC: simple-card: use asoc_simple_card_init_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:07:29 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0026.jpnprd01.prod.outlook.com (10.165.48.136) To HK2PR06MB1699.apcprd06.prod.outlook.com (10.167.73.13) X-MS-Office365-Filtering-Correlation-Id: 1a52bf57-91f5-460a-d0ba-08d38932fe30 X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1699; 2:kz1bfbz7nx6LjRyJuIW+OAntTXV25TATLGWbQ2GHEj6aZiumBR6Yxc5WCF61qCtXFZei+q69WLqnqQ5Oi05d+CmBHo8F/Bq7FIdfiKD6qzDb3Do0qeFS03Nwqlq6IrLG42Jn2EC6Jgz3PNBdfkCsKfqDtcpx9F2/HKStU7vyFiowqJKVrsbt8xbQlKFR8Ary; 3:4e5h+iVCDceM0OYz/NJdEc0owJUxl32B14sLSY0K4CRfZEFlNlHjRep939EWTOltPRtPgcNg2KiEbtENFDXEhv4nDOsuSSsjjyuT/HQlkcOEs/qqzmZAsgAE+kQub2va X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HK2PR06MB1699; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1699; 25:fPwYYwxvUoVMq9o6Oy8oGL3kFQNZrhTuTfQTsf7zWOvwITrAkEncI6Mv7+GnHnXWQNbTJ4PoKXnPLiITWhWBKwPjS8Pk4zDiyKF7KTS4uYVzLsU5Jfb6yuILUDWuSCxHdu9SEDOncXaqXNvpEX091nzw7DDMJA+t8lAP8V8b6eQU5KYEs/4UeTrVIjTkkZOu5hb9EnEa4JPIIhEaVZr7eZYTHhntvmQYHN/AtufzbFJxEfVDLQe3h8IiqQmLDFxlD0kD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WXnE1yfw7eBB/vsl+a2Geoox15lKsaxx1sfP+1xC5HTRTZTyOGCgeKVY0KmioIyp525RjTzz1WLCjFa/RqGuiCBi2Czf0ja0BmdXLhL8tkYqv2FnaskY7ohIrHzD3WYDWVY842hnpYxDG6K5SwYiigWTPQqo7SCp0xLSs/ag/e2EflocaGCrVUvaWcZLA2ikSoRhU5QMN/No2k38qEo4HhjLnRpXhGe8ZpL8ZsMiTn5ViXQCheplqhLny/MnhWGZokslF1FpfLUJYWl4lGtMchdRl1pbuPnUmnbexOwUNwE8l2XiDdZ07L2rmpqvJA== 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:HK2PR06MB1699; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB1699; X-Forefront-PRVS: 095972DF2F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6116002)(3846002)(2950100001)(586003)(81166006)(8676002)(77096005)(86362001)(76176999)(54356999)(575784001)(92566002)(23726003)(4001350100001)(50466002)(36756003)(2906002)(5004730100002)(50986999)(4326007)(42186005)(46406003)(66066001)(189998001)(19580395003)(19580405001)(53416004)(5008740100001)(229853001)(83506001)(110136002)(33646002)(47776003)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB1699; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB1699; 23:MX8dJYBJYR1Td/9Or8DLsgXSItl/nVo/FnwEd3GBG?= =?us-ascii?Q?20w7viGgx5DFiTpZmtvudsZ9fgJ/8I6Ad7PuVirs409MXIa68AQEqrNVsyHT?= =?us-ascii?Q?mBQHFxhe3bclOJ7MymmJMDO9wHYkdv9e2hEc/WUQXMpzmbc8avQnO4mzqFzf?= =?us-ascii?Q?em7Z2KkNaCmR7pvtONQ+ApeQL0VPg0sux6l12OFfPltVSV/aVp4WtQX0lHYb?= =?us-ascii?Q?2jv/ztHs1EWfabkvUo/cWABsQ+2Dr5GZeFdtyOwYNKgc+OPSVEbd0bD1fWoG?= =?us-ascii?Q?K41cdaAJDpActX8GkdLwT3iQhbpaEWTj35mSnIx+uyrL0LyvArmkGp0xp1BL?= =?us-ascii?Q?yrooJMJ9yWnFF0sKQVvYwOIm/qyCrgBCGq5nuhBHR9LR2q4K0ffmsPZFAguN?= =?us-ascii?Q?6ULS6f1i4vI987N6M9f5/SPqfnbB7f0zEPJDrBofG9b7s38MBG+7PMfBo3wD?= =?us-ascii?Q?a8EOKr6LIGlPXlKl7SnJpm+yETraZ8z5tZED9N0D7jJWHePdJLPL77hFmm4M?= =?us-ascii?Q?1y1pYzuSuVzZHRKaHhyTwX8X7wdezPcpidVGiKCZzFccqNV+oH10eky+6z3W?= =?us-ascii?Q?9uU4iGO/KLVnci4OCQpXgUlEoIlhi71f705uMsrkLzVFvuPJFVQ86gVvB9BN?= =?us-ascii?Q?fqvjBoruxH4R1T+tsROpoTdOiS0m0uzrrrt21GkqkpgyT92plFQLBub7qVgY?= =?us-ascii?Q?HzoEdxDzKGvges8ksHQtgeVopKVBnJFUfEHU4cMDWApg4JGTlCkIWzvYnIQ/?= =?us-ascii?Q?5hMiRMo8jGr/5VIWMqsIzrrGZj0T1YLohwFbObhVTAe+YbMjD6rdHStO+hos?= =?us-ascii?Q?Ha9yafo7STitEhmPYGrNwj1Muax+WJElp96AQUf/DVarKEnIeuMz8/eVmWM1?= =?us-ascii?Q?CtsGee87QJ0cV/ASek3YvDum04CskEiRvVuIXac38MSuzzy2kx6C7Onbv/aO?= =?us-ascii?Q?VoWTmxercvaRJj9SSM4Ww5ImIWE2FFB+4/+7jcQkN2c5cqwVkPjMG4k3qgw0?= =?us-ascii?Q?4A=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1699; 5:X8yfzjbPo4vJ2MFXVccD4po+akKaxapJ4UrZHFrlgjVOn2cQRIaIhtenKi/duN42mwGjoTvW/cpVblN+YE9ohdA1hJqy934hS2tlBtXbHdmNgI1Z93H1LXxbD4tzGWJl2RVGy3vz9uJGE8HIG+zdWw==; 24:uo8Sk6TabbixpbzMe5Fj2h2V0xZB6jDG0K/7Pwz8ceNogBj/7K0aYBgZtGt6eVtpXdx0huL6DygXDiLw2XPnMk7vSFBtXhctAqmM5yShasI=; 7:ALG4I9BRxjl0yh85Hie8Qr8MveBOIpiMZaE+S7cGkFf0sW4AS1RCXJGtH9lwBhNXYm7tjEcrWeiRo+OLToeIsZD1IJanncs51Dz2lXPh9U3IXdKqVLk5NSrgQWIC9p2aGQhwxvMhAAEZbrXWSYKGRypppJPt2ulD3zvMJedhSsjopDVpp03RapJdRXiQQ4J9; 20:p/ee5RYDoGdjdLECIfJkKitaPQUOCcFShuTin5LRkqN4tuM1Z2YByiozRk4S70BaMRjty2d4IPxTnGZ2wnrjCjgZxYw4nyfNv0a5J2vS2fkqM6N9GIcs2V7bMptDYlQs9RfqtC9aVg+i2vfCwJqZ0UivSCxw6zrxpJmQLqk6bbw= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2016 09:07:29.0978 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB1699 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/generic/simple-card.c | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 8d2ce0a..09ccbb0 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -179,51 +179,19 @@ static struct snd_soc_ops asoc_simple_card_ops = { .hw_params = asoc_simple_card_hw_params, }; -static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai, - struct asoc_simple_dai *set) -{ - int ret; - - if (set->sysclk) { - ret = snd_soc_dai_set_sysclk(dai, 0, set->sysclk, 0); - if (ret && ret != -ENOTSUPP) { - dev_err(dai->dev, "simple-card: set_sysclk error\n"); - goto err; - } - } - - if (set->slots) { - ret = snd_soc_dai_set_tdm_slot(dai, - set->tx_slot_mask, - set->rx_slot_mask, - set->slots, - set->slot_width); - if (ret && ret != -ENOTSUPP) { - dev_err(dai->dev, "simple-card: set_tdm_slot error\n"); - goto err; - } - } - - ret = 0; - -err: - return ret; -} - static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd) { struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_dai *codec = rtd->codec_dai; struct snd_soc_dai *cpu = rtd->cpu_dai; - struct simple_dai_props *dai_props; + struct simple_dai_props *dai_props = &priv->dai_props[rtd->num]; int ret; - dai_props = &priv->dai_props[rtd->num]; - ret = __asoc_simple_card_dai_init(codec, &dai_props->codec_dai); + ret = asoc_simple_card_init_dai(codec, &dai_props->codec_dai); if (ret < 0) return ret; - ret = __asoc_simple_card_dai_init(cpu, &dai_props->cpu_dai); + ret = asoc_simple_card_init_dai(cpu, &dai_props->cpu_dai); if (ret < 0) return ret;