From patchwork Tue Jul 12 14:15:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Daniel Baluta (OSS)" X-Patchwork-Id: 12915031 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E79CCC433EF for ; Tue, 12 Jul 2022 14:18:02 +0000 (UTC) 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 22A8D1696; Tue, 12 Jul 2022 16:17:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 22A8D1696 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1657635481; bh=e/5VpS1nC4xgimrNFiWsGUNBhhzR4vHs9LmMpDgLFFE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=XaKIVUcr7pddAhBeMdN3IHGIq+YO4YPTL5CbWLrKb3cke2CkEw2yuD6JlNAn/AIuC oDC/UDbFClxWCRPlFYj5XNa+6s+aS1KUljcImkuKV5PN/zdgeRUHWSONroN0MsFpQj ZN8eTcg+/sNkLG8uOJEHp10ci+A2j/9H+bMM+TK8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 775DAF80553; Tue, 12 Jul 2022 16:16:25 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 86A97F80548; Tue, 12 Jul 2022 16:16:23 +0200 (CEST) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2044.outbound.protection.outlook.com [40.107.104.44]) (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 8B456F8023B for ; Tue, 12 Jul 2022 16:16:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8B456F8023B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="cqSXTPKB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PBl2bwnY+ryfqhDAPfrI+ryf5i091R9xXCk2lUeJPbl6fNG11nhc3f1GU6Jga2SfzAbqbGzqL8miA7GqcDd3wLbRxqKDDf4HJRsLoijQpZv7d5+Gmk5KVPeKzlP+2eSb1Rm1nlYxjoDWNuYXc0REi/RPYQ6vikUFUs0FVRDfBxcGZLKSoI2U73H/F4OKWIsT8Y13veerdgmO/9E6jbRpmRBKTaCACe3brjWfP0zOvPGKexVt5ZNHrbeHqpesf0lMExDTm6853QLfs+aTQGqxv8KvTrwpFmJbMO8v/0v44OkrHZ+FRf9iX/GPY4hv/XFVFlkadg3zw/0SmT9+lUsZLg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ljJ8R4UZpSUlNFr6izu1KajiNuWYLjhJ5tqf1YnozFw=; b=a1vC5iQWxqPnYxsIBZYHVgZyXdSRIFCH06HhHnNU+fNxaNfvncRuN9UxcKXEyq9ZbvIRWIIye+EQChTRg8uEnsaiFodUhgROHoIxX9Px8xOuK7Nm4ue5rZ7wybWmAwmC8dANJKA+nafN02QzgJ5qV0tNamymil0VGWyh0p4ZxX9f7zaBmrB3txP3zqNKVA0iHzyJiQKGyAEQLJaYHGJZsqrKuUWDodsxsrzQ3ZnG2lQ4In1l/typcG9coCfANLS+Fo0jOzoJ5R7k8ddBolDuKAZxbHhAUKPNQ8cje+fzeFru2nLBpPQEtydHbp5XbBizB5uBha8fiUnOH7VMhJeSFg== 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=ljJ8R4UZpSUlNFr6izu1KajiNuWYLjhJ5tqf1YnozFw=; b=cqSXTPKBqxt2DapFWiszVEhebhr8UlBM2ERT+FyywSV3D6tnajSH8nrMovOiTfKIUctWVHL7g0Eug5qTPS74OSCgASFb+5c0NHnbWDNIDIJXfkLw0B9RjLYyrlv5G6/Nfg1u6j+nZxkJcszSziZmUg+xFAU6nabttl8Aw6fVUNo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) by PA4PR04MB7885.eurprd04.prod.outlook.com (2603:10a6:102:ce::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Tue, 12 Jul 2022 14:16:07 +0000 Received: from AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::15ba:4274:2df4:8928]) by AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::15ba:4274:2df4:8928%5]) with mapi id 15.20.5417.026; Tue, 12 Jul 2022 14:16:07 +0000 From: Daniel Baluta To: broonie@kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 1/4] ASoC: SOF: compress: Dynamically allocate pcm params struct Date: Tue, 12 Jul 2022 17:15:28 +0300 Message-Id: <20220712141531.14599-2-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220712141531.14599-1-daniel.baluta@oss.nxp.com> References: <20220712141531.14599-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: AM3PR07CA0141.eurprd07.prod.outlook.com (2603:10a6:207:8::27) To AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a71e4c3f-90ba-4e78-63a8-08da6411102e X-MS-TrafficTypeDiagnostic: PA4PR04MB7885:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0/YEn98yQByB+DBkIBMnmdi1ukGRec4BnvAllyC0ya4BaszYv0CBn66Bp28mm3RkfzPl1KAEr9PgkI6KvvhpNoGRaayLYqVg3SF8WBI3HJ/yvqqAhMJpbgcH+pIZEl6nUM/Jee4p5X8tHbeKNC28FAZNWIDgerdjM/YDk+39dLHbumnStTErVZyuqM8VDjcgda4L1yeR+C9CILslOsvayaQFsDOA4owV2/GCcVUWzy3dO6WV/lVDqX1WeVrqWbd56yeFoftEOP87WX9GQv29eU6JzYn99HB6ya0srWESye2ugK9i/Pi/zxv04Z71IlUnKdCyEzCVv0n637zPshsuoCPn0mjkdgPeUp16D97hv/xUgHQKh8wGn1DkzN1FQQlv0OqDb8X4t3Z/ixI0+pmPopJDxZ+RYmXJZk9tWevtursLG5PidPwOZcOVuxK797ybh86xxjfCcCJWoXykyWKOvW2pU5oQxgMTOMMiyX6hY9agwRvtg7EgfEpZI/uhjtuYUBcbxrjJDYma0Es6g61X/RAA10RDl/mDLIIUCPIFb6a8mS7Dx3lgO6WVBBXyHEv8Jw1I0yhFN0DfunhPSSjzQfHDl1W3eTEm5xVIC92yVMZLloFhseRAlU+t/eXi6UPBmtzaETEbnjQIw5mkH+eJP9giZGLEezHwHfmM2ovw7YziV+nOhtXDITGbBXnTEwKDa8lQYbPh2Tm8bfyCyefIdiDJdbQyIpbtnOxqOMlzyaGgWUrjsRXk23UzdBHKDnIJHmSPK8Am9ucsp/2ra78OK+bVsZEMk2eHnONpQVbyrzvs/kj3nmL1ByKS6iRsvCy6 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:(13230016)(4636009)(376002)(136003)(396003)(39860400002)(346002)(366004)(316002)(38100700002)(478600001)(6486002)(8676002)(38350700002)(2616005)(66946007)(4326008)(186003)(66556008)(66476007)(66574015)(1076003)(26005)(6666004)(86362001)(6506007)(44832011)(41300700001)(5660300002)(8936002)(7416002)(6512007)(52116002)(83380400001)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?U1kQjTjOqEzjNus+uzqg5LgTlsDC?= =?utf-8?q?QTUjnGnvOtP6uZ8KAEufDcVU9zrCA6w+hHdERyPh/gwGrBOTob/HK7i20BpwyVzTi?= =?utf-8?q?DB+j/siha6hqej2DTG1K+sQ4YfX7MPqChwNRtCWWhoSPYcBOeHJyC1Dsqmpe8Kc22?= =?utf-8?q?YDanrrtrJZGO1wiJV4uC3RnXNs5W/PDCkgBbeHh5v1IKhm5arEOPbqQNmuzQqqpEM?= =?utf-8?q?gFvmL5fw6pTY11mLa3IK7Itm3T/RhYUjpZ5YAwHjLamxH1qA7a0aObrAII11tk19t?= =?utf-8?q?K/Fr+Buv7ZaWKMrA7HP6bof1lsgpw9xG01Z2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8s2HijEiEE2LCp8ImDJkI5?= =?utf-8?q?jiVkCI2LKogPdgbGMC9ecB0k48fBvJ5iyPgiRfo0Q3p+6++ZT+iwrijjupBeM2y0M?= =?utf-8?q?noO559eNiSz1sRuO7QKBydzND6yN3qMhx5ryIy4CrGYoG8hx/V6Rn6DiwzN+uf5Ah?= =?utf-8?q?qyneFMbwFp2jaV/ziKB9W6evuZysoQN8+48pdZDMvsNR9D5+wY8UchC+A035i1NGz?= =?utf-8?q?LdZa6haHQ+4TkK3cpW1nT31dZBxekF0LPqh6BSy+DvLF49sX/G1yiyw6JXfd1u5qC?= =?utf-8?q?sfoHHvaAl2Q/N5ejCPcgoosW97p/B8AL/Mx8HTTEFWzSjo5xmNwmcd4VRl62V3SSz?= =?utf-8?q?4P5V/5g90j3R?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a71e4c3f-90ba-4e78-63a8-08da6411102e X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5140.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2022 14:16:07.6762 (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: aKfCYkpneExGTtGkDG7u6LkTarm2BZl9RgTH0+i5CKCoj+ZLSyeAaHc2JJGC63XeAiE5Jq/AP2FV9N0nhTPyjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7885 Cc: Pierre-Louis Bossart , kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, daniel.baluta@nxp.com, ranjani.sridharan@linux.intel.com, lgirdwood@gmail.com, linux-imx@nxp.com, yc.hung@mediatek.com, peter.ujfalusi@linux.intel.com, linux-kernel@vger.kernel.org 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 We need to extend sof_ipc_pcm_parmas with additional data in order to send compress_params to SOF FW. The extensions will be done at runtime so we need to dynamically allocate pcm object of type struct sof_ipc_pcm_params. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi --- sound/soc/sof/compress.c | 53 ++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/sound/soc/sof/compress.c b/sound/soc/sof/compress.c index 47639b6344c8..45c2ff61ee4d 100644 --- a/sound/soc/sof/compress.c +++ b/sound/soc/sof/compress.c @@ -168,7 +168,7 @@ static int sof_compr_set_params(struct snd_soc_component *component, struct snd_compr_runtime *crtd = cstream->runtime; struct sof_ipc_pcm_params_reply ipc_params_reply; struct snd_compr_tstamp *tstamp; - struct sof_ipc_pcm_params pcm; + struct sof_ipc_pcm_params *pcm; struct snd_sof_pcm *spcm; int ret; @@ -179,40 +179,42 @@ static int sof_compr_set_params(struct snd_soc_component *component, if (!spcm) return -EINVAL; + pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); + if (!pcm) + return -ENOMEM; + cstream->dma_buffer.dev.type = SNDRV_DMA_TYPE_DEV_SG; cstream->dma_buffer.dev.dev = sdev->dev; ret = snd_compr_malloc_pages(cstream, crtd->buffer_size); if (ret < 0) - return ret; + goto out; ret = create_page_table(component, cstream, crtd->dma_area, crtd->dma_bytes); if (ret < 0) - return ret; - - memset(&pcm, 0, sizeof(pcm)); - - pcm.params.buffer.pages = PFN_UP(crtd->dma_bytes); - pcm.hdr.size = sizeof(pcm); - pcm.hdr.cmd = SOF_IPC_GLB_STREAM_MSG | SOF_IPC_STREAM_PCM_PARAMS; - - pcm.comp_id = spcm->stream[cstream->direction].comp_id; - pcm.params.hdr.size = sizeof(pcm.params); - pcm.params.buffer.phy_addr = spcm->stream[cstream->direction].page_table.addr; - pcm.params.buffer.size = crtd->dma_bytes; - pcm.params.direction = cstream->direction; - pcm.params.channels = params->codec.ch_out; - pcm.params.rate = params->codec.sample_rate; - pcm.params.buffer_fmt = SOF_IPC_BUFFER_INTERLEAVED; - pcm.params.frame_fmt = SOF_IPC_FRAME_S32_LE; - pcm.params.sample_container_bytes = + goto out; + + pcm->params.buffer.pages = PFN_UP(crtd->dma_bytes); + pcm->hdr.size = sizeof(*pcm); + pcm->hdr.cmd = SOF_IPC_GLB_STREAM_MSG | SOF_IPC_STREAM_PCM_PARAMS; + + pcm->comp_id = spcm->stream[cstream->direction].comp_id; + pcm->params.hdr.size = sizeof(pcm->params); + pcm->params.buffer.phy_addr = spcm->stream[cstream->direction].page_table.addr; + pcm->params.buffer.size = crtd->dma_bytes; + pcm->params.direction = cstream->direction; + pcm->params.channels = params->codec.ch_out; + pcm->params.rate = params->codec.sample_rate; + pcm->params.buffer_fmt = SOF_IPC_BUFFER_INTERLEAVED; + pcm->params.frame_fmt = SOF_IPC_FRAME_S32_LE; + pcm->params.sample_container_bytes = snd_pcm_format_physical_width(SNDRV_PCM_FORMAT_S32) >> 3; - pcm.params.host_period_bytes = params->buffer.fragment_size; + pcm->params.host_period_bytes = params->buffer.fragment_size; - ret = sof_ipc_tx_message(sdev->ipc, &pcm, sizeof(pcm), + ret = sof_ipc_tx_message(sdev->ipc, pcm, sizeof(*pcm), &ipc_params_reply, sizeof(ipc_params_reply)); if (ret < 0) { dev_err(component->dev, "error ipc failed\n"); - return ret; + goto out; } tstamp->byte_offset = sdev->stream_box.offset + ipc_params_reply.posn_offset; @@ -220,7 +222,10 @@ static int sof_compr_set_params(struct snd_soc_component *component, spcm->prepared[cstream->direction] = true; - return 0; +out: + kfree(pcm); + + return ret; } static int sof_compr_get_params(struct snd_soc_component *component, From patchwork Tue Jul 12 14:15:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Daniel Baluta (OSS)" X-Patchwork-Id: 12915028 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BCAF0C433EF for ; Tue, 12 Jul 2022 14:17:12 +0000 (UTC) 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 55F6F42; Tue, 12 Jul 2022 16:16:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 55F6F42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1657635430; bh=QdHcpzyoNuLnIYeF/Kx+Fi+xYpM6uMQAwoGyOHmKp+g=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TEtaUEE8YkkAntS9iisAdvQqw6fX+SaJfXKHfifqFSvyKNU5yeUOlfly9nZv82VSJ ST8UW+JERZC478enKL/Iw8lkEUNJbXQr79pg+KeofSHxTupeeWfQEzpU0X6tSxrXul JI0bO7P+25TB8/qHKS1EfSHkOlvOl4Tnq/FtrYzY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B56C8F800BD; Tue, 12 Jul 2022 16:16:19 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C2E69F804FF; Tue, 12 Jul 2022 16:16:17 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2055.outbound.protection.outlook.com [40.107.20.55]) (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 A888FF8012B for ; Tue, 12 Jul 2022 16:16:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A888FF8012B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="joNb5Q/Y" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IjwM5HnQm3n2Gb8YF3EEZ05vLl64BFCvrMXEcnNlmsYwRdEHEAdwTcez1Ykg0yNzF77yBsWFTlihb3wwvoc6TlyWcOJwMrLUTGSrwomxQbdknTCnC1Cdy+Wx63Hcxe+tUlTN3aoE5do3FsLbLVGqMytHIjCBuIOsg0n/KDouItuQYSTs/NdWtzYu9R4aXkkoZETaQBQW9sZNL64IDuz+AEaS0M7NNMxHCIiGVvMxeDEfnE5QeeTXQsM6lbir/Iikn3b0BMH///SEjXIsxT+MnqQoPDgMi/6hkoGBwnxrWlqX0cOxVHX5CmUKZ84mQXKalQaEUQORa0ltL7vmlUynzQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Jbbl/cv+q2cw9BCYTXHn0REGjMf8Qz2rYqtLgmOKznA=; b=nhFcd2zkfFfBdu+NxEHlHHpziEVfFFzG6zvwk8AP/NFRIwYhmxRmD2cwoFh6jcNNUc84kCLPHMHtiUVaT33YfzpNDAPtCfVGr5gW4NpfxMpEoOdIl/8evc2bxX8hpJ0q45AbpMfxEfQii6rSFvMZqIImECQHip2ak5CnQzJ5lnKs5cXR2uH4ccj1hmPSmJ0o9ajT49H6inG+OrLJZ9+qjFOML4hqZVGy+xk0T0S9mguiNH0OPPHoTiWYm7SlxeBo22AzgoF100IZiiyLe/IuYGO5nAT81xPzHYrzFd9bBHWfZbxQSNx6DA3SzgLaW2Y1IGZ0CfcxbcD/y8dxBHV8Iw== 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=Jbbl/cv+q2cw9BCYTXHn0REGjMf8Qz2rYqtLgmOKznA=; b=joNb5Q/YplZSvmxCRCFnKwmWcjgm4y+jzDwIgvet3Y8m7iZuyyXwFdWKyWBzem4j7OOYOqeIpXj8+Wwl8PMHOj9/JFH7zrP0EYic5e5u6+7kPwzZylSJwvOazfzSAZT1dOYprVnolN5Pp6i9m4NrWaAdfnM4zQvl7boIF9tv4iA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) by PAXPR04MB8559.eurprd04.prod.outlook.com (2603:10a6:102:216::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Tue, 12 Jul 2022 14:16:08 +0000 Received: from AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::15ba:4274:2df4:8928]) by AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::15ba:4274:2df4:8928%5]) with mapi id 15.20.5417.026; Tue, 12 Jul 2022 14:16:08 +0000 From: Daniel Baluta To: broonie@kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 2/4] ASoC: SOF: Copy compress parameters into extended data Date: Tue, 12 Jul 2022 17:15:29 +0300 Message-Id: <20220712141531.14599-3-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220712141531.14599-1-daniel.baluta@oss.nxp.com> References: <20220712141531.14599-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: AM3PR07CA0141.eurprd07.prod.outlook.com (2603:10a6:207:8::27) To AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 177ee0df-89c5-4ec1-32cf-08da641110c2 X-MS-TrafficTypeDiagnostic: PAXPR04MB8559:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NJvVAzbVHGKdy6avCGqUfMj/iYgKM9pyMEM+XC7puC2EbSm0p6SwrfpV6TZPQ4IJgMmqT6xcogPyaDGJHHmwzZxAWzayGCEFysnRVlSLDexq12AQFY8BVmx+VdOr992zYDh6Lri6gR0EZ9dNwh64hOptrELj+Dp6x41FityGd65ig/lQfXRd/EWEa28z6oJ5yQmCAI0DfJhRj75kKtOCuh8ygcU1jCm9RAWqRM2ArthNxYkXQFRKcZ2hb3NEjlGqmCqo9kdCP4TMCiTwvE0TgGk2zvLBrCMYFL4/w6924o1dDVhaEbiYo38KaZd8h+wzFHfVFW1zAlSKKFIAwhalxWG/Nj0kGq+XCg54qGTQkHrVDKupIc+iMqW0/mkWeD6wEiFkIYTfqrtN7z0PW6kKb1TuMkbdzuTTr5EWSw3lSfOtnkIkSscgo8z23/kfVZIqf6jrm9V4UAZUwslHQjfQzh/sglIEU0r8Q8ijDl4Vmo2eTrQKB+trX4MnKDBx3LoJSTI68B/l0hiWEf9Yyxq2gA1taJME0dBevXlf+bnEmMmrBs6R2lhk0xSo47z+dPsU13uADplWAMFuEZz3u+fH+Gb+A8+AGQJvO6N26i2RkFyQWt6lv5FQnu0WeEj2TQ5eCEEHwC0aHUJzvmcfAOxVqdE00bNiHKEobwKDJtpgowqixnqD2ZylGXBfq4QzuIe8ff3+xfJypomBXqa3iDdoYm7aPnpyJcg8AcAcRWuztTPPooP/5KN7L5fBwlabl92H8aDsGC9Afqvuf42fC+Umpbw3IjnzydjBJlSt3OF7ZK1Pfxxc93iykmDXeEZT1QFF 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:(13230016)(4636009)(366004)(136003)(396003)(39860400002)(346002)(376002)(478600001)(8676002)(66946007)(66476007)(4326008)(2616005)(66556008)(83380400001)(52116002)(86362001)(2906002)(6666004)(6486002)(186003)(44832011)(6506007)(26005)(5660300002)(7416002)(316002)(41300700001)(8936002)(1076003)(38100700002)(38350700002)(66574015)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?KI0PyeUGKImeKkOrmk/EGs5qqGkA?= =?utf-8?q?KwQrQzj8URBTYRmqlpwnnysIHNpDSvfeRQ6qv35jjQO8FHbPock1ata0EDzTcx/Yx?= =?utf-8?q?KC4OnrvoIaugjFOtrZGLJo6RzOlu8azEmKY/gccewqw8FKkmjfHajRJAQUezjLy2/?= =?utf-8?q?PTVIpIXcfmKmyFSG5bsQbyhJFOaqQEgJB78g35q5DOEVWC4KmDdP8Zk7mbIuMz8WD?= =?utf-8?q?tiMcdaU4KCXAn9+QYjFP6WxrrAVZfLAlhGNf0BiIqlwKB7zB1EjUClTPQqAZvCsmw?= =?utf-8?q?WjzX+Cg4cwFA+d4FeK8U8NEG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xreWZYijp9tByYd4ayvLvmxFF+1lPTSNmNkVp3X?= =?utf-8?q?A0fdnTXbAc5oS7jNWDXZje9ZId0JnxWE2SI06cQkpjtdAoce6M059casoMY5F/pfw?= =?utf-8?q?gSj7PGBZhkeMCnNUeN34xFYmCkCQNN/l7Uet92lKragKgHgne15VHqkOfveINOrkp?= =?utf-8?q?exdtuc2EDnj2f0asYTIkYcco225IMmu2UTWk8I0H3IZpd+sH957O/WKGwc+tsVTj3?= =?utf-8?q?glq3gGDTXkV6Y4ij/ZvFDMRmLDoRk8AzR+ADHno2ES/vZlHOU4iRbV8QuzNTqcis/?= =?utf-8?q?OT6tlxIkSyj9GzJOTqfQbdiNHImZtNJsun95qaRPbmRcOfy1f1tjIVyyiKWcEWgWO?= =?utf-8?q?vRK0hj/n88QY?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 177ee0df-89c5-4ec1-32cf-08da641110c2 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5140.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2022 14:16:08.6449 (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: 5s8DEo80eKNFce6qZN04EvzkLCfpps0r0a/125MTrKwWSWA9BvOJRPDCF/fLgPbzSEKHA7+doiyjTdk7SUW6SQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8559 Cc: Pierre-Louis Bossart , kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, daniel.baluta@nxp.com, ranjani.sridharan@linux.intel.com, lgirdwood@gmail.com, linux-imx@nxp.com, yc.hung@mediatek.com, peter.ujfalusi@linux.intel.com, linux-kernel@vger.kernel.org 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 Allocate memory at the end of sof_ipc_stream_params to store snd_compr_params in order to be sent them to SOF firmware. This will help firmware correctly configure codecs parameters. Notice, that we use 2 bytes from the reserved pool in order to store the extended data length. This is compatible with older FWs where there was no extended data. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi --- include/sound/sof/stream.h | 6 ++++-- sound/soc/sof/compress.c | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/include/sound/sof/stream.h b/include/sound/sof/stream.h index 1db3bbc3e65d..9377113f13e4 100644 --- a/include/sound/sof/stream.h +++ b/include/sound/sof/stream.h @@ -86,9 +86,11 @@ struct sof_ipc_stream_params { uint32_t host_period_bytes; uint16_t no_stream_position; /**< 1 means don't send stream position */ uint8_t cont_update_posn; /**< 1 means continuous update stream position */ - - uint8_t reserved[5]; + uint8_t reserved0; + int16_t ext_data_length; /**< 0, means no extended data */ + uint8_t reserved[2]; uint16_t chmap[SOF_IPC_MAX_CHANNELS]; /**< channel map - SOF_CHMAP_ */ + uint8_t ext_data[]; /**< extended data */ } __packed; /* PCM params info - SOF_IPC_STREAM_PCM_PARAMS */ diff --git a/sound/soc/sof/compress.c b/sound/soc/sof/compress.c index 45c2ff61ee4d..1204dce29ef9 100644 --- a/sound/soc/sof/compress.c +++ b/sound/soc/sof/compress.c @@ -170,6 +170,7 @@ static int sof_compr_set_params(struct snd_soc_component *component, struct snd_compr_tstamp *tstamp; struct sof_ipc_pcm_params *pcm; struct snd_sof_pcm *spcm; + size_t ext_data_size; int ret; tstamp = crtd->private_data; @@ -179,7 +180,12 @@ static int sof_compr_set_params(struct snd_soc_component *component, if (!spcm) return -EINVAL; - pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); + ext_data_size = sizeof(params->codec); + + if (sizeof(*pcm) + ext_data_size > sdev->ipc->max_payload_size) + return -EINVAL; + + pcm = kzalloc(sizeof(*pcm) + ext_data_size, GFP_KERNEL); if (!pcm) return -ENOMEM; @@ -194,11 +200,11 @@ static int sof_compr_set_params(struct snd_soc_component *component, goto out; pcm->params.buffer.pages = PFN_UP(crtd->dma_bytes); - pcm->hdr.size = sizeof(*pcm); + pcm->hdr.size = sizeof(*pcm) + ext_data_size; pcm->hdr.cmd = SOF_IPC_GLB_STREAM_MSG | SOF_IPC_STREAM_PCM_PARAMS; pcm->comp_id = spcm->stream[cstream->direction].comp_id; - pcm->params.hdr.size = sizeof(pcm->params); + pcm->params.hdr.size = sizeof(pcm->params) + ext_data_size; pcm->params.buffer.phy_addr = spcm->stream[cstream->direction].page_table.addr; pcm->params.buffer.size = crtd->dma_bytes; pcm->params.direction = cstream->direction; @@ -209,8 +215,11 @@ static int sof_compr_set_params(struct snd_soc_component *component, pcm->params.sample_container_bytes = snd_pcm_format_physical_width(SNDRV_PCM_FORMAT_S32) >> 3; pcm->params.host_period_bytes = params->buffer.fragment_size; + pcm->params.ext_data_length = ext_data_size; + + memcpy((u8 *)pcm->params.ext_data, ¶ms->codec, ext_data_size); - ret = sof_ipc_tx_message(sdev->ipc, pcm, sizeof(*pcm), + ret = sof_ipc_tx_message(sdev->ipc, pcm, sizeof(*pcm) + ext_data_size, &ipc_params_reply, sizeof(ipc_params_reply)); if (ret < 0) { dev_err(component->dev, "error ipc failed\n"); From patchwork Tue Jul 12 14:15:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Daniel Baluta (OSS)" X-Patchwork-Id: 12915030 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 52AC2C43334 for ; Tue, 12 Jul 2022 14:17:54 +0000 (UTC) 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 8ECD51699; Tue, 12 Jul 2022 16:17:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8ECD51699 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1657635472; bh=cRraIjYkNIgjA3+HMaIjnvxb4xPzOKIyNQVT1pmeVBU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GpEdvInOvcKVPh8yXfBwq5AhJsFeYLtE8sSRKD4ASauOz6hmyrZUKhsogGQ9ZtISS JiXb4CIb04HaTa5wzgffQmCu7NnooWYD90+ni/6xdyinbuI3J4Sh9qn40A7udMdN1Z 6hGqE8g1eUXbbLUKRrMWBoxgcML38jWKkWTzw89E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DB505F80279; Tue, 12 Jul 2022 16:16:24 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4D752F80279; Tue, 12 Jul 2022 16:16:23 +0200 (CEST) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2044.outbound.protection.outlook.com [40.107.104.44]) (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 D1E5FF80279 for ; Tue, 12 Jul 2022 16:16:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D1E5FF80279 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="StTUnPMq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dMiuOv1Xul05owOGkUajHELcRfr3OJR9kjaeBuPZnQEO6/biN6tQm1Ohr6G7Zf3AeiKlVgTGsR4tJU2G+6Yd+UHhTLGNKHkJrO9jO/lF+lfy2fwTPcsc1x/uHLSh2SNgJ9+L8Y3qvm4K5vZMbyuBfbJplQ1jDSE8h9EIbjJ8L+oXsy1ifO/4kw16uo/Rps0b1ovb18rjhqohurGwDoEDX60LXsk5HM0qKps/kdSyU4Vo1AehqK2zQKf7k6mURYoxRlATE9Ms7qH6caUs5HwhGeL/p6yaOSpE8VUD8Y+QoTTbuF2dsdb3aWBEuXS5Jt/YAvwJFiFdLh/ygjsqBQg2MA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z1Ggc4LYG/lXVmUFwze3fqikKdfR3lu3hYI4t+f3EvI=; b=SV42kg7GGSrRlbzt5LtprdlOindju9kmG1h/FNBT4pqkjkuUuqZGSXp/LLMERyZiphHd6Zgg+Q7L50o3MKGW03JxOoqbtEd6a+b+jujRthC8WRI1ap1r3Nvjag1ZBCeI/29OduS0H3hZh+V4wTwKr8fgJz3vqj9dCdZxlquyNBbGGQhiF960X5OjMdjgOuoNlYCFpFwAFPTc5Cd3HHEkrcNWp81pcGxWMAGvLYoHBHie9MgbjIpCL0OlEsufXTmAyBtKmyOSylIur9wmVxGC4HGK1V1aZrNXuNJASn2K0Wt3+4J2DQNUFAMTkqUPjSiqPspo38Z3j2qNpi7+G7Yunw== 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=z1Ggc4LYG/lXVmUFwze3fqikKdfR3lu3hYI4t+f3EvI=; b=StTUnPMq1cIGopC3AF0zIIG2xwMYz0G8RFmotD7iT12VMvD0r7LZ6Cj6axJFfLW4Hj17VRkJ8tgLHgbeKFmu1yw+1tcanc6TDpPnOgc/NFZlpNA0vIoYXBfAdQUIWtEQL+jrODzjIMWgOGK10pHzNonotCh2gy9FnktRwV3A1lc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) by PA4PR04MB7885.eurprd04.prod.outlook.com (2603:10a6:102:ce::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Tue, 12 Jul 2022 14:16:09 +0000 Received: from AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::15ba:4274:2df4:8928]) by AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::15ba:4274:2df4:8928%5]) with mapi id 15.20.5417.026; Tue, 12 Jul 2022 14:16:09 +0000 From: Daniel Baluta To: broonie@kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 3/4] ASoC: SOF: compress: Prevent current kernel running with older FW Date: Tue, 12 Jul 2022 17:15:30 +0300 Message-Id: <20220712141531.14599-4-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220712141531.14599-1-daniel.baluta@oss.nxp.com> References: <20220712141531.14599-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: AM3PR07CA0141.eurprd07.prod.outlook.com (2603:10a6:207:8::27) To AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 13d35287-1fe1-4ece-9f9f-08da64111153 X-MS-TrafficTypeDiagnostic: PA4PR04MB7885:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hx9bCDz9wBhuruj2xtuae4ubhe/U1qIG4YNMGWwdDDKX1pxOhrkWvKhuml/r7rFVC1i1tMbyklvUOWdUrPQFrPlxTDksatomQ08hcoz0ShmLCG2Az3iMtc1n6Cp3/5Envdb/21sYZ/2gAtHrjHkdvRj4KAg/S/pR5bZXpHwKf53R/PZgvOeNQ/i7YJdPdgzRuR1aDHkzB5R4fzmhfdWONHFgHgKEhAiEazbNTwNRvPRM/e0+T7P6XNk73Ke+1mizE9n6hrz8WNaoLQhd6galjqnR0cNt2s3wsLAUOhVL4Joq8rOnM5hXLbiKv7cgVjfBBA8AK+SZyAahou2PJJ+HcoPsZBebLNRsvLiMdrWeD8mrgl8Hxv3yfzADcuz5mdCGoNKRyMt6/Gcwx+NomcozuMmogOy/Xj23sg/nxpgY0rLgPjVpZYrE/09c1FbfqDgLXmJvo8EZdHunMVNmrZVQWM+RBZ3ShL/NJDp0jZjoSjM46+of1c/zvvles5Zy7tNuM5wRyWaPLvttLbXP28eThEcimnKnnZeACx74xUvyZQ+9DF16yy0RviuKwZAUHUfeO6Tzkcx+vOKl9ofsx8FSQegiPvS4B9+9kg+Gxdz9/xhK4+1/hTI0JG+hHkf9HsRTqh08KPLJR3utACUxtoZBRdNPsV59W7XAT0/FXdSmDofV4ltCUKu9XHja4AB5MCm5/wmSDLCSutN8K+v3cnkmYwyoTvYSoGQNcwJDC4j1CZeH/u9o/Mua3B2vMOR+ffJSP7ySDHdgGhoiFXB2AvTH1/+Etoy3pNhsAGZ3FC4kXxXjx7A0nlAzuuEINX3stRyi 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:(13230016)(4636009)(376002)(136003)(396003)(39860400002)(346002)(366004)(316002)(38100700002)(478600001)(6486002)(8676002)(38350700002)(2616005)(66946007)(4326008)(186003)(66556008)(66476007)(1076003)(26005)(6666004)(86362001)(6506007)(44832011)(41300700001)(5660300002)(8936002)(7416002)(6512007)(52116002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VEUSU1i8T7jFBwEXCH2qO2kfp4kL?= =?utf-8?q?LCb/PogrLr8mQmYyF4r/daFBaEWhJmyGdUX6lZtf7+05g1F3lTQwdgKEU88Pr26xq?= =?utf-8?q?zIWbxxkqrs93xAZIoFBar8jKIiKzQh/ZRBi0iSCaoDqxhNcAtd4bT54tWv2d2OavC?= =?utf-8?q?SA/BobQhgzNky0rrNwYseWzfIyo9m90rraTwjf4IatTrf21kUuoO4xmsfwMT0WRxL?= =?utf-8?q?q342gF1B6rUOGXWndpVU3a1mnG1uuaEiym3+yzJijORK7gbzsV9sM9g7sLt/20OmE?= =?utf-8?q?vVz4PSXxiGHtMvJbgwvZerFYA7IHGuF9po+3C5QO7hlX2SnrLWdOzi62ilx/WmL6e?= =?utf-8?q?aUjI8dLK1d/wg8WJi9YultRx6gmla9/oyBRVmntfGUPY/LzcgAq6dqDUWlGI5zYoj?= =?utf-8?q?WAxKGWTBHuIPlP/MBKRGFgvmTBAyNg4WikZXsHd/ToVgrWy7ZRMLk5Cz+iXaokI0K?= =?utf-8?q?tDl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ad8IMo9MzwMKaXTn6dssSD2WjtmxwsacZeUf1qSBvmS779gkoAtdT2twhuov8snfp?= =?utf-8?q?3H5lXeYByQEXRTm0rl5gc7w6dbYBngVbC8p8G4SuY5T3jNNLCk5r4VcwNXF7TmzQs?= =?utf-8?q?4/3lR3RZ66iJ4FkIHKjx9x11H1ZhJh3P5SnDG4SymfEWtXsQSnfR/B1fYJvQUcRG4?= =?utf-8?q?zcve9fJF8jcP?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 13d35287-1fe1-4ece-9f9f-08da64111153 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5140.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2022 14:16:09.6136 (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: Dzp9Y0j4puH6gA6DQGBy4vk/CyMTHPAp2F3g+LfcWpKUVyFcyaMKc4ro3bDn3Izvse0KZ4ZP6gUYOlzaxyebkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7885 Cc: Pierre-Louis Bossart , kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, daniel.baluta@nxp.com, ranjani.sridharan@linux.intel.com, lgirdwood@gmail.com, linux-imx@nxp.com, yc.hung@mediatek.com, peter.ujfalusi@linux.intel.com, linux-kernel@vger.kernel.org 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 After introducing extended parameters we need to forbid older firmware versions to run with the current and future kernel versions. Although in theory the communication protocol will still work the semantics at application level are undefined. So, prevent this by disallowing older firmwares to run with newer kernels. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi --- sound/soc/sof/compress.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/soc/sof/compress.c b/sound/soc/sof/compress.c index 1204dce29ef9..67139e15f862 100644 --- a/sound/soc/sof/compress.c +++ b/sound/soc/sof/compress.c @@ -167,12 +167,23 @@ static int sof_compr_set_params(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd = cstream->private_data; struct snd_compr_runtime *crtd = cstream->runtime; struct sof_ipc_pcm_params_reply ipc_params_reply; + struct sof_ipc_fw_ready *ready = &sdev->fw_ready; + struct sof_ipc_fw_version *v = &ready->version; struct snd_compr_tstamp *tstamp; struct sof_ipc_pcm_params *pcm; struct snd_sof_pcm *spcm; size_t ext_data_size; int ret; + if (v->abi_version < SOF_ABI_VER(3, 22, 0)) { + dev_err(component->dev, + "Compress params not supported with FW ABI version %d:%d:%d\n", + SOF_ABI_VERSION_MAJOR(v->abi_version), + SOF_ABI_VERSION_MINOR(v->abi_version), + SOF_ABI_VERSION_PATCH(v->abi_version)); + return -EINVAL; + } + tstamp = crtd->private_data; spcm = snd_sof_find_spcm_dai(component, rtd); From patchwork Tue Jul 12 14:15:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Daniel Baluta (OSS)" X-Patchwork-Id: 12915032 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id CA1D7C43334 for ; Tue, 12 Jul 2022 14:18:27 +0000 (UTC) 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 E965F16BF; Tue, 12 Jul 2022 16:17:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E965F16BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1657635506; bh=E7YBuPDuICmYiPFqn4w/+SkHJ3B7mCYZ7w+Inneavhk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=NKMCCDZKD3RsCDXnd9ZjM7PnSd9tAKxzOKrOmhrYywp+7qPW0FYvCAAT0pPTkZsa2 EH2cWJLD6hZIjxVKK8YF/ik73+JnpquiAxD12Acuvm5Caa6VFxAXTg5biywOxp0TPb 3vGxtbtLQM9o1S2bCkRLoRIRswfmVKvbuniFobJk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0EEAEF8055A; Tue, 12 Jul 2022 16:16:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 14EEAF80548; Tue, 12 Jul 2022 16:16:24 +0200 (CEST) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2044.outbound.protection.outlook.com [40.107.104.44]) (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 0A404F80246 for ; Tue, 12 Jul 2022 16:16:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0A404F80246 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="S6PvqDLP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aQwm1HYfnh8uWfGBLxQQYzcXW1eMXTFham3cG+sZ4OMphEIqG9uZ3tH9tt00xb4aYXAY4B5LijBvYDvN4rBDRWLqTkZyF3jDYmQcVxC7wHgRHeoHUNvwlIojgJg2BrufgJwXnadiCGd+e6YPexGQLv7qCf1ludzaVLL+VIZJJjjLeuK0wUiMIdYO7EAnpX7dyZPs2Fay1o8jHDUxdg0coSY7AKDxY0yQCpblxx0QkshY+0euLDqizyY/nbnqYJH3a+GSdAyOLYXqGBZ+YvkM9AnjPanlkZyRUFsnmHqkbZ0WLQoid4qmI2oS75kr5HNx1V3URMSVvOGgIh0k1HBF3w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ceLa9D+Qpb6/lc8AwdiIW4+4rAWVx19NDFBb8oegG9I=; b=Bl+fGNJ8VI9sRzrTMVPYZX0mDJ9tBLHbXhLYnXelzF+4Civ9/ZYsiytNocebzyKln/mxbQfMUI64NJd+8LMQ39D970RQGNjaGpqq95U07h80tEj47phc65mmanM8X+R5+GxX6+V7B737Rquio+r9o9kIcMm2Lc7Ed7QDiWNcbdSR4nwtlzcbUni0ZKAtm+9Z5Q88Y4f9LkA/wtR1EpgrN5pRbAoQ1WrDW7bwh/cI+y2dzvO6AprJu94p46JHQE/0+OT6XwNPTai7AXJ7I/QlOKRErJ0fNEKiMqSXTjobKjuXOJME9oj0qHzQUpeth9zOCdGW/qW2dAEDIHC3PC2UNg== 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=ceLa9D+Qpb6/lc8AwdiIW4+4rAWVx19NDFBb8oegG9I=; b=S6PvqDLPyX25LiNNIPYtw6fkxu2CwhXHM8q22AZx1ZOHyWCjlfC06fkBMApKLMqopPldhtLwwFn5i1xkcuK5LGpvYJvCupoTTwhBGMuf4fnhbwydYF7xBDP3wU8sY+PVBO3w6Qwag8qd2aSY9snwQMQY44DK4Y1ZPjSFL6HV9AQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) by PA4PR04MB7885.eurprd04.prod.outlook.com (2603:10a6:102:ce::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Tue, 12 Jul 2022 14:16:10 +0000 Received: from AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::15ba:4274:2df4:8928]) by AM0PR04MB5140.eurprd04.prod.outlook.com ([fe80::15ba:4274:2df4:8928%5]) with mapi id 15.20.5417.026; Tue, 12 Jul 2022 14:16:10 +0000 From: Daniel Baluta To: broonie@kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 4/4] uapi: sof: abi: Bump SOF ABI for ext_data_length Date: Tue, 12 Jul 2022 17:15:31 +0300 Message-Id: <20220712141531.14599-5-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220712141531.14599-1-daniel.baluta@oss.nxp.com> References: <20220712141531.14599-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: AM3PR07CA0141.eurprd07.prod.outlook.com (2603:10a6:207:8::27) To AM0PR04MB5140.eurprd04.prod.outlook.com (2603:10a6:208:ca::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 36cf0971-e77f-441d-d103-08da641111e9 X-MS-TrafficTypeDiagnostic: PA4PR04MB7885:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N6WezHId6XyD0T2MCAYHG95Tjgw2/y7lK6RLPP2aDM45I4JKhEcncoMGMUC4GGteMBv4bXdN2Tf5eZ8K3rs9tlW05P/YAvH1RbZudzcksVc0paDFkgi82fbVDOoSPfwM+7gzserhYn6Yh+/ZGQ+zTYte+7hijixu0kx9CWR9LjUgdIitzVnttJCw1yms54MutY1PKfwLut6gXxf9iprondk3n/4eyB5KBVH7aR42vXtjYttJHs/oaWjmL3ajuO9xzaQCvwYsFkgSZJTKGBkkG8t12MX+41WNFofAe76a5sdWUuNCNKcnwWKJyxXLYDaTkPvq/c8a9KDw55bL8c7DMqEYXeWkfuiZaE+9h8GTAVHl4N5OutIVxMUK0ueVoZ+YkAhzAvhdWAIXxUb4LjhcseCRlXiCCyUGR9TXBzNIknHH+yquBtyxmGQWLV46rj8vqeGgZ5W7KrDL/SVaHkQFw0c45v70o7b8cJ2H0S9f8P4CrbzzLup+fCqUYKXfSFtGz3thmaN4mcpwVwRE+CkolMdN5++Th+IbrPNeBABLHaCUeJ1joSLDaowC9pKhi1IMvHUTUJEudZNbIf/9G+t7X31zK9r2hWWwtoU2chfmQ1d487gbo7d5iZL+s5tKFgHutNGZPrOUxdmvN7Xum68lC9ioKmdTJTZAGS/cyhRBFDyCTzO24nx9So70d1nKgRxKLYga4EwZ4wHZ4OGuUq5weYc1XSPeXA/CiO+IF+PEwqkqpY/ptqRaH/2cpDpYW4TtO6ZQ8ybqZ8UJGj3CQJ+Nmk0InNvAQoSWtCGIYKr+omGwYZXZdu3FySjPTFMMOqq+ 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:(13230016)(4636009)(376002)(136003)(396003)(39860400002)(346002)(366004)(316002)(38100700002)(478600001)(6486002)(8676002)(38350700002)(2616005)(66946007)(4326008)(186003)(66556008)(66476007)(66574015)(1076003)(26005)(6666004)(86362001)(6506007)(44832011)(41300700001)(5660300002)(8936002)(7416002)(6512007)(52116002)(83380400001)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?G0gax3/Jc8fySfn+pQqjRgJVh6zZ?= =?utf-8?q?Zr9guEznFFJErkNZBCivMMwknfFa2QEbyF3ewMdq10giDcDW1V99fNWPgcH8umkUd?= =?utf-8?q?cnTz/OvTxBaAw7uf3nIAjpNKKTdBAUOBjprD/IWUPFNj0jSNgUlBDjcRoNORU/MAV?= =?utf-8?q?NHqJtK9KG5Hf8cdCMhiWD8U+/hPZyouMhH7N9KzOS/AGYTZQDUz3kEBB/jIk1Z8HK?= =?utf-8?q?WQKugpy/47IDVJV8zsgrlru/K9dgTTwKxzFObDvw6nRlQAWepLYCzzl2okEXzcDIV?= =?utf-8?q?dfgnnhHbeVoq4ku1icOmuu12RjwywVcT+KNOYco1J3EjJVBgabJ3RuIQlKMBIA1PJ?= =?utf-8?q?7NZhXx/rAZ25AE5TbbreJ4NhSyOZxAbPDI+tJTHGt4PUrzWx1Rre1QuYLKW7hK8Yf?= =?utf-8?q?J6J77RNowOLzFYXFBZi8nEiJqsgq3EwmUhJcR9r9lol7ylRgdzDzAT8G57RBMpoVR?= =?utf-8?q?ZXxsFcAAJXlGqiJm3XPeqNiCmqX3foQhvFV5haRyxfsj5v9un2DnavTnZ6GTKdIba?= =?utf-8?q?H4EYHL+lBrcKcSDn8nLVN5ySDaXK/z6qB7vkck0xq4zLN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/dLx9NellHd7m?= =?utf-8?q?zBhUxcbDzunyD+dM1IQTjl6TSzLi1fje4aGHDRSlo+Q9Kk1IlRuFD3bMext8OTKBZ?= =?utf-8?q?WiM7KYgnGlCW?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36cf0971-e77f-441d-d103-08da641111e9 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5140.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2022 14:16:10.5979 (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: sIOIDLCdtVFW/niuQeYxntybwOHzYsmfkZRar3vD4h9gIRAFp2rlReJxb5tPU0MGCvhEy/VtSHJkiooFqm9XrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7885 Cc: Pierre-Louis Bossart , kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, daniel.baluta@nxp.com, ranjani.sridharan@linux.intel.com, lgirdwood@gmail.com, linux-imx@nxp.com, yc.hung@mediatek.com, peter.ujfalusi@linux.intel.com, linux-kernel@vger.kernel.org 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 Add new field to sof_ipc_stream_params in order to extend stream params struct with extended data to store compress parameters. Older kernel will still work this as they ext_data_length will always be zero. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi --- include/uapi/sound/sof/abi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/sound/sof/abi.h b/include/uapi/sound/sof/abi.h index c88f467374ae..b7dce4df7ecd 100644 --- a/include/uapi/sound/sof/abi.h +++ b/include/uapi/sound/sof/abi.h @@ -28,7 +28,7 @@ /* SOF ABI version major, minor and patch numbers */ #define SOF_ABI_MAJOR 3 -#define SOF_ABI_MINOR 21 +#define SOF_ABI_MINOR 22 #define SOF_ABI_PATCH 0 /* SOF ABI version number. Format within 32bit word is MMmmmppp */