All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, Keyon Jie <yang.jie@linux.intel.com>,
	broonie@kernel.org, Daniel Baluta <daniel.baluta@nxp.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 1/6] ASoC: SOF: Remove call to snd_sof_dsp_mailbox_init
Date: Wed,  7 Aug 2019 10:01:58 -0500	[thread overview]
Message-ID: <20190807150203.26359-2-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20190807150203.26359-1-pierre-louis.bossart@linux.intel.com>

From: Daniel Baluta <daniel.baluta@nxp.com>

This is reserved for some historical reason, we didn't enable memory
windows for byt/bdw at the beginning, to make it compatible, we get
those mailbox offsets from fw_ready struct firstly, and then update them
if they existed in the following memory windows, to make sure the
mailbox still can be used if no memory windows are created.

With this change all platforms have the same implementation for
xxx_fw_ready function so that we can refactor it in a common file.

Suggested-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/sof/intel/bdw.c | 5 -----
 sound/soc/sof/intel/byt.c | 5 -----
 2 files changed, 10 deletions(-)

diff --git a/sound/soc/sof/intel/bdw.c b/sound/soc/sof/intel/bdw.c
index 4bb9636da990..94be024a99eb 100644
--- a/sound/soc/sof/intel/bdw.c
+++ b/sound/soc/sof/intel/bdw.c
@@ -455,11 +455,6 @@ static int bdw_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
 	sof_block_read(sdev, sdev->mmio_bar, offset, fw_ready,
 		       sizeof(*fw_ready));
 
-	snd_sof_dsp_mailbox_init(sdev, fw_ready->dspbox_offset,
-				 fw_ready->dspbox_size,
-				 fw_ready->hostbox_offset,
-				 fw_ready->hostbox_size);
-
 	/* make sure ABI version is compatible */
 	ret = snd_sof_ipc_valid(sdev);
 	if (ret < 0)
diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c
index 000d576f6a8d..cb8f02ee09f2 100644
--- a/sound/soc/sof/intel/byt.c
+++ b/sound/soc/sof/intel/byt.c
@@ -237,11 +237,6 @@ static int byt_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
 	sof_block_read(sdev, sdev->mmio_bar, offset, fw_ready,
 		       sizeof(*fw_ready));
 
-	snd_sof_dsp_mailbox_init(sdev, fw_ready->dspbox_offset,
-				 fw_ready->dspbox_size,
-				 fw_ready->hostbox_offset,
-				 fw_ready->hostbox_size);
-
 	/* make sure ABI version is compatible */
 	ret = snd_sof_ipc_valid(sdev);
 	if (ret < 0)
-- 
2.20.1

  reply	other threads:[~2019-08-07 15:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 15:01 [PATCH 0/6] ASoC: SOF: refactor duplicated code between Intel and i.MX8 Pierre-Louis Bossart
2019-08-07 15:01 ` Pierre-Louis Bossart [this message]
2019-08-09 12:31   ` Applied "ASoC: SOF: Remove call to snd_sof_dsp_mailbox_init" to the asoc tree Mark Brown
2019-08-07 15:01 ` [PATCH 2/6] ASoC: SOF: Introduce snd_sof_dsp_get_mailbox_offset Pierre-Louis Bossart
2019-08-09 12:31   ` Applied "ASoC: SOF: Introduce snd_sof_dsp_get_mailbox_offset" to the asoc tree Mark Brown
2019-08-07 15:02 ` [PATCH 3/6] ASoC: SOF: Introduce snd_sof_dsp_get_window_offset Pierre-Louis Bossart
2019-08-09 12:31   ` Applied "ASoC: SOF: Introduce snd_sof_dsp_get_window_offset" to the asoc tree Mark Brown
2019-08-07 15:02 ` [PATCH 4/6] ASoC: SOF: Intel: byt: Refactor fw ready / mem windows creation Pierre-Louis Bossart
2019-08-07 19:07   ` Cezary Rojewski
2019-08-07 19:20     ` Pierre-Louis Bossart
2019-08-09 12:31   ` Applied "ASoC: SOF: Intel: byt: Refactor fw ready / mem windows creation" to the asoc tree Mark Brown
2019-08-07 15:02 ` [PATCH 5/6] ASoC: SOF: Intel: bdw: Use generic function for fw ready / mem windows creation Pierre-Louis Bossart
2019-08-09 12:31   ` Applied "ASoC: SOF: Intel: bdw: Use generic function for fw ready / mem windows creation" to the asoc tree Mark Brown
2019-08-07 15:02 ` [PATCH 6/6] ASoC: SOF: Intel: hda: Use generic function for fw ready / mem windows creation Pierre-Louis Bossart
2019-08-09 12:31   ` Applied "ASoC: SOF: Intel: hda: Use generic function for fw ready / mem windows creation" to the asoc tree 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=20190807150203.26359-2-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=tiwai@suse.de \
    --cc=yang.jie@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.