From patchwork Fri Feb 2 15:41:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 195917 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp524173dyc; Fri, 2 Feb 2024 08:02:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJeoEMzSocd/2EkMScX4lcHCEG3OmTQobooIaparbD77qgbd1xQVeyKLrbHV7qdHIIgE29 X-Received: by 2002:aa7:8c47:0:b0:6df:f59b:5331 with SMTP id e7-20020aa78c47000000b006dff59b5331mr2412942pfd.19.1706889733761; Fri, 02 Feb 2024 08:02:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706889733; cv=pass; d=google.com; s=arc-20160816; b=xRFUlVQkgSszxOZWa4MWz7Ef82gcP+8w/I0RSZ5iqX/I/oq2b0VaFuiDJz0nZLonLu sff1eol/NGF1DCKWTIN8ZvDZrig2WaYVupVB6WiPNQMZUXZFRfKECeNHEnBCjd0+7thA 2TEB2GSlPxVpsCfQYI+ypv4Qc1mw5dS7wxjcEVImiGKfGMTkpHdqiyot+afcacM9MCCB eftJmnZJ1l6WamzWiVvJ9oiNDnCB9Y+JX1B/X6T4FkXdMM/yle8LSNg0+sHrSFGUXG3G Z4rlDz03QnN/dPQ3Miy/rwKUhDXp+SARfMWuOjOpxIXN9y7vE5NlV2FmzrNifG8JGXu9 i9mA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Z4wtSxCTFL8J3xb+0hRT7NhxX/uKEWkZYK0/+CsMczk=; fh=sWVsr3qz+bi8U2lWia+0J6ne/L9ZKyxkyI1AXuDOePg=; b=WZ0pghpjf1VbqrdQ87+Nwgkj+CpP9h9QalMb8eflRBHTRRaJacZZ+5f8nZCUF7WtKu YsFgpFsiPtp83tdRVjqx4U+/C7IJa9NrsOtmkUG1R5iVbgNyquc2drfp86TE9MEr+Bb4 1mBKU7OvG5sDHVZH/2Dz5jpYLd3JehFTXkfBin8f5SvHP/EGRO9VCy63RxxxnpHfuJ9E TOONwzMZLK7jwKZccf2IBMLLai+/5FF15LEZnYfXqAgJHSetXnFj7JrbCMYfwDkTl73M IJFbcZ53zrzjRKMYHEwHmPVcLK5wAGz5r1lf6kfTIBOWfmHMbK2IxBtgTgjU/HmJBG1C pCzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v8A7ENZL; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-50037-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50037-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCVz8P5/fTk8LDmPq2W8kABeTyuXoFjF+xCX5bbHzsv/f/QqRSaxxvchMwM+kMOA8d5zPveeUvWOdVMEDElXexPWcs7d8g== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d5-20020a056a00198500b006dd881750d2si1738480pfl.46.2024.02.02.08.02.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 08:02:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50037-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v8A7ENZL; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-50037-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50037-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5E6BEB26F49 for ; Fri, 2 Feb 2024 15:42:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01EBC1474DE; Fri, 2 Feb 2024 15:41:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="v8A7ENZL" Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4928722085 for ; Fri, 2 Feb 2024 15:41:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706888502; cv=none; b=NjBfjvsD8A9Tfn7uWT6dPczhwGH2XkaFTq3KhQCO5NkQTh4KdPXkZYtsPi9onFIwDXOSsEHRte4Qk9wWmbGuG8YXVkwXJHKVKu4/w/W34YZEdYsBFgH0SZRpD7cMDn2li1/U/c9sZEDeIU4ITVKEW85boUA2E8BpCEBuDRFIB/M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706888502; c=relaxed/simple; bh=zlLIb0qKsjq730g/1cSkyRa9Pks3D7J4TqPjUvmN+gU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DDSUK/R+tOzwehanWTW1O+dBbbQlIKnvk8oxsTwa23YTR0sZZ19fApOzJ3BRFu4GIydVQUJtLpzg5CNFWIfzXo90Bi66NIBUYEe2zhGD04FYVeNUmzy58++DEaRxf/lgV/NStDu/qBRVb8FxRytKr7E7+yv69s3oWlVYb7XbYSQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=v8A7ENZL; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-51109060d6aso3233676e87.2 for ; Fri, 02 Feb 2024 07:41:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706888499; x=1707493299; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Z4wtSxCTFL8J3xb+0hRT7NhxX/uKEWkZYK0/+CsMczk=; b=v8A7ENZLFbbyjmEnTSOukTddPPYg8NoNSbYLJx1kdvS+K3pLCQ26G8OdrQ+crk07dP 5ngD/iM14IfNQmxvztMIRAA0NipO2wf8cyH8K1+KDSz6nH5oOTPI1zDTy0+C4CNXzu6W 637+1zIwBguPb3g+JgnFsVImlBa6bAXXvalD2qUSqWF469YDm6VsIN+78CPhfxtXshOR KKsdM+K8Rs9hozankpmzbykbnvau7jZITjMLOGTLVejCSLV6rSa3gcAq+dW+1y2X3pNS FSFUxTXqpOSO3vpuOwOkz1MfTCaD9coXNmFT34qRCQo1FQnP03PzxC+xLwaSiBBf62Ln QJNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706888499; x=1707493299; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z4wtSxCTFL8J3xb+0hRT7NhxX/uKEWkZYK0/+CsMczk=; b=Hhw3nWsm3LXcj1kpdQmziI16gLDpuv5PgjzoBuscEqcQYlYsIeI5YxGB0XVOJ/Xa0L fWJ/o3cs85tu+tA8/X2K3WacMtVhnH1OFkIGpJHPfma7lFuAGA2WU+eGXA4+FvaknlJ+ IKIXa1UyAerDOd6T8tKF4XoimsxeSL0jOV3R0O7mH96xhE/LOzPVyNoC5jr8S/Yq8EQE hzUzAlt9TtMwN7GCh29BE9kiUmCDNk9AOGlhWzINv3Rnk8MnfTK2ilDwYly5XRfHweBF m4n0bbkmV9vaXInos9+B3v11PtQ1xpufafop5QzwWh6+y61iBXYpacre3NgdJiPhxFBd QziQ== X-Gm-Message-State: AOJu0Yw1m36Ry/brb0RI4MKr/F49/dqWsN7MtSfdjMZQBIVugEyvuR9u jurosGvGnmhwGs7A8SrJnLSP5UubBwe8Y1p/UacjQr5Re9oBWhdrvD7LFMQjpQ0= X-Received: by 2002:ac2:5969:0:b0:50e:9f5f:a78e with SMTP id h9-20020ac25969000000b0050e9f5fa78emr4073298lfp.5.1706888499418; Fri, 02 Feb 2024 07:41:39 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVdCsvT7bvaPBStGioEEtBDj7FwEfmLDYxyWNjLHFW21Nw1QSXeO9h8VrqoxGPwvciCqCBqmjK6SMXjJBFfE4g9884EinjfNx8XYvNK5o9Pf8z9ZQDWvMtK6s1gwdWJE5Ic8BFpG+DO/QhK7JLRHQQ2M89fiOQuvAPrjHpsoFzRrQiqrTYNzCsTlONBkUT6DXmPqKh2DKqWh+b0AfiRyXbXlj690POw9IRh/iz2ybEDyYJqFUujU3j6DC/ETDPdjfqYFtsDvxIXt700oIq7MbrnDBCa+aaUwl1dQ/aqDvj2bVjAcVNd Received: from krzk-bin.. ([178.197.222.62]) by smtp.gmail.com with ESMTPSA id cu9-20020a170906ba8900b00a37116e2885sm624819ejd.84.2024.02.02.07.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 07:41:39 -0800 (PST) From: Krzysztof Kozlowski To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/3] ASoC: codecs: tx-macro: Drop unimplemented DMIC clock divider Date: Fri, 2 Feb 2024 16:41:32 +0100 Message-Id: <20240202154134.66967-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202154134.66967-1-krzysztof.kozlowski@linaro.org> References: <20240202154134.66967-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789803609417094733 X-GMAIL-MSGID: 1789803609417094733 Downstream driver configures DMIC clock rate through the divider register but only parts of this code ended up in the upstream driver: we always write the same value 0, so DIV2. Same default value is used also for the AMIC rate control. Let's make it obvious and drop unneeded parts of the code. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/lpass-tx-macro.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index 124c2e144f33..cdceccf64ac8 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -38,6 +38,8 @@ #define CDC_TX_TOP_CSR_I2S_RESET (0x00AC) #define CDC_TX_TOP_CSR_SWR_DMICn_CTL(n) (0x00C0 + n * 0x4) #define CDC_TX_TOP_CSR_SWR_DMIC0_CTL (0x00C0) +/* Default divider for AMIC and DMIC clock: DIV2 */ +#define CDC_TX_SWR_MIC_CLK_DEFAULT 0 #define CDC_TX_SWR_DMIC_CLK_SEL_MASK GENMASK(3, 1) #define CDC_TX_TOP_CSR_SWR_DMIC1_CTL (0x00C4) #define CDC_TX_TOP_CSR_SWR_DMIC2_CTL (0x00C8) @@ -270,7 +272,6 @@ struct tx_macro { struct clk_hw hw; bool dec_active[NUM_DECIMATORS]; int tx_mclk_users; - u16 dmic_clk_div; bool bcs_enable; int dec_mode[NUM_DECIMATORS]; struct lpass_macro *pds; @@ -743,7 +744,6 @@ static int tx_macro_put_dec_enum(struct snd_kcontrol *kcontrol, unsigned int val, dmic; u16 mic_sel_reg; u16 dmic_clk_reg; - struct tx_macro *tx = snd_soc_component_get_drvdata(component); val = ucontrol->value.enumerated.item[0]; if (val >= e->items) @@ -793,7 +793,7 @@ static int tx_macro_put_dec_enum(struct snd_kcontrol *kcontrol, dmic_clk_reg = CDC_TX_TOP_CSR_SWR_DMICn_CTL(dmic); snd_soc_component_write_field(component, dmic_clk_reg, CDC_TX_SWR_DMIC_CLK_SEL_MASK, - tx->dmic_clk_div); + CDC_TX_SWR_MIC_CLK_DEFAULT); } } @@ -882,7 +882,7 @@ static int tx_macro_enable_dec(struct snd_soc_dapm_widget *w, snd_soc_component_write_field(component, dmic_clk_reg, CDC_TX_SWR_DMIC_CLK_SEL_MASK, - tx->dmic_clk_div); + CDC_TX_SWR_MIC_CLK_DEFAULT); } } snd_soc_component_write_field(component, dec_cfg_reg, From patchwork Fri Feb 2 15:41:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 195904 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp512837dyc; Fri, 2 Feb 2024 07:42:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqUg/R7v3gFjAx1hesKPvkLIrC3vJ+tF4/BRtwfehxhdeFB1vIXDuSIQEs99oXk9qR983K X-Received: by 2002:aa7:d8d3:0:b0:55f:fb63:1c49 with SMTP id k19-20020aa7d8d3000000b0055ffb631c49mr65219eds.0.1706888548247; Fri, 02 Feb 2024 07:42:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706888548; cv=pass; d=google.com; s=arc-20160816; b=lS6ggmem7QpHgmtLZuMjMFG7872iMFXCAYYBSdT+pWQKBRkpfgHUZIEG6hN2Z9IpND jVbrqS7JpkbJ/WocHSDXANRKN/5Kr7Xy8t362X/jDnQpLQM1xycCpmphTGqOA9WIWKFs R+i9r3ZM5/Ys8PY5hJI5GwZwvZswsJZm4PVMyBUm/+ycp+XKClqPqt1kugLSt16uwKtK NvbR3hsAAiw1eXKWUHrLr5rwilXELRMPgRMhlHQksI+cWW6zzJ/waqUgvN3502LKa96c yjONhU+I19lMrmxDdmH3yPeLOHtOq6r1NhRSQBKNmnTkckaQLCzB8136houWdjibFARj KEPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=JTaE595ceD/5+24qRv22P7o3MSmNjYJJN4DZfYKGFdg=; fh=fhC/6QOLyfuUAd0G7WyF8itQf2wB56B3vspWwO8VMAQ=; b=axMc7LttrYcQz1x/rewrN/S1SepwxhVUwbiNy6c/CT1TkPd1FYhY1d9bljJ+0dDzVz hdtNzVeTQtzTQNd1SaMm8+n97Kommj7CR7a+vPqGZ4T2XP3M+mWyopIS/U4yu95WQoGj 6n/TJsmX6wtOK9mQ5OQdaQo/7Gyhw/zNy5KlZ4I1fSTzt03B8OLQJTkzbe8OASgRh/dN trY5BKk97vTgOHZotb4B4euc34cop7kdHMEwJ3J+nzRGjdo916ohCIc8Rj2K8EH78jVp lL6w6NdKXdoUoqgU+AJHzx7GsKbWcnO/iljgbaLdA0cJf98PsvMOv5oi6dls2EtI5Jd7 csfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zdSjn+pz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-50038-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50038-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCVLzhSXNOF4BVg0bm1hf6acYFgVxQsryy706VyWSmwxFCmmZgAXQoH/GPzqV/JpjxwysSg2tsf3M3sSN+sCpKmBZ7eENw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cy28-20020a0564021c9c00b0055cfd9b7636si895597edb.103.2024.02.02.07.42.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 07:42:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50038-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zdSjn+pz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-50038-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50038-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C9D7C1F28036 for ; Fri, 2 Feb 2024 15:42:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DC0A1482F0; Fri, 2 Feb 2024 15:41:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zdSjn+pz" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA635146913 for ; Fri, 2 Feb 2024 15:41:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706888504; cv=none; b=OMV3BN2sZXQVwFhPPHR9LM9ZP9l8eJKW2U8wTzy8+cayrj4sDbU4XkfV2Toe7ESl2CuDw+Y1/X5NUl2u6tDuuN7344DIadOBACadGCW9yziF/6T5MZW/DZkH0PY5ZKEfmXf/XEtZlO6CrXRGNH2Xfo+27CFapM7pyJmDT4OeHuw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706888504; c=relaxed/simple; bh=scWCCSNr1Q3lv9FkWzECrNcLle7Ox7YalRe8vTccd4A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DxvyxCrqcEZOlOQ6rBl76AxrsHTj725+u2mVNnSSp/KH2gvO2rJfOo3VGpxRc8RQokvMbG0laHjmgkLpOtX0hthhaPXSujB5DoxJrvpdFPB4Csjkd0PFSLMzraRzt7OZM2l4DGUyhwyi6xiqmikxn7Gk+AFoQPrqQ9j7vNOAHIk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=zdSjn+pz; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-5112d5ab492so2935102e87.0 for ; Fri, 02 Feb 2024 07:41:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706888501; x=1707493301; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JTaE595ceD/5+24qRv22P7o3MSmNjYJJN4DZfYKGFdg=; b=zdSjn+pzgqCXHaQj2HLnL2H+BliDJ3UvQ6QpRa8YnAzD5Ol+jhop8XZrBify/XfeSC b231xBp3i8a3WZo7uuERJtHDatYFylDKNMYiauAISg9SjGV+UL7HE24Da/nJKHqVPqBH y9cowYtIGBL2hJs+DYIJ3emiHqRVB+Uk/9rtTbnziYXKQMh6uQ7O2nafytV/bX6JKKH3 DX9s2Sz92K3ZaDTZmmOHAVSGANplR+ZzpscB0SG28fz+7wT/2osn40lIV9IZzsQ0JQEO EnO+3E5pzt/1TtYhFGPXy+IHgPd1Z6DdLEwhoFWVzj/RevwB48xox39sObAuS48kcDT7 1oXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706888501; x=1707493301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JTaE595ceD/5+24qRv22P7o3MSmNjYJJN4DZfYKGFdg=; b=HxwUyPrW2O6y4d5bNnpEe6lEMQf831tVaDw4ix+4bKkn67C6y4wZtaEjWu5j0qQhVk fyKDInlWXxpPpDFn2LLZiT/RnO5ra6QA8zgD4N2Byd5UKa2wkYMjzeamfVLOaCsudq6e +7cAPar2NiGbrja13jZ1/hzXtqn8BdNxr/UZ4CN1c7EzDLMK0DKtHb8pPmpX0yGTkfFB RegDSvkNZ+ToNV5XTgA4tcz1B98LdzOFxTaIIPyDwUR601oCuSdlsYqIB7k8hOzPQJtD EQp1X360hSiTgLo9jZUKiJCkZj/rLExjq2QoYZWuiSbcmfmGlXY51Z9BTYmBD5k+lyir ttvw== X-Gm-Message-State: AOJu0YwItElhrqveWKE+EAmWQ/EqTOdQcQwdlwwycWpnIzoEtyyYnAQp EdwVBlxL7XhoVxyTYKfu2+K/8ki2aYYVRyUijxi3LDXwEkebl1Va8drEuqId/mk= X-Received: by 2002:a05:6512:707:b0:511:3622:508e with SMTP id b7-20020a056512070700b005113622508emr1363443lfs.62.1706888500980; Fri, 02 Feb 2024 07:41:40 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVkuv4Il9EedgVLpQq/ZhdclgzdmtTwnPPSDBsrgSnZo+gjyW9AHgkjtA+/h21aEJrXSM0g1Sj80CLaSu1E5KvA4lvxLsn460edSq0v+V53kBD0D+qR7Aup78/Hhj+2CZqq04PyCdookc7Mqu53p6Ef0iliIChxx/NYodMp70e3QHW5z1l8YYdk4MXG24+VwQYHaTIXy4N4QFMbI0A70BnG2aDH07mIL9KD0FGVXoKP4oyTC690lDHVbZXfeGriepHqBiaYDn43d1ynKeutgJROqaBopUTFKb6d+jurU5MSKqJvhnAF Received: from krzk-bin.. ([178.197.222.62]) by smtp.gmail.com with ESMTPSA id cu9-20020a170906ba8900b00a37116e2885sm624819ejd.84.2024.02.02.07.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 07:41:40 -0800 (PST) From: Krzysztof Kozlowski To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/3] ASoC: codecs: tx-macro: Mark AMIC control registers as volatile Date: Fri, 2 Feb 2024 16:41:33 +0100 Message-Id: <20240202154134.66967-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202154134.66967-1-krzysztof.kozlowski@linaro.org> References: <20240202154134.66967-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789802366084810139 X-GMAIL-MSGID: 1789802366084810139 Just like DMIC, the AMIC control registers are volatile. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/lpass-tx-macro.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index cdceccf64ac8..2d4f6c04332b 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -432,6 +432,8 @@ static bool tx_is_volatile_register(struct device *dev, unsigned int reg) case CDC_TX_TOP_CSR_SWR_DMIC1_CTL: case CDC_TX_TOP_CSR_SWR_DMIC2_CTL: case CDC_TX_TOP_CSR_SWR_DMIC3_CTL: + case CDC_TX_TOP_CSR_SWR_AMIC0_CTL: + case CDC_TX_TOP_CSR_SWR_AMIC1_CTL: return true; } return false; From patchwork Fri Feb 2 15:41:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 195906 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp513074dyc; Fri, 2 Feb 2024 07:42:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjOLq9jFu+8yzkUuSnS9F97XfQEuK2jQdzf+j0uEnjmPXGgNgHqJoRHzeAlDT8OTFahYEo X-Received: by 2002:a17:903:1103:b0:1d9:53ca:e651 with SMTP id n3-20020a170903110300b001d953cae651mr2936837plh.33.1706888577076; Fri, 02 Feb 2024 07:42:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706888577; cv=pass; d=google.com; s=arc-20160816; b=yzBlMGYavb+ze+DNQ8Ufy1JfH7Q8X6M7oF/JKUSiQEjjiRya/oE2Q8EWekCQTI7Ees OzORV2oC2Ix8vjnm76CN+KJcOH54eYV9dkWiLzF0H3HlUPanyw/pTG/9+EQ1rskfEILB uyddPNCvcwwTx9MejNE35/mMysjoarDQNXDdj0BzGGnnBp6dFbs9foiQfJtGvv7auXb2 9VwQz492ycpOwsEoAOfSEgmC+yOHhJ8d0oY/vUh8TQvVAgz0MeyJmAu2V2V9R0Pkr7d9 MfEeblzDJq3DRkz4PuSMO7G9Pb8ciBixf1UyHxCmgtNnsOW4waKnZxQja/nO6c+HU5Sx W4Bw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LF4BB/ebiJDn9LW6b9s3SFnH7jRadY8xXWrehEGe0f4=; fh=fYL2V9tQytxXbK7Ev9F1Smyk0iusuWHwo0PKl0WXpHE=; b=cPyhXa49ParChyUEZwXJ9LBJcrBevui1i7CGGY0KqHw4YmfLPGnDSIMSlF4V0cuwkU T89/2GXCdckBkrkWrDpR55Z4jeexyNXUHV7BqC24waRL3UIEPk6tEzENb0WdgZivv5E5 a3DLKNCPlSwjmm7XEbA13aC3Nrzn0pAqDZEuC2F/hHt1NMGVbsuho473hT14kdWFZ3au 9qzcuscSzlDXqHsgMLBFBQuqNzBCJ+Lh0dP5Y+gYnqOnJ2/dSXgKzbTYdAJthUcfrRUZ mm1G2NZDUnD80tsMqKo7L2FJBKOlFtdIrL3js9vwaVk9746a5s2RX7kp5VNF8LqiH7bI aOXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KMuyRO6G; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-50039-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50039-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCUBd9+I8u+3g9tGM4J50EgVATqPdKM6N8DpgUEUDmej9dQiU023N/YQKD6+/Rt2sbcAH2EkRiv/Xc1eVWtqPiy4SG4ztA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j10-20020a170902da8a00b001d5486c27a6si1898483plx.422.2024.02.02.07.42.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 07:42:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50039-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KMuyRO6G; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-50039-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50039-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A840528C46F for ; Fri, 2 Feb 2024 15:42:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D66FF1482F4; Fri, 2 Feb 2024 15:41:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KMuyRO6G" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 859ED1474C3 for ; Fri, 2 Feb 2024 15:41:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706888506; cv=none; b=fwhUi5vZ66VHIdrt6xngKzfPVT51KA0nnBRS2aJgqBkVQIKzh9+MvkwDZarFCreR2upzZprGdKvYve0BaKjmtE/r0fyhI1/ldEqtEHBLSxNJQj6GHAjPfRpXpm63LexD9K2K01xPkuNvkZSAyzecuGv/zlhjGHpNBKPyA5NZRjE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706888506; c=relaxed/simple; bh=4X1TPMFs6uYp8v8YB3aNn81TS+wxeI5hvW9G+HbDZuM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LCC6Rz482jex91lQt/olc71l36JjgduZGiliZXX+gEDO0+XM05vl+2wC4n1Psok0fRSO5iiT2La/pPNSg0tmgvYMShgWTkLH5BxjFxk2asaxEaBUa8vm9y0o480hfYPII7LoDUgVwtSy5ORA2WP82K4x9iADicpdB7VG+w0585c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=KMuyRO6G; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a2f79e79f0cso312167766b.2 for ; Fri, 02 Feb 2024 07:41:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706888502; x=1707493302; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LF4BB/ebiJDn9LW6b9s3SFnH7jRadY8xXWrehEGe0f4=; b=KMuyRO6G9sk3VlTa3TOnIRMnk1WcA+K6sW52A9jVOGYletXqkfZD62lF3EtF0NtdBk rOjJpn+FR0qXu7ovMxS4OgKV649xwsr2/wdNxadoqCv7DNP92erogV32Rq91qFL1iUwy Wv2aey2mGZ4pmG/6cqjvOaIRwsbRrLTxVznXX9liONtNspvAb1rZE+4xSMRVeJy6fKlb e2A7OJ5G3Kkb9yU1e1fuUWV/EcLI9TnsMn2khuE3LDUKSqw1IoOkchPFri//Cud1I/qI bwiyjlcWwVy+5xuWp4NdzbJecOcYvx9OjELbZELRKGUFuSUWyS3sX/ZO+z+s3+FGWvPo yKLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706888502; x=1707493302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LF4BB/ebiJDn9LW6b9s3SFnH7jRadY8xXWrehEGe0f4=; b=dytyYDc3Qq3m+8J+WvITg3q4lkr3ctvih7L8Bp7LW/6+Kj3MaUjCGzWFoMzhmFuWsR /1kEVhkg2+6Gtr+nww7LCF16s6SBRtkx+f4O2HS/qGiZh/tLyAbbBjYqe7DEc/T1xMbe xvAqKCRy74kNBisp1DjD+BmW24BE4HE92i7wSgK9K/eis11Inkc8MxIQ/i/tooIMEZ8O J7wGHIylbx2VvlC0S4tL6XGMHB8iua7G7L1eTx3QsTwYt60P97nKyxc9KRPf53H33+69 4nnDxD0VByLjzXmfMcT5VuIZWqq26aJKPyQN102NoJQxDPJAF8wgzn9WGozPgB1Ndcz+ DDsA== X-Gm-Message-State: AOJu0YyY+N34inCVMTq39D898G9EAPyVeIw7daW9zFasTu5M6CIT+CVc +TIczP4+ym2kh5nEE8XfSPxo7slUccAqlnPlGdgdQx4BGnab8tv1VLp9Efy7Rxs= X-Received: by 2002:a17:906:7185:b0:a36:7bee:5d9b with SMTP id h5-20020a170906718500b00a367bee5d9bmr6375843ejk.76.1706888502620; Fri, 02 Feb 2024 07:41:42 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU22WkjqI/e18Wrj93BXTP/RqCvlOF91i6IDCtxrNbtFQ/ntRsDiAvZ/K18jVxcFpHI1pk0CVuDZ54O36EsmAAGwbTefUaNkK5O5fahsHH9A0Rt65bXEZEhqDana+8PI4mHJHVp/Pc2Oc5jMX/LYGhy0F+cpQhlaNSONnnRl4WSxSpVs03IkzZSEsiLVfGzu9ewDpcnCxcwrrRdpm9dnzHkgBzMGS0lQSZfKnsbU0Hve6UYEfhezQ03++TFMGKRJWzds+4e7EGMcMxvcOkaQT5d+GpVsZPpGmOCCywOk0ImT7iWCB9s Received: from krzk-bin.. ([178.197.222.62]) by smtp.gmail.com with ESMTPSA id cu9-20020a170906ba8900b00a37116e2885sm624819ejd.84.2024.02.02.07.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 07:41:42 -0800 (PST) From: Krzysztof Kozlowski To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 3/3] ASoC: codecs: tx-macro: Simplify setting AMIC control Date: Fri, 2 Feb 2024 16:41:34 +0100 Message-Id: <20240202154134.66967-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202154134.66967-1-krzysztof.kozlowski@linaro.org> References: <20240202154134.66967-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789802396860437288 X-GMAIL-MSGID: 1789802396860437288 When updating all bits in AMIC control registers (mask 0xff), use more obvious snd_soc_component_write(). Replace also hard-coded value 0x00 with a define. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/lpass-tx-macro.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index 2d4f6c04332b..7e51212d4503 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -1850,8 +1850,10 @@ static int tx_macro_component_probe(struct snd_soc_component *comp) snd_soc_component_update_bits(comp, CDC_TX0_TX_PATH_SEC7, 0x3F, 0x0A); /* Enable swr mic0 and mic1 clock */ - snd_soc_component_update_bits(comp, CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0xFF, 0x00); - snd_soc_component_update_bits(comp, CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0xFF, 0x00); + snd_soc_component_write(comp, CDC_TX_TOP_CSR_SWR_AMIC0_CTL, + CDC_TX_SWR_MIC_CLK_DEFAULT); + snd_soc_component_write(comp, CDC_TX_TOP_CSR_SWR_AMIC1_CTL, + CDC_TX_SWR_MIC_CLK_DEFAULT); return 0; }