From patchwork Mon Mar 13 21:29:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13173357 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C5466C6FD19 for ; Mon, 13 Mar 2023 21:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ql/l8LHqnhLeCWTiYRgnwtY5NPVJFNMtsnE5CwAJvkA=; b=rbENXg27h1E3Kwgdpn1vISeVZa +TQWr73uyELGO5FjmXaZNU+HMBKpPMJ4uNo8NWGP9trvaxshnBYZSSwx/IcoOPAcmsN3W43EYIwb3 4uqlBPq3NqBMcnvCiavUv9GSyszdaMLvWpEioAT+1S3FUhtpuzh/hpJePRPE/B6xWHdMddEtR/5iC 3q8xob5+MALeEeOWTAJ2fpwTfXMstgSVk7Zz34dK9lTWx7g2STsggmE3fCYETZ04Vhq7J2T2F/IW8 NFrhfKCu9f+uHzbId2cC33MTzsSbfS8HFclEjwqCSq3E/T3NQKhJLVGYYAVT/yMQ44v1zUHcsvRNz +PzqBcOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbpjw-007vLk-8t; Mon, 13 Mar 2023 21:29:56 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbpjb-007vDu-CR; Mon, 13 Mar 2023 21:29:37 +0000 Received: from notapiano.myfiosgateway.com (zone.collabora.co.uk [167.235.23.81]) (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) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id ACC116603093; Mon, 13 Mar 2023 21:29:25 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678742968; bh=dUxa3OCQgUXblMw21199yTPLdr60La5FQyGmHy5l/KA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eCwra3Szp3JYaASFVbgHL9W502iflnuU4Oalhlg2HIkPFSG+b8dkfjvKFTKh+o6Ck 6V4jpS0GVDz7O75CKS5tp3AKsgebirZpXRXs+kkZ7mUdlfkzFtGBSHOq1lpdsdKg/A +DuIGKMSbOqsRrmnj0b0MqpyuteDt8gHdRJhzFuPESXnpW8S4t7ris7n2F/QgHhXI/ eKrdGMWlC2aTCNtfx+OSnV6HyluBkEZEhEWY1OG9MLyaCdh3yuhuhAbK8xTI7NRWZY jH7IU5S3qaIXROCy8HudJskfw0hku2E7701cR+lrG3pRd0AcNfnQaH8ejL6WS6EHqD qgopxwB+gckwA== From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Mark Brown Cc: AngeloGioacchino Del Regno , kernel@collabora.com, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Akihiko Odaki , Jaroslav Kysela , Jiaxin Yu , Liam Girdwood , Matthias Brugger , Takashi Iwai , Tzung-Bi Shih , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 1/2] ASoC: mt8192: Remove function name log messages Date: Mon, 13 Mar 2023 17:29:06 -0400 Message-Id: <20230313212908.2282961-2-nfraprado@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313212908.2282961-1-nfraprado@collabora.com> References: <20230313212908.2282961-1-nfraprado@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_142935_577670_5D44C939 X-CRM114-Status: GOOD ( 12.76 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org There are some log messages in the mt8192 sound code that print the function name, presumably to aid in tracing. However this can also be achieved by ftrace and without spamming the console, so remove these messages. Signed-off-by: NĂ­colas F. R. A. Prado --- sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 4 ---- sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 4 ---- sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 2 -- sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 2 -- 4 files changed, 12 deletions(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c index bba5f3056e8f..416aff726253 100644 --- a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c +++ b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c @@ -206,8 +206,6 @@ int mt8192_afe_enable_clock(struct mtk_base_afe *afe) struct mt8192_afe_private *afe_priv = afe->platform_priv; int ret; - dev_info(afe->dev, "%s()\n", __func__); - ret = clk_prepare_enable(afe_priv->clk[CLK_INFRA_SYS_AUDIO]); if (ret) { dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", @@ -276,8 +274,6 @@ void mt8192_afe_disable_clock(struct mtk_base_afe *afe) { struct mt8192_afe_private *afe_priv = afe->platform_priv; - dev_info(afe->dev, "%s()\n", __func__); - clk_disable_unprepare(afe_priv->clk[CLK_AFE]); mt8192_set_audio_int_bus_parent(afe, CLK_CLK26M); clk_disable_unprepare(afe_priv->clk[CLK_MUX_AUDIOINTBUS]); diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c index e1e4ca931551..a420b78dde89 100644 --- a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c +++ b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c @@ -2055,8 +2055,6 @@ static int mt8192_afe_runtime_suspend(struct device *dev) unsigned int value; int ret; - dev_info(afe->dev, "%s()\n", __func__); - if (!afe->regmap || afe_priv->pm_runtime_bypass_reg_ctl) goto skip_regmap; @@ -2097,8 +2095,6 @@ static int mt8192_afe_runtime_resume(struct device *dev) struct mt8192_afe_private *afe_priv = afe->platform_priv; int ret; - dev_info(afe->dev, "%s()\n", __func__); - ret = mt8192_afe_enable_clock(afe); if (ret) return ret; diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c b/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c index f3bebed2428a..bcd2150c2816 100644 --- a/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c +++ b/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c @@ -754,8 +754,6 @@ int mt8192_dai_tdm_register(struct mtk_base_afe *afe) struct mtk_afe_tdm_priv *tdm_priv; struct mtk_base_afe_dai *dai; - dev_info(afe->dev, "%s()\n", __func__); - dai = devm_kzalloc(afe->dev, sizeof(*dai), GFP_KERNEL); if (!dai) return -ENOMEM; diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index 16660eda577e..87737d054682 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -161,8 +161,6 @@ static int mt8192_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd) int counter; int mtkaif_calib_ok; - dev_info(afe->dev, "%s(), start\n", __func__); - pm_runtime_get_sync(afe->dev); mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA, 1); mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA, 0); From patchwork Mon Mar 13 21:29:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13173358 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D04B4C6FD1C for ; Mon, 13 Mar 2023 21:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QZMcQh4LM/3Zg8d0wkQ7qx7Cng8LcUP3yn8unE5ajdY=; b=vHcFALwXJU8vYeAS57AXZ10+GB h1kP+6Zh+TlWRgiOORqUk+vE2kcm1P6UPKvrvY3kZBmJPtldX7rqNQ8AB29da7phacxgM2iC5Lnm4 dJ5eeMZga9AkrGd9NafUKVrl4GCQV2+YoomQJaQJcFqaSJ3DmjCRpyvi0lQwuKVCLnCE0gBCs/kQa /seEiT+0MgVUOZePMq4II9jhxU3qGr2Qcd7lJWI9FFAco7mUnwzjyHfFxbQIIMYrwSepG0mZqM8VV vDrbxFBpr6wju09R9ShKICZLh514EDfhFjTDPLkuFOUDqqVNymZdaXHR2jG7HNRKBFVYd9yqOrHj4 t/fy/K0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbpjx-007vMO-02; Mon, 13 Mar 2023 21:29:57 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbpjb-007vEL-CS; Mon, 13 Mar 2023 21:29:37 +0000 Received: from notapiano.myfiosgateway.com (zone.collabora.co.uk [167.235.23.81]) (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) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id A86B4660308F; Mon, 13 Mar 2023 21:29:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678742971; bh=mWFcFs6EaqxA+zO4mnrYdfWBJNLnPvbamIJ4mjHcCOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mmOtB8Dm37lrB6dpX7uwY8hJ4Rd3Lj3BLfyDMa85FoEWZf9r/NVcsUQeY641Sb7bD FSe8vOQuzj1u6pfhd07PpCKZBNuzD4BvaGW2Jko1gEZfKjhu47A73xmFyFUFkoZnaK 3aP5jrM0DYtJiDNYpgVG+qxXS1d+bFLxV+LywpXCnWs1/FD3gGO7+WNHSpb2KqExkD Zw7WI/pyNAF8965JoMRyRdNv1sGb2BT/A1ADCmINjSy3Nfs8Xn2DMrBoKKs7q1RD3f av9HyBfR6hm2JRW4dz7EL0U8geAaCczuwwTnnWj97faX2ZkNFxsqO5GmCJAiyHuOnx S0WmmPwELnggw== From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Mark Brown Cc: AngeloGioacchino Del Regno , kernel@collabora.com, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Akihiko Odaki , Jaroslav Kysela , Jiaxin Yu , Liam Girdwood , Matthias Brugger , Takashi Iwai , Tzung-Bi Shih , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 2/2] ASoC: mt8192: Move spammy messages to debug level Date: Mon, 13 Mar 2023 17:29:07 -0400 Message-Id: <20230313212908.2282961-3-nfraprado@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313212908.2282961-1-nfraprado@collabora.com> References: <20230313212908.2282961-1-nfraprado@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_142935_744203_92498C1E X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org There are many log messages throughout the mt8192 sound drivers that print to the info level and are triggered very frequently. Move these messages to the debug level to avoid spamming the console. Signed-off-by: NĂ­colas F. R. A. Prado --- sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 2 +- sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 26 +++++++++---------- .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 10 +++---- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c index a420b78dde89..333e0ee98c5a 100644 --- a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c +++ b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c @@ -369,7 +369,7 @@ static int ul_tinyconn_event(struct snd_soc_dapm_widget *w, unsigned int reg_shift; unsigned int reg_mask_shift; - dev_info(afe->dev, "%s(), event 0x%x\n", __func__, event); + dev_dbg(afe->dev, "%s(), event 0x%x\n", __func__, event); if (strstr(w->name, "UL1")) { reg_shift = VUL1_USE_TINY_SFT; diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c b/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c index bcd2150c2816..9ce06821c7d0 100644 --- a/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c +++ b/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c @@ -256,8 +256,8 @@ static int mtk_tdm_en_event(struct snd_soc_dapm_widget *w, return -EINVAL; } - dev_info(cmpnt->dev, "%s(), name %s, event 0x%x\n", - __func__, w->name, event); + dev_dbg(cmpnt->dev, "%s(), name %s, event 0x%x\n", + __func__, w->name, event); switch (event) { case SND_SOC_DAPM_PRE_PMU: @@ -288,8 +288,8 @@ static int mtk_tdm_bck_en_event(struct snd_soc_dapm_widget *w, return -EINVAL; } - dev_info(cmpnt->dev, "%s(), name %s, event 0x%x, dai_id %d\n", - __func__, w->name, event, dai_id); + dev_dbg(cmpnt->dev, "%s(), name %s, event 0x%x, dai_id %d\n", + __func__, w->name, event, dai_id); switch (event) { case SND_SOC_DAPM_PRE_PMU: @@ -320,8 +320,8 @@ static int mtk_tdm_mck_en_event(struct snd_soc_dapm_widget *w, return -EINVAL; } - dev_info(cmpnt->dev, "%s(), name %s, event 0x%x, dai_id %d\n", - __func__, w->name, event, dai_id); + dev_dbg(cmpnt->dev, "%s(), name %s, event 0x%x, dai_id %d\n", + __func__, w->name, event, dai_id); switch (event) { case SND_SOC_DAPM_PRE_PMU: @@ -545,13 +545,13 @@ static int mtk_dai_tdm_hw_params(struct snd_pcm_substream *substream, if (tdm_priv->mclk_rate % tdm_priv->bck_rate != 0) dev_warn(afe->dev, "%s(), bck cannot generate", __func__); - dev_info(afe->dev, "%s(), id %d, rate %d, channels %d, format %d, mclk_rate %d, bck_rate %d\n", - __func__, - tdm_id, rate, channels, format, - tdm_priv->mclk_rate, tdm_priv->bck_rate); + dev_dbg(afe->dev, "%s(), id %d, rate %d, channels %d, format %d, mclk_rate %d, bck_rate %d\n", + __func__, + tdm_id, rate, channels, format, + tdm_priv->mclk_rate, tdm_priv->bck_rate); - dev_info(afe->dev, "%s(), out_channels_per_sdata = %d\n", - __func__, out_channels_per_sdata); + dev_dbg(afe->dev, "%s(), out_channels_per_sdata = %d\n", + __func__, out_channels_per_sdata); /* set tdm */ if (tdm_priv->bck_invert) @@ -644,7 +644,7 @@ static int mtk_dai_tdm_set_sysclk(struct snd_soc_dai *dai, return -EINVAL; } - dev_info(afe->dev, "%s(), freq %d\n", __func__, freq); + dev_dbg(afe->dev, "%s(), freq %d\n", __func__, freq); return mtk_dai_tdm_cal_mclk(afe, tdm_priv, freq); } diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index 87737d054682..5e163e23a207 100644 --- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c @@ -292,11 +292,11 @@ static int mt8192_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd) mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA_CH34, 0); pm_runtime_put(afe->dev); - dev_info(afe->dev, "%s(), mtkaif_chosen_phase[0/1/2]:%d/%d/%d\n", - __func__, - afe_priv->mtkaif_chosen_phase[0], - afe_priv->mtkaif_chosen_phase[1], - afe_priv->mtkaif_chosen_phase[2]); + dev_dbg(afe->dev, "%s(), mtkaif_chosen_phase[0/1/2]:%d/%d/%d\n", + __func__, + afe_priv->mtkaif_chosen_phase[0], + afe_priv->mtkaif_chosen_phase[1], + afe_priv->mtkaif_chosen_phase[2]); return 0; }