From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>, alsa-devel@alsa-project.org
Cc: broonie@kernel.org, lgirdwood@gmail.com
Subject: Re: [PATCH] ASoC: SOF: Fix probe point getter
Date: Mon, 9 Mar 2020 11:58:13 -0500 [thread overview]
Message-ID: <d83bf2b3-b97f-d1de-4356-752d0eb2b5a3@linux.intel.com> (raw)
In-Reply-To: <20200309142124.29262-1-cezary.rojewski@intel.com>
On 3/9/20 9:21 AM, Cezary Rojewski wrote:
> Firmware API changes which introduced 'num_elems' param in several probe
> structs such as sof_ipc_probe_dma_add_params also impacted getter for
> both, DMA and probe points. All struct handlers except for
> sof_ipc_probe_info_params have been updated. Align said handler too to
> calculate payload size correctly.
>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thanks Cezary!
> Fixes: f3b433e4699f ("ASoC: SOF: Implement Probe IPC API") > ---
> sound/soc/sof/probe.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/sof/probe.c b/sound/soc/sof/probe.c
> index 2b2f3dcfc7e9..c38169fe00c5 100644
> --- a/sound/soc/sof/probe.c
> +++ b/sound/soc/sof/probe.c
> @@ -95,13 +95,17 @@ static int sof_ipc_probe_info(struct snd_sof_dev *sdev, unsigned int cmd,
> if (!reply->num_elems)
> goto exit;
>
> - bytes = reply->num_elems * sizeof(reply->dma[0]);
> + if (cmd == SOF_IPC_PROBE_DMA_INFO)
> + bytes = sizeof(reply->dma[0]);
> + else
> + bytes = sizeof(reply->desc[0]);
> + bytes *= reply->num_elems;
> *params = kmemdup(&reply->dma[0], bytes, GFP_KERNEL);
> if (!*params) {
> ret = -ENOMEM;
> goto exit;
> }
> - *num_params = msg.num_elems;
> + *num_params = reply->num_elems;
>
> exit:
> kfree(reply);
>
next prev parent reply other threads:[~2020-03-09 17:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 14:21 [PATCH] ASoC: SOF: Fix probe point getter Cezary Rojewski
2020-03-09 16:58 ` Pierre-Louis Bossart [this message]
2020-03-10 13:51 ` Applied "ASoC: SOF: Fix probe point getter" 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=d83bf2b3-b97f-d1de-4356-752d0eb2b5a3@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=lgirdwood@gmail.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