From patchwork Tue Oct 18 12:09:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 616078 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 6F2CDC4332F for ; Tue, 18 Oct 2022 12:13:49 +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 9395A8143; Tue, 18 Oct 2022 14:12:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9395A8143 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1666095227; bh=kQJ2AfBz113zvjUHzXsFb0AJBsjNzMxAJaogHFuPanU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Epr+DHjrgFaoPYDwPySfHogGx02WP7mC6K7+L32i6qFVNk4rV5Ae+AkXgmL6zqYXo 7fy24v8iRfUAOCNDQbiOsr1O7uCr2Jqqew+xqHEwg2l/DgI5Qs9eeogcZp+I8/8Ifo SeAhPoaxbWaeBc19u/ao7b/XvHP5j3Q7nMFNHmIc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 01AD9F805C3; Tue, 18 Oct 2022 14:09:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D5953F805AC; Tue, 18 Oct 2022 14:09:38 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 511EEF8057C for ; Tue, 18 Oct 2022 14:09:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 511EEF8057C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KdEkEHlO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666094972; x=1697630972; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kQJ2AfBz113zvjUHzXsFb0AJBsjNzMxAJaogHFuPanU=; b=KdEkEHlOHBlfTD+WD7rJ8sD3v++fYBmq7tU+bASEZZ21FuRXRK8PhqUp ITK76Z0lGa1OMrDW9YCsARvqKA6l1G3WmC78/TvEhSgudc0VFNGsj0E5i AOxCZz8ti71zGVBHBtsotsMoTqiXfHfw7FPa7zkfrvDYp4+AfZUOxAcko x2MTS7Ga2/hUwclq6X6ZHzuM4gPcs1iNHL9PDeln3+xY0UkTzwdGLB6cc FSJ6QhILcKi1BQsQFmUSWIQsRDdv3XNN19JmVmsVZgjpDKHiw2JIo0i6u S2C41n9ZSQkZ6G9SYyaWbPD90Bw+mvPro5u56FB/8Oz6jGK6V2vAlmxlO Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="293452988" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="293452988" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2022 05:09:29 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="579758000" X-IronPort-AV: E=Sophos;i="5.95,193,1661842800"; d="scan'208";a="579758000" Received: from mariaca1-mobl.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.27.127]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2022 05:09:27 -0700 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org Subject: [PATCH 13/19] ASoC: SOF: ipc4: Define platform dependent library loading callback Date: Tue, 18 Oct 2022 15:09:10 +0300 Message-Id: <20221018120916.19820-14-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221018120916.19820-1-peter.ujfalusi@linux.intel.com> References: <20221018120916.19820-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 Cc: chao.song@intel.com, alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com, kai.vehmanen@linux.intel.com, ranjani.sridharan@linux.intel.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" Platforms where external libraries can be supported should set the load_library callback to implement this functionality. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen --- sound/soc/sof/ipc4-priv.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/soc/sof/ipc4-priv.h b/sound/soc/sof/ipc4-priv.h index ecfa9f701ef1..7e7115ada2a2 100644 --- a/sound/soc/sof/ipc4-priv.h +++ b/sound/soc/sof/ipc4-priv.h @@ -66,6 +66,8 @@ struct sof_ipc4_fw_library { * @mtrace_log_bytes: log bytes as reported by the firmware via fw_config reply * @max_libs_count: Maximum number of libraries support by the FW including the * base firmware + * + * @load_library: Callback function for platform dependent library loading */ struct sof_ipc4_fw_data { u32 manifest_fw_hdr_offset; @@ -74,6 +76,9 @@ struct sof_ipc4_fw_data { enum sof_ipc4_mtrace_type mtrace_type; u32 mtrace_log_bytes; u32 max_libs_count; + + int (*load_library)(struct snd_sof_dev *sdev, + struct sof_ipc4_fw_library *fw_lib, bool reload); }; extern const struct sof_ipc_fw_loader_ops ipc4_loader_ops;