From patchwork Fri May 20 10:04:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9129115 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 48EDE6048B for ; Fri, 20 May 2016 10:04:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A97C279C4 for ; Fri, 20 May 2016 10:04:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F01B27BF1; Fri, 20 May 2016 10:04:29 +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 23B6A279C4 for ; Fri, 20 May 2016 10:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752892AbcETKE0 (ORCPT ); Fri, 20 May 2016 06:04:26 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:20455 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752075AbcETKE0 (ORCPT ); Fri, 20 May 2016 06:04:26 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie1.idc.renesas.com with ESMTP; 20 May 2016 19:04:24 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id AFF584821B; Fri, 20 May 2016 19:04:24 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id B1DE6480A4; Fri, 20 May 2016 19:04:24 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id A97EC480A3; Fri, 20 May 2016 19:04:24 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id VAR10640; Fri, 20 May 2016 19:04:24 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="211275449" Received: from mail-hk2apc01lp0214.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.214]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 20 May 2016 19:04:23 +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=3DRSEY4wqGpxLOdM/wNQVjTIf/UDcbBH1OspbPxqnOY=; b=SaONoKR/XQ3feEhtKlzrtJmhUEM+wJpbXCHE09lJWFo2axniBe1m5BfUAXYZA/rQg3qvvwpEMKrkPneDZhf1xeqNPtjidhiWv54gDh3MyH4vcn+C9quZ7+Gpf9JHM/bfFuQWxWzOIhVaM/HHNIPwuICsGWXoekAXbP3kpxME34M= 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 KL1PR06MB1702.apcprd06.prod.outlook.com (10.167.63.16) with Microsoft SMTP Server (TLS) id 15.1.497.12; Fri, 20 May 2016 10:04:20 +0000 Message-ID: <87wpmpoxu8.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 41/49] ASoC: rsrc-card: use asoc_simple_card_parse_card_route() 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:04:20 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0029.jpnprd01.prod.outlook.com (10.164.162.139) To KL1PR06MB1702.apcprd06.prod.outlook.com (10.167.63.16) X-MS-Office365-Filtering-Correlation-Id: c0c4cbda-7e64-42e9-262f-08d380961d05 X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1702; 2:LiuORY0W5H+YL49n1x0FMBxtV//hS2I19bcjYe6hbJuS+jGd/N9+AueY4UIaYssBUl+kOxsqhNqYRfN5gKIOgE3Y971Mm/HQJhw2d5HSezTXc9SEJViin9cIzM6hUHmxhixv9d5SRgiEtjPyD4hC/yVXUz1guxnija4dUCie3F91mpNRSGHSGC5XhCisOGqJ; 3:6Mu4FP/lLaLEHwufqV48RBxjBKkFXbQTncihafeGpQYj8QPgev/PNeT+eGAr1SYNx6s4cA/kff9RLU0AynrvrGoFL/nvPRZMujbDoVSHr5kiVMPYMyRoSB1SdufR/wRv X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:KL1PR06MB1702; X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1702; 25:IPJseDPatjQd1Be3VptYsaT/Qv7LCOU9WOuxiKA8F471TyZhPGp8jxYrsUz3+NDcpckoyTZ4gXM4Jyuvg36TRyKIQU5oF+hdBe6bEK36dAAUcu5kEGskmhzPozHGnPA6G0STB1GGo/e/mXrv30Yelw59TxmqqVLcTz7GStVqImnntQh9h+f4MOcRZD6YDtNJRpihnMUMqsBbxFZNa4Ic9PvXW8w0kNw17BLF8Vu6hHtRPZwLFe3UWtDyYn82bQJteVLroUb4HM8tMD2E8V2p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es3SLtO/z22RaVjh4zS1jWOysTaBa1XDCxaTJvOT1tbMcbAEFIRl/hI68QUqWS+UHL86Fbw5E65j4PR7guzFFCcVKSH9DaMtmL2BBrI1vubjoB2Sd3X0ooNiNdoU+ADFdn3tD8CDp6Zfq0QHOKwniaY9NrDlOXS2D4E/G8XOrnKplpGXV1kzjy1kMMhzLEvhZR+/IVlBInSmWcfirXgLIDbDvyOzzFVVFi891OKyo2wLdxHzwUArEumNKedLSGfLWgTXlnl013UHp6nPtVmGmfjSpMzSaTUXeGzjlD/SPqtog+FF2mMpzs1dvSXTKRjpJd4WJ6mD7nKHWRmM4 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:KL1PR06MB1702; BCL:0; PCL:0; RULEID:; SRVR:KL1PR06MB1702; X-Forefront-PRVS: 09480768F8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(47776003)(5008740100001)(66066001)(189998001)(53416004)(2950100001)(77096005)(575784001)(86362001)(50466002)(33646002)(46406003)(2906002)(4326007)(110136002)(5004730100002)(92566002)(19580395003)(19580405001)(36756003)(23726003)(83506001)(6116002)(3846002)(586003)(54356999)(42186005)(76176999)(229853001)(50986999)(81166006)(8676002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR06MB1702; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1702; 23:EJP0WytJrIg+D7Nw09hJ2CNbpqEqYzmeiVRFsNwTxrW2LuoGT08Z7BNApRFMkuqqem92SvuQ83Kk0M3PK3EXIBqDVn8zo2LLxVf+xB7Q1fKufqaYraNjuhpG6VJlhPfyKSrqyPQeye7YaLHQU3aFY/zdx+z/AEgO0rjuEzWjGnN/YC99TJ2Iyx6W/DpgsAJA48p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eyTMkgNfL8nhABw4y84xp6ElT7g/RfDFKrmgUqx/ITEHu//8Z6uCB/nIThbhLXssDPrgYYhX1WpBJGYXg+INFTjPoudKRxJYidIGE13wlpTIjBKX7Q7O6ytUO00hQZWogUFpLwz+Oh4tY+PuCUQw7Dkj1eXUzY4y8R; 20:OkFKAESVpr5AXU+xchSV0inRiqWdxP7Wfpj3EcaR9y4O/H5iXenad+38t+iFjZaM5DP+aSsLXEtfGz/M5u6PomeM4iAQwBZORCUp1TS6s7oHo8ZMdHMNGWywIZlUa8fXSowyW95sCn8tRcdPQU2MLJvlzjyS52ZsKskEANsYV/8= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2016 10:04:20.3604 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB1702 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, 12 insertions(+), 13 deletions(-) diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c index 5907fd8..3cec0e8 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c @@ -308,33 +308,32 @@ static int rsrc_card_parse_of(struct device_node *node, priv->snd_card.codec_conf = &priv->codec_conf; priv->snd_card.num_configs = 1; - if (of_data) { - priv->snd_card.of_dapm_routes = of_data->routes; - priv->snd_card.num_of_dapm_routes = of_data->num_routes; - } else { - snd_soc_of_parse_audio_routing(&priv->snd_card, - "audio-routing"); - } - /* sampling rate convert */ of_property_read_u32(node, "convert-rate", &priv->convert_rate); /* channels transfer */ of_property_read_u32(node, "convert-channels", &priv->convert_channels); - dev_dbg(dev, "New rsrc-audio-card: %s\n", - priv->snd_card.name ? priv->snd_card.name : ""); - dev_dbg(dev, "SRC : convert_rate %d\n", priv->convert_rate); - dev_dbg(dev, "CTU : convert_channels %d\n", priv->convert_channels); - ret = rsrc_card_dai_link_of(node, priv); if (ret < 0) return ret; + if (of_data) { + priv->snd_card.of_dapm_routes = of_data->routes; + priv->snd_card.num_of_dapm_routes = of_data->num_routes; + } else { + asoc_simple_card_parse_card_route(&priv->snd_card, "audio-"); + } + ret = asoc_simple_card_parse_card_name(&priv->snd_card, "card-"); if (ret < 0) return ret; + dev_dbg(dev, "New rsrc-audio-card: %s\n", + priv->snd_card.name ? priv->snd_card.name : ""); + dev_dbg(dev, "SRC : convert_rate %d\n", priv->convert_rate); + dev_dbg(dev, "CTU : convert_channels %d\n", priv->convert_channels); + return 0; }