[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200110064838.GY2818@vkoul-mobl>
Date: Fri, 10 Jan 2020 12:18:38 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
tiwai@...e.de, broonie@...nel.org, gregkh@...uxfoundation.org,
jank@...ence.com, srinivas.kandagatla@...aro.org,
slawomir.blauciak@...el.com,
Bard liao <yung-chuan.liao@...ux.intel.com>,
Rander Wang <rander.wang@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Sanyog Kale <sanyog.r.kale@...el.com>,
Jonathan Corbet <corbet@....net>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH 2/6] soundwire: stream: update state machine and add
state checks
On 08-01-20, 11:54, Pierre-Louis Bossart wrote:
> Stream State Operations
> -----------------------
> @@ -246,6 +251,9 @@ SDW_STREAM_PREPARED
>
> Prepare state of stream. Operations performed before entering in this state:
>
> + (0) Steps 1 and 2 are omitted in the case of a resume operation,
> + where the bus bandwidth is known.
> +
> (1) Bus parameters such as bandwidth, frame shape, clock frequency,
> are computed based on current stream as well as already active
> stream(s) on Bus. Re-computation is required to accommodate current
> @@ -270,13 +278,15 @@ Prepare state of stream. Operations performed before entering in this state:
> After all above operations are successful, stream state is set to
> ``SDW_STREAM_PREPARED``.
>
> -Bus implements below API for PREPARE state which needs to be called once per
> -stream. From ASoC DPCM framework, this stream state is linked to
> -.prepare() operation.
> +Bus implements below API for PREPARE state which needs to be called
> +once per stream. From ASoC DPCM framework, this stream state is linked
> +to .prepare() operation. Since the .trigger() operations may not
> +follow the .prepare(), a direct transitions from
> +``SDW_STREAM_PREPARED`` to ``SDW_STREAM_DEPREPARED`` is allowed.
>
> .. code-block:: c
>
> - int sdw_prepare_stream(struct sdw_stream_runtime * stream);
> + int sdw_prepare_stream(struct sdw_stream_runtime * stream, bool resume);
so what does the additional argument of resume do..?
> diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
> index 178ae92b8cc1..6aa0b5d370c0 100644
> --- a/drivers/soundwire/stream.c
> +++ b/drivers/soundwire/stream.c
> @@ -1553,8 +1553,18 @@ int sdw_prepare_stream(struct sdw_stream_runtime *stream)
and it is not modified here, so is the doc correct or this..?
--
~Vinod
Powered by blists - more mailing lists