From patchwork Thu Nov 22 00:55:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10693345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EABBC14BD for ; Thu, 22 Nov 2018 00:55:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D56A52C5BD for ; Thu, 22 Nov 2018 00:55:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9B492C697; Thu, 22 Nov 2018 00:55:51 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham 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 233382C5BD for ; Thu, 22 Nov 2018 00:55:50 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id DBA5F267A72; Thu, 22 Nov 2018 01:55:49 +0100 (CET) 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 B50E3267A72; Thu, 22 Nov 2018 01:55:46 +0100 (CET) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (mail-eopbgr1400131.outbound.protection.outlook.com [40.107.140.131]) by alsa0.perex.cz (Postfix) with ESMTP id 9CB1526770D for ; Thu, 22 Nov 2018 01:55:44 +0100 (CET) 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:X-MS-Exchange-SenderADCheck; bh=qjZ2xVnCkvpsFSEPGJcKkyDuW1zU4BrUfTGsN7JCXe4=; b=bpJQc31xaWm8EGEsAFr+BowLBV1ALmvSKp/FauYHUIHPaVsDnC05BbPm01gjDXkGgvDVDJf/tzoyHtYMQc0bkypVrwBumGVjsGT61uJDO1iTFCzoNuCCpHz26TlFK7OiDRByJcrX+cV2gtQx5lPajr2/93f1WL2f4fQeh5m2nm4= Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com (20.178.136.81) by TYAPR01MB2847.jpnprd01.prod.outlook.com (20.177.103.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Thu, 22 Nov 2018 00:55:41 +0000 Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com ([fe80::19d4:7f22:a842:9f67]) by TYAPR01MB3328.jpnprd01.prod.outlook.com ([fe80::19d4:7f22:a842:9f67%4]) with mapi id 15.20.1339.027; Thu, 22 Nov 2018 00:55:41 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 03/10] ASoC: simple-scu-card: tidyup "prefix" parsing Thread-Index: AQHUgf4WvE7g9LbL8kG51lSm/NAcnQ== Date: Thu, 22 Nov 2018 00:55:40 +0000 Message-ID: <87wop6lz1a.wl-kuninori.morimoto.gx@renesas.com> References: <871s7endnu.wl-kuninori.morimoto.gx@renesas.com> In-Reply-To: <871s7endnu.wl-kuninori.morimoto.gx@renesas.com> Accept-Language: ja-JP, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: TYAPR01CA0208.jpnprd01.prod.outlook.com (2603:1096:404:29::28) To TYAPR01MB3328.jpnprd01.prod.outlook.com (2603:1096:404:bb::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [211.11.155.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; TYAPR01MB2847; 20:ExdRfSYOP+j9d/hXPsR+UeLPYDnIUATKFLIbq6G3Qx/lsHH4ylimOXX0DSDY2TxuSAy1ITqzID5Qe9JqfLSoBHLwYTGSm/xujWOdsII2uigsk0HJpfcgtKIdRqic5nmsq2/o5sBGQUH3/TTQoXtqTtDztR3kRvdZJ8J4+v84i5Q= x-ms-office365-filtering-correlation-id: afd5c7df-7a79-41ce-5751-08d65015394f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:TYAPR01MB2847; x-ms-traffictypediagnostic: TYAPR01MB2847: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB2847; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB2847; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(376002)(346002)(39860400002)(366004)(396003)(199004)(189003)(8936002)(86362001)(2616005)(476003)(99286004)(446003)(11346002)(8676002)(486006)(256004)(81166006)(81156014)(6506007)(71200400001)(68736007)(36756003)(71190400001)(316002)(76176011)(26005)(386003)(102836004)(52116002)(6512007)(2900100001)(105586002)(3846002)(6116002)(6436002)(106356001)(4326008)(53936002)(6486002)(66066001)(186003)(97736004)(5660300001)(14454004)(478600001)(6916009)(2906002)(25786009)(7736002)(305945005); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB2847; H:TYAPR01MB3328.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: LGFiBgyvMukefuaBKSaqigb84TNhpoWL6GvIVOU4pDqPfxHys744pZaXoxUeX3z3/TvtTjxgP3yhVshkzBMg/AzOUaxEGWPC+VikBGELpw+MNDYuU3Hy/jweNLsJwC/BJhUXAFF/artEItUAO+oX3VXcW/LQ5OLBfzHT4g5Sw+8Qm36MUCU9Fui1HC+2VNhdAdIKwdy79agJKBQZs/jzemYfY0Sp+VG7t09MJfi7BImcktr+LxNuYB7aYcPzgzcmYYO775lbjd5w50jml85TBfDbWXa6g728JcomKtQXkjvfPS6n9OdgmE4BErepJLTbHpNH5fo6dFzF2EKj9l1NM29g1dYXlOPIKxgqRMrC1wI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <64A7725C50C9864A8442A0108C7A07CA@jpnprd01.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: afd5c7df-7a79-41ce-5751-08d65015394f X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 00:55:40.8182 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB2847 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 03/10] ASoC: simple-scu-card: tidyup "prefix" parsing 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 simple-scu-card.c is supporting "prefix" which is used to avoid DAI naming conflict when CPU/Codec matching. But, sound card might have multi sub-devices, and each codec might need each prefix. Now, ASoC is supporting snd_soc_of_parse_node_prefix(), let's support it on audio-graph-scu-card, too. It is keeping existing DT style. It can't support each codec's prefix if sound card had multi sub-devices without this patch. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/simple-scu-card.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/generic/simple-scu-card.c b/sound/soc/generic/simple-scu-card.c index e650143..7ae1901 100644 --- a/sound/soc/generic/simple-scu-card.c +++ b/sound/soc/generic/simple-scu-card.c @@ -157,10 +157,17 @@ static int asoc_simple_card_dai_link_of(struct device_node *np, if (ret < 0) return ret; + /* check "prefix" from top node */ snd_soc_of_parse_audio_prefix(card, &priv->codec_conf, dai_link->codecs->of_node, PREFIX "prefix"); + /* check "prefix" from each node if top doesn't have */ + if (!priv->codec_conf.of_node) + snd_soc_of_parse_node_prefix(np, + &priv->codec_conf, + dai_link->codecs->of_node, + "prefix"); } ret = asoc_simple_card_of_parse_tdm(np, &dai_props->dai);