From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3206DC433DB for ; Mon, 1 Feb 2021 10:28:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF43764E11 for ; Mon, 1 Feb 2021 10:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233011AbhBAK16 (ORCPT ); Mon, 1 Feb 2021 05:27:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:37510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232290AbhBAK14 (ORCPT ); Mon, 1 Feb 2021 05:27:56 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 295D764E0F; Mon, 1 Feb 2021 10:27:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612175235; bh=PS8IJ5JvjZuy5zHzMyJ9YXXpfetmK358icWc9qRWdAg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iXgHbP3by/cp7VCm81uh8jumovxCHj/+brOghZuWOvNupn7obmdzp36kPwTY/j0ll SenD7VNR2YLA/Ag2uCeBfkzvEXrrbFYGQNjK+W07dhHLF/6kmo4aKr/be7ikDehI/6 dp8a8DKuFWcx6sWuKBsEjs+u/RDWMUsd46aAiKZMgz4ZYUQhwSZ6qcaVQcK1iexoR3 Ag/iEkHozCodKArXpr9U9OtrUOjq5xc47KDzJfvO4KnNDUjHTgmFn3FMfeyn/+FCQ0 XINdU4TMDfCR94Qhywdjq1RDN/rqiCHF+jPgcXC06mbp09Ib8+Vn315YFX9ldi3aiI knzPiObvyzObw== Date: Mon, 1 Feb 2021 15:57:09 +0530 From: Vinod Koul To: Srinivas Kandagatla Cc: Pierre-Louis Bossart , yung-chuan.liao@linux.intel.com, gregkh@linuxfoundation.org, sanyog.r.kale@intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/2] soundwire: add support for static port mapping Message-ID: <20210201102709.GT2771@vkoul-mobl> References: <9a688b02-80a6-fb1f-d6fa-36ba2d88d3b9@linux.intel.com> <3ee60ad9-9635-649e-ba67-d40a96b25256@linux.intel.com> <487c91f9-f6ea-75c2-9150-52db2de42a3a@linaro.org> <31ff9d2b-760a-374e-5b37-45d8e8116f7b@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31ff9d2b-760a-374e-5b37-45d8e8116f7b@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25-01-21, 16:23, Srinivas Kandagatla wrote: > > > On 22/01/2021 16:42, Pierre-Louis Bossart wrote: > > > > > > > > if you completely remove the stream and re-add it with updated > > > > configuration things should work. > > > > > > That's exactly what we do currently! > > > > > > The updated ports due to new configuration ex: for "mic capture" > > > dailink needs to be communicated from slave(codec) to master so that > > > it can allocate correct ports. That is what this patch is trying to > > > do (share current port map information). > > > > .. we have a disconnect on how to do this configuration update. > > > > The 'stream' support was designed so that a stream can be split across > > multiple devices (both masters and slaves). With this design we need to > > have a central configuration and distribute the information to all > > devices taking part of the stream. That is correct, but in this case a stream consists of one master and one or more slave devices. This is not a multi-master design. The adding of multiple masters should not be done here... that does not seem logically right in this situation > > It seems you are in a different solution-space, where the codec driver > > needs to notify the master of which ports it needs to use? > > Correct! As Codec is the place where we have mixer controls ant it can > clearly tell which master ports should be used for that particular > configuration. And that should come from firmware (DT etc) and driver should pass on this info > > I also don't see where the mapping is actually set. Patch 2 uses a > > mapping but there's no codec driver change that defines the mapping? > > > > Do you actually call sdw_stream_add_slave() with a new mapping? > > > Yes, currently am working on a codec driver for WCD938x Codec, which I will > posting very soon! > > > It feels we are missing the codec part to really see what you are trying > > to do? > My WIP code is at https://git.linaro.org/people/srinivas.kandagatla/linux.git/tree/sound/soc/codecs/wcd938x.c?h=wcd938x/wip#n4526 > > Currently the master ports are hardcoded in the driver for now, but these > will come from DT. > > --srini -- ~Vinod