From patchwork Fri Jun 30 14:27:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13299720 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 96F6CEB64DC for ; Mon, 3 Jul 2023 08:34:10 +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 54DF3846; Mon, 3 Jul 2023 10:33:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 54DF3846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688373248; bh=NRFErKcwJ/XzcSK0nLh18CLPEbv6pza++M+LD175n/g=; 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=nvgrbMd+EUgFBY/ENLSVYctl0UvSUXmuUk/5fuBGHW5BzImN+pP0U6rSHlirjNlEx BSSZIQLHtLEqnAejj3aUSegZl//UjjGBOtXCaD3i7xRq+TC42Ktu6+7tVyOjvw5snq KTOhJuz8lSJpOWx+GPjpv4OctOiXrc7PRYuzL/WQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 29FAEF80557; Mon, 3 Jul 2023 10:32:27 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 449CBF80549; Mon, 3 Jul 2023 10:32:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 291E4F80535; Fri, 30 Jun 2023 16:27:28 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 AE24DF8027B for ; Fri, 30 Jun 2023 16:27:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AE24DF8027B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Rp+wfgt/ Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4617661761; Fri, 30 Jun 2023 14:27:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB990C433CC; Fri, 30 Jun 2023 14:27:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688135238; bh=NRFErKcwJ/XzcSK0nLh18CLPEbv6pza++M+LD175n/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rp+wfgt/fmfucldMXsQFVG5qrpdRwt2MhBa4hhvoo9tTSd9s8F6S09guVvviSPh/b bvOMCWwmWygIQDX8yK6ABQIriIUp8fSs+G96HhRVrxiNbzy/Jzjym4F4HEXRvJr38o gC1AOgAl0g1w86zqKQY7JJuc/k18l98/0N+CmP+cNX7oB5wTM7wwvtQEAtZD/9Ir5F mGDRP0qyjIWKfFkJ2vWj9TyXN7gTh5by1Z+O3tZKJQKV65lK9/L+Zc2tQgIUr1nrKA YXv08G+0rd0aWGx3sd2Nr0LQsBCE87E0E+qlvOnS2I9yA/SEKhID5PrCkmf02qkMXs Mrgz7snhumXqQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1qFF5p-0001O7-8o; Fri, 30 Jun 2023 16:27:25 +0200 From: Johan Hovold To: Mark Brown , Srinivas Kandagatla Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 1/5] ASoC: codecs: wcd938x: fix mbhc impedance loglevel Date: Fri, 30 Jun 2023 16:27:13 +0200 Message-Id: <20230630142717.5314-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230630142717.5314-1-johan+linaro@kernel.org> References: <20230630142717.5314-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-MailFrom: johan+linaro@kernel.org X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: ABST7UQIUJH6FIFAE5TKBXAOKWUBWEPF X-Message-ID-Hash: ABST7UQIUJH6FIFAE5TKBXAOKWUBWEPF X-Mailman-Approved-At: Mon, 03 Jul 2023 08:32:22 +0000 X-Mailman-Version: 3.3.8 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: Demote the MBHC impedance measurement printk, which is not an error message, from error to debug level. While at it, fix the capitalisation of "ohm" and add the missing space before the opening parenthesis. Fixes: bcee7ed09b8e ("ASoC: codecs: wcd938x: add Multi Button Headset Control support") Signed-off-by: Johan Hovold --- sound/soc/codecs/wcd938x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index e3ae4fb2c4db..b8a52a1a63d5 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -2165,8 +2165,8 @@ static inline void wcd938x_mbhc_get_result_params(struct wcd938x_priv *wcd938x, else if (x1 < minCode_param[noff]) *zdet = WCD938X_ZDET_FLOATING_IMPEDANCE; - pr_err("%s: d1=%d, c1=%d, x1=0x%x, z_val=%d(milliOhm)\n", - __func__, d1, c1, x1, *zdet); + pr_debug("%s: d1=%d, c1=%d, x1=0x%x, z_val=%d (milliohm)\n", + __func__, d1, c1, x1, *zdet); ramp_down: i = 0; while (x1) { From patchwork Fri Jun 30 14:27:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13299724 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 EEF8CC0015E for ; Mon, 3 Jul 2023 08:35:07 +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 3D890843; Mon, 3 Jul 2023 10:34:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3D890843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688373305; bh=PQzafQPINWzNCKfU5qAbB7q39zv1fe5dtlRulHQmlWU=; 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=EaxtjIwBnQzRYXAGE90rN+WWqTJXqJnhQvqathlgLdiT2rBgeWIUrrLfFAz9eye8Q Wx/Juv1UM1YH2BWWW5c9eh1sgxeyC2/Yakl/1XgEBrtZMLmvjAEPS8JtCcOi/hVmn1 de9xC1PPXXKZ7EskQTk5yTutQ09tbGH1VWChr0RY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id DDEC5F805B5; Mon, 3 Jul 2023 10:32:36 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 35584F805B3; Mon, 3 Jul 2023 10:32:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 81B7FF80431; Fri, 30 Jun 2023 16:27:32 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 AAE56F80246 for ; Fri, 30 Jun 2023 16:27:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AAE56F80246 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=EEH5d8nm Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 45E1961758; Fri, 30 Jun 2023 14:27:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB908C433CA; Fri, 30 Jun 2023 14:27:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688135238; bh=PQzafQPINWzNCKfU5qAbB7q39zv1fe5dtlRulHQmlWU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EEH5d8nmZCFHaRW8Qfwvrw5eNUf+1b2fNeJWl2yEjsEaYvYJH0AzcfYcAfP2rHAe7 sBLFMDTvsOaXYOYCudL0iFFfRwKwwgEXgrlXqC4nG23beyJK+aJUOXQInbZy20Tle5 3YUWnL39h1Q68uJzcvO+S1WxjG+0y392YKXRo15u8y2hZOIFBW06lIlUlIb2LG2IQ9 W66LzIPVxrsK2xDEh2qvjNdaP89h+TF+u9CzC9JRo7aRyQS0XBnFMVTYed/WyuGWvY z+I1c8vDDYWSksfECI0r9E/HS6Sk+9WKQ4ZbhU2M8AVAK243u3Gkw4DgxlGC3YjOaz uQ4eGCn4tJXjw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1qFF5p-0001OQ-BJ; Fri, 30 Jun 2023 16:27:25 +0200 From: Johan Hovold To: Mark Brown , Srinivas Kandagatla Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 2/5] ASoC: codecs: wcd938x: drop inline keywords Date: Fri, 30 Jun 2023 16:27:14 +0200 Message-Id: <20230630142717.5314-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230630142717.5314-1-johan+linaro@kernel.org> References: <20230630142717.5314-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-MailFrom: johan+linaro@kernel.org X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: UZF3MPPX3GIOVAWAD4CG3F5ICPAYGK7H X-Message-ID-Hash: UZF3MPPX3GIOVAWAD4CG3F5ICPAYGK7H X-Mailman-Approved-At: Mon, 03 Jul 2023 08:32:29 +0000 X-Mailman-Version: 3.3.8 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: The compiler is generally better at deciding what functions should be inlined than driver authors are. Drop the bogus inline keyword from two functions that were neither very small or used in a single place. Signed-off-by: Johan Hovold --- sound/soc/codecs/wcd938x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index b8a52a1a63d5..5ce15b622a91 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -2124,7 +2124,7 @@ static int wcd938x_mbhc_micb_ctrl_threshold_mic(struct snd_soc_component *compon return wcd938x_mbhc_micb_adjust_voltage(component, micb_mv, MIC_BIAS_2); } -static inline void wcd938x_mbhc_get_result_params(struct wcd938x_priv *wcd938x, +static void wcd938x_mbhc_get_result_params(struct wcd938x_priv *wcd938x, s16 *d1_a, u16 noff, int32_t *zdet) { @@ -2231,8 +2231,8 @@ static void wcd938x_mbhc_zdet_ramp(struct snd_soc_component *component, *zr = zdet; } -static inline void wcd938x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component, - int32_t *z_val, int flag_l_r) +static void wcd938x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component, + int32_t *z_val, int flag_l_r) { s16 q1; int q1_cal; From patchwork Fri Jun 30 14:27:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13299725 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 8F8B8EB64DC for ; Mon, 3 Jul 2023 08:35:10 +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 3A8ACA4E; Mon, 3 Jul 2023 10:34:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3A8ACA4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688373308; bh=P6YVdCFm2ZOkpCnCJ7xlyVk9dprYs6KAI7jlHUrVE5Y=; 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=JW2Rx2gpekzR/K3ksog3vwUqs9Y3a579Mo58q+nRqAw2d7uZRUW//W2k+hryjYN3z Ge9G7vjhbVZdonyBqlj7zgOK4zql+5OS7qnPTDfNoUd66vgbKZ1YegvssiKH481Lx+ 75tTXBGBzV1hf4FzazymNqx8mMxhXP8U6JNBXA4s= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 39C9AF805BE; Mon, 3 Jul 2023 10:32:38 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D1CB0F805BE; Mon, 3 Jul 2023 10:32:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 81241F80124; Fri, 30 Jun 2023 16:27:34 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 28157F8051E for ; Fri, 30 Jun 2023 16:27:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 28157F8051E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=D424TjQi Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D13346176C; Fri, 30 Jun 2023 14:27:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B36E4C433CD; Fri, 30 Jun 2023 14:27:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688135238; bh=P6YVdCFm2ZOkpCnCJ7xlyVk9dprYs6KAI7jlHUrVE5Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D424TjQiXcZcj4i/3v89N3a4BuqKXQtLcEZgEl+wCzeh7iNUv9wFPGkfd+0jwWfcF p4pMrS4+tXjRGn/TwKglozLY4ew3h/f+zgCLPdyKpxacvKwkQA1ab0X9/DTvw15rGy 2SzNG29ZYSKYlrOtNDqgn3Y0WMNdqhEPRR3xPTg4Y9ZUzgjl1j7bPYSboYsYysFPHY +rMGkUb3Kg96Cul1BwADFXFtywQbLLUwaJUL0T0bS+qPNzIgEJz0lDRm/Sd5uu1olg 04l1NbsWscLKr++r95aPcKmkuLf90puLbVydfB0tcAUzmSQeKxeFhputmq4UrPxsrk qBS6Ed5P+q0tA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1qFF5p-0001OS-Ds; Fri, 30 Jun 2023 16:27:25 +0200 From: Johan Hovold To: Mark Brown , Srinivas Kandagatla Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 3/5] ASoC: codecs: wcd938x: use dev_printk() for impedance logging Date: Fri, 30 Jun 2023 16:27:15 +0200 Message-Id: <20230630142717.5314-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230630142717.5314-1-johan+linaro@kernel.org> References: <20230630142717.5314-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-MailFrom: johan+linaro@kernel.org X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: D5CVOO3K67LRA6M74DTOAG2F7EHL3FLB X-Message-ID-Hash: D5CVOO3K67LRA6M74DTOAG2F7EHL3FLB X-Mailman-Approved-At: Mon, 03 Jul 2023 08:32:30 +0000 X-Mailman-Version: 3.3.8 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: Pass the component structure also to the wcd938x_mbhc_get_result_params() helper so that the component device can be used for logging consistently. Signed-off-by: Johan Hovold --- sound/soc/codecs/wcd938x.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index 5ce15b622a91..ddefe4af0b1e 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -2124,10 +2124,11 @@ static int wcd938x_mbhc_micb_ctrl_threshold_mic(struct snd_soc_component *compon return wcd938x_mbhc_micb_adjust_voltage(component, micb_mv, MIC_BIAS_2); } -static void wcd938x_mbhc_get_result_params(struct wcd938x_priv *wcd938x, +static void wcd938x_mbhc_get_result_params(struct snd_soc_component *component, s16 *d1_a, u16 noff, int32_t *zdet) { + struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); int i; int val, val1; s16 c1; @@ -2154,8 +2155,8 @@ static void wcd938x_mbhc_get_result_params(struct wcd938x_priv *wcd938x, usleep_range(5000, 5050); if (!c1 || !x1) { - pr_err("%s: Impedance detect ramp error, c1=%d, x1=0x%x\n", - __func__, c1, x1); + dev_err(component->dev, "Impedance detect ramp error, c1=%d, x1=0x%x\n", + c1, x1); goto ramp_down; } d1 = d1_a[c1]; @@ -2165,8 +2166,8 @@ static void wcd938x_mbhc_get_result_params(struct wcd938x_priv *wcd938x, else if (x1 < minCode_param[noff]) *zdet = WCD938X_ZDET_FLOATING_IMPEDANCE; - pr_debug("%s: d1=%d, c1=%d, x1=0x%x, z_val=%d (milliohm)\n", - __func__, d1, c1, x1, *zdet); + dev_dbg(component->dev, "%s: d1=%d, c1=%d, x1=0x%x, z_val=%d (milliohm)\n", + __func__, d1, c1, x1, *zdet); ramp_down: i = 0; while (x1) { @@ -2210,7 +2211,7 @@ static void wcd938x_mbhc_zdet_ramp(struct snd_soc_component *component, WCD938X_ANA_MBHC_ZDET, 0x80, 0x80); dev_dbg(component->dev, "%s: ramp for HPH_L, noff = %d\n", __func__, zdet_param->noff); - wcd938x_mbhc_get_result_params(wcd938x, d1_a, zdet_param->noff, &zdet); + wcd938x_mbhc_get_result_params(component, d1_a, zdet_param->noff, &zdet); regmap_update_bits(wcd938x->regmap, WCD938X_ANA_MBHC_ZDET, 0x80, 0x00); @@ -2224,7 +2225,7 @@ static void wcd938x_mbhc_zdet_ramp(struct snd_soc_component *component, WCD938X_ANA_MBHC_ZDET, 0x40, 0x40); dev_dbg(component->dev, "%s: ramp for HPH_R, noff = %d\n", __func__, zdet_param->noff); - wcd938x_mbhc_get_result_params(wcd938x, d1_a, zdet_param->noff, &zdet); + wcd938x_mbhc_get_result_params(component, d1_a, zdet_param->noff, &zdet); regmap_update_bits(wcd938x->regmap, WCD938X_ANA_MBHC_ZDET, 0x40, 0x00); From patchwork Fri Jun 30 14:27:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13299722 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 39E9EEB64DC for ; Mon, 3 Jul 2023 08:34:31 +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 0816486F; Mon, 3 Jul 2023 10:33:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0816486F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688373269; bh=d1TV3UMh6xoeemuKnST1bo2dXdckO3q+r8QUrL0X6V0=; 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=U8cEX4SKELTBwGg8pUiRt+1lwYrqng8arByupXnubrwxutlRwR51XRMTt/2FisoNU /f1Ag/lKdGfYZlBrbpiyYHjbxGD/4mlf/V1zsZVm6T/789toGJ7JdPfDCnmzkZbIQH h+HBaWW5iImUK3+0KzIFjohTY5mZTSj2+Cmlyh38= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7AE8BF8057A; Mon, 3 Jul 2023 10:32:31 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 24549F8057A; Mon, 3 Jul 2023 10:32:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4535AF8027B; Fri, 30 Jun 2023 16:27:30 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 D4947F80431 for ; Fri, 30 Jun 2023 16:27:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D4947F80431 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=jcldJ0KI Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4615E61717; Fri, 30 Jun 2023 14:27:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB857C433C8; Fri, 30 Jun 2023 14:27:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688135238; bh=d1TV3UMh6xoeemuKnST1bo2dXdckO3q+r8QUrL0X6V0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jcldJ0KIiGOHCLdh9VVbIIOMTDdsd6uLObALf9+N/4QXztMgUhpnzo07D6JSEprGM ysVwMdU2PImvgsB5pqYjIvXZMsmeeULwOILdMeIoJXSwnjfIErW6dM4eX1nbNAAJXY V9JcWcfAE4AfzWdwEc1M4M77rRKpZVqIQwUz3MiMlfa2v7hLL3SFBbvGoiSa+xN5H5 OfzWVaRpKNjExA124iP9Ph2a1ewcq91hqNWwCiKAMNmSwWeO7QJdoOU5wS78uBPvXy fzqKb+BQ2096laCMex5jcQuh3ulVn45f94C2JgpZgoQgM6iNWghg5jSYM2fyJqS3/W W3WQTNgRXUdWg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1qFF5p-0001OU-GP; Fri, 30 Jun 2023 16:27:25 +0200 From: Johan Hovold To: Mark Brown , Srinivas Kandagatla Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 4/5] ASoC: codecs: wcd934x: demote impedance printk Date: Fri, 30 Jun 2023 16:27:16 +0200 Message-Id: <20230630142717.5314-5-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230630142717.5314-1-johan+linaro@kernel.org> References: <20230630142717.5314-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-MailFrom: johan+linaro@kernel.org X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: NB57CH5SKOXF2JJFCPHTAHCZGEUGARZ3 X-Message-ID-Hash: NB57CH5SKOXF2JJFCPHTAHCZGEUGARZ3 X-Mailman-Approved-At: Mon, 03 Jul 2023 08:32:22 +0000 X-Mailman-Version: 3.3.8 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: Demote the MBHC impedance measurement printk, which is only needed for development and debugging, to debug level. While at it, fix the capitalisation of "ohm" and add the missing space before the opening parenthesis. Signed-off-by: Johan Hovold --- sound/soc/codecs/wcd934x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index c0d1fa36d841..9d724b5710f7 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -2683,7 +2683,7 @@ static inline void wcd934x_mbhc_get_result_params(struct wcd934x_codec *wcd934x, else if (x1 < minCode_param[noff]) *zdet = WCD934X_ZDET_FLOATING_IMPEDANCE; - dev_info(wcd934x->dev, "%s: d1=%d, c1=%d, x1=0x%x, z_val=%d(milliOhm)\n", + dev_dbg(wcd934x->dev, "%s: d1=%d, c1=%d, x1=0x%x, z_val=%di (milliohm)\n", __func__, d1, c1, x1, *zdet); ramp_down: i = 0; From patchwork Fri Jun 30 14:27:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13299723 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 C177DEB64DD for ; Mon, 3 Jul 2023 08:34:40 +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 AB71284A; Mon, 3 Jul 2023 10:33:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AB71284A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688373278; bh=lrVbd0JoMGVuCAGlTtBwHS0krlYpo5gW52m7Wo7fi6w=; 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=tH1IM+IB+pRnB5vYBzbLMEwXByPaE/3qjGmORUG+KtL/LzbpX/9TSSLj2yunbbmAi Gype3JjbFyPQiFtnnwoth3HO1bXNqqqyWFap0xjAHUVMW2koye3fLmYQF0r7uDzNRp GHvdTB90T0jULOB+PHnAsSf3McpEBD6ekojnDEj4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F2CC2F80587; Mon, 3 Jul 2023 10:32:33 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5452CF80587; Mon, 3 Jul 2023 10:32:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ACB4EF80212; Fri, 30 Jun 2023 16:27:31 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 A6E4CF80124 for ; Fri, 30 Jun 2023 16:27:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A6E4CF80124 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=eYqZFelz Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 45DA76171C; Fri, 30 Jun 2023 14:27:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB87AC433C9; Fri, 30 Jun 2023 14:27:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688135238; bh=lrVbd0JoMGVuCAGlTtBwHS0krlYpo5gW52m7Wo7fi6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eYqZFelz3wt7y/0/q3o7bAsYRDLYrKrsMemIk08HP9xdO/MwqGzw09bWbTrSyYu8c KNNrYRnbad1Z5fuRBL2+xKFmpTirqeRQeexighNf8Whe3vS0ogxc1O86yFCD1VWbbB Ft5KD1t8MCf3RnPvebkrKv3PXpfcc5ntWi158pa6b6T1CfuFviR4KsRLEWbCWPpwgg 8whZvA/RiPAuV1j9Vo+85OxGwWa1QrLo4K86BSDV1ZmFXEoQOYuzuoHH8vr46aA2aO Zt91COgZM3Fovf1l0SK8cZzoX/YsQQ6KQnEN2v230F4nPMlXMds6q3A0tdRc4Tkz9i Hwvsy/8BSTC5Q== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1qFF5p-0001OY-Iu; Fri, 30 Jun 2023 16:27:25 +0200 From: Johan Hovold To: Mark Brown , Srinivas Kandagatla Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 5/5] ASoC: codecs: wcd934x: drop inline keywords Date: Fri, 30 Jun 2023 16:27:17 +0200 Message-Id: <20230630142717.5314-6-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230630142717.5314-1-johan+linaro@kernel.org> References: <20230630142717.5314-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-MailFrom: johan+linaro@kernel.org X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: RHLAC2NGL75ASFTKOXUHFJ3SHNZKHKWR X-Message-ID-Hash: RHLAC2NGL75ASFTKOXUHFJ3SHNZKHKWR X-Mailman-Approved-At: Mon, 03 Jul 2023 08:32:24 +0000 X-Mailman-Version: 3.3.8 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: The compiler is generally better at deciding what functions should be inlined than driver authors are. Drop the bogus inline keyword from two functions that were neither very small or used in a single place. Signed-off-by: Johan Hovold --- sound/soc/codecs/wcd934x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index 9d724b5710f7..a17cd75b969b 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -2642,7 +2642,7 @@ static int wcd934x_mbhc_micb_ctrl_threshold_mic(struct snd_soc_component *compon return rc; } -static inline void wcd934x_mbhc_get_result_params(struct wcd934x_codec *wcd934x, +static void wcd934x_mbhc_get_result_params(struct wcd934x_codec *wcd934x, s16 *d1_a, u16 noff, int32_t *zdet) { @@ -2740,8 +2740,8 @@ static void wcd934x_mbhc_zdet_ramp(struct snd_soc_component *component, *zr = zdet; } -static inline void wcd934x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component, - int32_t *z_val, int flag_l_r) +static void wcd934x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component, + int32_t *z_val, int flag_l_r) { s16 q1; int q1_cal;