linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: andy.gross@linaro.org, david.brown@linaro.org,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org, bgoswami@codeaurora.org,
	rohitkr@codeaurora.org
Subject: Re: [PATCH] qcom: apr: Make apr callbacks in non-atomic context
Date: Thu, 31 Jan 2019 10:44:00 +0000	[thread overview]
Message-ID: <7555094b-350b-b4c6-47c6-507f7ce99dc5@linaro.org> (raw)
In-Reply-To: <20190131011649.GA27190@builder>



On 31/01/2019 01:16, Bjorn Andersson wrote:
> On Thu 15 Nov 10:49 PST 2018, Srinivas Kandagatla wrote:
> 
>> APR communication with DSP is not atomic in nature.
>> Its request-response type. Trying to pretend that these are atomic
>> and invoking apr client callbacks directly under atomic/irq context has
>> endless issues with soundcard. It makes more sense to convert these
>> to nonatomic calls. This also coverts all the dais to be nonatomic.
>>
> Hi Srinivas,
> 
> Sorry for not looking at this before.
> 
NP, thanks for the review!

> Are you sure that you're meeting the latency requirements of low-latency
> audio with this change?

Low and Ultra Low Latency audio is not supported in the exiting upstream 
qdsp drivers.

Also it depends on definition of "latency", is the latency referring to 
"filling the data" or "latency between DSP command and response".

For former case as long as we have more samples in our ring buffer there 
should be no latency in filling the data.
For later case it should not really matter as long as former case is 
taken care off.

Low latency audio involves smaller sample sizes and no or minimal 
preprocessing in DSP so am guessing that we should be okay with 
responses in workqueue as long as we have good size ring buffer.

> 
> [..]
>> @@ -303,6 +363,10 @@ static int apr_remove_device(struct device *dev, void *null)
>>   
>>   static void apr_remove(struct rpmsg_device *rpdev)
>>   {
>> +	struct apr *apr = dev_get_drvdata(&rpdev->dev);
>> +
>> +	flush_workqueue(apr->rxwq);
>> +	destroy_workqueue(apr->rxwq);
> The devices may still be communicating until you remove them on the next
> line, wouldn't it make more sense to destroy the work queue after
> removing the APR devices?

Yes, that makes sense!

--srini
> 
>>   	device_for_each_child(&rpdev->dev, NULL, apr_remove_device);
>>   }
> Regards,
> Bjorn

  reply	other threads:[~2019-01-31 10:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 18:49 [PATCH] qcom: apr: Make apr callbacks in non-atomic context Srinivas Kandagatla
2019-01-29 10:51 ` Srinivas Kandagatla
2019-01-31  1:16 ` Bjorn Andersson
2019-01-31 10:44   ` Srinivas Kandagatla [this message]
2019-01-31 16:05     ` Bjorn Andersson
2019-01-31 17:33       ` Srinivas Kandagatla
2019-02-05 18:35         ` Bjorn Andersson

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=7555094b-350b-b4c6-47c6-507f7ce99dc5@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=bgoswami@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=rohitkr@codeaurora.org \
    /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).