linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@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: Tue, 5 Feb 2019 10:35:49 -0800	[thread overview]
Message-ID: <20190205183548.GC23363@builder> (raw)
In-Reply-To: <49a8b982-356b-73ad-0f9a-46e0f496ce02@linaro.org>

On Thu 31 Jan 09:33 PST 2019, Srinivas Kandagatla wrote:

> On 31/01/2019 16:05, Bjorn Andersson wrote:
> > Sure, but we want the design to allow for that still, either in future
> > upstream or by additional downstream code.
> > 
> Yes, I agree, I don't have solution for this ATM.
> It will be interesting to see how Intel handles this kind of usecase on
> there DSP.
> 
> The whole issue is the APR messaging is not really atomic in nature, it is
> basically request->response but the fact in existing code is that smd/glink
> callbacks run in interrupt context.
> 
> Trying to pretend that APR is atomic in nature is problem with audio.
> 
> As audio (dai-links) can be marked as atomic or non-atomic depending on
> which bus it links with, for example when it has to work with other buses
> like slimbus, soundwire, i2c whose transactions can sleep we mark the audio
> dai-link as non-atomic which means that the functions can sleep.
> In the above case, invoking any audio functions as part of the rpmsg
> callback is an issue.
> 
> The only solution I found to address this is handle the callbacks in
> workqueue.
> 

Okay, I think we should merge this and once we have the means of doing
low latency playback we can measure and worst case revisit this
decision.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> > > Also it depends on definition of "latency", is the latency referring to
> > > "filling the data" or "latency between DSP command and response".
> > > 
> > I'm referring to the latency between the message from the DSP until we
> > give it a new buffer.
> > 
> > > 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.
> > > 
> > Relying on more buffered data will increase the latency of the audio,
> > preventing you from doing really low-latency things.
> My bad!.. Yes, in low latency case we would have very less buffers!
> 
> srini
> 

      reply	other threads:[~2019-02-05 18:35 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
2019-01-31 16:05     ` Bjorn Andersson
2019-01-31 17:33       ` Srinivas Kandagatla
2019-02-05 18:35         ` Bjorn Andersson [this message]

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=20190205183548.GC23363@builder \
    --to=bjorn.andersson@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=bgoswami@codeaurora.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 \
    --cc=srinivas.kandagatla@linaro.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).