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: 769241 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 28812C4828F for ; Fri, 2 Feb 2024 15:42:29 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C4261852; Fri, 2 Feb 2024 16:42:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C4261852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1706888547; bh=zlLIb0qKsjq730g/1cSkyRa9Pks3D7J4TqPjUvmN+gU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=VmkFmSdceFCd/91Sl+2h+1jy7pvYnuoBc2DvfAxcMja4o5LxvbmGtSJIswj6F4vh+ cL8BpTdyfC9GPhklQ1Z3zRKV0VSH/OyQCv6F5n3ZrPSBQmaLIBWtUmy5ApJJTrEfEy LpPIbt4msUFiV0QQCimGiuUo55L0RZbd5ORX5MZw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 708FAF8057D; Fri, 2 Feb 2024 16:41:55 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9F9D6F805A1; Fri, 2 Feb 2024 16:41:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 84B10F80567; Fri, 2 Feb 2024 16:41:48 +0100 (CET) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BC30AF8055B for ; Fri, 2 Feb 2024 16:41:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BC30AF8055B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=O6SrXSt9 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-5113303e664so1691714e87.0 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=alsa-project.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=O6SrXSt95MOgqppRHZXRpjhE3JsbZXPJ8/vTnyEP/FSDssFZRB7nmel2fy/E+fk/tu MkgngNjbfwyjAApJ5m72XeuHJ9JJjXPjIs/xlOcF1iUEaPPepK5b5NZQvsZQnD0YdvkL Vl2zba54zELo/nXjifPdUZ7Mc1xa11L8YbUmApAuKKA30BSk1u0JwngLYph6pU2NDCj9 l/flAQwS4Uvi7DaiKcsY4Dt5fYcn/PZuUsmcOBBhshszuI0u5OwGIDIc6WjN7Pn/xKQF WtwxsBFnIlZT+x8xTT9M/hghj6/fh8Y4orfSjgEffSdsUtD5yV1cn3fIvVqM3s2lAG/k 4hkA== 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=RLAEP4/jdCMOuFoVpt6XIKYg0ll4B0iOK8IzMo8zRN01Lg+pIC3qJBg1R70pQfR9Qe /+6iyQk5eSnx1x8bf0q9tYtMUwX82pQ8IdY9BGxA5PjQYR5qFZe0D2Pd1vQjTEOZMxtZ sRRivudEREplD7W+VtiYOhc9BHm63RtNWbcjpimNaAKvDTFYygM6q+i4/iswLH7JNai7 iS1FzghMpszx4Lb0F/saUY+M+0d4LN7xFDlS8j70WP626WLniZRB2OpNDNaDPv0lTfp0 DYVjle3oOe7ceJ/8WwfSFte8aXnsArHCQHNNllXT93BYZCgQqB/+bxa4+zVUtgEO9DAY V9Jw== X-Gm-Message-State: AOJu0Yx65gzYnsmOtriuE0W8qdByPvMBR7/SfNJewEyNanEbBuOu/aLm JP9s9kT3830AqOp5xKwP/nv5Utf2BS1CrcAoidYz9Ul8M2T94nydbXaGOakkyfg= 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> MIME-Version: 1.0 Message-ID-Hash: 6XW7ZEH6MO7PVG5H2OKSCO6KMYL5HHLB X-Message-ID-Hash: 6XW7ZEH6MO7PVG5H2OKSCO6KMYL5HHLB X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: 769914 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 1154FC4828F for ; Fri, 2 Feb 2024 15:43:15 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5FD7884D; Fri, 2 Feb 2024 16:43:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5FD7884D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1706888594; bh=scWCCSNr1Q3lv9FkWzECrNcLle7Ox7YalRe8vTccd4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=NJFJRGWFqqStzLIHCpG8umPS6MTnOaAnpHigLmTr2nq3d++zC7KfsYN24iw51Qg3W GeXIBtzKYphbk/1G5GXHhBnKWi7srEaDYeB+7VLERucwoFvUg8bMpNBibNM7uItqqg gqITBw2LMwPcGWcICfQgGCDh0viC0aXzg7yghl1Q= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 54430F80609; Fri, 2 Feb 2024 16:42:02 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E2A68F80600; Fri, 2 Feb 2024 16:42:01 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C2D8DF80588; Fri, 2 Feb 2024 16:41:55 +0100 (CET) Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 30F49F80149 for ; Fri, 2 Feb 2024 16:41:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 30F49F80149 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=oSQdEed8 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-5112d5ab492so2935101e87.0 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=1706888501; x=1707493301; darn=alsa-project.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=oSQdEed8fdIFQG2Ken6KVwJ2YtFc526GQfmL0oFRAcNqEoE0OX6uPSAgou4AYDDRwA vsZiK5uINY77AvWh6uZlmCc5VLmMcAYkuGEeQr7H5ZVrkmOlBitmiCEB7KJk51ywZQTc ERnk4GJppQzpNcLiwxjftEegiyZkgOkW8OZjYSRtBH5wHirrTrJ3z3sK5o7OZkXMJiP5 oaqd7sLBn5SdcKESDIO4UVAsC4dM6xL5fbkOevefO0j75x9PE0eq2J0Ag4tSIyCSMR2b a7aaESvTed67p3ouATuoK4uhnKzcZV27jrxjgMRWEpHWdQ7uTCIrI5Nj3GehNTJbVO0i L2UA== 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=FflcrPGvnXLRkEkUa0b16+6UJm6WeITadzSKqGVhTY8BgyIrgV4/uO3giKpOvNRm4X JggljWmnBKIPwpKvq7ny8EU07NLzCHgeIfHhleGA2zRBlMKzyG7Fq9f6I3HVeIv7NtZL aSa5A8uJRMt7VXLzmizW7dLUYBRUMmFVfwchncO6ejsk4mlsE/rjKQINCCEblZxdrjDY xv5Sb6W9EobjyIolljisN1RrpkQvSgDVBcxCmFXnZeeCwUXv+5/RVB823XgU6rkw20Xc 9GsB3rj2zjWDM/OyEp47CraVaikgBSpWh9JkD2Yav+zkfltTMVFTYPFim49+G4ndatL3 iu8g== X-Gm-Message-State: AOJu0YzkJjECj2fEByMgy6FZCpf8ToKD+Gp2nJKAstlS1cO13bCJrzlw StJyx3ec4UbslS/5j6f0f2Ij5y8AwWs2RLj60yC9SEa/Vd8CGpq6WIW2kGDNEoo= 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> MIME-Version: 1.0 Message-ID-Hash: HMTGL3LPV6GONHBXM4ESJQRXBXOAAPUA X-Message-ID-Hash: HMTGL3LPV6GONHBXM4ESJQRXBXOAAPUA X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: 769240 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 909E7C4828F for ; Fri, 2 Feb 2024 15:43:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B57D4850; Fri, 2 Feb 2024 16:42:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B57D4850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1706888579; bh=4X1TPMFs6uYp8v8YB3aNn81TS+wxeI5hvW9G+HbDZuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=eYZ9kuVroipFdxLLodkhn5DzvGGB5rblvI68UKSvSPZFYWfsYYU47rlJoAfIPo8W9 4TieXJLk/qqpXSiu9782JCg8NKzJPTbPT9vKteTYywLgnbydK1ZETm8IFrgOf0uE0b dSY+pG49PujUOl8nly6BU2kpShfI4vuVL+WdZ260= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B536CF805F3; Fri, 2 Feb 2024 16:41:59 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0E3F5F805EA; Fri, 2 Feb 2024 16:41:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A3448F80563; Fri, 2 Feb 2024 16:41:52 +0100 (CET) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 91A08F8055C for ; Fri, 2 Feb 2024 16:41:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 91A08F8055C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=CLLXCE0V Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-55783b7b47aso3141749a12.0 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=alsa-project.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=CLLXCE0Vkfj7zQbFscFiLkrWQmClpY3Jv1cd3ZnXWvSaaI/xiy7Rqgmgz1lmNuLo6a eNFWVgu4rfqgw4cSNWiCxtLvv1HNkHHuulXpLnJss+sBcKyn19m7vuWIEvupIGL9NEN7 AVOkpVr2IaiGHHbVi5ZGxTSnN/kDmK1KOn06vYzDYHcRS91ttbH/yGPMqalFQF5qySYl kXmljnhXJCrPD994rFiXqP6jeNi2a3C+AM9QAnSDo/xtpOSj0ISmAZ3mUmYXW3ZL7x5K oyao/XRVTAIPdKZWY1N6Fj1Zo+UpHqquXqlq0d5jNxlnqfCxl8Cc9YhYgNipHLCD/4FB Yp0g== 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=GftTgi4l048dHcXjZ/w+VzLLbnzSkcnAk8+ueADODottYcDbzohUnqw1O1Go3vJ+o2 W16oaUc3V0TKChKGFTQc84aKZYgaF29e2vQcLH2Bz040XyfMi0WxH5lJfHNx5GI35VUq W7uFFP9gLTQ6bdBxh/D3JYhay9wE+eyzgVMazRbR2s94zfdl7wpWKgdKM89v2InoiVKI Hhpg6incSpXTiSWl3Iu7PS2j50GWSOQuleqou3VZqU+ak1mCt9RjVfQK8sRR41VY4EpN nUy8And2hc8l8EuP/R1U368VMJrd1AAU5EubG6VkwW0sPBH4yvmn7xcqVzGnQaC/yeFW wbAg== X-Gm-Message-State: AOJu0YztGsKGM5yyQnMiXUA67WfXYt2Q999iGt4ECAnghVS6+K1w8Plq dQExVFY8wLOnH5qfRmMvHGEHfRcwcFKMLHI54gwJOmmS01MbRZGc268k7IzrPyE= 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> MIME-Version: 1.0 Message-ID-Hash: COC5MCYVR33TUMQJ75GHWWZHDCWJUNND X-Message-ID-Hash: COC5MCYVR33TUMQJ75GHWWZHDCWJUNND X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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; }