From patchwork Thu Feb 2 13:29:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 650131 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 062C2C05027 for ; Thu, 2 Feb 2023 13:33:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 021CBEAC; Thu, 2 Feb 2023 14:32:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 021CBEAC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675344786; bh=hqGPiTb3SAUmJcU9PUxVFwsufiYM6BS1FXIonficbCo=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=N8IA5KjEiDU/1gBsQuFs5D4k1+2EhvFYZRDOpQkae5LN0Z90aJxbRQ75xSzfhmTW9 +5sgYhsRnqgKKXXAVa8XUf2NQ81UgjrqOWDKXZ51j8DTzXO/dd5PozXnJoebLpDtW0 n7f90JIoRfqKKQnYLSv1bYZDceZ6cvCt0JLBsu28= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C1A1BF80543; Thu, 2 Feb 2023 14:30:40 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5BF1DF8053D; Thu, 2 Feb 2023 14:30:39 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 A2B09F80169 for ; Thu, 2 Feb 2023 14:29:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A2B09F80169 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=M2NCOTRD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675344599; x=1706880599; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hqGPiTb3SAUmJcU9PUxVFwsufiYM6BS1FXIonficbCo=; b=M2NCOTRDdsTbz/qsUW/q3qCtC2WBvwrU55H7j++BHmjubSVLD5y9dz2j XGxmkW46k1WYIcFv/400pS0HbEEHzA+tcbU/Rznczlwhwr7XmUjOYIb1r BXepfPj1hBNjzdJVvHguKiXAa6968mDmiN1s9fLEbJH1Lk0qw2LFVG9qf 1Q8nzShkjtp5/9fidAh4DJHw1kYURC1RTHbYXNsbVnyoMKaIPLiBYXH1M 2mvuR1RLC5I/GbNlg4uoz5zmpFZ8/cXKV/YGevnj+zRwTDkpsEUf7HQJR Kqe5hFdI8UueKYSy7KMea64cuhbUBFTU3/0dIvUwkwuW2QIS95BjPWUnZ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10608"; a="308783269" X-IronPort-AV: E=Sophos;i="5.97,267,1669104000"; d="scan'208";a="308783269" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2023 05:29:56 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10608"; a="658727330" X-IronPort-AV: E=Sophos;i="5.97,267,1669104000"; d="scan'208";a="658727330" Received: from jpdamery-mobl.ger.corp.intel.com (HELO pujfalus-desk.ger.corp.intel.com) ([10.252.1.104]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2023 05:29:53 -0800 From: Peter Ujfalusi To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz Subject: [PATCH v3 3/9] ASoC: SOF: add time info structure for ipc4 path Date: Thu, 2 Feb 2023 15:29:48 +0200 Message-Id: <20230202132954.26773-4-peter.ujfalusi@linux.intel.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230202132954.26773-1-peter.ujfalusi@linux.intel.com> References: <20230202132954.26773-1-peter.ujfalusi@linux.intel.com> MIME-Version: 1.0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: alsa-devel@alsa-project.org, kai.vehmanen@linux.intel.com, pierre-louis.bossart@linux.intel.com, rander.wang@intel.com, ranjani.sridharan@linux.intel.com, yung-chuan.liao@linux.intel.com Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Rander Wang Start_stream_offset is used to strip invalid sample count in dai for some cases like dai is started before host. llp_offset is used to get current dai position from memory windows. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi --- sound/soc/sof/ipc4-priv.h | 14 ++++++++++++++ sound/soc/sof/sof-audio.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/sound/soc/sof/ipc4-priv.h b/sound/soc/sof/ipc4-priv.h index 8f8259a7e21c..f461b8c70df3 100644 --- a/sound/soc/sof/ipc4-priv.h +++ b/sound/soc/sof/ipc4-priv.h @@ -87,6 +87,20 @@ struct sof_ipc4_fw_data { struct mutex pipeline_state_mutex; /* protect pipeline triggers, ref counts and states */ }; +/** + * struct sof_ipc4_timestamp_info - IPC4 timestamp info + * @host_copier: the host copier of the pcm stream + * @dai_copier: the dai copier of the pcm stream + * @stream_start_offset: reported by fw in memory window + * @llp_offset: llp offset in memory window + */ +struct sof_ipc4_timestamp_info { + struct sof_ipc4_copier *host_copier; + struct sof_ipc4_copier *dai_copier; + u64 stream_start_offset; + u32 llp_offset; +}; + extern const struct sof_ipc_fw_loader_ops ipc4_loader_ops; extern const struct sof_ipc_tplg_ops ipc4_tplg_ops; extern const struct sof_ipc_tplg_control_ops tplg_ipc4_control_ops; diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h index b0593b46d477..334b715b17c8 100644 --- a/sound/soc/sof/sof-audio.h +++ b/sound/soc/sof/sof-audio.h @@ -311,6 +311,9 @@ struct snd_sof_pcm_stream { */ bool suspend_ignored; struct snd_sof_pcm_stream_pipeline_list pipeline_list; + + /* used by IPC implementation and core does not touch it */ + void *private; }; /* ALSA SOF PCM device */