From patchwork Fri Sep 17 14:36:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daniel Baluta (OSS)" X-Patchwork-Id: 12502281 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD5C2C433F5 for ; Fri, 17 Sep 2021 14:38:27 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 981EC60F6B for ; Fri, 17 Sep 2021 14:38:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 981EC60F6B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6B1DF1769; Fri, 17 Sep 2021 16:37:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6B1DF1769 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1631889504; bh=cGHcE5YDLvy2AxWutbfBWiK1jpHBOBDGkpLAWf/SJ5I=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=JYDhlR+H2yAGdrv8ysbq9h7OUtCPL9jUn99uIzmgxZ06B2Zl3WgM4+y6vnPZSn7ip Al6R1Z8Ag8E8K8P/7ratpgmWmyjYaXJZTf3428ur7SPnap/AC7lWMjzapbE4mTDFgm 5UrGslcM7Z0llu+TqW1GNdF7GaFLt/YfSqbx9n2w= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DE7B1F804AB; Fri, 17 Sep 2021 16:37:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 16692F804BD; Fri, 17 Sep 2021 16:37:32 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140047.outbound.protection.outlook.com [40.107.14.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 93FF8F80152 for ; Fri, 17 Sep 2021 16:37:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 93FF8F80152 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="H03Ct+uP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FRSy/i83sybYh1OWduRby0S2MpTIZc4git0F1YW5hi7tVT32PiE5wMnQ/ZCwCHn69Z5rc4m1aNnjbxtCS+vUoZH3OkB3Hcsb9CGK+VzVo8EKuffXQEejzrM4BGwxk8HKHrEA8QAt0V3QZjZ1b/6tHXKe9L5dEofFEqPpTLB0SCo149CT0bxXgCBxVp9H0PbtoYTwCL1n1ydbbKx8aATJX+vctlN/5sd/hgt3hPERruVKamkNT/1hqoA7KAekij4bhovm2pxOwXU++CPSTnweygctw50XLI6tYGXKY1PZ/ffbmTebHMcHISCbAtoPH/rzZV/3pUCWMXL0CYrNMOSuXA== 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; bh=DBJdF652ocpAkUSwlKtxkK5ACiD3lYEIu2RMRT1uUGU=; b=WwfHbLD2T7NZzL7BWuPhKOHYJF0KvQZRez1k7DmZXfdqNG5xAUqLSpN9gwdsyir7nFRhVrPrSq8FDfxCtvl4K4cTdyxeIFo7yIF/VTeUZHSKv1T+PsS9ek7jH+wU1SemsXL/u3HqrUuKKNGTwddnVE+lgS3cFkNBXiFPo6QuOFyrA4UH+7HVfHDZKOaWu/o528GFsLBOfPE8EjBYlQmbOVrkIVN1HKh2S0gRd+WV3nQe53sihLUEnHTHStvNRRIxeGXtPJCU7h4LMMAl9M5v96xXamWp4JdRgV98epXWWAMbbZ9nElFjk5PZ/N8oNwbfPE0O/EEsrAEXsZXns5Gs3w== 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=DBJdF652ocpAkUSwlKtxkK5ACiD3lYEIu2RMRT1uUGU=; b=H03Ct+uP86YK7lCYgCP2+LsYWn0mrB6iOLi3ucIIcWdtcIOo9FTf9wCSRoDfqXhB07Wnf13la08d/p3GM0AGMKN7iXs9thSbc+HSRlgYym3awJCmVkbPZ0zTenAYpeeUViVNgJBtxEKpUGNwS55k1k3O2SwDeQlYz87WfigXSWA= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) by AM8PR04MB7409.eurprd04.prod.outlook.com (2603:10a6:20b:1c5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.16; Fri, 17 Sep 2021 14:37:19 +0000 Received: from AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::dd84:b996:1c8:705]) by AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::dd84:b996:1c8:705%6]) with mapi id 15.20.4523.016; Fri, 17 Sep 2021 14:37:19 +0000 From: Daniel Baluta To: broonie@kernel.org Subject: [PATCH v2 00/12] Add support for on demand pipeline setup/destroy Date: Fri, 17 Sep 2021 17:36:47 +0300 Message-Id: <20210917143659.401102-1-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 X-ClientProxiedBy: VI1P193CA0022.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:bd::32) 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:5708:8600:8372:c747:541d:bbc9) by VI1P193CA0022.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:bd::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Fri, 17 Sep 2021 14:37:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 85981e5b-f3a3-487b-0b91-08d979e8a6fd X-MS-TrafficTypeDiagnostic: AM8PR04MB7409: 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-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5fMQqzdezgBLWiu+d+kzybzzwJVxW1hMxouhbLtkUTLSISVSr4R3QsK5MaS0FsPY0llLAzGudS/QT7QL6dtpd5yM5/349nzH5C6gOzi56XNrrog0VE2sEsfnqogJC2SGUbniEMDvSkr37v4LTHMXtSY3e1DTLvvozHrvt7trgMlfTClJI+VPH2I0T3h1RtAN+nKILjZmve07EkRrl49D+Ga9wcWU1QJTl8xR779wDgNN+wnrKi/oEWWpqJavl6DYuk2zPSKUiDFJJ/C8oNc5rfrLJyZUrWKdwUmo2mcDd1bqCI2tSRJY5Gs7DIknmDVRn4+DyOyHab1c0+Z6f/v+g1UySmojD/bEgM3xD9AalXG9WBNb31zsJvVCjPSITXpRFwUmLUYAWoBhmhmo+hn+omF5N7/b/Z3Uhny4JjaM2Mo+nW6H0Lr7yc4t2j7vdIwBTp1ARXb0vkqDlCtiFR923+PaKCtl03NC5HW8B1T2YF4kEthZiaCIGdbh5NcWZJN0m4guEusweG99INiJRwLRmxuTp+6zr7dZLSKT4yMKxbJ7JEIAs487uOPMRcBhcHC2Kz11+V24teroZsp48g159yynUAKzJSGiZf5Mux5x03ECY2jeUuvpB6jULudT3TVDWj1tNtNVuCiPVaPFrxPt+j25aPw6SfLrOj4G0ExhE1sKWMq2sihMIWoX1vjXv+vpOOXS8dOA0ZubAjztaMyrdC5ADPzNo8nYls9saIyOeSE= 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)(346002)(376002)(136003)(366004)(396003)(39860400002)(5660300002)(8676002)(2906002)(4326008)(38100700002)(8936002)(66476007)(44832011)(1076003)(6666004)(86362001)(66556008)(6512007)(186003)(478600001)(316002)(966005)(6486002)(2616005)(6506007)(52116002)(6916009)(66946007)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?hfXBb6DGpvcA5urJC1HzVZVJ4wwX?= =?utf-8?q?jHj/L4Sy1nDg+ZVhhOtfMesgUTwpnWVv6Vu18w3qc4cPiKctpOCDcPLm3oIhMgxD7?= =?utf-8?q?T6fd4/gPVgdrdUMVEQyol6JsXRHufGnq48O+MbTNz9PVV8YGbIzN6hF3TYO52CbeL?= =?utf-8?q?vla2etkvc4/7A7byoLlUT/COZC6cUwQzAHv+Tc7vVYUdVQKxOoE1976er46qJ9LGe?= =?utf-8?q?Mkh9x15A2UCpuebjItRTwRTbtpSTwepjtiq2he2aSCYoxcHHsOoE3H1TAs8OTxrTU?= =?utf-8?q?sr5z1Q+Fb4dQWLE+2knBzpSKGG90uBcbokwiwL8fUN0fPKlQxdKy8+7UayxUDyuuV?= =?utf-8?q?9t60yCR+DxT5O34DdIbHPNIi4o4gkc67K4XmbMGlai3r0wEYjPqKCAO6C6pUnVy8g?= =?utf-8?q?sy8dsQTkwkqCKta1nDRlDoO7A7+dufnh7RJW9LOoJX9SuB0a+hnMqZoZYR4cjp5Uy?= =?utf-8?q?tTwdIbBwsvX+Hwj4WXxgTy5ubfo6f3guUUaki9uhocvbYH6PfNyKl5hmgEZUyXxlD?= =?utf-8?q?PwHijP895xjCObMSXXbQczrEfu87zP2AtHh+egly99orDpax9fDOz3axgOTFr8XRk?= =?utf-8?q?LSBOs0MidVViMAJhglTplXI3Fja1F/NYjUBjnKWOvzpksmuf00kW/54R5mQhcIR4+?= =?utf-8?q?QqB0OZGhMcoAbK0zbPX22wOJKle5OkVlJiURTCX0XqEwgcMZk0uOOpVrDVAP2/7cF?= =?utf-8?q?gJ3lT+/MOoLeIPzNm+5uCDRYc946OX4kHhsWpktsPHU/gWH73sbxlHTh4uLOuTZv2?= =?utf-8?q?lpFHsUrvDyrN6YY+3QTrp4kcGzwcUqCRKJyXWUmKC4Q61HjREGYesoXLnszDRhnsu?= =?utf-8?q?w2t24zLtme5d93tdCFfPra1KUZFw2noeFwbLqY7xUbXNhgaC+BjN+zlQb2JTzTLib?= =?utf-8?q?Aw5V6XfHV5OZj7mMnTyTXrEWibFDvH4ovmYUEBrm1WyTb8OCqlkPLdWl9wxf2z5A0?= =?utf-8?q?UMYnXo1wGDB+GVC3kSApWQ4aLiTDem1Rd8/R7IScX+GKI5berzp86dW/yDOiY4oYh?= =?utf-8?q?iOVmvVfrQZUOn/chkY2mWaA9v+ubAJ6CdajHXv9FBiwNe+MUIO6u/nDBgDCDoD57T?= =?utf-8?q?t+SHDKI6g3Y6WPqy5UuQ7+VCRO4G5QZc/zK2A2rw4J2TjC8/mo0JRet5JZKsGcb4h?= =?utf-8?q?GheNGyGCb2k2r1pLJXrGTSietItENtoXUfXl+Oj5SAsxt7rXZsS78k/0e3/Q8Xm0Q?= =?utf-8?q?drVJpCWeYcahygqx9CRp7GV9tz+/J0SrXIBJ2YFa/ebicLC+tOvYktfZMteYKt2JY?= =?utf-8?q?ZwZcpKXoJnLQEYtY8XIF0lAv6ccMbRe9sJBEax3JMa8HyV8v1wMC0vZAVhRP4uUAX?= =?utf-8?q?RXwcb+gLYhSSrWX?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 85981e5b-f3a3-487b-0b91-08d979e8a6fd X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5140.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2021 14:37:19.3019 (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: l+lFgKAs38zluBy2+3hK5DFhGnJRrKVNZ8i5p2NNBoKpYPsYTpacGRLPjbhtJYn5LAriYutmrFpsAzu+WRLGCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7409 Cc: pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, kai.vehmanen@linux.intel.com, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" From: Daniel Baluta This patchseries implements the new feature to setup/teardown pipeline as needed when a PCM is open/closed. This only only support single cores, with support for multicore arriving with a future patchseries. Review with SOF community at https://github.com/thesofproject/linux/pull/2794 Changes since v1: - added my own Signed-off-by tag. Ranjani Sridharan (12): ASoC: topology: change the complete op in snd_soc_tplg_ops to return int ASoC: SOF: control: Add access field in struct snd_sof_control ASoC: SOF: topology: Add new token for dynamic pipeline ASoC: SOF: sof-audio: add helpers for widgets, kcontrols and dai config set up AsoC: dapm: export a couple of functions ASoC: SOF: Add new fields to snd_sof_route ASoC: SOF: restore kcontrols for widget during set up ASoC: SOF: Don't set up widgets during topology parsing ASoC: SOF: Introduce widget use_count ASoC: SOF: Intel: hda: make sure DAI widget is set up before IPC ASoC: SOF: Add support for dynamic pipelines ASoC: SOF: topology: Add kernel parameter for topology verification include/sound/soc-dpcm.h | 1 + include/sound/soc-topology.h | 2 +- include/uapi/sound/sof/tokens.h | 1 + sound/soc/intel/skylake/skl-topology.c | 6 +- sound/soc/soc-dapm.c | 2 + sound/soc/soc-pcm.c | 4 +- sound/soc/soc-topology.c | 10 +- sound/soc/sof/intel/hda-dai.c | 176 +++--- sound/soc/sof/intel/hda.c | 177 ++++-- sound/soc/sof/intel/hda.h | 5 + sound/soc/sof/ipc.c | 22 + sound/soc/sof/pcm.c | 58 +- sound/soc/sof/pm.c | 4 +- sound/soc/sof/sof-audio.c | 709 +++++++++++++++++++------ sound/soc/sof/sof-audio.h | 32 +- sound/soc/sof/sof-priv.h | 1 + sound/soc/sof/topology.c | 362 +++++-------- 17 files changed, 1034 insertions(+), 538 deletions(-)