ASoC: mt8192: Address spammy log messages
Subsystems (3)
cover ASoC: mt8192: Address spammy log messages
A couple commits to make the mt8192 sound driver not spam the console.
Nícolas F. R. A. Prado (2):
ASoC: mt8192: Remove function name log messages
ASoC: mt8192: Move spammy messages to debug level
sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 4 --- sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 6 +--- sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 28 +++++++++---------- .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 12 ++++---- 4 files changed, 19 insertions(+), 31 deletions(-)
Signature · 1 line
2.39.2
PATCH 1/2 ASoC: mt8192: Remove function name log messages
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.
---
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(-)
sound/soc/mediatek/mt8192/mt8192-afe-clk.c +0 -4
@@ -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 ]);
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c +0 -4
@@ -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;
sound/soc/mediatek/mt8192/mt8192-dai-tdm.c +0 -2
@@ -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 ;
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +0 -2
@@ -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 );
Signature · 1 line
2.39.2
Re: [PATCH 1/2] ASoC: mt8192: Remove function name log messages
Il 13/03/23 22:29, Nícolas F. R. A. Prado ha scritto:
Quoted 4 lines
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.
Yeah, I totally agree.
Did you check the others (8173, 83, 86, 95) as well?
Quoted 2 lines
Signed-off-by Nícolas F. R. A. Prado <[email protected]>
Re: [PATCH 1/2] ASoC: mt8192: Remove function name log messages
Quoted 8 lines · AngeloGioacchino Del Regno
Il 13/03/23 22:29, Nícolas F. R. A. Prado ha scritto:
Quoted 4 lines
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.
Yeah, I totally agree.
Did you check the others (8173, 83, 86, 95) as well?
Not yet. I can check later if the patches from Mark didn't already address this for those other SoCs and send another patch/series if needed.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Nícolas F. R. A. Prado <[email protected]>Reviewed-by AngeloGioacchino Del Regno <[email protected]>
Thanks,
Nícolas
Re: [PATCH 1/2] ASoC: mt8192: Remove function name log messages
In reply to AngeloGioacchino Del RegnoQuoted 8 lines · AngeloGioacchino Del Regno
Il 13/03/23 22:29, Nícolas F. R. A. Prado ha scritto:
Quoted 4 lines
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.
Yeah, I totally agree.
Did you check the others (8173, 83, 86, 95) as well?
Not yet. I can check later if the patches from Mark didn't already address this for those other SoCs and send another patch/series if needed.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Nícolas F. R. A. Prado <[email protected]>Reviewed-by AngeloGioacchino Del Regno <[email protected]>
Thanks,
Nícolas
Re: [PATCH 1/2] ASoC: mt8192: Remove function name log messages
In reply to Nícolas F. R. A. PradoIl 13/03/23 22:29, Nícolas F. R. A. Prado ha scritto:
Quoted 4 lines
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.
Yeah, I totally agree.
Did you check the others (8173, 83, 86, 95) as well?
Quoted 2 lines
Signed-off-by Nícolas F. R. A. Prado <[email protected]>
PATCH 2/2 ASoC: mt8192: Move spammy messages to debug level
In reply to Nícolas F. R. A. PradoThere 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.
---
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(-)
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c +1 -1
@@ -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 ;
sound/soc/mediatek/mt8192/mt8192-dai-tdm.c +13 -13
@@ -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); }
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +5 -5
@@ -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 ; }
Signature · 1 line
2.39.2
Re: [PATCH 2/2] ASoC: mt8192: Move spammy messages to debug level
Il 13/03/23 22:29, Nícolas F. R. A. Prado ha scritto:
Quoted 5 lines
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 <[email protected]>
Re: [PATCH 2/2] ASoC: mt8192: Move spammy messages to debug level
In reply to Nícolas F. R. A. PradoIl 13/03/23 22:29, Nícolas F. R. A. Prado ha scritto:
Quoted 5 lines
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 <[email protected]>
PATCH 1/2 ASoC: mt8192: Remove function name log messages
In reply to Nícolas F. R. A. PradoThere 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.
---
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(-)
sound/soc/mediatek/mt8192/mt8192-afe-clk.c +0 -4
@@ -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 ]);
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c +0 -4
@@ -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;
sound/soc/mediatek/mt8192/mt8192-dai-tdm.c +0 -2
@@ -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 ;
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +0 -2
@@ -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 );
Signature · 1 line
2.39.2
PATCH 2/2 ASoC: mt8192: Move spammy messages to debug level
In reply to Nícolas F. R. A. PradoThere 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.
---
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(-)
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c +1 -1
@@ -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 ;
sound/soc/mediatek/mt8192/mt8192-dai-tdm.c +13 -13
@@ -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); }
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c +5 -5
@@ -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 ; }
Signature · 1 line
2.39.2
Mark Brown
maintainerQuoted 8 lines · Nícolas F. R. A. Prado
A couple commits to make the mt8192 sound driver not spam the console.
Nícolas F. R. A. Prado (2):
ASoC: mt8192: Remove function name log messages
ASoC: mt8192: Move spammy messages to debug level[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: mt8192: Remove function name log messages
commit: f147ca85d6ecaf65106d1650f3c2e8afacbc833f
[2/2] ASoC: mt8192: Move spammy messages to debug level
commit: 5f2a53c0687b151c2ecad19995108b40df76ba86All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark