From patchwork Thu Nov 22 00:55:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10693341 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 00FED14BD for ; Thu, 22 Nov 2018 00:55:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBD202C5DF for ; Thu, 22 Nov 2018 00:55:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA3AF2C5BD; Thu, 22 Nov 2018 00:55:17 +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 1D8F72C5BD for ; Thu, 22 Nov 2018 00:55:17 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 11E2C267929; Thu, 22 Nov 2018 01:55:16 +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 757EE267929; Thu, 22 Nov 2018 01:55:14 +0100 (CET) Received: from JPN01-OS2-obe.outbound.protection.outlook.com (mail-eopbgr1410129.outbound.protection.outlook.com [40.107.141.129]) by alsa0.perex.cz (Postfix) with ESMTP id 534D426770D for ; Thu, 22 Nov 2018 01:55:12 +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=SOuuzYVzthI+LShPhKMZ6vqrVnB7enF1wx13Muucdwo=; b=Sgpwgq4un7SlZAgBXuHbbRQPmAj7zTP0YrxrmoHEp7t9u9SzJNEprXdtn1rKhJXM0hBfbZ6ZUDz2xC0wfpCPBCNhMjh91tDUda7PljcIYDQ51anrGp26bykINEeTCSDU0Re+ym0V1oNdVW+Af96OUI4WD3xqKRoYNGirQ4fkYFQ= Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com (20.178.136.81) by TYAPR01MB2093.jpnprd01.prod.outlook.com (52.133.180.13) 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:09 +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:09 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 01/10] ASoC: soc-core: add snd_soc_of_parse_node_prefix() Thread-Index: AQHUgf4EdFnDtEmLek6/R4pSG87Ehg== Date: Thu, 22 Nov 2018 00:55:09 +0000 Message-ID: <87zhu2lz26.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: KAXPR01CA0003.jpnprd01.prod.outlook.com (2603:1096:402:19::13) 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; TYAPR01MB2093; 20:F0lBxYkmAExVj9iBUcxyM38mgFYiRMQpNf6zBtxOXJap6ptpgoPgoYO0m3zlWfZTG4dYmc8fkxt/kJyg4xt7MWq4WTU8TWEsGXXMwEKTG2dGgQXSRAeDqRVi8QJNksNMEYC2pxKsqj+u8vH2vV/H8rOjwvZ5rph7LIXlkc3MQ6Q= x-ms-office365-filtering-correlation-id: 74b9dba4-73d6-4316-80ce-08d65015268e 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:TYAPR01MB2093; x-ms-traffictypediagnostic: TYAPR01MB2093: 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)(3002001)(10201501046)(3231442)(944501410)(52105112)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB2093; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB2093; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(366004)(39860400002)(376002)(396003)(346002)(199004)(189003)(5660300001)(256004)(186003)(2900100001)(14454004)(7736002)(4326008)(316002)(305945005)(2616005)(446003)(11346002)(71190400001)(71200400001)(6916009)(102836004)(476003)(97736004)(36756003)(26005)(8936002)(8676002)(76176011)(86362001)(3846002)(6116002)(66066001)(486006)(6486002)(81156014)(81166006)(6506007)(386003)(52116002)(99286004)(478600001)(6512007)(25786009)(68736007)(6436002)(53936002)(2906002)(105586002)(106356001); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB2093; 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: KkO7PaQs8magoD/XI42CdZ/v3howGEOUeuoKbm0iMZ5xe7NxXVk/mPhOet2ueT17jMjfxEp0Rd9PSGWAezV2V2KdL1skBdmUJ8um41pds7rOL9g9kbgKtHrQhlShtX2ktzvqIFiXVxiWL0faLLKmbcvuAML0e8C4EABnR0Wnnxobbq+NhvkMnFO+SQuo1Tbtulzb+ZqLOH5YXUpFKDWIaKcC+jJz6ou0llavNjjk5B2z0nxQvyljR8TPMgm3Qb0P0dMfJGM1AdHAJZVx/rV0kd590pCqN4gKqEdZrvMBHiWYgyqaVxfigzRPzk+hqoy5yQ72vJS8ckAXfyuQs8GtPE9SBAHmihyuYzgWzYe90Fc= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74b9dba4-73d6-4316-80ce-08d65015268e X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 00:55:09.2503 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB2093 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 01/10] ASoC: soc-core: add snd_soc_of_parse_node_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 Current ASoC has snd_soc_of_parse_audio_prefix() to get codec_conf settings from DT which is used to avoid DAI naming conflict when CPU/Codec matching. Currently, it is parsing from "top node", but, we want to parse from "each sub node" if sound card had multi cpus/codecs. This patch adds new snd_soc_of_parse_node_prefix() to allow parsing settings from selected node. It is keeping existing snd_soc_of_parse_audio_prefix() by using macro. Signed-off-by: Kuninori Morimoto --- include/sound/soc.h | 6 +++++- sound/soc/soc-core.c | 11 +++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 5a8b841..93b7510 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1477,10 +1477,14 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np, unsigned int *rx_mask, unsigned int *slots, unsigned int *slot_width); -void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, +void snd_soc_of_parse_node_prefix(struct device_node *np, struct snd_soc_codec_conf *codec_conf, struct device_node *of_node, const char *propname); +#define snd_soc_of_parse_audio_prefix(card, conf, node, name) \ + snd_soc_of_parse_node_prefix((card)->dev->of_node, \ + (conf), (node), (name)) + int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, const char *propname); unsigned int snd_soc_of_parse_daifmt(struct device_node *np, diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 6ddcf12..012000d 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3484,12 +3484,11 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np, } EXPORT_SYMBOL_GPL(snd_soc_of_parse_tdm_slot); -void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, - struct snd_soc_codec_conf *codec_conf, - struct device_node *of_node, - const char *propname) +void snd_soc_of_parse_node_prefix(struct device_node *np, + struct snd_soc_codec_conf *codec_conf, + struct device_node *of_node, + const char *propname) { - struct device_node *np = card->dev->of_node; const char *str; int ret; @@ -3502,7 +3501,7 @@ void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, codec_conf->of_node = of_node; codec_conf->name_prefix = str; } -EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_prefix); +EXPORT_SYMBOL_GPL(snd_soc_of_parse_node_prefix); int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, const char *propname) From patchwork Thu Nov 22 00:55:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10693343 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 4913314DE for ; Thu, 22 Nov 2018 00:55:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32C7F2C5BD for ; Thu, 22 Nov 2018 00:55:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26A902C697; Thu, 22 Nov 2018 00:55: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=-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 7F29F2C5BD for ; Thu, 22 Nov 2018 00:55:33 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7834F2677E8; Thu, 22 Nov 2018 01:55:32 +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 552A826784F; Thu, 22 Nov 2018 01:55:30 +0100 (CET) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (mail-eopbgr1400091.outbound.protection.outlook.com [40.107.140.91]) by alsa0.perex.cz (Postfix) with ESMTP id 3F2AF26770D for ; Thu, 22 Nov 2018 01:55:27 +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=y0rONh/Fg/5hYTypSMwGT0O8Nk4p3EmKoqJXS7fNdqo=; b=L1buzREhuFylL44IwPm/PPcrPcrsKuGjua/7WaWczXGQd4OBofVz0uB1y7wc7zBzotLgszqbvFWycIP8DAso05U7U1txInT0ItFdf6EzKK5PLqp48s2bHZs+lwcA1bvozmPPQnHDyICefyn4cc08/Xf6OREL1QZ8esnLzP1yvK4= Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com (20.178.136.81) by TYAPR01MB3263.jpnprd01.prod.outlook.com (20.177.104.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Thu, 22 Nov 2018 00:55:24 +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:24 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 02/10] ASoC: simple-scu-card: tidyup "prefix" parsing on Doc Thread-Index: AQHUgf4Nz+kh9olqqEGPsLJ0/WJCVQ== Date: Thu, 22 Nov 2018 00:55:24 +0000 Message-ID: <87y39mlz1s.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: TYAPR04CA0004.apcprd04.prod.outlook.com (2603:1096:404:15::16) 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; TYAPR01MB3263; 20:x+hnMtULTXQlagctXKUmecK87IxVdnvdLcMSXGg433ifSi2H0SR+lTux6jqgeI+1pz2Y7CCWeq+z+2LBUrjUdEWS0RvWJgDzD1Pi+P8J/wjR247Kog6tttu1KYhVOeC4N+qMaTaZA7z3RFsYxho509/77tg7Oki3Wok9nVCJGsQ= x-ms-office365-filtering-correlation-id: 674b2027-fbee-498f-b424-08d650152f7c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:TYAPR01MB3263; x-ms-traffictypediagnostic: TYAPR01MB3263: 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)(5005006)(8121501046)(3231442)(944501410)(52105112)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB3263; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB3263; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(136003)(366004)(376002)(39860400002)(396003)(189003)(199004)(52116002)(97736004)(3846002)(7736002)(66066001)(386003)(11346002)(305945005)(81166006)(102836004)(446003)(6506007)(68736007)(316002)(76176011)(86362001)(106356001)(105586002)(8936002)(2900100001)(71200400001)(486006)(5660300001)(26005)(6512007)(6916009)(2906002)(36756003)(14444005)(256004)(53936002)(6116002)(476003)(4326008)(186003)(6486002)(71190400001)(8676002)(81156014)(6436002)(478600001)(2616005)(99286004)(14454004)(25786009); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB3263; H:TYAPR01MB3328.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: AQ06C+NetZn5Z4HcbFYQX1Huf+S02CBrqRZhTUWmnYRi1jae6M3p8NX+uMqhBwZlBZVwXmlmGs14ij+fR5R123ofcnLskNTCTPWJ/YT7pyYn+G+zHtP6fnzAqB4vLAZTRCRBOeK4NEOXyeIHF+HEQvuAnNH0+HwyLB3RcxuR8B5hf4QMN2Xq/xKQe+6PeOHGOyLVOHAj8jJkiJSTYTeyt8bL/BuWHvcymP2AkLI6KywvAIvT4DYN9twsDbgTHtR9sVIcnc8yAY+g1Ti2tKq0keFHi/jSvp6c+CJWcpeJufya0o2FbP+onhkm7qNw596DDgZAWBrd1f/t9HYFlE98SpRleqRiR44z1Q8ZeostCuE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <093E637C8F22E140BE4300C1F299DF37@jpnprd01.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 674b2027-fbee-498f-b424-08d650152f7c X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 00:55:24.2402 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB3263 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 02/10] ASoC: simple-scu-card: tidyup "prefix" parsing on Doc 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 --- Documentation/devicetree/bindings/sound/simple-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/simple-scu-card.txt b/Documentation/devicetree/bindings/sound/simple-scu-card.txt index 32f8dbc..3a2f716 100644 --- a/Documentation/devicetree/bindings/sound/simple-scu-card.txt +++ b/Documentation/devicetree/bindings/sound/simple-scu-card.txt @@ -75,7 +75,6 @@ sound { simple-audio-card,bitclock-master = <&dpcmcpu>; simple-audio-card,frame-master = <&dpcmcpu>; - simple-audio-card,prefix = "ak4642"; simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback", "ak4642 Playback", "DAI1 Playback"; @@ -88,6 +87,7 @@ sound { }; codec { + prefix = "ak4642"; sound-dai = <&ak4643>; clocks = <&audio_clock>; }; 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); From patchwork Thu Nov 22 00:55:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10693347 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 D208F14BD for ; Thu, 22 Nov 2018 00:56:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB8662C5BD for ; Thu, 22 Nov 2018 00:56:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF1772C697; Thu, 22 Nov 2018 00:56:05 +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 ED7322C5BD for ; Thu, 22 Nov 2018 00:56:04 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E4C66267A7E; Thu, 22 Nov 2018 01:56:03 +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 38D88267929; Thu, 22 Nov 2018 01:56:01 +0100 (CET) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (mail-eopbgr1400112.outbound.protection.outlook.com [40.107.140.112]) by alsa0.perex.cz (Postfix) with ESMTP id 0C704267A7F for ; Thu, 22 Nov 2018 01:55:57 +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=940yjI3RUiHK5JWO1ez6D90FtEr/sXWx0e5l4Bv7ptE=; b=dySbh00lC5wGGgEHryo6eSN3bZMOnxX4iBPj5RZsGlxPTT4bLG89h/X+FFfvV0YM4Jh6Pffi0ITM5VAPzLPTaWdgsBySIBaWL1hoxjBJWkmLAE5pl57UZ6/+K4zuIP37PxA8xiQ7ndyEOmWjcnWCfN1GWq+waZYH9e0y5SXCQgw= 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:55 +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:55 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 04/10] ASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc Thread-Index: AQHUgf4feKK73KnjokChsO+oFp+vFA== Date: Thu, 22 Nov 2018 00:55:54 +0000 Message-ID: <87va4qlz0w.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: TYAPR03CA0004.apcprd03.prod.outlook.com (2603:1096:404:14::16) 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:/3x0lHK8Ejl1G2D6GoiI+vfHhM65fs83kaToFlyNzJrz9ohqH8xJyZkS5YHdByD26p4meqw3rhnbuW+Wlt3Fjy1TnWaYJXnBcdkUITUYZK9rPaqboxDKah6qrXSk8dcZuDJUCJfMBzLmdPX2nzB6uTzveJs/1i/1Gx4/PiNQJ7U= x-ms-office365-filtering-correlation-id: 874cb98b-7039-4b60-550d-08d6501541be 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)(14444005)(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: YbNmuE7/r5GHoR8BIPZVBs+POrbxMrzn5x1ML0AYyHMJ3w1udE6XhqVFtgOA393aCE7e5xBsFo8LG/0vhkjq8tf8krvKyj5+lSivBoxum9nlyJh30G11rYTOi4ps6z6CUEDskTw+WxEi04+IxCjldg2DPSqB0zpAhVETMxKrHy+YCQFmiIJK5n0UDr2yxRRMfxcLD9pkkCwFE8qrHdHr9sXoKzF8/lOeWCA+e54qXaER9NQiMK/XaUd0qDZV+Bowa7LqiYsA8KzlCiA2owxVZtMxNn5CCFYDf95YghYwbsNXoQdijMQZ1kkwS6rQr1wJRcbJPi1q7iUVM4W3GGjBKSiXIHp/zERx1+NZ+kszR8k= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 874cb98b-7039-4b60-550d-08d6501541be X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 00:55:54.8312 (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 04/10] ASoC: audio-graph-scu-card: tidyup "prefix" parsing on Doc 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 audio-graph-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 --- Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt b/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt index 441dd6f..a361088 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt +++ b/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt @@ -77,7 +77,6 @@ Example 2. 2 CPU 1 Codec (Mixing) compatible = "audio-graph-scu-card"; label = "sound-card"; - prefix = "codec"; routing = "codec Playback", "DAI0 Playback", "codec Playback", "DAI1 Playback", "DAI0 Capture", "codec Capture"; @@ -90,6 +89,7 @@ Example 2. 2 CPU 1 Codec (Mixing) audio-codec { ... + audio-graph-card,prefix = "codec"; port { codec_endpoint0: endpoint { remote-endpoint = <&cpu_endpoint0>; From patchwork Thu Nov 22 00:56:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10693349 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 413D914BD for ; Thu, 22 Nov 2018 00:56:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 295112C5BD for ; Thu, 22 Nov 2018 00:56:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1875B2C697; Thu, 22 Nov 2018 00:56:30 +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 6CA902C5BD for ; Thu, 22 Nov 2018 00:56:29 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 6A61C2677E8; Thu, 22 Nov 2018 01:56:28 +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 745B4267929; Thu, 22 Nov 2018 01:56:26 +0100 (CET) Received: from JPN01-OS2-obe.outbound.protection.outlook.com (mail-eopbgr1410108.outbound.protection.outlook.com [40.107.141.108]) by alsa0.perex.cz (Postfix) with ESMTP id 534032677E8 for ; Thu, 22 Nov 2018 01:56:24 +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=lSGiusiILnYWDH1pnG82cwi4YQ0SyZxQga2kY0ig+Lk=; b=hok9OwnFThjRJ4akAk6Ylj4sHJrNMIAr8gLn2HJYQ4FFlH4ftrAr+sQ49nthAcEARaojIICsxUWPKXxaYKSVXXSX4CQN2/21m2xKTBpj1vPo9gP5k4s1xBfkbn/zsFqjR6SlAblseCMW18uIwPTD/u0BU2td3XdYy2nTSdiRPjs= Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com (20.178.136.81) by TYAPR01MB3263.jpnprd01.prod.outlook.com (20.177.104.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Thu, 22 Nov 2018 00:56:22 +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:56:22 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 05/10] ASoC: audio-graph-scu-card: tidyup "prefix" parsing Thread-Index: AQHUgf4vnttN4nc+REe+ZrdciaY0cA== Date: Thu, 22 Nov 2018 00:56:21 +0000 Message-ID: <87tvkalz05.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: TYAPR04CA0020.apcprd04.prod.outlook.com (2603:1096:404:15::32) 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; TYAPR01MB3263; 20:L0k0nZEpaREFokpAH7dXfXaqFFrV0HRqdfXeBXDG0Vmc+SCrWtvq+z+QxqGiIHICgaOED5HOkZ3VTi/DVwEUUPXNJECpsrYk5sgLgzatbw2gOYiQr0sm/91i6juJWZckx0UpokK1LKuxlnPVekJxrFKegLjhWvjGjSDw495gIR0= x-ms-office365-filtering-correlation-id: e14b2198-4208-4e61-1836-08d6501551d8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:TYAPR01MB3263; x-ms-traffictypediagnostic: TYAPR01MB3263: 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)(5005006)(8121501046)(3231442)(944501410)(52105112)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB3263; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB3263; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(136003)(366004)(376002)(39860400002)(396003)(189003)(199004)(52116002)(97736004)(3846002)(7736002)(66066001)(386003)(11346002)(305945005)(81166006)(102836004)(446003)(6506007)(68736007)(316002)(76176011)(86362001)(106356001)(105586002)(8936002)(2900100001)(71200400001)(486006)(5660300001)(26005)(6512007)(6916009)(2906002)(36756003)(256004)(53936002)(6116002)(476003)(4326008)(186003)(6486002)(71190400001)(8676002)(81156014)(6436002)(478600001)(2616005)(99286004)(14454004)(25786009); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB3263; H:TYAPR01MB3328.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 9LfEY+VyXIa9MYMqRd3mf/zlZkQfHr/0fndCJqDNVoOZunz1eo4/R4+JFfzLwu8pL3Bf46WlHpGAkNcabQ8aLCtFDzDhSAN28Rco+UoFWht94v44lnOKMl5sG4IKkh74sGfqUPGmAhZ+VsDOlbuWi7cih3SxVAh3rco8fmt2nrfBNUqg6G8J0OSkDQzht/Tk8LUrnZUSPHxYGmh/h/5dRMu4gLy8YNhPw6rDWEY/o6AbSixR6AHU96sDCs1PRE16rQj3yTXvxWTR/0yvVzKQ2qwP7DcVrirSOH9kcbG/TcVMojw6B3TlLMHXHWtlJuPD3JTXaSYVOm0U7Sgw0kNpnMssAMXYaNw09YpPjFbPam8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e14b2198-4208-4e61-1836-08d6501551d8 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 00:56:21.8446 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB3263 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 05/10] ASoC: audio-graph-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 audio-graph-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/audio-graph-scu-card.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/generic/audio-graph-scu-card.c b/sound/soc/generic/audio-graph-scu-card.c index c469473..fdc61f1 100644 --- a/sound/soc/generic/audio-graph-scu-card.c +++ b/sound/soc/generic/audio-graph-scu-card.c @@ -39,6 +39,8 @@ struct graph_card_data { #define graph_priv_to_dev(priv) (graph_priv_to_card(priv)->dev) #define graph_priv_to_link(priv, i) (graph_priv_to_card(priv)->dai_link + (i)) +#define PREFIX "audio-graph-card," + static int asoc_graph_card_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; @@ -98,6 +100,7 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep, struct snd_soc_dai_link *dai_link = graph_priv_to_link(priv, idx); struct graph_dai_props *dai_props = graph_priv_to_props(priv, idx); struct snd_soc_card *card = graph_priv_to_card(priv); + struct device_node *node = of_graph_get_port_parent(ep); int ret; if (is_fe) { @@ -154,10 +157,17 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep, 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"); + /* check "prefix" from each node if top doesn't have */ + if (!priv->codec_conf.of_node) + snd_soc_of_parse_node_prefix(node, + &priv->codec_conf, + dai_link->codecs->of_node, + PREFIX "prefix"); } ret = asoc_simple_card_of_parse_tdm(ep, &dai_props->dai); From patchwork Thu Nov 22 00:56:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10693351 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 B910414DE for ; Thu, 22 Nov 2018 00:56:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1A1F2C5BD for ; Thu, 22 Nov 2018 00:56:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9476D2C697; Thu, 22 Nov 2018 00:56:50 +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 EBED42C5BD for ; Thu, 22 Nov 2018 00:56:49 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E0A4D267A5C; Thu, 22 Nov 2018 01:56:48 +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 13A4E267A61; Thu, 22 Nov 2018 01:56:46 +0100 (CET) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (mail-eopbgr1400104.outbound.protection.outlook.com [40.107.140.104]) by alsa0.perex.cz (Postfix) with ESMTP id 147B7267961 for ; Thu, 22 Nov 2018 01:56:43 +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=q/034J5JoYkqIXqhlNmc/GvgXKHfnLekeWYw8WjiQ/Y=; b=KLFNoRUjsJT/omQ/2qcWBTpCid3R1e/EdpalKGNUu9G1L8MHJFwZu/gPgQDPMd3HdPnMbd6P6iiXQH4NUbvzFVeO0d95jGx28LjWUjjegtyQLzBS/2FZ2VnLjomGkB11QEJBuhzE5AAMKpKPty0kPEE3Vd92rClQ/dMS+eo5Ny8= Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com (20.178.136.81) by TYAPR01MB3263.jpnprd01.prod.outlook.com (20.177.104.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Thu, 22 Nov 2018 00:56: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:56:41 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 06/10] ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing on Doc Thread-Index: AQHUgf47dCoiIs3jf0604wu0ifNMCg== Date: Thu, 22 Nov 2018 00:56:41 +0000 Message-ID: <87sgzulyzm.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: TYAPR04CA0017.apcprd04.prod.outlook.com (2603:1096:404:15::29) 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; TYAPR01MB3263; 20:KBu6vrKrKmDsMijEi4k+TBLKBt2Wf1CfkoRwmjso0VImANcsB2TFc2LV3zWxqcdX019/1GITJgmE73V8w/0gSXblNCdLnR2FX+vozPuTRrzMiXcuVcpn0qZCdkaMuC+kMAPlYW5M8yNVCnH0MX6GjG9JACSrFuYlV8EiBY3eLKc= x-ms-office365-filtering-correlation-id: 45c54f31-fe76-451a-6319-08d650155d98 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:TYAPR01MB3263; x-ms-traffictypediagnostic: TYAPR01MB3263: 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)(5005006)(8121501046)(3231442)(944501410)(52105112)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB3263; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB3263; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39850400004)(346002)(136003)(366004)(376002)(396003)(189003)(199004)(52116002)(97736004)(3846002)(7736002)(66066001)(386003)(11346002)(305945005)(81166006)(102836004)(446003)(6506007)(68736007)(316002)(76176011)(86362001)(106356001)(105586002)(8936002)(2900100001)(71200400001)(486006)(5660300001)(26005)(6512007)(6916009)(2906002)(36756003)(14444005)(256004)(53936002)(6116002)(476003)(4326008)(186003)(6486002)(71190400001)(8676002)(81156014)(6436002)(478600001)(2616005)(99286004)(14454004)(25786009); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB3263; H:TYAPR01MB3328.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: ItU1e77zNv07UHuZIv3bTmgKDpvIg9+5MqtBoMVgOyG+3F/l8fuexcPRsGShcPVNsHOurHbpQzocTLPdSR/npvPUO7sL6K7XA9NBMjoyXEpkK4xqgSMr+RIy0SDWxOyzggHzOOAK2ZdOG7mUPxHiu+wpS/UlECM+yaHGzSjVYrJWRzkwCBNsmdhQEXdH14WGH50NzteL/PLToIpYwzHAO6VkQqsN55EOt1orBXV7N36L2oV26/i9A7hyQGMzTvq53z3Y/ihE6jbBPgZ5d+ae9GO/ep3khCoK43wX9yAEXhZvQi1rHMWLKnWAKN+EeqiBoXmSHc+NoIVt869IC4hpDpnHc5WZLgLu15RbhCQu3TM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45c54f31-fe76-451a-6319-08d650155d98 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 00:56:41.5517 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB3263 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 06/10] ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing on Doc 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 audio-graph-scu-card.c is supporting "convert-rate/channels" which is used for DPCM. But, sound card might have multi codecs, and each codec might need each convert-rate/channels. This patch supports each codec's convert-rate/channles support. top node convert-rate/channels will overwrite settings if exist. It can't support each codec's convert-rate/channels if sound card had multi codecs without this patch. Signed-off-by: Kuninori Morimoto --- Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt b/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt index a361088..62d4276 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt +++ b/Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt @@ -80,7 +80,6 @@ Example 2. 2 CPU 1 Codec (Mixing) routing = "codec Playback", "DAI0 Playback", "codec Playback", "DAI1 Playback", "DAI0 Capture", "codec Capture"; - convert-rate = <48000>; dais = <&cpu_port0 &cpu_port1>; @@ -90,6 +89,7 @@ Example 2. 2 CPU 1 Codec (Mixing) ... audio-graph-card,prefix = "codec"; + audio-graph-card,convert-rate = <48000>; port { codec_endpoint0: endpoint { remote-endpoint = <&cpu_endpoint0>; From patchwork Thu Nov 22 00:56:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10693353 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 30F8914DE for ; Thu, 22 Nov 2018 00:57:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 183AD2C5BD for ; Thu, 22 Nov 2018 00:57:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0979F2C697; Thu, 22 Nov 2018 00:57:04 +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 634B62C5BD for ; Thu, 22 Nov 2018 00:57:03 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5C289267961; Thu, 22 Nov 2018 01:57:02 +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 F2D3A267A7D; Thu, 22 Nov 2018 01:57:00 +0100 (CET) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (mail-eopbgr1400109.outbound.protection.outlook.com [40.107.140.109]) by alsa0.perex.cz (Postfix) with ESMTP id BA51126770D for ; Thu, 22 Nov 2018 01:56:58 +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=kelJcxrOFz8idPTM0S2vShxxQ+WOdUQ6zR3mYD+CsCk=; b=ohqDEMc8BXkdjp2Btvr+a9R9xfs19k3NcgcUAFJMXry6unR/0EfyB5tOep7YqQBg3QsPGkH8LR9TCg/JwG4gYanx4CigdhSexTFLNxp8fWMdBZvpcq4GfdMNaPI1xpTQkoFGGbEeyGdt6ec5RuhmIn6DJhpeI4XvpC+mglnGHYA= Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com (20.178.136.81) by TYAPR01MB3231.jpnprd01.prod.outlook.com (20.177.103.86) 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:56:54 +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:56:54 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 07/10] ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" parsing Thread-Index: AQHUgf5CdLoNOtm1g02Tu3ZwKzxQGQ== Date: Thu, 22 Nov 2018 00:56:53 +0000 Message-ID: <87r2felyz9.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: TYAPR01CA0220.jpnprd01.prod.outlook.com (2603:1096:404:11e::16) 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; TYAPR01MB3231; 20:BoKPWDHRUixdrLAggD+18A0zAPJaB+HCJOYm0g44RpkGI68iTctio2oPyqGc5vx3j8LPaMEdGr1t/eVaJo21xZ7LInH4jbIQIN4nJKTUiL6f8K8wu0bunUaTzdMArBSeTXJdMPMHqzEY0JW71qGKpiXQKVMrCWvgMtU82t4QaxQ= x-ms-office365-filtering-correlation-id: 179fc46f-9136-46aa-6fe2-08d6501564f5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:TYAPR01MB3231; x-ms-traffictypediagnostic: TYAPR01MB3231: 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)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB3231; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB3231; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(39850400004)(396003)(136003)(366004)(189003)(199004)(53936002)(6512007)(316002)(36756003)(305945005)(26005)(5660300001)(52116002)(386003)(6506007)(2906002)(102836004)(71200400001)(71190400001)(7736002)(6486002)(25786009)(6916009)(68736007)(3846002)(6116002)(4326008)(99286004)(6436002)(2900100001)(446003)(97736004)(486006)(11346002)(476003)(478600001)(86362001)(8676002)(66066001)(14454004)(2616005)(76176011)(186003)(106356001)(81156014)(81166006)(8936002)(256004)(105586002); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB3231; H:TYAPR01MB3328.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: QC5fXKulSMhS+2COAL9ZbrnfWWc/lu9UgcAU9Rex+2WiWPQTSGC0ClxJtMx01nVQHqcXdvR1I07kZgpxAYY65uKyK9hpOgrfsq8sLh4qVHGd8zV87gBjr5gDVitOhKLNsoQdGEZrAlN054iv9yz/xP2H9Vr1gbHM/UYfK1cEvUGuKrW4Y1Sb2U1QP4NmUZsZZQTG8zgX9ot0ySPWOvtxW5Q/gQTX21xHfE8lXQSkUcyYVC2OomwcQydsk6LCV/1ngpElCceGi+seSho3Q68POJzTJFPunHbtWdRgyVgwIfxzYSYpcq8BZwlVu06oBzmoXNlRtPUDZ0K7tnycgeLQtLkzTUTFk39GFE6uuLFPL7A= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <3217E89043FBA041BA5E71F27BBAF345@jpnprd01.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 179fc46f-9136-46aa-6fe2-08d6501564f5 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 00:56:53.9086 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB3231 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 07/10] ASoC: audio-graph-scu-card: tidyup "convert-rate/channels" 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 audio-graph-scu-card.c is supporting "convert-rate/channels" which is used for DPCM. But, sound card might have multi codecs, and each codec might need each convert-rate/channels. This patch supports each codec's convert-rate/channles support. top node convert-rate/channels will overwrite settings if exist. It can't support each codec's convert-rate/channels if sound card had multi codecs without this patch. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-scu-card.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/generic/audio-graph-scu-card.c b/sound/soc/generic/audio-graph-scu-card.c index fdc61f1..0f13f11 100644 --- a/sound/soc/generic/audio-graph-scu-card.c +++ b/sound/soc/generic/audio-graph-scu-card.c @@ -29,6 +29,7 @@ struct graph_card_data { struct asoc_simple_dai dai; struct snd_soc_dai_link_component codecs; struct snd_soc_dai_link_component platform; + struct asoc_simple_card_data adata; } *dai_props; struct snd_soc_dai_link *dai_link; struct asoc_simple_card_data adata; @@ -85,7 +86,11 @@ static int asoc_graph_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params) { struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card); + struct graph_dai_props *dai_props = graph_priv_to_props(priv, rtd->num); + + asoc_simple_card_convert_fixup(&dai_props->adata, params); + /* overwrite by top level adata if exist */ asoc_simple_card_convert_fixup(&priv->adata, params); return 0; @@ -170,6 +175,8 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep, PREFIX "prefix"); } + asoc_simple_card_parse_convert(dev, node, PREFIX, &dai_props->adata); + ret = asoc_simple_card_of_parse_tdm(ep, &dai_props->dai); if (ret) return ret; From patchwork Thu Nov 22 00:57:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10693355 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 3BCB814BD for ; Thu, 22 Nov 2018 00:57:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21B162C5BD for ; Thu, 22 Nov 2018 00:57:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 132F72C697; Thu, 22 Nov 2018 00:57:18 +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 57F7B2C5BD for ; Thu, 22 Nov 2018 00:57:17 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 59FE12677E8; Thu, 22 Nov 2018 01:57:16 +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 0D0DC267A90; Thu, 22 Nov 2018 01:57:14 +0100 (CET) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (mail-eopbgr1400094.outbound.protection.outlook.com [40.107.140.94]) by alsa0.perex.cz (Postfix) with ESMTP id D69F72677E8 for ; Thu, 22 Nov 2018 01:57:11 +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=R5AQtWJTeDFBwfOdc9AL+Ftt0FyykZts8aE9hehgdpM=; b=ECCD9YrGPye2m0e3CtXHGWsQ7eOtQLeVC71OAA8VIP9RyySIAGK4dZdha9jjjBTqkjT3VHiuLfvgw39RtAmITE5FGfEzs+N3YLP4vppgBAbmsXUD4tKgO1CbJ7f9es5DetK4SQO0XSgiIcV7Xj2KlrNqiAhLTy5vnSBFXohXWUs= Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com (20.178.136.81) by TYAPR01MB3231.jpnprd01.prod.outlook.com (20.177.103.86) 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:57:09 +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:57:09 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 08/10] ASoC: audio-graph-scu-card: tidyup asoc_simple_card_parse_daifmt() timing Thread-Index: AQHUgf5LdRXanAD14kun2XGRIAGPSw== Date: Thu, 22 Nov 2018 00:57:09 +0000 Message-ID: <87pnuylyyv.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: TY2PR02CA0005.apcprd02.prod.outlook.com (2603:1096:404:56::17) 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; TYAPR01MB3231; 20:dkmuX+4/bfhYxrDFGNjzC8mr4dtfziDqgK08p7Y0qTV5H0niXxndGoq38pNDeY0OCpkPAPMmcGXXZQlB7dmQT5eZOFFU78D7phf7netTJlEUg9zt+IYdFSjMKPDVIQ6X55j1Z44pdKwW4r2+r7PXLnBQTCx8q/3dAyfeO0NltcE= x-ms-office365-filtering-correlation-id: 5dd3ca46-d87a-461e-3485-08d650156e1b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:TYAPR01MB3231; x-ms-traffictypediagnostic: TYAPR01MB3231: 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)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB3231; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB3231; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(39850400004)(396003)(136003)(366004)(189003)(199004)(53936002)(6512007)(316002)(36756003)(305945005)(26005)(5660300001)(52116002)(386003)(6506007)(2906002)(102836004)(71200400001)(71190400001)(7736002)(6486002)(25786009)(6916009)(68736007)(3846002)(6116002)(4326008)(99286004)(6436002)(2900100001)(446003)(97736004)(486006)(11346002)(476003)(478600001)(86362001)(8676002)(66066001)(14454004)(2616005)(76176011)(186003)(106356001)(81156014)(81166006)(8936002)(256004)(105586002); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB3231; H:TYAPR01MB3328.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: /KSUXnNpQER/gveL9jyfj7KW39o8iVWB5/Z8vqNqZBv7nXDyDWtFJXRDHGI7APgIUPKulDWVPOq/ZHqBAFOHwcsm0/YCVkvoLAIJ9p2k7SCMzsDqRZqzR28D6XS1vl3/Jwbg2mWXHTVPdoWwFKM2kh/7fTwxJK41NzTvJvrP0DodRrBq9kwe8CpOVpTX5TVwmg6XsOkgc0SkQbBfz11VYqYcQObu0/3LB/feToikzEzz5nt1jbo138HCH696iJhnX2q1QhzXhd8w/8RLdFcvMWNJUyVAcKe4bPqT8F5Y1c5eE1tC4Dr5Br4x9VmsEkri0ptkpy3IQE8orVqX7gIxscgE7lT/ixnIb/bEUQ8Qhno= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <7591B1A3B72F9D439EB787BC4C860AC9@jpnprd01.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5dd3ca46-d87a-461e-3485-08d650156e1b X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 00:57:09.2456 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB3231 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 08/10] ASoC: audio-graph-scu-card: tidyup asoc_simple_card_parse_daifmt() timing 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 Current audio-graph-scu-card driver is parsing codec position for DPCM and consider DAI format. But, current operation is doing totally pointless, because 1) asoc_simple_card_parse_daifmt() will be called not only for 1st codec on current implementation, and it will be used as fixed format 2) it should be called for each CPU/Codec pair. Let's tidyup asoc_simple_card_parse_daifmt() timing. Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-scu-card.c | 54 ++++++++++---------------------- 1 file changed, 16 insertions(+), 38 deletions(-) diff --git a/sound/soc/generic/audio-graph-scu-card.c b/sound/soc/generic/audio-graph-scu-card.c index 0f13f11..ce1f108 100644 --- a/sound/soc/generic/audio-graph-scu-card.c +++ b/sound/soc/generic/audio-graph-scu-card.c @@ -96,15 +96,16 @@ static int asoc_graph_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } -static int asoc_graph_card_dai_link_of(struct device_node *ep, +static int asoc_graph_card_dai_link_of(struct device_node *cpu_ep, + struct device_node *codec_ep, struct graph_card_data *priv, - unsigned int daifmt, int idx, int is_fe) { struct device *dev = graph_priv_to_dev(priv); struct snd_soc_dai_link *dai_link = graph_priv_to_link(priv, idx); struct graph_dai_props *dai_props = graph_priv_to_props(priv, idx); struct snd_soc_card *card = graph_priv_to_card(priv); + struct device_node *ep = is_fe ? cpu_ep : codec_ep; struct device_node *node = of_graph_get_port_parent(ep); int ret; @@ -185,7 +186,11 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep, if (ret < 0) return ret; - dai_link->dai_fmt = daifmt; + ret = asoc_simple_card_parse_daifmt(dev, cpu_ep, codec_ep, + NULL, &dai_link->dai_fmt); + if (ret < 0) + return ret; + dai_link->dpcm_playback = 1; dai_link->dpcm_capture = 1; dai_link->ops = &asoc_graph_card_ops; @@ -205,7 +210,6 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv) struct device_node *codec_ep; struct device_node *codec_port; struct device_node *codec_port_old; - unsigned int daifmt = 0; int dai_idx, ret; int rc, codec; @@ -228,26 +232,6 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv) * see asoc_graph_get_dais_count */ - /* find 1st codec */ - of_for_each_phandle(&it, rc, node, "dais", NULL, 0) { - cpu_port = it.node; - cpu_ep = of_get_next_child(cpu_port, NULL); - codec_ep = of_graph_get_remote_endpoint(cpu_ep); - - of_node_put(cpu_ep); - of_node_put(codec_ep); - - if (!codec_ep) - continue; - - ret = asoc_simple_card_parse_daifmt(dev, cpu_ep, codec_ep, - NULL, &daifmt); - if (ret < 0) { - of_node_put(cpu_port); - goto parse_of_err; - } - } - dai_idx = 0; codec_port_old = NULL; for (codec = 0; codec < 2; codec++) { @@ -264,28 +248,22 @@ static int asoc_graph_card_parse_of(struct graph_card_data *priv) of_node_put(cpu_ep); of_node_put(codec_ep); + of_node_put(cpu_port); of_node_put(codec_port); + it.node = NULL; if (codec) { if (codec_port_old == codec_port) continue; codec_port_old = codec_port; - - /* Back-End (= Codec) */ - ret = asoc_graph_card_dai_link_of(codec_ep, priv, daifmt, dai_idx++, 0); - if (ret < 0) { - of_node_put(cpu_port); - goto parse_of_err; - } - } else { - /* Front-End (= CPU) */ - ret = asoc_graph_card_dai_link_of(cpu_ep, priv, daifmt, dai_idx++, 1); - if (ret < 0) { - of_node_put(cpu_port); - goto parse_of_err; - } } + + ret = asoc_graph_card_dai_link_of(cpu_ep, codec_ep, + priv, dai_idx++, + !codec); + if (ret < 0) + goto parse_of_err; } } From patchwork Thu Nov 22 00:57:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10693357 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 69FAA14BD for ; Thu, 22 Nov 2018 00:57:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5345F2C5BD for ; Thu, 22 Nov 2018 00:57:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 478E22C697; Thu, 22 Nov 2018 00:57:32 +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 B1AC52C5BD for ; Thu, 22 Nov 2018 00:57:31 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AB252267A8A; Thu, 22 Nov 2018 01:57:30 +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 4BA4E267A8A; Thu, 22 Nov 2018 01:57:28 +0100 (CET) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (mail-eopbgr1400120.outbound.protection.outlook.com [40.107.140.120]) by alsa0.perex.cz (Postfix) with ESMTP id 3189926770D for ; Thu, 22 Nov 2018 01:57:25 +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=TB0m/sHWK2MlCOWUCf7hcgHL2QFo6Uu8EhywmDp37iU=; b=ZF/infz+ALCYzU8sLBOiuoxpTuDaN/rfPVa/l3MMzlAckwhgEUyO3WCoImFG81SfP24P7u1NnsFEnOr7m/2j8SOyGNeqQ3OFwiIkS8JDKu4SPzrEoma+/DC4Uwuj/ljS6d61vkdYssqa2dRhRTXOV+obLmPwFtMkt2L5ZkpqAwA= Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com (20.178.136.81) by TYAPR01MB3231.jpnprd01.prod.outlook.com (20.177.103.86) 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:57:23 +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:57:23 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 09/10] ASoC: audio-graph-card: tidyup typo SND_AUDIO_GRAPH_CARD Thread-Index: AQHUgf5U5oxMhTBH9EWFPGsfN+AI8g== Date: Thu, 22 Nov 2018 00:57:23 +0000 Message-ID: <87o9ailyyf.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: TYAPR01CA0041.jpnprd01.prod.outlook.com (2603:1096:404:28::29) 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; TYAPR01MB3231; 20:un1oPQ8B5QYI4hBCnjmj8n+mBxW7eBUfyrKY52esTalJTtMkcbrcNbeaDEqMJRMXplbX5gseXmomg7uXt8pHne7GimFaVui+MnEOnIh36EhjIJUqIH5wxnOEkrJnWYQjWbHXp+IP/htAq8D4uaXlAP80bhaeNafD0z11cC2LEQU= x-ms-office365-filtering-correlation-id: 02731015-838f-43f2-bfb4-08d6501576a6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:TYAPR01MB3231; x-ms-traffictypediagnostic: TYAPR01MB3231: 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)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231442)(944501410)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB3231; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB3231; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(39850400004)(396003)(136003)(366004)(189003)(199004)(53936002)(6512007)(316002)(36756003)(305945005)(26005)(5660300001)(52116002)(386003)(6506007)(2906002)(102836004)(71200400001)(71190400001)(7736002)(6486002)(25786009)(6916009)(68736007)(3846002)(6116002)(4326008)(99286004)(6436002)(2900100001)(446003)(97736004)(486006)(11346002)(476003)(478600001)(86362001)(8676002)(66066001)(14454004)(2616005)(76176011)(186003)(14444005)(106356001)(81156014)(81166006)(8936002)(256004)(105586002); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB3231; H:TYAPR01MB3328.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: xbHnAx1ctTRqekJCT8G1wSHAfx7tzo9yJaLvIKWG6680GTZOtAV2RV8aBM2g0VAo1CQJjFAPg63g8WFSwy2QGkKuj2sUIv6MbgM730w0UAm4/mOWd+ecMzc5Q+kBe7p14qzSJTwqJHX4UqpoIwE2NbPbibamHCVDTtgqS/thCjVU4TlgDV+F0MBNwbr1MaK9g70LkB6u+3tGhr0FL8CLAm7MkVOAnMHKW7+NOPCTSRW33LrzLzl3c4mzbl1HvuGXhdbSBzi53KK8MeY7mBm7M0/2mQmIcIHLEU14wlKG7YLc0+49Cka5a8kM1vmeKjf6hJtLfR+iclx18TbMgoVrt+LG3rmZV1Ckao7hdHUuhyM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02731015-838f-43f2-bfb4-08d6501576a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 00:57:23.5849 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB3231 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 09/10] ASoC: audio-graph-card: tidyup typo SND_AUDIO_GRAPH_CARD 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 1 "simple" is enough on Kconfig help Signed-off-by: Kuninori Morimoto --- sound/soc/generic/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/generic/Kconfig b/sound/soc/generic/Kconfig index c954be0..fa5aff9 100644 --- a/sound/soc/generic/Kconfig +++ b/sound/soc/generic/Kconfig @@ -20,7 +20,7 @@ config SND_AUDIO_GRAPH_CARD depends on OF select SND_SIMPLE_CARD_UTILS help - This option enables generic simple simple sound card support + This option enables generic simple sound card support with OF-graph DT bindings. config SND_AUDIO_GRAPH_SCU_CARD From patchwork Thu Nov 22 00:57: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: 10693359 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 EC34D14DE for ; Thu, 22 Nov 2018 00:57:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5C2B2C5BD for ; Thu, 22 Nov 2018 00:57:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA3472C697; Thu, 22 Nov 2018 00:57:50 +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 0C7642C5BD for ; Thu, 22 Nov 2018 00:57:50 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 09AF6267947; Thu, 22 Nov 2018 01:57: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 70CB6267A5C; Thu, 22 Nov 2018 01:57:46 +0100 (CET) Received: from JPN01-OS2-obe.outbound.protection.outlook.com (mail-eopbgr1410128.outbound.protection.outlook.com [40.107.141.128]) by alsa0.perex.cz (Postfix) with ESMTP id 63D3E26770D for ; Thu, 22 Nov 2018 01:57: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=J2Cy65fi90u5F6SeZjBtgyxHD10M3If8g5TOGdPxhGQ=; b=Xnv15SnRrI7Q6pzGCyKbGSfDOlyA7gjVjbz+koLq8snF7nKweYu2ABGKvhel5O3lkl7lP3FF8u0iaGUTIGzg2FUy1ZtGza87EotHSwqTEQ3UO3HFXQVvcwZ3cN/ZI6hXynHre2gIonxt3Nt5Cb2AVUkApYG2kbvB0RV9R2KrNm8= Received: from TYAPR01MB3328.jpnprd01.prod.outlook.com (20.178.136.81) by TYAPR01MB2191.jpnprd01.prod.outlook.com (52.133.178.140) 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:57: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:57:41 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 10/10] ASoC: audio-graph-card: tidyup define position Thread-Index: AQHUgf5eF5YD2S09okGI4KUrSf4c5w== Date: Thu, 22 Nov 2018 00:57:40 +0000 Message-ID: <87muq2lyxy.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: TY2PR02CA0008.apcprd02.prod.outlook.com (2603:1096:404:56::20) 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; TYAPR01MB2191; 20:eydgV/cpoGKV+CSr5muQWSy+LcBq76mXcn7Bnzo6bm9hYyQus8EY/t71m9pYUf6hcz5GOKA6dPLJ0rLNhaqAgqtWmXFctAxQR8xQYK0yQBTqT3vsA9oLkdZecvNZnmV9tTYuMhgW4rU2s4nr5LaHduFpRa377PdvLRtLSceNVT0= x-ms-office365-filtering-correlation-id: 1865c9ad-f3de-441e-5ddd-08d6501580ea 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:TYAPR01MB2191; x-ms-traffictypediagnostic: TYAPR01MB2191: 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)(5005006)(8121501046)(93006095)(93001095)(3231442)(944501410)(52105112)(10201501046)(3002001)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB2191; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB2191; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(346002)(376002)(366004)(39860400002)(136003)(199004)(189003)(2900100001)(5660300001)(7736002)(52116002)(386003)(6506007)(76176011)(26005)(6916009)(99286004)(478600001)(6486002)(102836004)(305945005)(6116002)(3846002)(186003)(316002)(36756003)(6436002)(2906002)(86362001)(14454004)(11346002)(446003)(71190400001)(476003)(97736004)(106356001)(2616005)(53936002)(256004)(71200400001)(486006)(105586002)(4326008)(81166006)(6512007)(25786009)(81156014)(8936002)(68736007)(8676002)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB2191; 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: kcTKkn1vdaJ4+PDExcJhhyCEcWg0Xs3iRz7hM6H6KRbE383sx12936/S3+dCFu0Glez7+afhhqOYd3iOg7z9lNUO4PMoU0CWxhhVh6BDfSwaC378yxcQZgEeAFbaIbLdfE7U9pcfECgP8QL5CiJ1Vd6TATRNpXG0t0dTUwEG/KtF18DWkjN8KP4FYXbRe0ljQ02kSDffQ/Rsr1zfY41qsLt4NvvTbZ4jYqNnqLFhIgFA9SaRAA55TQxAB+YKmc0NhFP0T2pfxS6owj/72MbmeM8tA0cma0QtrRLUjFHCQ4ZWVG4lbp46dN0jxpd3oTpfJ+YJed4yyDWXOjpeIvKYO98PHzUBITVWW4Nuh0XAuHI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1865c9ad-f3de-441e-5ddd-08d6501580ea X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 00:57:40.8683 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB2191 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 10/10] ASoC: audio-graph-card: tidyup define position 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 commit f986907c9225 ("ASoC: audio-graph-card: add widgets and routing for external amplifier support") added new function asoc_graph_card_outdrv_event(), but the inserted position breaks define area. This patch tidyup it Signed-off-by: Kuninori Morimoto --- sound/soc/generic/audio-graph-card.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 101c7da..1b158cc 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -36,6 +36,11 @@ struct graph_card_data { struct gpio_desc *pa_gpio; }; +#define graph_priv_to_card(priv) (&(priv)->snd_card) +#define graph_priv_to_props(priv, i) ((priv)->dai_props + (i)) +#define graph_priv_to_dev(priv) (graph_priv_to_card(priv)->dev) +#define graph_priv_to_link(priv, i) (graph_priv_to_card(priv)->dai_link + (i)) + static int asoc_graph_card_outdrv_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) @@ -63,11 +68,6 @@ static const struct snd_soc_dapm_widget asoc_graph_card_dapm_widgets[] = { SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), }; -#define graph_priv_to_card(priv) (&(priv)->snd_card) -#define graph_priv_to_props(priv, i) ((priv)->dai_props + (i)) -#define graph_priv_to_dev(priv) (graph_priv_to_card(priv)->dev) -#define graph_priv_to_link(priv, i) (graph_priv_to_card(priv)->dai_link + (i)) - static int asoc_graph_card_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data;