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=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable 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 B13A6C433E0 for ; Mon, 25 Jan 2021 16:24:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6FC47221E3 for ; Mon, 25 Jan 2021 16:24:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730750AbhAYQYs (ORCPT ); Mon, 25 Jan 2021 11:24:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730634AbhAYQYT (ORCPT ); Mon, 25 Jan 2021 11:24:19 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0438CC06174A for ; Mon, 25 Jan 2021 08:23:39 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id d16so12688586wro.11 for ; Mon, 25 Jan 2021 08:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8ntcyKS2z/vURCjFfNTXCa/WB0rFRGasD9K1aMBQeVg=; b=YOrhvTmgbPBursMMTpLVLMkWmwTlD4zQcAxCRsGWKu0dPOiVQaHQo0K/W+Doa1OhVR pkbf723h2oTPMzDgVpANcT1wGGCRUv59qw3VhKnw9jvrrZ7/TMzi/KoiB1+rA07m3ENR JBSZjmEMl7uBvqtCps3sRB0rXjvV/J3IBtlL1882V1JRzHvSqnFb7DlZnKITiUGSwHpH N+rf3UQr56Ek1eShxSmJtOB7HH90xicJZqXJiZEmqRqEyUwjvVoZsVxxZs1k2TGBVySf Pt14PjFCY9dPTpc+yzZkjN0pSoFvddf9J04hvlKVFW3GQxRvbpRyl+4EPC2TFG3hj8Y/ Monw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8ntcyKS2z/vURCjFfNTXCa/WB0rFRGasD9K1aMBQeVg=; b=ZO5KTx25vOemgxFbdluSk6AZNtqKlLY3eIUy15i7K3VM2JHQ89s8vGkgRYHMjnAISH QPs1yBzAGz6qhv7uDIbUrDv8T/vDDYw3r7TTQT182g/hwCpBmJDPbt106+hC+VsGX54w xwvMF0v4XLvIfm0kNBquAJuT58MbZ0akW/YLnQbFM79WxdC9zakRWVLWT0QpyqbKTCx4 OxVIjO5P+dCXKpDQdntbiuvmI1LfRMMG6x/WVqAcldJ3MHoAcPEVZ//z2MWIh3uCCsYP 4ytCA8iUcTM3Etx4Fgj0eN6TgLgcFu8oXLnOuEqqX+qj8wUdzDaAFo9iRgCFiQJSduBs W4Rg== X-Gm-Message-State: AOAM532DkMo7G6UchPlkWf5Mp15PtsIooCoPRJTfu36JUqN4RM8K4LQE c4+N1TyxK7bvUNVAfSDtPki76Q05coIEYQ== X-Google-Smtp-Source: ABdhPJznz/oZIZRIgTjD6QnaUMMHl8/spzDxYWNM3AlfDKD5kHjOUMDsxEXuMaoOrrd0+uy+dPzOpQ== X-Received: by 2002:a5d:4e89:: with SMTP id e9mr1819480wru.201.1611591817453; Mon, 25 Jan 2021 08:23:37 -0800 (PST) Received: from [192.168.86.34] (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.googlemail.com with ESMTPSA id w14sm11646805wro.86.2021.01.25.08.23.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 08:23:36 -0800 (PST) Subject: Re: [RFC PATCH 1/2] soundwire: add support for static port mapping To: Pierre-Louis Bossart , vkoul@kernel.org, yung-chuan.liao@linux.intel.com Cc: gregkh@linuxfoundation.org, sanyog.r.kale@intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <20210120180110.8357-1-srinivas.kandagatla@linaro.org> <20210120180110.8357-2-srinivas.kandagatla@linaro.org> <0a2bbbe5-821a-34dd-e893-fef42baaad2b@linaro.org> <9a688b02-80a6-fb1f-d6fa-36ba2d88d3b9@linux.intel.com> <3ee60ad9-9635-649e-ba67-d40a96b25256@linux.intel.com> <487c91f9-f6ea-75c2-9150-52db2de42a3a@linaro.org> From: Srinivas Kandagatla Message-ID: <31ff9d2b-760a-374e-5b37-45d8e8116f7b@linaro.org> Date: Mon, 25 Jan 2021 16:23:35 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > 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. > > 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