All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org,
	vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com,
	slawomir.blauciak@intel.com,
	Bard liao <yung-chuan.liao@linux.intel.com>,
	Rander Wang <rander.wang@linux.intel.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Hui Wang <hui.wang@canonical.com>,
	Sanyog Kale <sanyog.r.kale@intel.com>
Subject: Re: [PATCH] soundwire: stream: only change state if needed
Date: Tue, 17 Mar 2020 08:19:34 -0500	[thread overview]
Message-ID: <6dde3b32-a29a-3ac9-d95d-283f5b05e64a@linux.intel.com> (raw)
In-Reply-To: <c1e5dc89-a069-a427-4912-89d90ecc0334@linaro.org>



On 3/17/20 8:04 AM, Srinivas Kandagatla wrote:
> 
> 
> On 17/03/2020 12:22, Pierre-Louis Bossart wrote:
>>
>> The change below would be an error case for Intel, so it's probably 
>> better if we go with your suggestion. You have a very specific state 
>> handling due to your power amps and it's probably better to keep it 
>> platform-specific.
> 
> Just trying to understand, why would it be error for Intel case?
> 
> IMO, If stream state is SDW_STREAM_ENABLED that also implicit that its 
> prepared too. Similar thing with SDW_STREAM_DEPREPARED.
> Isn't it?

the stream state is a scalar value, not a mask. The state machine only 
allows transition from CONFIGURED TO PREPARED or from DEPREPARED TO 
PREPARED, or DISABLED to PREPARED.
There is no allowed transition from ENABLED TO PREPARED, you have to go 
through the DISABLED state and make sure a bank switch occurred, and 
re-do a bank switch to prepare again.

WARNING: multiple messages have this Message-ID (diff)
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	alsa-devel@alsa-project.org
Cc: tiwai@suse.de, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Hui Wang <hui.wang@canonical.com>,
	vkoul@kernel.org, broonie@kernel.org, jank@cadence.com,
	slawomir.blauciak@intel.com,
	Sanyog Kale <sanyog.r.kale@intel.com>,
	Bard liao <yung-chuan.liao@linux.intel.com>,
	Rander Wang <rander.wang@linux.intel.com>
Subject: Re: [PATCH] soundwire: stream: only change state if needed
Date: Tue, 17 Mar 2020 08:19:34 -0500	[thread overview]
Message-ID: <6dde3b32-a29a-3ac9-d95d-283f5b05e64a@linux.intel.com> (raw)
In-Reply-To: <c1e5dc89-a069-a427-4912-89d90ecc0334@linaro.org>



On 3/17/20 8:04 AM, Srinivas Kandagatla wrote:
> 
> 
> On 17/03/2020 12:22, Pierre-Louis Bossart wrote:
>>
>> The change below would be an error case for Intel, so it's probably 
>> better if we go with your suggestion. You have a very specific state 
>> handling due to your power amps and it's probably better to keep it 
>> platform-specific.
> 
> Just trying to understand, why would it be error for Intel case?
> 
> IMO, If stream state is SDW_STREAM_ENABLED that also implicit that its 
> prepared too. Similar thing with SDW_STREAM_DEPREPARED.
> Isn't it?

the stream state is a scalar value, not a mask. The state machine only 
allows transition from CONFIGURED TO PREPARED or from DEPREPARED TO 
PREPARED, or DISABLED to PREPARED.
There is no allowed transition from ENABLED TO PREPARED, you have to go 
through the DISABLED state and make sure a bank switch occurred, and 
re-do a bank switch to prepare again.

  reply	other threads:[~2020-03-17 14:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17 10:51 [PATCH] soundwire: stream: only change state if needed Pierre-Louis Bossart
2020-03-17 10:51 ` Pierre-Louis Bossart
2020-03-17 11:53 ` Srinivas Kandagatla
2020-03-17 11:53   ` Srinivas Kandagatla
2020-03-17 12:22   ` Pierre-Louis Bossart
2020-03-17 12:22     ` Pierre-Louis Bossart
2020-03-17 12:43     ` Srinivas Kandagatla
2020-03-17 12:43       ` Srinivas Kandagatla
2020-03-17 13:04     ` Srinivas Kandagatla
2020-03-17 13:04       ` Srinivas Kandagatla
2020-03-17 13:19       ` Pierre-Louis Bossart [this message]
2020-03-17 13:19         ` Pierre-Louis Bossart
2020-03-17 15:07         ` Srinivas Kandagatla
2020-03-17 15:07           ` Srinivas Kandagatla
2020-03-17 15:31           ` Pierre-Louis Bossart
2020-03-17 15:31             ` Pierre-Louis Bossart
2020-03-20 14:15 ` Vinod Koul
2020-03-20 14:15   ` Vinod Koul
2020-03-20 14:33   ` Pierre-Louis Bossart
2020-03-20 14:33     ` Pierre-Louis Bossart
2020-03-23 12:46     ` Vinod Koul
2020-03-23 12:46       ` 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=6dde3b32-a29a-3ac9-d95d-283f5b05e64a@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hui.wang@canonical.com \
    --cc=jank@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rander.wang@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=slawomir.blauciak@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.de \
    --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.