From patchwork Fri Mar 12 12:22:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 398727 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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 7F2C1C433DB for ; Fri, 12 Mar 2021 12:24:57 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9ACA964F6E for ; Fri, 12 Mar 2021 12:24:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9ACA964F6E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2B8451711; Fri, 12 Mar 2021 13:24:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2B8451711 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1615551895; bh=i/1oqDbFIS+6NuiPKhN7dmvS9ilBTnwdAV/I2E1ErpU=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=XEy8fBH7Off5ykp368jSqoYjpchYbWPhVB7lMiV4dOn0nMFy8iZCELzlRjgnYEIzY oYRNNZLddRqPsRrCnw6w7pRsiTw4mAzXMIDAlf4J4N6kMc7NUPcNPGQOtFriAcU2bi QEvbhzkhz8jt/hfAWEYZo3wO2yMcaCwfvT8p4WBs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 13BFEF802E7; Fri, 12 Mar 2021 13:23:14 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 92551F8016C; Fri, 12 Mar 2021 13:23:09 +0100 (CET) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 87368F8016C for ; Fri, 12 Mar 2021 13:22:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 87368F8016C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="cuOnInoC" Received: by mail-wm1-x32f.google.com with SMTP id l19so3690840wmh.1 for ; Fri, 12 Mar 2021 04:22:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gw1EmCEru4mg3+UNq5mxUL127uGPwQQa9UFbvGW5NTI=; b=cuOnInoCzbYXcB1KE5fz2yZHLtqWBz9qh7UG3lXJMeCj+zARTGww+hTmqo5PhiXx97 UY4064YuVsrxrXIb+OcMhjPO/NY2dmV7Pray+0LDDZ+JulCWwdW86mPXw9W41mxeExYU LCCSxP+raDM2LLVKnLFvyhqLxmrVlfjNCy/LAdRao99I7O+X5AHfkcf8gY6minxejmkO TtlESx6ZWGcsbiJieSPRPItF2SZ/ZQUIX9iywILHy1Ugs1fNo3mKWhTheBDKMwSfxIQj AG4Yp8fis64UejdHnk4rWcFONt3iMHy+BsaLAbC/nw1j3v4GZ4HBbO1s3jBr0urATl/m qHQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gw1EmCEru4mg3+UNq5mxUL127uGPwQQa9UFbvGW5NTI=; b=K+3r0nt05AnkGjeAzijs0vjHpnpBqk0I5uq22kFbajmtInxPMDT4o6pMGldjis7dkR 1XpVbaL7yPCO386HvjH/dlFFfV9xS5ClDwsRCt0OLyM5TiYXq5W7hin1FlEg1eLAaSk7 O103/gNsiYhKXieTz8jl8QO6qM3Wf+FH+mXGctlECXWRCKdTM0TD2oBZr691DQdDyTMQ vRHRwReFgW6z3XbZmW5+0AOgyD78N3x+I08aabLVdhpOmbU368mhiMWV+nBJFeFgpuQt 28PiRKozvoQrqqt7ys727q4KGJOhsBCukN+CMCSp41mNaTWuxv2z2DS2M2TAPH/t4fcX SKpA== X-Gm-Message-State: AOAM531VciDtX8qYJiMq36qmzNzCXoA9fR6+pYvB4JfVyGjLoSEQQwIS l1/9CdWS8x43SuUZW5tDryaOlA== X-Google-Smtp-Source: ABdhPJww7SBBR/wgNWOgTTUZXlxZnzs/4W5fSEWQ/e3ed5u/QFiShUj+guiVKTkM7YlwR7o26udojg== X-Received: by 2002:a7b:c3c1:: with SMTP id t1mr12734679wmj.47.1615551778173; Fri, 12 Mar 2021 04:22:58 -0800 (PST) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id 3sm8804329wry.72.2021.03.12.04.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 04:22:57 -0800 (PST) From: Srinivas Kandagatla To: broonie@kernel.org, vkoul@kernel.org Subject: [RESEND PATCH v3 0/5] soundwire: add static port map support Date: Fri, 12 Mar 2021 12:22:50 +0000 Message-Id: <20210312122255.3143-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Cc: robh@kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, pierre-louis.bossart@linux.intel.com, linux-kernel@vger.kernel.org, Srinivas Kandagatla , sanyog.r.kale@intel.com, yung-chuan.liao@linux.intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Resending this as I realized that alsa-devel list was missing in cc! In some cases, SoundWire device ports are statically mapped to Controller ports during design, however there is no way to expose this information to the controller. Controllers like Qualcomm ones use this info to setup static bandwidth parameters for those ports. A generic port allocation is not possible in this cases! This patch adds a new member m_port_map to SoundWire device so that it can populate the static master port map and share it with controller to be able to setup correct bandwidth parameters. As a user of this feature this patchset also adds new bindings for wsa881x smart speaker which has 4 ports which are statically mapped to the 3 output and 1 input port of the controller. Tested it on DB845c and SM8250 MTP. thanks, srini Changes since v2: - fixed dt_binding_check error and kernel test robot reported errors - updated comments as suggested by Pierre - updated wsa881x to populate m_ports from valid index. Srinivas Kandagatla (5): soundwire: add static port mapping support soundwire: qcom: update port map allocation bit mask soundwire: qcom: add static port map support ASoC: dt-bindings: wsa881x: add bindings for port mapping ASoC: codecs: wsa881x: add static port map support .../bindings/sound/qcom,wsa881x.yaml | 9 ++++++ drivers/soundwire/qcom.c | 31 +++++++++++++++---- include/linux/soundwire/sdw.h | 2 ++ sound/soc/codecs/wsa881x.c | 7 +++++ 4 files changed, 43 insertions(+), 6 deletions(-)