LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
bgoswami@codeaurora.org, lgirdwood@gmail.com, tiwai@suse.de,
plai@codeaurora.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 05/16] ASoC: qcom: audioreach: add basic pkt alloc support
Date: Thu, 15 Jul 2021 11:31:49 +0100 [thread overview]
Message-ID: <e581be78-10cd-12e7-17df-c53c1b680473@linaro.org> (raw)
In-Reply-To: <58d6df8d-83ed-c716-81b2-e0927f58da6f@linux.intel.com>
Thanks for review Pierre,
On 14/07/2021 17:30, Pierre-Louis Bossart wrote:
>
>
>
>> diff --git a/sound/soc/qcom/Kconfig b/sound/soc/qcom/Kconfig
>> index cc7c1de2f1d9..721ea56b2cb5 100644
>> --- a/sound/soc/qcom/Kconfig
>> +++ b/sound/soc/qcom/Kconfig
>> @@ -103,6 +103,12 @@ config SND_SOC_QDSP6
>> audio drivers. This includes q6asm, q6adm,
>> q6afe interfaces to DSP using apr.
>>
>> +config SND_SOC_QCOM_AUDIOREACH
>> + tristate "SoC ALSA audio drives for Qualcomm AUDIOREACH"
>
> typo: drivers?
>
Will fix all the typos in next spin.
>> +static void *__audioreach_alloc_pkt(int payload_size, uint32_t opcode,
>> + uint32_t token, uint32_t src_port,
>> + uint32_t dest_port, bool has_cmd_hdr)
>> +{
>> + struct apm_cmd_header *cmd_header;
>> + struct gpr_pkt *pkt;
>> + void *p;
>> + int pkt_size = GPR_HDR_SIZE + payload_size;
>> +
>> + if (has_cmd_hdr)
>> + pkt_size += APM_CMD_HDR_SIZE;
>> +
>> + p = kzalloc(pkt_size, GFP_ATOMIC);
>
> is GFP_ATOMIC required? it's the same question really than my earlier one on spinlock_irqsave, it's rather hard to figure out in what context this code will run.
I had some spinlocks in this patch for compress offload cases, so had to
make it ATOMIC. having said that we could avoid ATOMIC here.
>
>> + if (!p)
>> + return ERR_PTR(-ENOMEM);
>> +
>> + pkt = p;
>> + pkt->hdr.version = GPR_PKT_VER;
>> + pkt->hdr.hdr_size = 6;
>
> magic number. looks like a missing macro...
There is already a macro for this, GPR_PKT_HEADER_WORD_SIZE I should
have used it.
>
>> + pkt->hdr.pkt_size = pkt_size;
>> + pkt->hdr.dest_port = dest_port;
>> + pkt->hdr.src_port = src_port;
>> +
>> + pkt->hdr.dest_domain = GPR_DOMAIN_ID_ADSP;
>> + pkt->hdr.src_domain = GPR_DOMAIN_ID_APPS;
>> + pkt->hdr.token = token;
>> + pkt->hdr.opcode = opcode;
>> +
>> + if (has_cmd_hdr) {
>> + p = p + GPR_HDR_SIZE;
>> + cmd_header = p;
>> + cmd_header->payload_size = payload_size;
>> + }
>> +
>> + return pkt;
>> +}
>
next prev parent reply other threads:[~2021-07-15 10:31 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 15:30 [PATCH v2 00/16] ASoC: qcom: Add AudioReach support Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 01/16] soc: dt-bindings: qcom: add gpr bindings Srinivas Kandagatla
2021-07-14 16:05 ` Pierre-Louis Bossart
2021-07-14 15:30 ` [PATCH v2 02/16] soc: qcom: apr: make code more reuseable Srinivas Kandagatla
2021-07-14 20:36 ` kernel test robot
2021-07-14 15:30 ` [PATCH v2 03/16] soc: qcom: apr: Add GPR support Srinivas Kandagatla
2021-07-14 16:20 ` Pierre-Louis Bossart
2021-07-15 10:31 ` Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 04/16] ASoC: qcom: dt-bindings: add bindings Audio Processing manager Srinivas Kandagatla
2021-07-28 17:36 ` Rob Herring
2021-07-29 9:18 ` Srinivas Kandagatla
2021-07-29 11:13 ` Mark Brown
2021-07-30 11:06 ` Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 05/16] ASoC: qcom: audioreach: add basic pkt alloc support Srinivas Kandagatla
2021-07-14 16:30 ` Pierre-Louis Bossart
2021-07-15 10:31 ` Srinivas Kandagatla [this message]
2021-07-14 15:30 ` [PATCH v2 06/16] ASoC: qcom: audioreach: add q6apm support Srinivas Kandagatla
2021-07-14 16:40 ` Pierre-Louis Bossart
2021-07-15 10:31 ` Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 07/16] ASoC: qcom: audioreach: add module configuration command helpers Srinivas Kandagatla
2021-07-14 16:48 ` Pierre-Louis Bossart
2021-07-15 10:32 ` Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 08/16] ASoC: qcom: audioreach: add topology support Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 09/16] ASoC: qcom: audioreach: add q6apm-dai support Srinivas Kandagatla
2021-07-14 16:59 ` Pierre-Louis Bossart
2021-07-15 10:32 ` Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 10/16] ASoC: qcom: audioreach: add bedai support Srinivas Kandagatla
2021-07-14 17:03 ` Pierre-Louis Bossart
2021-07-15 10:32 ` Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 11/16] ASoC: qcom: dt-bindings: add bindings for Proxy Resource Manager Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 12/16] ASoC: qcom: audioreach: add q6prm support Srinivas Kandagatla
2021-07-14 17:09 ` Pierre-Louis Bossart
2021-07-15 10:32 ` Srinivas Kandagatla
2021-07-15 7:40 ` kernel test robot
2021-07-14 15:30 ` [PATCH v2 13/16] ASoC: qcom: dt-bindings: add audioreach soundcard compatibles Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 14/16] ASoC: qcom: audioreach: add volume ctrl module support Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 15/16] ASoC: qcom: audioreach: topology add dapm pga support Srinivas Kandagatla
2021-07-14 15:30 ` [PATCH v2 16/16] ASoC: qcom: sm8250: Add audioreach support Srinivas Kandagatla
2021-07-14 17:12 ` Pierre-Louis Bossart
2021-07-15 10:32 ` 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=e581be78-10cd-12e7-17df-c53c1b680473@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=plai@codeaurora.org \
--cc=robh@kernel.org \
--cc=tiwai@suse.de \
--subject='Re: [PATCH v2 05/16] ASoC: qcom: audioreach: add basic pkt alloc support' \
/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
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).