All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz
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
Subject: [PATCH v3 3/9] ASoC: SOF: add time info structure for ipc4 path
Date: Thu,  2 Feb 2023 15:29:48 +0200	[thread overview]
Message-ID: <20230202132954.26773-4-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20230202132954.26773-1-peter.ujfalusi@linux.intel.com>

From: Rander Wang <rander.wang@intel.com>

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 <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
 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 */
-- 
2.39.1


  parent reply	other threads:[~2023-02-02 13:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 13:29 [PATCH v3 0/9] ASoC: SOF: core/ipc4/mtl: Add support for PCM delay reporting Peter Ujfalusi
2023-02-02 13:29 ` [PATCH v3 1/9] ASoC: SOF: add ipc4_fw_reg header file Peter Ujfalusi
2023-02-02 13:29 ` [PATCH v3 2/9] ASoC: SOF: add fw_info_box support Peter Ujfalusi
2023-02-02 13:29 ` Peter Ujfalusi [this message]
2023-02-02 13:29 ` [PATCH v3 4/9] ASoC: SOF: ipc4-pcm: allocate time info for pcm delay feature Peter Ujfalusi
2023-02-02 13:29 ` [PATCH v3 5/9] ASoC: SOF: ipc4-pcm: add hw_params Peter Ujfalusi
2023-02-02 13:29 ` [PATCH v3 6/9] ASoC: SOF: add delay function support in sof framework Peter Ujfalusi
2023-02-02 13:29 ` [PATCH v3 7/9] ASoC: SOF: add get_stream_position ops for pcm delay Peter Ujfalusi
2023-02-02 13:29 ` [PATCH v3 8/9] ASoC: SOF: Intel: mtl: add get_stream_position support Peter Ujfalusi
2023-02-02 13:29 ` [PATCH v3 9/9] ASoC: SOF: ipc4-pcm: add delay function support Peter Ujfalusi
2023-02-03 15:07 ` [PATCH v3 0/9] ASoC: SOF: core/ipc4/mtl: Add support for PCM delay reporting Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230202132954.26773-4-peter.ujfalusi@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rander.wang@intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.