From patchwork Fri Jun 24 01:17:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9196295 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 E94D96075A for ; Fri, 24 Jun 2016 01:19:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D73F62847D for ; Fri, 24 Jun 2016 01:19:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA2EB28483; Fri, 24 Jun 2016 01:19:48 +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 05AEE2847D for ; Fri, 24 Jun 2016 01:19:48 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 238C7265DC6; Fri, 24 Jun 2016 03:19:47 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5456E265B51; Fri, 24 Jun 2016 03:18:10 +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 5C11F265FE9; Fri, 24 Jun 2016 03:18:09 +0200 (CEST) Received: from relmlie4.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa0.perex.cz (Postfix) with ESMTP id 9BECE265B51 for ; Fri, 24 Jun 2016 03:17:13 +0200 (CEST) Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie4.idc.renesas.com with ESMTP; 24 Jun 2016 10:17:12 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 470A04BE33; Fri, 24 Jun 2016 10:17:12 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 427841806F; Fri, 24 Jun 2016 10:17:12 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 3AFE41800A; Fri, 24 Jun 2016 10:17:12 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id LAC16836; Fri, 24 Jun 2016 10:17:12 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="213663730" Received: from mail-pu1apc01lp0015.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.15]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 24 Jun 2016 10:17:11 +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=m+7ZC9qK7Cqqmy9xIJpz+PO5ElXe2MmEC+SllY7a47I=; b=JV3GOILoM0A2903xIfPyo/djIS0zHqpdrFVi/LE0t5iRRxkxHpFT4QVGQg5dMEST+vxfiXQxpSPRS1lTe5XidzJX0J6VDmnJ23OflisRkeXIAteinQ5bc34gNSgSUdSZ2uSv1yxk3KoQzZB5UEDt4qkCNzzimLb2CNcIgAndIFI= 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 KL1PR06MB1704.apcprd06.prod.outlook.com (10.167.63.18) with Microsoft SMTP Server (TLS) id 15.1.523.12; Fri, 24 Jun 2016 01:17:08 +0000 Message-ID: <87por7xuh4.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown In-Reply-To: <87wplfxumi.wl%kuninori.morimoto.gx@renesas.com> References: <87wplfxumi.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Fri, 24 Jun 2016 01:17:08 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS2PR01CA0059.jpnprd01.prod.outlook.com (10.165.51.147) To KL1PR06MB1704.apcprd06.prod.outlook.com (10.167.63.18) X-MS-Office365-Filtering-Correlation-Id: fc7715f3-4a4e-4ec5-9944-08d39bcd43c5 X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1704; 2:C6XdlVhN46LmcSArhGpsLjhJ1Le7pkAxhCOhlcNlroospk2489AKkQKcYLEFjJAm10qU+2/KkR+wgCnjc52ty3oV0WfdzGMsXLtT/CLvJ7yKYanonGXciBNLUkXNizYGHm34uuJtEPkWXcZgJkqROXWBXsEMqQUiN0XOdx0METQXpXg7wyLEV7IMcMIr9e0s; 3:8KaJPrjZPAwpp28GJxJcHRB4MdAOjK48DpCz/GmgZTTq8lV6pDCwAMDeBOc/AmJR9Hxk2lRE7e4nyhKPLMvBTGX0jZsTEIsIbyboX+YhWkn3rXQPeZT2TYevcU3obPPv; 25:VfFQFvCcCdQTQ+nbs1qbFhIXtSLhD6ZdsuZBpXnLjI/qpXkPj/stW16Bbu0Xw3luOjlCHCx7/zdkUIa54VVNiYB1oKmxi+8DMJLgBs/nFO/tuVVK9OuDERauS6MHry75XS9VNY3paWmkaBv25bClIG9oNAX0fmuyyulQJoE7YEjgVgZuX9tnzwOE0OZYnTQZfyYMeKpADg/XifpRAOZ6nAO5T+XT1CI5qhKvTr2FKtjhZ9zc/2dWmBu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1A+6gqujWnHGx+vCond5FNRgnwYFv0ZvAvWFom6LUrTXxN4vy6Ryn7bm9z1UMqQCgIIcnfpKJ9OBiQj1jznmkxnjIML332k490Ry3mRfAMGxIG/iFEJ9amaOFw== 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)(3002001)(10201501046)(6055026); SRVR:KL1PR06MB1704; BCL:0; PCL:0; RULEID:; SRVR:KL1PR06MB1704; X-Forefront-PRVS: 0983EAD6B2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(54356999)(66066001)(230783001)(47776003)(50986999)(86362001)(106356001)(105586002)(36756003)(76176999)(81156014)(4326007)(77096005)(23726003)(19580405001)(305945005)(2906002)(19580395003)(586003)(81166006)(7736002)(3846002)(6116002)(69596002)(83506001)(8676002)(7846002)(92566002)(53416004)(110136002)(46406003)(42186005)(189998001)(101416001)(68736007)(33646002)(50466002)(2950100001)(4001350100001)(97736004)(229853001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR06MB1704; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; KL1PR06MB1704; 23:ntiHMKqjdYqspG7C4u7T2wXO+zhZ+MGCEzsJWxyZV?= =?us-ascii?Q?KcQ3rFWWUgZ07/cGxKZtug8MQUZ4AJyko0xL1HTU9M7LQdUIZqdptTPgsulH?= =?us-ascii?Q?ljFuZl1ONR9g3Ug0Lom9c0CzXWC8LojWCTfgfT+c9H3cX9ieCMxu82/pSNxM?= =?us-ascii?Q?6ll0ioRsdF5XQ3XNaxbnyHQCVSRcTrY4fXhfZwFNNktK96CwL5A3IYNBW/gQ?= =?us-ascii?Q?DeZPsqs1ojy/eM1nATIJV1P3Tm0XjmJyyfzq3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nostics: 1; KL1PR06MB1704; 20:bxjHy2mfxsr/e28efzehwgX+nekOnVNwFsas+4I0eEmtJhKlkHwDcDwSH4qcHiGVy1+gn5v67Z0oZTibXAoaN5SA1RAIBjcmnWaXn3qQVdSh02WHOTpdwbMIIjan/g9CR3vSJI2SjtB9bG6dgnLHpPL3IXJaVZOMor3zczKcZpE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2016 01:17:08.9860 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB1704 Cc: linux-renesas-soc@vger.kernel.org, Linux-ALSA , Simon , Liam Girdwood Subject: [alsa-devel] [PATCH 05/11] ASoC: simple-card-utils: add asoc_simple_card_parse_card_prefix() 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto DPCM might need audio prefix for route matching. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto --- include/sound/simple_card_utils.h | 4 ++++ sound/soc/generic/simple-card-utils.c | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 2f991da..89172aa 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -33,5 +33,9 @@ int asoc_simple_card_parse_dailink_name(struct device *dev, struct snd_soc_dai_link *dai_link); int asoc_simple_card_parse_card_name(struct snd_soc_card *card, char *prefix); +int asoc_simple_card_parse_card_prefix(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_link, + struct snd_soc_codec_conf *codec_conf, + 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 c782b3a..439fc01 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -125,3 +125,20 @@ int asoc_simple_card_parse_card_name(struct snd_soc_card *card, return 0; } EXPORT_SYMBOL_GPL(asoc_simple_card_parse_card_name); + +int asoc_simple_card_parse_card_prefix(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_link, + struct snd_soc_codec_conf *codec_conf, + char *prefix) +{ + char prop[128]; + + snprintf(prop, sizeof(prop), "%sprefix", prefix); + + snd_soc_of_parse_audio_prefix(card, codec_conf, + dai_link->codec_of_node, + prop); + + return 0; +} +EXPORT_SYMBOL_GPL(asoc_simple_card_parse_card_prefix);