From nobody Mon Feb 9 11:21:33 2026 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="v8A7ENZL" 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-Google-Smtp-Source: AGHT+IGvZgNljdQJeXEnx1Bcsyc/p36FoHZO0vYXUyxE28XL740l3VgIeyf1ign+KzPUYPjVCMqyKg== 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 *k= control, unsigned int val, dmic; u16 mic_sel_reg; u16 dmic_clk_reg; - struct tx_macro *tx =3D snd_soc_component_get_drvdata(component); =20 val =3D ucontrol->value.enumerated.item[0]; if (val >=3D e->items) @@ -793,7 +793,7 @@ static int tx_macro_put_dec_enum(struct snd_kcontrol *k= control, dmic_clk_reg =3D 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); } } =20 @@ -882,7 +882,7 @@ static int tx_macro_enable_dec(struct snd_soc_dapm_widg= et *w, =20 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, --=20 2.34.1 From nobody Mon Feb 9 11:21:33 2026 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zdSjn+pz" 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-Google-Smtp-Source: AGHT+IHGdGRJSDguuQBM/q+45C0xJUE3HWzzBXrNL1nVnq4WR1VewqBP5WknN4Upn68unEhG+XLvNQ== 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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; --=20 2.34.1 From nobody Mon Feb 9 11:21:33 2026 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KMuyRO6G" 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-Google-Smtp-Source: AGHT+IFKIHngJwG+a8+K2tvxYalO1Inf+CHn/nPl1OzTiD97fi59n0bVlsRCJVniN7XOzim1bIBKfQ== 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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_c= omponent *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, 0= x00); - snd_soc_component_update_bits(comp, CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0xFF, 0= x00); + 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); =20 return 0; } --=20 2.34.1