From patchwork Thu Jul 15 14:18:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 477432 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp320195jao; Thu, 15 Jul 2021 07:18:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPtbEyEhDIwsDz/o2e03soUbfeBKtiuf4SsWqzK89VVramEpMFo7sR62+ikWgud2eVwE1e X-Received: by 2002:a05:6602:8c3:: with SMTP id h3mr3298603ioz.144.1626358721132; Thu, 15 Jul 2021 07:18:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626358721; cv=pass; d=google.com; s=arc-20160816; b=SL53Zl7z0q4zW7Cfr8MFBylfry/RmXR1a5gssx1Ky1IrQn6edoKL3/JWtauzG04at6 EIFlny4qAOHhLUolKm4kkeRCwjscojxPVOlUho1KQc8SpmUmakcnoHdCLI+6pvDsAVxu 9eMIZWETqvzS94VScVZQF+fiMghnB3VBo+ZbS9a+b8jzDs5P6Iq6/NGKBF8dWx1125WA Bb090jy9rXE1p+6vGmsLy+ZGOJoWhgI9sKABolMkOwuMM2nvqLtmP5ZKEWo+WyV9skal TSzU7/7lEVaqvyzSvkc3ugMcCtIfq+L6Vixy/iVUSJ9w8345l2AX3Cjej4NMKpTauwsj Awpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=odbGdYbxHjSAK3R5MowOr11nHN07ijMrAcuXq0bH9Lg=; b=x8bsnfKQ0afouAujLcWHzu2ulg8btRoL5xnDKcreGUr9d1pstyqu7PTusDtrAW9WLz LXc9ld11obUGVnpUO0YvnxgVxvcBE+uJUJ2EsjZDhov58PAL+7f/ZaX3Om8JuEJUchKw EhC+XOznfLttCJYmCrashaO6+EvABE4yDyqQHpDCT5zdw7FQN2FQENleSeBOTkZLaJcg 0H1xTMZ8kW1x8aOeFPWpBdx9eHIYBQWKHzNJW3IjCaZC+D8LsKDr7yXWlkxMo3/5sTJc K6702OCAZ6B19c8P3nEu5XAMldJ5ngszj9iHt+ku0rifn/p84pwf9EuzvT1BNw+MmITT dW1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=GqFMAHPp; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f17si6703711ion.28.2021.07.15.07.18.40; Thu, 15 Jul 2021 07:18:41 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=GqFMAHPp; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238117AbhGOOVd (ORCPT + 7 others); Thu, 15 Jul 2021 10:21:33 -0400 Received: from mail-db8eur05on2062.outbound.protection.outlook.com ([40.107.20.62]:1953 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238112AbhGOOVc (ORCPT ); Thu, 15 Jul 2021 10:21:32 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JWtnlN8Bho8eayiuV8dFjfMwygACz+RzzSEbC3VZHagHu9EnkUZoS6wGEKAKj108LFO8XRLSt0wcixtoUdJGZY0cdiyo/rJhm4jqaKh301ZQup0ZFKeKtZsqOEL9e/FFKVLPiQrU8namZu0N061zc5UGCQ3417Ocg7uEkhUcGT2qafB8ZTznghYsn602Y6/rv/JfiwMoDsDF/Obx+TA0xhNG9uYUcQk1x2lqrJFPBGWgFqUgdZInTDC8kT9n9eZ8sy60WZn5yt2pKlunbNEov64xvTIIGLfHBYdC2HpAES9nMNG4uFpql5SEFavhsHLo9uJ/y7r7jKB0zfOHM+ekmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=odbGdYbxHjSAK3R5MowOr11nHN07ijMrAcuXq0bH9Lg=; b=bs/3LsRCeawLXpW9ZBbh7Jmk4II66u47rYvRAp1eseuhPjW2Z7wqxdMqeda1nUTGGpOb/B9+V2vmLFguisy5dvAHy54s4/99hBMTmGT62ebLQUBz+nouhx/nuZcwbXDGa6VWEjWWBeCkHfz2rBwTveaCARnus/VDWVub/jIt/O9wEeQJVjRiImDMMo1huCkxQs4VETvgNGHAYYhI+nHm2Wz0JO1++FoM7GJp6PpocpU6wUimxNDpThcU+xSaaE9M4kAaMKpVE0Js2VdOrUP5iGxJ8DYRGqCXr/iMk0kEyGJkV2Ap8g+Ijk1ojM0eSl9Ho1pkpfnrKPLK8zTYEGAOpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=odbGdYbxHjSAK3R5MowOr11nHN07ijMrAcuXq0bH9Lg=; b=GqFMAHPppsY6VyvuoNg7clPcwEX8/ykOTctN3TdJoifLe9oyulud1osvgkpaqw2SXYLOJQDItbq1uiCZY6tBbXvLHT5oGUYXXDICxD9dO7UPyCntdfUqUSSx0Qymiox4JZ46f++9QxFtEDn9P9+B0Uw4fQt72z1MLyj0zxmDdkY= Authentication-Results: alsa-project.org; dkim=none (message not signed) header.d=none;alsa-project.org; dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) by AM0PR04MB6835.eurprd04.prod.outlook.com (2603:10a6:208:180::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.26; Thu, 15 Jul 2021 14:18:37 +0000 Received: from AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::1105:2d9f:b790:4ec3]) by AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::1105:2d9f:b790:4ec3%6]) with mapi id 15.20.4331.023; Thu, 15 Jul 2021 14:18:37 +0000 From: Daniel Baluta To: alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com, broonie@kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, perex@perex.cz, tiwai@suse.com, daniel.baluta@gmail.com, Daniel Baluta Subject: [PATCH 1/3] ASoC: SOF: Parse fw/tplg filename from DT Date: Thu, 15 Jul 2021 17:18:00 +0300 Message-Id: <20210715141802.880911-2-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210715141802.880911-1-daniel.baluta@oss.nxp.com> References: <20210715141802.880911-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: VI1P195CA0085.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:59::38) To AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2a02:2f08:5503:9f00:58f1:af0b:2fd9:e70) by VI1P195CA0085.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:59::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Thu, 15 Jul 2021 14:18:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da6da1a0-91f1-459c-005e-08d9479b6fda X-MS-TrafficTypeDiagnostic: AM0PR04MB6835: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cSbtLhxGcfkkIekgx3os8j0B3hAKDlWGARXFXqT5lAb5ltTGJeC3wh4EITS7qvOkSnbxZCjlHSthe7cUlltFQpAnlKsFcz+31+JrweQi+5AnZAZw1pPV2un2ufdV6KZhpg0LMB2dgnmxZadyj7DuJJ5yCmfoJZIoksKWxzrJwMM3MhmMptTpZetWBu7FwDE7c7mzd+UJvYzx8EKjCNfaGtUmY5j9Z+k+Gr/UMloTwOGujfCvdaS9M7+zjcWTNfKPC4D0JKItvJycO2vvq6MOw2v+Rt2blMz6GbUSaN1H1xcGR6DQNHEiIUD/VazCxGgloY8NXiJnc+C+OOihyZLiCv/202fLipFC1/vaoY6YlwGyYUzdvzhq2R+CX76QHwRTUWc4h8uvLXybC8hKBQ87zgxh51wA6XnNsDLSN3Mvr9zN8hRBeLd/jyVgBbJ75gSofXiZs1Azo9n4VRdV2Z/T5YOneoRzliXucft4A04Q3L3hnBABnEvAQz5QEGZNA9BdlCuDDyKD/HtuTKpNjGIq7Imd/kkJUUA+4Iyyo2Gt/IbjpISemn68iqpKkH6JXGWS2aGb0lwmzeV8mEf/vo2f3KXWDr7/aRjVZDogwUTlDc+gGkcUt05vkTu/TgruzTf2UXPTaHUywqa2+5R/Y9Kb8g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB5140.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(39860400002)(396003)(376002)(52116002)(4326008)(66556008)(44832011)(66946007)(8936002)(2616005)(6512007)(6486002)(86362001)(8676002)(7416002)(66476007)(316002)(5660300002)(6506007)(186003)(478600001)(83380400001)(6666004)(1076003)(38100700002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dPTeJ8BuOP5DVZfwbi1SvR7ASd8pSw4BYlnnJ4ukXsaHoVktJ+FoOf3XGAC+hJntOI7gEXRdoItWnRVTmBrzmAPS4lPXw3yWMafhNSe/XIcznXhevPROfZGYLb9n8ioRh8FRHgIgL7KILD3NbVCRBKCV0CNH9TbhU6zC9toB4qVr/8j2evE9Ds5vP3reIULmCVssxwU9je9GbufUNmtIM3xvAlGjNddHuruHRSe+m+mKI6WqrBgPQOlaifT1zO5MolKUWsRpgbU6m1KTpaAdW5dYrgNET7BPRyPpVjJQdpMT52NVRCjJnLHIQMTV0hKGlbSww7ap/9xW0B2XMjV15ZnsmPENMXnAwJYmxqAwc6wbtbgHeLLQnbZaBA2atbJsRB6SdytnQf1onv6LI2S9SOzQRSYVWtIUIwmBUheh0CxLasghX1P17rX8Q/Le11Gt7GZxcUexEZS/Rk89GrlyouovJeatoHZgAbFFayaSypt0k6Ie+vSguWKCTuwhsu8bxeQVV+Yz4l8LOOIm0Vzd8uCRhNaKaf8xtpaMOerw6mD7Agi3mnoB6R2c6C4mKIITXfSn5xQ+Nglk8Vf6fpDKnIHXD9AhJ9ffQFXrIeq8M54BS1IFbKeIqBKmU0jZvmaZeq5PPD6SAoF02D1seUy7rtDqK1dOGWXacC2i0uIIzDWiwfpBrv08fIDhmdokzX835gB8Ge7DmQoum+H3ItWivPFyuAZttyLqs9Ovx6NMdXVaJJtvubxfYfPtXCah6ivWbe/gVypmIf8xdNoYJYFmmaG8Ri0kbt6UURk4oZI1eU0m5FQyu+lzefkXsIeNrJvPDKv/gu2+pFz9ZpGrc8LJWskzk3yR5B/V4XL3O+m56BgUz2aKNJLWc+QSAU+ptAyfyi48ajjK9jIQvei7paK/CLQQ9QwpZC++WwJRG4qw82kquJrtsxvQUMlFt6JcWlxl224cZ9AJq8Uq4sJsdLyv3Jw4UZJiGZ/iEMA+m2+F8jxZnHPwD2vycYsXv+3IL3fOQ38gFhlaUfHmUZIPOy5CMZnjPNH+Q/JmcFzE6piFLew7a5U2z9i0egYjuCMXz9FnbU9x0rat0D06fgR+AgbbAmg8n3E70iDIyG6HyuFLRUkL/m+RhlbS4sFvWuIkh/xTTdcnb5wW2Bpu71IQFstWPSzV6l2M669iOuNFJRivO+4rJjSqGvJcEGLTSoT5828Ddmz883Yy56C9eFkk9OeD9ANSwWmOQYgWkrPS6MsboLMNFUBDVqc/roXa02SSSmWOpFnTF39a8PRLEGN5G66zx9+Y4y/OvhoyKwLqtn4VANgwA2XkrG9twXW1TsFx7vH1My1kJZsZ3qkhGUK3HdOrWWZBKm20tShObb0CXZMTHbHAhreOFcfMSdwKGRpxsosa X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: da6da1a0-91f1-459c-005e-08d9479b6fda X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5140.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2021 14:18:37.3465 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rCKsafeBExdCtXcVH7y9qzXbJ56/26/L66HqEhxoA4AQ+d8/5SwCq8o2OdAZXf/upnkuuZorHKvb1sl0jJeZTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6835 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Daniel Baluta Introduce two DT properties in dsp node: * fw-filename, optional property giving the firmware filename (if this is missing fw filename is read from board description) * tplg-filename, mandatory giving the topology filename. Signed-off-by: Daniel Baluta --- sound/soc/sof/sof-of-dev.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) -- 2.27.0 diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c index d1a21edfa05d..770935191823 100644 --- a/sound/soc/sof/sof-of-dev.c +++ b/sound/soc/sof/sof-of-dev.c @@ -65,11 +65,28 @@ static void sof_of_probe_complete(struct device *dev) pm_runtime_put_autosuspend(dev); } +int sof_of_parse(struct platform_device *pdev) +{ + struct snd_sof_pdata *sof_pdata = platform_get_drvdata(pdev); + struct device_node *np = pdev->dev.of_node; + int ret; + + /* firmware-name is optional in DT */ + of_property_read_string(np, "firmware-name", &sof_pdata->fw_filename); + + ret = of_property_read_string(np, "tplg-name", &sof_pdata->tplg_filename); + if (ret < 0) + return ret; + + return 0; +} + static int sof_of_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; const struct sof_dev_desc *desc; struct snd_sof_pdata *sof_pdata; + int ret; dev_info(&pdev->dev, "DT DSP detected"); @@ -77,6 +94,8 @@ static int sof_of_probe(struct platform_device *pdev) if (!sof_pdata) return -ENOMEM; + platform_set_drvdata(pdev, sof_pdata); + desc = device_get_match_data(dev); if (!desc) return -ENODEV; @@ -94,6 +113,16 @@ static int sof_of_probe(struct platform_device *pdev) sof_pdata->fw_filename_prefix = sof_pdata->desc->default_fw_path; sof_pdata->tplg_filename_prefix = sof_pdata->desc->default_tplg_path; + ret = sof_of_parse(pdev); + if (ret < 0) { + dev_err(dev, "Could not parse SOF OF DSP node\n"); + return ret; + } + + /* use default fw filename if none provided in DT */ + if (!sof_pdata->fw_filename) + sof_pdata->fw_filename = desc->default_fw_filename; + /* set callback to be called on successful device probe to enable runtime_pm */ sof_pdata->sof_probe_complete = sof_of_probe_complete; From patchwork Thu Jul 15 14:18:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 477433 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp320248jao; Thu, 15 Jul 2021 07:18:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7/UHMF7JsQd1Qqxb6y/+yWm/Zux9SY35R0NNIYSQVNejM57Hf2x244ryg7xcCgwuFXc+N X-Received: by 2002:a5d:8c9a:: with SMTP id g26mr3385713ion.121.1626358723800; Thu, 15 Jul 2021 07:18:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626358723; cv=pass; d=google.com; s=arc-20160816; b=0r0VSYaNuxj/ZEMsoj7wNMZ8VybME7ouEXcz4R/cDMriFh4Gvm9I7pBlstXfAduSmA bCd8tNCrTCwXMT+DciOKohhQfKOwOWsmcd4whPomxrUo67W4/XBvIu2LOPPEM+fdSpRh Nhmtgrtd7QOD37GYAc+HxcSqihb9oWCgT+au60F6d0JNZ+iLG8dvRaeHL8O91iemeSJR dZc+6k3teZQlar9INcZmiNQ4q2961Z6J+Dl0xIZpDJte9lVLJ8xsn0oY5UbJbmmKJFn8 UJvU/WL4b3itb8qrTFtjbY1Vaj0T6I0jVWz0gAliACqCzwM3C8ejEtVGkjePJAWXI08f Dg/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6qaVUTJnEddSUWxBN6fQN/A6ngW4XCyIyhenaY/Jo3w=; b=1EWyxp7GN4XqQzl50IrYmMdNIH56+TzfYLZzZ+wXpErNFGqdWP3LYHrzVceMWvPwZs rJC400X28BJQbdEmH6TpzfQ8YyQULVubbpsm09g90UTWvjnWp9bCbc45RyquS9SrdCMr aLoHdp3ZMbBNtMcGAGOF92vhgkrpre/jM9y3RJ2FuUen6vwBWMPEK2xDPJaRLVIAtIJY d6onzDIHgpJ6eZzvBGfyQxPBU5S77eA/MPXYg5K837yw49rUJ/7ODVX/QYHIZuqitLu0 8MrB7lRa+t5qBEFrIJ8wDIo+O/5aX2AfDMPmo0fBlFg+dGxAZea5DO9AiUpjLP8fPgGV GdVg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=fE7TEPdT; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si7422712jav.18.2021.07.15.07.18.43; Thu, 15 Jul 2021 07:18:43 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=fE7TEPdT; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236981AbhGOOVf (ORCPT + 7 others); Thu, 15 Jul 2021 10:21:35 -0400 Received: from mail-eopbgr60087.outbound.protection.outlook.com ([40.107.6.87]:36737 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231563AbhGOOVe (ORCPT ); Thu, 15 Jul 2021 10:21:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fzNfuLSG+bS8AXjat70HPWxtSqYMagmhkuPR+e9bFiBCH/2eClUmIDR5Xy6ilIeB7pWyLnOSOFhH6VGqxQYrq16Njt0dwUECF2oTT3MxKRd4t0hjHz3qLaBzLpeZT4wfFg3keJ+FUK4d9iIw8WyYeS0Pn6ydYNJo5+q7qPZmdnGDOk5cTGeo5JNWt+7/BSPgLlIkD+uRrta6KuAHvdYQ8AMeFd/QReunT/DJy1WJudcccrfWEJiL5pDdGbXBy65G/Ekhp8s9UOzB60bsl3ig2XtDM+SDZ+rMmrM5bxbAtYIQoCuumYHYO8DvYlj48Mcxz2yTQY67X92zHqzmlJQ4vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6qaVUTJnEddSUWxBN6fQN/A6ngW4XCyIyhenaY/Jo3w=; b=HpZ5MAio0LdRoBLcQvSHd+Gh1YDcMeK+ko3wudADF7lw810cJJhFORGbs1zRsCOkzwJPtEqyJFGBvgjBcSvDAo+uqZkcz+vcecA64+KZOzg6ARB55/6R5Bdxs4ErBb7ql3fnCKOWkYl2gfKfyA3A4leyvXk9ddtc2IPIeK6Vrn/yQd2HwcCqr7vqMpSoUBU7aHbl9hRA8f/wtBdMTiNLvrzuafJmJtBcXE0V2+ioU2Uqe6MwZ0A6UIgtG1aaEaw2CgMnRm9EKrrkqNR1CtWSlDcwE9PNJRA2HXp1IHjof44Y3m+p4sggxlGrJx2pGSgBnzK0wPu6znKCeLrRNvm4kA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6qaVUTJnEddSUWxBN6fQN/A6ngW4XCyIyhenaY/Jo3w=; b=fE7TEPdTxRKt7dPqgXTpDuNnF++DPd+p9fr/Aq7hTPDCSS/oXs7RjA7WrXpGyLiJg7doqZZw7JUZSOjjwwk3MEw06whmG/js+ocgJakzm+TtTUSDUIur1otBN/HYG90SymUGSudjqb4wQ7KEwj50PxUZ44NAFG2R30+tAlENbLU= Authentication-Results: alsa-project.org; dkim=none (message not signed) header.d=none;alsa-project.org; dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) by AM0PR04MB4916.eurprd04.prod.outlook.com (2603:10a6:208:c4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20; Thu, 15 Jul 2021 14:18:39 +0000 Received: from AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::1105:2d9f:b790:4ec3]) by AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::1105:2d9f:b790:4ec3%6]) with mapi id 15.20.4331.023; Thu, 15 Jul 2021 14:18:39 +0000 From: Daniel Baluta To: alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com, broonie@kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, perex@perex.cz, tiwai@suse.com, daniel.baluta@gmail.com, Daniel Baluta Subject: [PATCH 2/3] ASoC: SOF: Introduce machine driver name Date: Thu, 15 Jul 2021 17:18:01 +0300 Message-Id: <20210715141802.880911-3-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210715141802.880911-1-daniel.baluta@oss.nxp.com> References: <20210715141802.880911-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: VI1P195CA0085.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:59::38) To AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2a02:2f08:5503:9f00:58f1:af0b:2fd9:e70) by VI1P195CA0085.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:59::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Thu, 15 Jul 2021 14:18:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a9e40c58-9f64-4f2d-45b3-08d9479b70d2 X-MS-TrafficTypeDiagnostic: AM0PR04MB4916: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JOAl3yh6CCS+L19+IPAX4+t5mhz7HpyDitJ69XwSGgD+GUpnFHQ9Q4dUYwz+I2I3du4IilzMS0qMIsXne+ApFqsoTCbgX/VQqNC4TksRmWkEnHLI6isBAZHYXvelHx0ruzqGpcNHtEmrnJIaMGrMu+CXNpyhPw0TFUwu0xu9IOkNhMVz3GB6j0uqxtobXJvRnuAAS/S3gFKVo7oBUUGs1Jtze5B0hrX/IHTHi58KxfCAYaitXLpiX/rnv55BiDpeSZKt65DyMzdTbmNWgN93rNOK4GLEVO0Fgi173tN33tw+aN8RdeRHmw8IFD7xGzez5MyR81w8y1AiBnomH2R2g4fqWL5svsmQpCY7fouh1lzj4JTL/R8wyOtX/XGPlOV6YibFxAMoyeCqhtpBnbJprkniobIm+EbU8xgZcufdmPer2p+DrQftl9t1Cfi1nbyNHhy9coTAJkPxVx9w5c8pbJXoeLsmohx0e+YnXduHqiNXtJOTzgLctrSfPJJ/L3epvbOW/NuNMatPpZtfDzQ59Iv52AAOQTIlxYSwlV4yKb3Vr6X54T3ji1fOhUb89nO3HiR4PRcV9scf+OM85gbcWp0Zhf+SqV0C2aQN9cDQSIS0K0fTM60C0NxrvoZATfp8j4UDvFrM+G0MIOX7fXZaJg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB5140.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(8676002)(6506007)(1076003)(66946007)(66556008)(478600001)(2906002)(4326008)(6512007)(38100700002)(52116002)(8936002)(86362001)(7416002)(66476007)(6666004)(6486002)(316002)(186003)(83380400001)(44832011)(5660300002)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mIQgdsFwFxQaJh3SqAHOlbU846rGDlqcNN8HlXoHZkoh7s+mZYB9SuJv2XMVMNCUgQSn1JiBJx8cm+cxq2hVUY7W9jSTnWmfEx2DshP/UcBAtlGLlRwkaSz7Jmg5/vYKL2DHC+Qrz05SOozaI3NHaxwIxwAVFf0q8ODjs0bakyczj8Fpvj0SarFsliTomes5iVQZkSixGfeoITbHjRIqeMfr0+Ex3T4wnQqBbcyuvzUvVMDIJXc5CTOxx96DNkyDgB/wkT8cnJHB/4bkkASFdAXZ1Z4Tpqt44s9zY82ZwMP7X6oMjBIijEZA69b8sO6zx3qOLxOu5PhBHNoJb+SGL9qg2fVSVImsEm+KE/rrqW+Zbinivcs6LefNsfJFQZiwCG6dzpUZiMPtvZteFANl7By4vrHuBehA/jnXChdS5ZBRnJkjW7roLdHw1TBTnFwsCYC1HSklheebeADkBziHQ0xJsrqHRje4owFAxKtQnqYmMZxGOsfUnpo57fvA6ccsretCLa95Hfx3vVBjf0FGtvLUKXCpkTcpk7RyoOC9YOmMQT2/esQas8zYyGbUueWVpY6135rMBWqp9jsPFBdIqg8Qqh/3Vn1gjdMaOKZRJD5oC5dPEkIRHNvdAsd0JkPR15MRY1A1CDNvN3/055mM6WggEjxaiaR4iiy0e3wPkk0xUe6L6Td/XB67RN+oTw4Pst4PqBLGfW8ZeGwrM4tJpYtjOTTxHONnxzejeLMzvWfOd7+MQzwFXqRykHNQOOeilQzPCeC5o1iqDfPBsQafJ9H2ZfxgP5ZnGYY6dXnuCOVs9QHvJKkMUt61XmRip7TYiggf0fGzUCH/vZm/L6IUQ6scYUs76SlgNrvdMgTZtzK3L6TW+hsPaqdbjZpPNPFvKYoARwYss/fQXJG0D/hUEVXWFeVdhFJX24gUDZV3ywtw7/lN/11XzdOedVzfb9DRRLtm0xW7Pn/JwpAgh+y1HVf8uogpWdtjmLW8kXm954hkdPRJ/mYUF8cOVLIxDsbj50GTP7k77pHPN2umR753gDuFHZCfSZJT3MRubpKIW90/INZgNYq2z95noaIxIH2FZRFbhXcXtmi+jMIMjVPu3mYyha0uJ0pzKfEKXzd6EAtmGixebloNyoNRdOtYQjzSx6SGeFMbqMr0YBEJv7ET/rbClfKFwL+IEXtVgneHtcRcQ01hAwxa07FJBs8lXKL7qUns+QcDV4vsbhrn8vMxrK2L1GlzDscGvEEz1DY1AHbXoYkJKqmzyWmYQyY0tTrD6vb3cgKdmB6ZtZRa0ekr2fC1T1oeMHZbx77Q36ivcaCizFn01nSe7BR67X6Ik+azc6/6d7C/EmFj5tSY/Pu9Ed/h78UXNODms0+WWNRlkeqbC5r6y1mWvBxNoJkTE5C+ X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9e40c58-9f64-4f2d-45b3-08d9479b70d2 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5140.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2021 14:18:38.9526 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FUGLtiCPJ4lFyAkRy0nILBwJ3k1aG38JlbGOXUNgRbfpEfpfC+5u3U0E92gLVsLu/giumSSz2OaLWtdkBC/1Vw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4916 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Daniel Baluta ACPI creates tables with information about the machine driver. With DT there is no need for such tables because we can directly get all the information needed from DT file. This patch introduces machine driver property inside dsp node. Notice that sof_pdata->machine_drv_name is the OF equivalent of sof_pdata->machine (snd_soc_acpi_mach). We don't need more information than machine_drv_name for OF platforms (for now). Signed-off-by: Daniel Baluta --- include/sound/sof.h | 1 + sound/soc/sof/pcm.c | 5 ++++- sound/soc/sof/sof-audio.c | 2 +- sound/soc/sof/sof-of-dev.c | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) -- 2.27.0 diff --git a/include/sound/sof.h b/include/sound/sof.h index 23b374311d16..191607945432 100644 --- a/include/sound/sof.h +++ b/include/sound/sof.h @@ -51,6 +51,7 @@ struct snd_sof_pdata { /* machine */ struct platform_device *pdev_mach; const struct snd_soc_acpi_mach *machine; + const char *machine_drv_name; /* machine driver name, set only for OF case */ void *hw_pdata; }; diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index 27244dc043ce..47def9240e7c 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -885,7 +885,10 @@ void snd_sof_new_platform_drv(struct snd_sof_dev *sdev) struct snd_sof_pdata *plat_data = sdev->pdata; const char *drv_name; - drv_name = plat_data->machine->drv_name; + if (plat_data->machine) + drv_name = plat_data->machine->drv_name; + else + drv_name = plat_data->machine_drv_name; pd->name = "sof-audio-component"; pd->probe = sof_pcm_probe; diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c index 10aa0d8ea186..aebfa5150fa1 100644 --- a/sound/soc/sof/sof-audio.c +++ b/sound/soc/sof/sof-audio.c @@ -884,7 +884,7 @@ int sof_machine_check(struct snd_sof_dev *sdev) /* find machine */ snd_sof_machine_select(sdev); - if (sof_pdata->machine) { + if (sof_pdata->machine || sof_pdata->machine_drv_name) { snd_sof_set_mach_params(sof_pdata->machine, sdev); return 0; } diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c index 770935191823..18bfe5b78966 100644 --- a/sound/soc/sof/sof-of-dev.c +++ b/sound/soc/sof/sof-of-dev.c @@ -78,6 +78,11 @@ int sof_of_parse(struct platform_device *pdev) if (ret < 0) return ret; + ret = of_property_read_string(np, "machine-drv-name", + &sof_pdata->machine_drv_name); + if (ret < 0) + return ret; + return 0; } From patchwork Thu Jul 15 14:18:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 477434 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp320367jao; Thu, 15 Jul 2021 07:18:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzu3rY6X4XieUxdjXRtT0eNFJn7tvhtgynVhMFR3yVSc2Kj08wrklfstkEnJRKywkUsDzbu X-Received: by 2002:a5e:950f:: with SMTP id r15mr3333682ioj.174.1626358729698; Thu, 15 Jul 2021 07:18:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626358729; cv=pass; d=google.com; s=arc-20160816; b=BMWVNkJJSWMH1MV5N70MMTAzPelEXv9VFGyO/jwqDk3CQXXLKARXk2TWwZnYS0eo66 hFBHb9nfg1OJPLHiO1LCcTnj78UcA17ToZLPKzOQUW9u3WY48n3Lx9zRf7RwAvGY1qEf 4KlICgKa4xQ9pGT/TT9q3NBERv57/xSUPjB50xzIkr4iJEw39rXuTUPdvd7+nmx+jHnR +AI9fm58q20YOrZxv4fVTpDjsdX5UEWbu4FXSCXvJub461LWG5tE/LfgVhFMtpWZirf1 aXVP0GEuu2AZfJ4c/psqu92UQUEO6QBZOk/+VsqynD7wJ2Y16ulYFL5fcSPJzzLDNJMX bYew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lNWxs69cCWV1EfFdnk29EGsk12tnzfIxTH2XdLwhvnc=; b=dB1treHy3DABrJDBVKmJ9yVNOC9UllWI8SorEw4eAcKbRj4CjWYMz9kdDh5eH9UKLM CtxwcdNiCKKYx4CY1p/isSccT4HtQNagLDVMzOm0CJwp/vHOC3b0TvRpNHcqWwZcJP9w CsdCpmuSpbXe8SzTrIm8B4wAGOEQvVXuY1iYYQz+sncxnBTt13AX8dANq/QCVy6ZoFf+ Y6l3lf7Q2ywllhT+tOWlib3WGzrXKGVv0WeLKoQ0/LIbT2Djx9PUCCnrWJhtLxkoHauk VMD1zkMXPasbWYvO3IA2b9TjVzkBMKeGWIfetfZTejsIktab4CNusswiv0yybc8ITnt2 WxjQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Lfezue3L; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j8si6818540ilq.125.2021.07.15.07.18.49; Thu, 15 Jul 2021 07:18:49 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Lfezue3L; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231563AbhGOOVg (ORCPT + 7 others); Thu, 15 Jul 2021 10:21:36 -0400 Received: from mail-eopbgr60087.outbound.protection.outlook.com ([40.107.6.87]:36737 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238156AbhGOOVf (ORCPT ); Thu, 15 Jul 2021 10:21:35 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B1EXnm4XA8SpFcAYZjQv5sZMgSr9QdYqGTbwVw6uL9doWaAJ9aFPwq30nAYFLVkIm0736NAB7hDIzJid2HArP7JEy4qoNOhnqKMbv2cTdJRLmYNr8VZuU7S12L3ES7mzXPaMx2jrgG2BYPzJTnW5fwSQlkMHp1E21vkJjcTYuLotkLQeyOo4O+2TQ+12oodxtDOsEK/ZRXn2liEh/+uQ3agv3uM9HTsPdp3iJxNtgrCE8MtWhccpb715X5hfTmXgRxtJ2zvzIhsKGrFlpKSGKj+LgXdrekeBxM01GS9PGTHD4GfSxhhy7gqnlihsrdUZJ5yAjQz7nkoe5fwDWnsyGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lNWxs69cCWV1EfFdnk29EGsk12tnzfIxTH2XdLwhvnc=; b=dAOg2NL/WuL8T/vJniV9N96yT+WGmdmMvVYgEo7V5NUkYg6gz9X51PBVUq/HAlB9ZXdSb88aFVfg6tCw9DJfsYftVM4ySxjfGYhc0SilL2lYEco+ywwPWEzR/Iie8vXg6zuq6npYyYifvNwUAghnZ5gTUYMo4ihWQA6vH2foGfNwK5UhbTuYijjvkiam41HuiQzY+gnIrYOtufkkrd9G0x+4UWYzlvkuaatb35IOajGnyso2VXqoDDRaKn6DlCIXrL3RXgTGxb3PKVyv3RI9gSPrgdxXIdJDkv7+lIzH94DT41hMxhd9SVIH3DvFEruWqDOlDjxdBWyKndrHsGrP9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lNWxs69cCWV1EfFdnk29EGsk12tnzfIxTH2XdLwhvnc=; b=Lfezue3LiEwL1Ugx4im9pN1/W3ZfHG79YMAsG1ypqU3wiYbbcZSz/AH/hDtvj7h7XU9g9fjt4W3SV2gHo7wTLcrwzGERmdNViA4POuUSEFlZtwlgEjTmDgSUZAzt5P616HIAocqu2C/jxSZJBgmfi70bEuaDnHUMc8hwkeWER3o= Authentication-Results: alsa-project.org; dkim=none (message not signed) header.d=none;alsa-project.org; dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) by AM0PR04MB4916.eurprd04.prod.outlook.com (2603:10a6:208:c4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20; Thu, 15 Jul 2021 14:18:40 +0000 Received: from AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::1105:2d9f:b790:4ec3]) by AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::1105:2d9f:b790:4ec3%6]) with mapi id 15.20.4331.023; Thu, 15 Jul 2021 14:18:40 +0000 From: Daniel Baluta To: alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com, broonie@kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, perex@perex.cz, tiwai@suse.com, daniel.baluta@gmail.com, Daniel Baluta Subject: [PATCH 3/3] dt-bindings: dsp: fsl: Document newly introduced fsl, properties Date: Thu, 15 Jul 2021 17:18:02 +0300 Message-Id: <20210715141802.880911-4-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210715141802.880911-1-daniel.baluta@oss.nxp.com> References: <20210715141802.880911-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: VI1P195CA0085.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:59::38) To AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2a02:2f08:5503:9f00:58f1:af0b:2fd9:e70) by VI1P195CA0085.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:59::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Thu, 15 Jul 2021 14:18:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ee5ff288-8dca-49a0-30c4-08d9479b71be X-MS-TrafficTypeDiagnostic: AM0PR04MB4916: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B5AxKN3AcGW5Jh5qkzcpzo2m3aUTsiBmr6KhjBNqnMv5jPs/lrCn6foE5VSa0zmQix3fS+3SSeyvFSwRvx3Isr5YK8taD70c0FM7vjz965uzuychKt/E1SrBs+brzbhiV7B9DcX0FXgqT1UQ2tf6pEV8xbnRtZq+dQpcaciCln6cjus/xI3DCtW90zECpoLFvbnxdK5BwVhRaIiOf70UCA6lEvG3tnCjGuiuvCD0Xi/8df+hCjWIUJX+emOGdmqAp4rEYdIXFODa62uzu8Xu4Q3ebcgdDE34sOyn+JZxhCyMOk/qTStNqtl3h2sIzvnok0/Z7Wt8TjJd4rLqp386xEreuZmz4X4SH2ydBspxiWGj+mhtJP9+6A1j1oYOjZinLieRMb7xk+nQms+OwHWY71RRzBJ02H+DX4rfyo+mQjyNMJvr+kp1cUZxHUqA+H+JSHu7+u/aYiw3DhswCmcFv1XekoqDz97sSxQkTdAcNg7f+PAT8rzReVI8A5a3da9J7GJtHT1sA+xO97qYqNLBL9mtCCpmFpt9Mc9g/2U31Ldqs8CxQKURZ/1xfsGu5ORfYfX+Vqwtb0xEXAlAEVaF2qYl1CdDjZQLUyeOwycAKZHGDoBkNde1SR3WHFrB8LtTrklPEXfSNFgSC1gYOyiB+g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB5140.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(8676002)(6506007)(1076003)(66946007)(66556008)(478600001)(2906002)(4326008)(6512007)(38100700002)(52116002)(8936002)(86362001)(7416002)(66476007)(6666004)(6486002)(316002)(186003)(44832011)(5660300002)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EZWeS0WpBXNNz1Zg/DoGo7JLOLxgDnUKNLbSnife/txFmp3rCWkHBK0hbTvn+MUDMFSRWrMCQCGP+7kAhR2zmVBr5/Yx7L7lSsbT7nYnUP9/skJLNZCiBbErLznH10jlyP9X8gdoiplXqUm/T5QOBamsC28zatlzosLbM6+9dCysa7XXI2k+PlkERbYZPv/lC/stwNp/bQ51yVuekIZ9u5L632wum29ZHGdzYCY+mLkURxBh8vXn9oMyp3gGzhJbHq8Bts4wTm+rxXRFhb0gbOqV76RsRhe8GkUfWFqnIVpzp27hT8id1i6C+MiDqPDhCKmSJYZsopgfhOOuFHiW4V9Fkk8lS+pHq/llxvOhHP4UuGYXs6KoRs07Lo+AjeDOQKCabBXmFdv3QahKZPU3Mctg0pnCuKRAMXFfacw4vZzIF2UK3uAs2d/uZpyQdr4kaqTnBRgT6hS/g+G+y6NyNDRat0/2/gMuK3KVrkFr51Xm+9jo1HtUM2+EpOfIF0Cb1A0ka9zusuA/vXvtXlrzplFev1DlXaPLNAqaoTVSUAk/JDEqe7B2qbzvBSXPRPX0bQF0bCVjQD3IhTSE/LwkC/tBv5e2dI24VggZppKNLQsk3jaeeY15ERRl/r+BtfE8awXtmo8oMSsOe/2MVwgZzCgFjjbOlu+HExLuh9O5msw3L4dDPrpHYG+9e1jlxsYAVLI1/RAhgNZ0Sz7QrWacnxnx6uRnmq0rAlJ0X4O9KB8v/sx9wjaQ1lMGxVp8zo+b7xrLjN0SXPEOaRRm3BfRukMuF4HH88uLeVU51rp4Ydlr0Vs1FJknWQpcz/+Csuwv0s0gFEzqXO34PoUBCcPdfEZUaI77HpI0/n3qGXPVZgjLC1ySk8XGSo+JoCaVYEEwaX/vqI5md/qk95AgOECSMPmpTt7xAC5UzDkd1i5IWpZu/g/xGIHneISHhBHTw1PYLpgslKazhJd9qWacDWN8yfDfwqcnj0Ew6v5tVDSS1oMIG2WwQddaPZzjVsv8HK3v6lP/PTGV3JL3E1giHUUGwfGulmwjMK+Dvh4Cq34Dt5Wmjho4HY0SS1Pd57GoAS3MZQ5DVnfcnODmTKD9lm875Hf2ZTaSSqCHlVeB13xCkx+MugZ/QPdnuH6ZNVwebUViRKqMaTYI0t8/jW/SWAzZnx+4vUqAEaGQ1zG3qldsyW22Xbqc6mB47j0d76j+5PSnxB6qyLbvUUoXKG86nY7PRFO6h+2lW6dqK3PWJ2UJwUuQc1cUfjOBQVISSwwHCzHQf9ukSkI3HG2puHh8kNSwbx33kX33JmPNnaG+HnYkOfQjUd4Qto5HXCifc6Zj14lKaNkWLxTg+jXdXuvajPMTLFebmQZJsvvOTDxJxM9WaooAAZL62+atpkCpzcuUwDSC X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee5ff288-8dca-49a0-30c4-08d9479b71be X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5140.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2021 14:18:40.5107 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LAC3Fn+ehKiOcAD2F6fnGd6HTIPIbRgmXnG8FNwwZDW3yvJ09s15zSIacw3cBIQS1lHcsjFhVgbv6EDhR7DhpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4916 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Daniel Baluta Document firmware-name, tplg-name and machine-drv-name properties. Signed-off-by: Daniel Baluta --- .../devicetree/bindings/dsp/fsl,dsp.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.27.0 diff --git a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml index 7afc9f2be13a..8095aa178e7c 100644 --- a/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml +++ b/Documentation/devicetree/bindings/dsp/fsl,dsp.yaml @@ -60,6 +60,22 @@ properties: used by DSP (see bindings/reserved-memory/reserved-memory.txt) maxItems: 1 + firmware-name: + $ref: /schemas/types.yaml#/definitions/string + description: + If present, name of the file within the firmware search path containing + the DSP firmware loaded by SOF at DSP boot time. + + tplg-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Should contain the audio topology file name loaded by SOF driver. + + machine-drv-name: + $ref: /schemas/types.yaml#/definitions/string + description: + Contains the ASoC machine driver name used by SOF to handle DSP audio scenario. + required: - compatible - reg @@ -69,6 +85,8 @@ required: - mboxes - mbox-names - memory-region + - tplg-name + - machine-drv-name additionalProperties: false @@ -90,4 +108,6 @@ examples: mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1"; mboxes = <&lsio_mu13 2 0>, <&lsio_mu13 2 1>, <&lsio_mu13 3 0>, <&lsio_mu13 3 1>; memory-region = <&dsp_reserved>; + tplg-name = "sof-imx8-wm8960.tplg"; + machine-drv-name = "asoc-simple-card"; };