All of 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>,
	vkoul@kernel.org
Cc: robh@kernel.org, alsa-devel@alsa-project.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	sanyog.r.kale@intel.com, yung-chuan.liao@linux.intel.com
Subject: Re: [PATCH v2] soundwire: qcom: wait for fifo space to be available before read/write
Date: Thu, 1 Apr 2021 17:49:46 +0100	[thread overview]
Message-ID: <41911806-e4ce-44e2-d187-a1a27406ed34@linaro.org> (raw)
In-Reply-To: <e1bcc85d-b583-2c9a-18e5-634994cc2916@linux.intel.com>



On 01/04/2021 15:36, Pierre-Louis Bossart wrote:
> 
> 
> On 4/1/21 4:00 AM, Srinivas Kandagatla wrote:
>> If we write registers very fast we can endup in a situation where some
>> of the writes will be dropped without any notice.
>>
>> So wait for the fifo space to be available before reading/writing the
>> soundwire registers.
> 
> Out of curiosity, do you actually need to do a check in the read case as 
> well?

Yes, This is just to make sure the read command is finished and fifo is 
ready with data.

If not we will be reading quickly an empty fifo!

> 
> The commit message talks about writes getting dropped, is the opposite 
> also a problem?

Its highly likely, for safety I have added support for both write and 
read waits in this patch.


--srini
> 

  reply	other threads:[~2021-04-01 18:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  9:00 [PATCH v2] soundwire: qcom: wait for fifo space to be available before read/write Srinivas Kandagatla
2021-04-01  9:00 ` Srinivas Kandagatla
2021-04-01 14:36 ` Pierre-Louis Bossart
2021-04-01 16:49   ` Srinivas Kandagatla [this message]
2021-04-06  4:54 ` Vinod Koul
2021-04-06  4:54   ` Vinod Koul

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=41911806-e4ce-44e2-d187-a1a27406ed34@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh@kernel.org \
    --cc=sanyog.r.kale@intel.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.