Message ID | 87shvnlgrh.wl%kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | Accepted |
Commit | fc55c9b5a2ea794c4b6be937522bcfe98be4770a |
Headers | show
Return-Path: <alsa-devel-bounces@alsa-project.org> 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 D197B60572 for <patchwork-alsa-devel@patchwork.kernel.org>; Wed, 6 Jul 2016 01:13:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD97128549 for <patchwork-alsa-devel@patchwork.kernel.org>; Wed, 6 Jul 2016 01:13:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B09B62854C; Wed, 6 Jul 2016 01:13:34 +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=-1.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E324828549 for <patchwork-alsa-devel@patchwork.kernel.org>; Wed, 6 Jul 2016 01:13:33 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1E53B2667DB; Wed, 6 Jul 2016 03:13:28 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7CBEA266806; Wed, 6 Jul 2016 03:12:05 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C898B2668DD; Wed, 6 Jul 2016 03:12:03 +0200 (CEST) Received: from relmlie4.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa0.perex.cz (Postfix) with ESMTP id C2C56266806 for <alsa-devel@alsa-project.org>; Wed, 6 Jul 2016 03:10:43 +0200 (CEST) Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie4.idc.renesas.com with ESMTP; 06 Jul 2016 10:10:42 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 7D9C246538; Wed, 6 Jul 2016 10:10:42 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id D44212806F; Wed, 6 Jul 2016 10:10:41 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 083BF2806D; Wed, 6 Jul 2016 10:10:41 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id LAL04676; Wed, 6 Jul 2016 10:10:40 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="214478052" Received: from mail-sg2apc01lp0244.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.244]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 06 Jul 2016 10:10:40 +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=9R9eC07iMlnuTE/xmsLzTjD4cY9naOa3LiuJ5/RFEQ0=; b=X1K2MT0SHLKclvijsQwofNQrjA2rSwq6gaYMQQ3JULQ8AloMQQqp+8sYVsdb0CF4i8DXCCLOvk6vuCLTGeqRoXI1Kbb4UwXpznSQmXZjgT7V3W8/ltVwP1U/U5FnQJV1i+uQKtWEYM3arsck/6qt9pYSTCfq/1CI7IRY6e9Lhsk= 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:10:38 +0000 Message-ID: <87shvnlgrh.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com> 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:10:38 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS2PR01CA0031.jpnprd01.prod.outlook.com (10.164.161.141) To SG2PR06MB1709.apcprd06.prod.outlook.com (10.167.82.139) X-MS-Office365-Filtering-Correlation-Id: 5650bc82-3557-4bfe-cc61-08d3a53a57f3 X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 2:r1GQzZuQvW+Lf4ZOShuATcuMjkM1MgWazrsWgvFPOuf28nW5eZccJX4hUPh0LX/+rQLwHH3qRE65xbKPnOHUVKBWZpVfJQPN0KtWCR+P5hI/H3JTyjmmWlon/3MQdIArzhaE4Kkm/oEF1pX9Rv1hS+dVSpgrynjR4d/fB1YSfTwptwNM3d/nD8vxB0IDHs/P; 3:bRSOwAVaIc3CpMrp7cyFfBzKs/QF7YclVjU0u00Lq2hzYLLVPjzvV9uaZM52bQwnQzoqTUiNY88tY1QPWx0+cBYCw5sZJvazrvcIibb1OzT0PTK6AKhcBCNg0Uw6vt/l; 25:H5/KtkoLPVKyeSlvIL6KefmrZ4rhNX78wL1nGuAZUPvkR8nEcocU4hUnf84VqQVpNw8g8+ts//Wq9vm4crEYxQ2AAoRk5AGIoHufGVcZDjXenOszenQY/CShn7KNglmWk3zncrFUFLHUK+ArDClFJtAhr6OQhMEMavExCDkFiY4H1hRNmots/pZsFpm3aIiGtGOj6o/ziArLNNLQCqc3OJi5VqGRebg09gu1/vhuNCHbFdmXzjXhXOvtu4w395fiW9USuEuUrSY2fQqpdSVvIxw0zNzqCH1XZSDvj088UmBwhAMde5ilANtb3srOw75l132ltjFE+1V3+q0i7MKdGzpE/oRbzPyICVh0oskSW2LDTLlKNsMcc8ujWL0RHh9QqOJUrVIqyVzD8QDEjq17JqNBV/cb2qiYfnQ4+98utT0=; 31:VJZk/T90r+JD1SRQNu/o4VD7kHpgW043f1wlKHPJvUiH/DYIv9rtiXVHXL8IxnirsKCxxDzenKD6pRFfjKcEA4XynpRMZTXPXJgTBAaz/VyaEjcepPzzfmS7/wz+mtmMTrfjk+bvD29jLdHyHTNpsTyqKtL2vLD0m8DuMiz/kkjwmKwdh+oUW9dBNZDSO+fC5f6GyRr3BXS0VcS2JPYU ow== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB1709; X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 20:xXol02mOpJbQnfbu7jdTWrxTYnhpE1W9qtyglPP+zJuyxfxQcE58OwToVbXYcrCnoJNxE2E4micQh3bGh38WS730IRoNpvcG3T3ZCd1c56CB+SCqaeYcrJtO7r8pV1SeycrBdVKrh2poCLkrGC0Gi/2l2meoZV3EqTQbDMlnNQKv3VKOhwI132fszb391Z4eor3dzVx/lRDx8zgrR/2oCfGXPJyXu26XfiaGnQqrQRepGDfq1BVewoLtPAzpyOvsQZ3d3EaM/Y6dYJf1epKYSqsNftdYWK+RnDSElej+4RKRyXVYvolwMW+Pn9YXzyy2y3DKmPH+VM2seknLvHRgf40aFLbI/lxVxmuuif0A3AKd8+Gp6DS4LEdDUuTjOkXm+dYP5WjbCEc1P4F6sQ//CQo2eSoUbaFdCjyP6u31it4+1uZ06spWUctlzxp5EGzKipV1OUoNWR/U9l1EB2ozxcM2OsUNB8hwmBzQ+RFqUtlPG6D7q14IVj1AUBd1f5TD; 4:MDqaOv26kuQn4PnGQVz7HHa9kmYnihQ4u65bVonPp097BFMIqnjh9ue81LcFZGqOwt9fmfHPBFuFGC0M7OrvUPWdgpu0+iTmq7oHH3x8aYWZ+ShCDCKywB8NPvl4aotGPFlw0Rw9jNtkS2/JOka1FKIYldTFoEhsWX5BW1gMc23MXmFhAHOS92wYGGUumPqolUVnhuE08rVBLaWtlhypO8QuV761UD4iKi9dFpNwRrzWvt5SRt9/KudbTNvfrRFr0sQ/GHRyv2noN83qOsfo3tA+I7U/mtKLcakD7jzq5iUZ09AEGk3gX/VlXSUhGC+0CxoascWP9q6D8Bwoatpib94woXHR3K5N2PXm2EtBwI4Hf2qRVIWqjM+aDr+eT9TL/LcJoa46AYOx4H0LNwed+g== X-Microsoft-Antispam-PRVS: <SG2PR06MB17096F0F3A13EF6FF9674B61D43A0@SG2PR06MB1709.apcprd06.prod.outlook.com> 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)(230783001)(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:zXbQiPcTk9GvM1/fcOLTvGYAEtiHv6Rkb565IPVlK?= =?us-ascii?Q?m70XP1d626GZ7VASqfLeMxjxY0eu8dwWKM1W9uSfSNQhRv1PfDoR5coxeiRh?= =?us-ascii?Q?qDoeQBka3DZpSUKX1Lp1sRv39kECB4v+ORRbczjpegTMDY5i7TrHY4qopYbu?= =?us-ascii?Q?j6lrYwtiR9+EQVYwcfEeu3Q+TLAOALZle/WfhO+MJCWYSmS0w61NX+nE+ojz?= =?us-ascii?Q?dxzgtyWDnAK9u1V7uc/Dfs4jo7+ewvA0AZcVTMAnQdIyf9LvHFJVCebOqqm0?= =?us-ascii?Q?C3XUMFBBnQedMSDGV65zRg70SvwXFpOSPurAAQw40bq9UWlVwIerYb6OHVod?= =?us-ascii?Q?kspweAhPsSwavrJeQ5ZBLqlo2jvWF5ehWwL4N9hUiuZu9q/F6s8Up9J4ViOD?= =?us-ascii?Q?RfzfAExhWb9tEF2ZwwyItOd1CBnsZ2ZG0vEuPPNIIbQwVaqljYpypv3s5O0S?= =?us-ascii?Q?jzO10F9Ib4sHSs8W8LiPzdOJeJcpbLeROH9VPIf0BYbdGBQj9WBzcQqSe3B1?= =?us-ascii?Q?fnrlIU/ZwBfzzWUMWFxaEsaUl2IiKthHhktn8Plt4vB5VAK3HEpWCXoWihNM?= =?us-ascii?Q?Wl2C4f4YSnV9ICgzIbLp/1GctkyhHoDZasbIRk8bFL0aRucLFtKwYz1T3hrp?= =?us-ascii?Q?To/hGAcKltBrUAQp6unq1iTnnXHkP5hHMKYSWXDKPtq/LpWftRZ13Th2ofrZ?= =?us-ascii?Q?jCfz1v0zSLcVA5DRaUczOt4WXJWwJXmqMy5LJEn8WjISbz4ed9rDbxGjZaBV?= =?us-ascii?Q?hN3c3Jno9IMPbzpyF9CQTWEXdNYPcJCoe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3j7KhvqKK9E4RBPcO8hR4OxI0D/G6ADrkTAx+wnGvPvecA9g7KiuAZXHxL0mRP8LvGiy8tN0JkWesw=; 7:vDUuGAjFJhECd/R3yiL12VmHj6SabKwpxIjWfDQMqQWoZikmUJehw3HcEbz0m4rWTHWglkBkH2/niAc5iK0F57axm2v2irWAbFWj5ko4nomY6PLp+/ZfxhzBTIAD4ZH41RxfrU8xKxbP18eJ4DgNEPetvcFveY0ADZviCpTId88XEP8tJzyVYlCwwZYLDPCK31duodjWTouqSsH6H6jKNOG7zJdcLkNQpjWrYyiFipFHSNB6ocwTULVYNiOCO4OD SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SG2PR06MB1709; 20:KbnrIr6XPJaOvDqAiQ19ki/YGy6AoJ7f97t51Mtn6GNKuvNOrbijHgDIzv3n6544QcPRL/M1cDliO1sNacqM12GUmlmOWVg8HW2YJv09VmETAcsezrykQ5lPoORvsTwRXZ3YoQl6iwvUa4HSfKA16eqpqNE9HyTt7NRYiG3p/7s= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2016 01:10:38.4517 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1709 Cc: linux-renesas-soc@vger.kernel.org, Linux-ALSA <alsa-devel@alsa-project.org>, Simon <horms@verge.net.au> Subject: [alsa-devel] [PATCH 5/7] ASoC: simple-card-utils: add asoc_simple_card_parse_card_name() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" <alsa-devel.alsa-project.org> List-Unsubscribe: <http://mailman.alsa-project.org/mailman/options/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=unsubscribe> List-Archive: <http://mailman.alsa-project.org/pipermail/alsa-devel/> List-Post: <mailto:alsa-devel@alsa-project.org> List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help> List-Subscribe: <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>, <mailto:alsa-devel-request@alsa-project.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index b88a8dc..86088ae 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -30,5 +30,7 @@ int asoc_simple_card_parse_daifmt(struct device *dev, int asoc_simple_card_set_dailink_name(struct device *dev, struct snd_soc_dai_link *dai_link, const char *fmt, ...); +int asoc_simple_card_parse_card_name(struct snd_soc_card *card, + char *prefix); #endif /* __SIMPLE_CARD_CORE_H */ diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 7f9014e..45eb093 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -75,3 +75,23 @@ int asoc_simple_card_set_dailink_name(struct device *dev, return ret; } EXPORT_SYMBOL_GPL(asoc_simple_card_set_dailink_name); + +int asoc_simple_card_parse_card_name(struct snd_soc_card *card, + char *prefix) +{ + char prop[128]; + int ret; + + snprintf(prop, sizeof(prop), "%sname", prefix); + + /* Parse the card name from DT */ + ret = snd_soc_of_parse_card_name(card, prop); + if (ret < 0) + return ret; + + if (!card->name && card->dai_link) + card->name = card->dai_link->name; + + return 0; +} +EXPORT_SYMBOL_GPL(asoc_simple_card_parse_card_name);