All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: ALSA <alsa-devel@alsa-project.org>,
	tiwai@suse.de, Greg KH <gregkh@linuxfoundation.org>,
	liam.r.girdwood@linux.intel.com, patches.audio@intel.com,
	broonie@kernel.org, Sanyog Kale <sanyog.r.kale@intel.com>
Subject: Re: [alsa-devel] [PATCH v2 02/13] soundwire: Add support for SoundWire stream management
Date: Wed, 11 Apr 2018 09:11:57 +0530	[thread overview]
Message-ID: <20180411034155.GU6014@localhost> (raw)
In-Reply-To: <29ccea0c-e89c-f9c2-7cde-465a60f14acc@linux.intel.com>

On Tue, Apr 10, 2018 at 10:47:24AM -0500, Pierre-Louis Bossart wrote:

> >>>Again we are not writing a spec but code and comments to explain the code.
> >>>The above is not related to "this" series so we should not add it here. When
> >>>we add device-device support, multi-master support these can be added
> >>>
> >>>We are adding blocks in a giant building, but you are only looking at the
> >>>giant picture but not the block in discussion!
> >>
> >>no, you have keep mentions to multi-link that are questionable. Either you
> >>remove them or you state it's reserved for future use.
> >
> >I have clarified on bus_node above, can you check and tell me if there is
> >anything else?
> 
> The code pattern for the bank switch was inspired by multi-link.

As you pointed out, we are fixing that too

> >Okay so we are going to track if master and slaves runtimes are configured
> >by adding a flag in each of them. Once all the components are configured the
> >stream stated will be updated. Does that sound ok?
> 
> How do you detect that all components are configured? We have a distributed
> allocation/configuration with multiple actors, I don't what triggers the
> transition to a new state.
> see more below.
> 
> >
> >>>>+Configuration state of stream. Operations performed before entering in
> >>>>+this state:
> >>>>+
> >>>>+  (1) The resources allocated for stream information in
> >>>>SDW_STREAM_ALLOCATED
> >>>>+      state are updated here. This includes stream parameters, Master(s)
> >>>>+      and Slave(s) runtime information associated with current stream.
> >>>>+
> >>>>+  (2) All the Master(s) and Slave(s) associated with current stream provide
> >>>>+      the port information to Bus which includes port numbers allocated by
> >>>>+      Master(s) and Slave(s) for current stream and their channel mask.
> >>>>
> >>>>so how can Master ports be configured if it is added to a stream *after* the
> >>>>CONFIGURED state?
> >>>
> >>>Yes you have a valid point wrt documentation, will update it.
> >>
> >>It's not just the documentation, I wonder if it actually works. You would
> >>want to make sure all masters and slaves are allocated before configuring
> >>them, otherwise the error handling flow is just awful to deal with. You
> >>could end-up in a situation where all Slaves are configured but the master
> >>allocation fails.
> >
> >Ok
> 
> If the ALLOCATED and CONFIGURED states are clearly separated out, then what
> if the flag you mentioned used for?

As you rightly pointed out that we have distributed allocation/configuration
with multiple actors. So to ensure that all actors are properly configured
before we move stream state to CONFIGURED, we need to check and to do so the
flag will be very useful :-)
-- 
~Vinod
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2018-04-11  3:37 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05 16:48 [PATCH v2 00/13] soundwire: Add stream support Vinod Koul
2018-04-05 16:48 ` [PATCH v2 01/13] soundwire: Add more documentation Vinod Koul
2018-04-05 21:37   ` Pierre-Louis Bossart
2018-04-06  3:24     ` Vinod Koul
2018-04-06 15:24       ` Pierre-Louis Bossart
2018-04-10  4:04         ` Vinod Koul
2018-04-05 16:48 ` [PATCH v2 02/13] soundwire: Add support for SoundWire stream management Vinod Koul
2018-04-05 22:34   ` Pierre-Louis Bossart
2018-04-06  4:53     ` Vinod Koul
2018-04-06 15:21       ` Pierre-Louis Bossart
2018-04-10  4:43         ` Vinod Koul
2018-04-10 15:47           ` Pierre-Louis Bossart
2018-04-11  3:41             ` Vinod Koul [this message]
2018-04-05 16:48 ` [PATCH v2 03/13] soundwire: Add support for port management Vinod Koul
2018-04-05 23:04   ` Pierre-Louis Bossart
2018-04-06  5:00     ` Vinod Koul
2018-04-06 15:26       ` Pierre-Louis Bossart
2018-04-05 16:48 ` [PATCH v2 04/13] soundwire: Add Master and Slave port programming Vinod Koul
2018-04-05 23:14   ` Pierre-Louis Bossart
2018-04-06  5:01     ` Vinod Koul
2018-04-05 16:48 ` [PATCH v2 05/13] soundwire: Add helpers for ports operations Vinod Koul
2018-04-05 23:27   ` Pierre-Louis Bossart
2018-04-06  5:05     ` Vinod Koul
2018-04-05 16:48 ` [PATCH v2 06/13] soundwire: Add bank switch routine Vinod Koul
2018-04-05 23:35   ` Pierre-Louis Bossart
2018-04-06  8:33     ` Vinod Koul
2018-04-05 16:48 ` [PATCH v2 07/13] soundwire: Add stream configuration APIs Vinod Koul
2018-04-05 23:40   ` Pierre-Louis Bossart
2018-04-06  8:48     ` Vinod Koul
2018-04-06 15:28       ` Pierre-Louis Bossart
2018-04-05 16:48 ` [PATCH v2 08/13] ASoC: Add SoundWire stream programming interface Vinod Koul
2018-04-05 23:42   ` Pierre-Louis Bossart
2018-04-06  8:49     ` Vinod Koul
2018-04-05 16:48 ` [PATCH v2 09/13] soundwire: Remove cdns_master_ops Vinod Koul
2018-04-05 16:48 ` [PATCH v2 10/13] soundwire: cdns: Add port routines Vinod Koul
2018-04-06  0:19   ` Pierre-Louis Bossart
2018-04-06  8:55     ` Vinod Koul
2018-04-06 15:29       ` Pierre-Louis Bossart
2018-04-05 16:48 ` [PATCH v2 11/13] soundwire: cdns: Add stream routines Vinod Koul
2018-04-06  0:29   ` Pierre-Louis Bossart
2018-04-06  8:57     ` Vinod Koul
2018-04-05 16:48 ` [PATCH v2 12/13] soundwire: intel: Add stream initialization Vinod Koul
2018-04-05 16:48 ` [PATCH v2 13/13] soundwire: intel: Add audio DAI ops Vinod Koul
2018-04-06  0:46 ` [PATCH v2 00/13] soundwire: Add stream support Pierre-Louis Bossart

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=20180411034155.GU6014@localhost \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=tiwai@suse.de \
    /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.