From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org,
tiwai@suse.com, lgirdwood@gmail.com, bgoswami@quicinc.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/9] ASoC: qdsp6: audioreach: simplify module_list sz calculation
Date: Fri, 21 Oct 2022 12:13:07 -0500 [thread overview]
Message-ID: <5528f5e7-86fe-f53e-d8db-db91cdd25adb@linux.intel.com> (raw)
In-Reply-To: <20221021165207.13220-6-srinivas.kandagatla@linaro.org>
On 10/21/22 11:52, Srinivas Kandagatla wrote:
> Simplify module_list size calcuation by doing inside modules loop.
typo: calculation.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> sound/soc/qcom/qdsp6/audioreach.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c
> index 0015ec89d90b..87a3fd1f8107 100644
> --- a/sound/soc/qcom/qdsp6/audioreach.c
> +++ b/sound/soc/qcom/qdsp6/audioreach.c
> @@ -430,7 +430,6 @@ void *audioreach_alloc_graph_pkt(struct q6apm *apm, struct audioreach_graph_info
> struct audioreach_sub_graph *sgs;
> struct apm_mod_list_obj *mlobj;
> struct list_head *sg_list;
> - int num_modules_per_list;
> int num_connections = 0;
> int num_containers = 0;
> int num_sub_graphs = 0;
> @@ -451,6 +450,9 @@ void *audioreach_alloc_graph_pkt(struct q6apm *apm, struct audioreach_graph_info
> list_for_each_entry(container, &sgs->container_list, node) {
> num_containers++;
> num_modules += container->num_modules;
> + ml_sz = ml_sz + sizeof(struct apm_module_list_params) +
> + APM_MOD_LIST_OBJ_PSIZE(mlobj, container->num_modules);
> +
> list_for_each_entry(module, &container->modules_list, node) {
> if (module->src_mod_inst_id)
> num_connections++;
> @@ -459,11 +461,11 @@ void *audioreach_alloc_graph_pkt(struct q6apm *apm, struct audioreach_graph_info
> }
>
> num_modules_list = num_containers;
> - num_modules_per_list = num_modules/num_containers;
> sg_sz = APM_SUB_GRAPH_PSIZE(sg_params, num_sub_graphs);
> cont_sz = APM_CONTAINER_PSIZE(cont_params, num_containers);
> - ml_sz = ALIGN(sizeof(struct apm_module_list_params) +
> - num_modules_list * APM_MOD_LIST_OBJ_PSIZE(mlobj, num_modules_per_list), 8);
> +
> + ml_sz = ALIGN(ml_sz, 8);
> +
> mp_sz = APM_MOD_PROP_PSIZE(mprop, num_modules);
> mc_sz = APM_MOD_CONN_PSIZE(mcon, num_connections);
>
next prev parent reply other threads:[~2022-10-22 2:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 16:51 [PATCH v2 0/9] ASoC: qdsp6: audioreach: add multi-port, SAL and MFC support Srinivas Kandagatla
2022-10-21 16:51 ` [PATCH v2 1/9] ASoC: qdsp6: audioreach: topology use idr_alloc_u32 Srinivas Kandagatla
2022-10-21 17:09 ` Pierre-Louis Bossart
2022-10-26 9:19 ` Srinivas Kandagatla
2022-10-26 20:38 ` Pierre-Louis Bossart
2022-10-21 16:52 ` [PATCH v2 2/9] ASoC: qdsp6: audioreach: remove unused connection_list Srinivas Kandagatla
2022-10-21 16:52 ` [PATCH v2 3/9] ASoC: qdsp6: audioreach: update dapm kcontrol private data Srinivas Kandagatla
2022-10-21 16:52 ` [PATCH v2 4/9] ASoC: qdsp6: audioreach: Simplify handing FE and BE graph connections Srinivas Kandagatla
2022-10-21 16:52 ` [PATCH v2 5/9] ASoC: qdsp6: audioreach: simplify module_list sz calculation Srinivas Kandagatla
2022-10-21 17:13 ` Pierre-Louis Bossart [this message]
2022-10-21 16:52 ` [PATCH v2 6/9] ASoC: qdsp6: audioreach: add support for more port connections Srinivas Kandagatla
2022-10-21 16:52 ` [PATCH v2 7/9] ASoC: qdsp6: audioreach: add support to enable SAL Module Srinivas Kandagatla
2022-10-21 16:52 ` [PATCH v2 8/9] ASoC: qdsp6: audioreach: add support for MFC Module Srinivas Kandagatla
2022-10-21 16:52 ` [PATCH v2 9/9] ASoC: qdsp6: audioreach: add support to enable module command Srinivas Kandagatla
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=5528f5e7-86fe-f53e-d8db-db91cdd25adb@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.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