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,
	pierre-louis.bossart@linux.intel.com
Cc: alsa-devel@alsa-project.org, ranjani.sridharan@linux.intel.com,
	kai.vehmanen@linux.intel.com, rander.wang@intel.com
Subject: [PATCH 4/7] ASoC: SOF: ipc4: Configure the debug box offset
Date: Fri,  9 Sep 2022 14:43:29 +0300	[thread overview]
Message-ID: <20220909114332.31393-5-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20220909114332.31393-1-peter.ujfalusi@linux.intel.com>

The debug window for IPC4 compatible firmware is always window #2,
set the debug_box.offset accordingly.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/ipc4-priv.h | 1 +
 sound/soc/sof/ipc4.c      | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/sound/soc/sof/ipc4-priv.h b/sound/soc/sof/ipc4-priv.h
index f3dbcc2e6331..4599dd95f17d 100644
--- a/sound/soc/sof/ipc4-priv.h
+++ b/sound/soc/sof/ipc4-priv.h
@@ -15,6 +15,7 @@
 
 /* The DSP window indices are fixed */
 #define SOF_IPC4_OUTBOX_WINDOW_IDX	1
+#define SOF_IPC4_DEBUG_WINDOW_IDX	2
 
 /**
  * struct sof_ipc4_fw_data - IPC4-specific data
diff --git a/sound/soc/sof/ipc4.c b/sound/soc/sof/ipc4.c
index 58aa054663bf..4f7ec18ae7fa 100644
--- a/sound/soc/sof/ipc4.c
+++ b/sound/soc/sof/ipc4.c
@@ -545,10 +545,14 @@ static int ipc4_fw_ready(struct snd_sof_dev *sdev, struct sof_ipc4_msg *ipc4_msg
 	sdev->host_box.offset = outbox_offset;
 	sdev->host_box.size = outbox_size;
 
+	sdev->debug_box.offset = snd_sof_dsp_get_window_offset(sdev,
+							SOF_IPC4_DEBUG_WINDOW_IDX);
+
 	dev_dbg(sdev->dev, "mailbox upstream 0x%x - size 0x%x\n",
 		inbox_offset, inbox_size);
 	dev_dbg(sdev->dev, "mailbox downstream 0x%x - size 0x%x\n",
 		outbox_offset, outbox_size);
+	dev_dbg(sdev->dev, "debug box 0x%x\n", sdev->debug_box.offset);
 
 	return sof_ipc4_init_msg_memory(sdev);
 }
-- 
2.37.3


  parent reply	other threads:[~2022-09-09 11:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 11:43 [PATCH 0/7] ASoC: SOF: ipc4: Add support for 'mtrace' log extraction Peter Ujfalusi
2022-09-09 11:43 ` [PATCH 1/7] ASoC: SOF: ipc4: Only print LOG BUFFER update message info if requested Peter Ujfalusi
2022-09-09 11:43 ` [PATCH 2/7] ASoC: SOF: ipc4: Add macro to get core ID from log buffer status message Peter Ujfalusi
2022-09-09 11:43 ` [PATCH 3/7] ASoC: SOF: ipc4: Add define for the outbox window index Peter Ujfalusi
2022-09-09 11:43 ` Peter Ujfalusi [this message]
2022-09-09 11:43 ` [PATCH 5/7] ASoC: SOF: ipc4: Add support for mtrace log extraction Peter Ujfalusi
2022-09-09 11:43 ` [PATCH 6/7] ASoC: SOF: Intel: icl: Set IPC4-specific DSP ops Peter Ujfalusi
2022-09-09 11:43 ` [PATCH 7/7] ASoC: SOF: Intel: Add mtrace type information for IPC4 Peter Ujfalusi
2022-09-09 21:25 ` [PATCH 0/7] ASoC: SOF: ipc4: Add support for 'mtrace' log extraction 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=20220909114332.31393-5-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=pierre-louis.bossart@linux.intel.com \
    --cc=rander.wang@intel.com \
    --cc=ranjani.sridharan@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.