From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre-Louis Bossart Subject: Re: [PATCH v4 08/13] ASoC: Add SoundWire stream programming interface Date: Wed, 25 Apr 2018 10:08:20 -0500 Message-ID: <95778758-bcea-8c08-6e6d-27ea558e6b73@linux.intel.com> References: <1524049146-8725-1-git-send-email-vinod.koul@intel.com> <1524049146-8725-9-git-send-email-vinod.koul@intel.com> <79c978d0-0ded-ddcb-5405-18b657c062d7@linux.intel.com> <20180421155804.GN6014@localhost> <20180424090633.GD6014@localhost> <20180425024923.GG6014@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by alsa0.perex.cz (Postfix) with ESMTP id C068C26772B for ; Wed, 25 Apr 2018 17:08:23 +0200 (CEST) In-Reply-To: <20180425024923.GG6014@localhost> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Vinod Koul Cc: ALSA , tiwai@suse.de, Greg KH , liam.r.girdwood@linux.intel.com, patches.audio@intel.com, broonie@kernel.org, Shreyas NC List-Id: alsa-devel@alsa-project.org On 4/24/18 9:49 PM, Vinod Koul wrote: > On Tue, Apr 24, 2018 at 06:40:54PM -0500, Pierre-Louis Bossart wrote: >> On 4/24/18 4:06 AM, Vinod Koul wrote: >>> On Mon, Apr 23, 2018 at 08:33:08AM -0500, Pierre-Louis Bossart wrote: >>>> On 4/21/18 10:58 AM, Vinod Koul wrote: >>>>> On Sat, Apr 21, 2018 at 06:59:49AM -0700, Pierre-Louis Bossart wrote: >>>>>> >>>>>>> +/** >>>>>>> + * snd_soc_dai_set_sdw_stream() - Configures a DAI for SDW stream operation >>>>>>> + * @dai: DAI >>>>>>> + * @stream: STREAM >>>>>>> + * @direction: Stream direction(Playback/Capture) >>>>>>> + * SoundWire subsystem doesn't have a notion of direction and we reuse >>>>>>> + * the ASoC stream direction to configure sink/source ports. >>>>>>> + * Playback maps to source on the TX and sink on Rx. Vice-versa for Capture. >>>>>> >>>>>> this is just confusing... >>>>>> >>>>>> This should be something like >>>>>> "use Playback for source ports and Capture for sink ports". >>>>> >>>>> Source port on ...? This is also confusing to me! >>>>> >>>>> For playback there are two ports, one on transmitter aka >>>>> TX and one on receiver aka RX. For Tx we use source port, and Rx uses sink >>>>> ports. I should probably add port to make people really figure out we are >>>>> talking about ports! >>>>> >>>>> So: >>>>> >>>>> Playback maps to source port on the TX and sink port on Rx. Vice-versa for Capture. >>>>> >>>>> Do you agree to above statement? >>>> >>>> No. Source port and TX are redundant definitions, and your wording isn't >>>> clear: is the PLAYBACK/CAPTURE qualifier for the stream or the DAI used by >>>> the stream? >>> >>> Yes they are redundant, will update. PLAYBACK/CAPTURE qualifier is for stream. >> >> Let me try again. >> let's say in point-to-point mode you have dai1 as the source and dai2 as the >> sink. >> >> Which sequence are the higher layers supposed to use: >> >> a. >> >> snd_soc_dai_set_sdw_stream(dai1, stream, PLAYBACK); >> snd_soc_dai_set_sdw_stream(dai2, stream, PLAYBACK); >> >> b. >> >> snd_soc_dai_set_sdw_stream(dai1, stream, PLAYBACK); >> snd_soc_dai_set_sdw_stream(dai2, stream, CAPTURE); > > I believe this. For clarity, did you mean b) ? If yes, Playback == Source and Capture == sink.