alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	Jaska Uimonen <jaska.uimonen@intel.com>,
	tiwai@suse.de, Keyon Jie <yang.jie@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	broonie@kernel.org
Subject: [PATCH 4/7] ASoC: SOF: topology: fix the ipc_size calculation for process component
Date: Tue, 25 Aug 2020 16:50:37 -0700	[thread overview]
Message-ID: <20200825235040.1586478-5-ranjani.sridharan@linux.intel.com> (raw)
In-Reply-To: <20200825235040.1586478-1-ranjani.sridharan@linux.intel.com>

From: Keyon Jie <yang.jie@linux.intel.com>

The topology private struct is used for token parsing and its size
should not be included to the ipc_size, fix it here though it didn't
cause any real issue as the Firmware won't use this wrong-added data.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/topology.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 707fbac3e64f..95e63d138326 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -2114,9 +2114,7 @@ static int sof_process_load(struct snd_soc_component *scomp, int index,
 			goto out;
 	}
 
-	ipc_size = sizeof(struct sof_ipc_comp_process) +
-		le32_to_cpu(private->size) +
-		ipc_data_size;
+	ipc_size = sizeof(struct sof_ipc_comp_process) + ipc_data_size;
 
 	/* we are exceeding max ipc size, config needs to be sent separately */
 	if (ipc_size > SOF_IPC_MSG_MAX_SIZE) {
-- 
2.25.1


  parent reply	other threads:[~2020-08-25 23:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 23:50 [PATCH 0/7] SOF fixes and updates Ranjani Sridharan
2020-08-25 23:50 ` [PATCH 1/7] ASoC: SOF: Intel: hda: report error only for the last ROM init iteration Ranjani Sridharan
2020-08-25 23:50 ` [PATCH 2/7] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work Ranjani Sridharan
2020-08-25 23:50 ` [PATCH 3/7] ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics Ranjani Sridharan
2020-09-18 15:10   ` Pierre-Louis Bossart
2020-09-18 15:14     ` Mark Brown
2020-08-25 23:50 ` Ranjani Sridharan [this message]
2020-08-25 23:50 ` [PATCH 5/7] ASoC: SOF: Intel: hda: add extended rom status dump to error log Ranjani Sridharan
2020-08-25 23:50 ` [PATCH 6/7] ASoC: SOF: imx: Replace sdev->private with sdev->pdata->hw_pdata Ranjani Sridharan
2020-08-25 23:50 ` [PATCH 7/7] ASoC: SOF: sof-of-dev: Add .arch_ops field Ranjani Sridharan
2020-08-26 12:55 ` [PATCH 0/7] SOF fixes and updates 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=20200825235040.1586478-5-ranjani.sridharan@linux.intel.com \
    --to=ranjani.sridharan@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=jaska.uimonen@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).