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: 398603 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1149331jai; Fri, 12 Mar 2021 04:24:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyBfRRJvHNB4gyX3jMAabFuBys+w+CxLVobyoxUEuYG+OFjS6PORdOA1pdY1rlHMECIhkj X-Received: by 2002:a05:6402:35d3:: with SMTP id z19mr13773716edc.143.1615551841940; Fri, 12 Mar 2021 04:24:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615551841; cv=none; d=google.com; s=arc-20160816; b=GtZ4+TksLd0GVyzOUXe6VD9TuIyGx5oQfHEMPWwBA4P/DcZ1R9H052uEeJLvKaT/Ru 3vTApgLP3r+R+SYN10OYOjn2AkGxon/6gdgU8Yg2L8zet+FRK+rcCSRTHBsJgwpJVqwW ahQOfH711Win1bCj4oaxLMcGzMZvxKqejf4hS91uolw4WjxCisdPCBFFPuscpiZpOu0t Q/PtB3vgRw9xndUJ4Ow8IPW8IK1AwaKaG68X6qqspNUtkiU7PLoMdRfbyBiJQ3gIDgRM CdsIVnUX0hnfPyZxQN9HJw3I1waVxBpGpYPvu7ga+0EqNthFqBZCQdpmcKYTnKgu1Z4U oeug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gw1EmCEru4mg3+UNq5mxUL127uGPwQQa9UFbvGW5NTI=; b=bE5ZN9CUQrdPPnDfcX0kY/95QmyqjlcCa8eHlhjcrD526reGbYN42vkFwZG1G0Oq9G bl+lEK3ztgnrLhl9LT2y5BOXSkBHyL9DgISCoKS9ZIfmxrohU5CnO3UvJSyG9EetS4Sq i7wbtW145rfOeZonuRcsOl6hwy+7wvcfk+cn9CSLEdDgYp8yA5yMgyex/bKmlkRxYry4 lbBLjoQ7cWO9yqdKpjJvcYo6qZqx/PKtwFAwBdOXoZ7ldo88SCFemD8omP6WZhZdwZ7T 7OBkU//xDQn+YZ1KY8F3cv6IUjvSTAKcj7evDtfdADiFUwt50G6EDRAMxYap8aRYzZXC bJ/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cuOnInoC; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qu25si4092931ejb.665.2021.03.12.04.24.01; Fri, 12 Mar 2021 04:24:01 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cuOnInoC; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229748AbhCLMXZ (ORCPT + 6 others); Fri, 12 Mar 2021 07:23:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231181AbhCLMXA (ORCPT ); Fri, 12 Mar 2021 07:23:00 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F6DDC061761 for ; Fri, 12 Mar 2021 04:22:59 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id b2-20020a7bc2420000b029010be1081172so15070775wmj.1 for ; Fri, 12 Mar 2021 04:22:59 -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=EMMYSIXJC80JrzEwnNc85WTCa2tqbhkCUGW/M8AmTRPeRsNfDgoVaoIc5L6pB3zs7G k2FLK0uSH+bm76EYNUTs+UyHvnKT4Ggr4wMM/LPBoDQkJ3Qq9x0dcXNi5qDvUdSE0R5w KKHAZ7rSchQPT4Jbq3qHoZLKsDaqsX0//qkSqHL7mEge2RLkQSMajWc7/XYVeeQXkOCo 7IBza8SJnH010VcxNoTsbsUNohBR/C3J1udk4jFRsyWmJm/8EEaxuj4s4/Qrd0ON8n9/ lGzWOXJdGX5yshXLy+LhTz9qa6Xg4T+wfuxV5rQr9/rLbuJgN1jF+0TDy/pfaup9hFX+ rAXQ== X-Gm-Message-State: AOAM533C7mVTsOxxuo+wdEekplUpX2XM312pwtO+fkMTSR23tJeJAyD1 gbz0D+3bw0gEtw64S7rqSCuU3A== 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 Cc: robh@kernel.org, devicetree@vger.kernel.org, yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Srinivas Kandagatla 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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(-) -- 2.21.0