Commit 3af24372 authored by Allen-KH Cheng's avatar Allen-KH Cheng Committed by Mark Brown

ASoC: mediatek: mt8186: Move some prints to debug level

There are many log messages scattered throughout the mt8186 sound
drivers, and they are frequently triggered.

To avoid spamming the console, move these messages to the debug level.
Signed-off-by: default avatarAllen-KH Cheng <allen-kh.cheng@mediatek.com>
Link: https://lore.kernel.org/r/20230329080418.1100-1-allen-kh.cheng@mediatek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent dd6bdd8b
...@@ -85,7 +85,7 @@ int mt8186_afe_gpio_init(struct device *dev) ...@@ -85,7 +85,7 @@ int mt8186_afe_gpio_init(struct device *dev)
aud_gpios[i].name); aud_gpios[i].name);
if (IS_ERR(aud_gpios[i].gpioctrl)) { if (IS_ERR(aud_gpios[i].gpioctrl)) {
ret = PTR_ERR(aud_gpios[i].gpioctrl); ret = PTR_ERR(aud_gpios[i].gpioctrl);
dev_info(dev, "%s(), pinctrl_lookup_state %s fail, ret %d\n", dev_dbg(dev, "%s(), pinctrl_lookup_state %s fail, ret %d\n",
__func__, aud_gpios[i].name, ret); __func__, aud_gpios[i].name, ret);
} else { } else {
aud_gpios[i].gpio_prepare = true; aud_gpios[i].gpio_prepare = true;
...@@ -108,13 +108,13 @@ static int mt8186_afe_gpio_select(struct device *dev, ...@@ -108,13 +108,13 @@ static int mt8186_afe_gpio_select(struct device *dev,
int ret = 0; int ret = 0;
if (type < 0 || type >= MT8186_AFE_GPIO_GPIO_NUM) { if (type < 0 || type >= MT8186_AFE_GPIO_GPIO_NUM) {
dev_err(dev, "%s(), error, invalid gpio type %d\n", dev_dbg(dev, "%s(), error, invalid gpio type %d\n",
__func__, type); __func__, type);
return -EINVAL; return -EINVAL;
} }
if (!aud_gpios[type].gpio_prepare) { if (!aud_gpios[type].gpio_prepare) {
dev_err(dev, "%s(), error, gpio type %d not prepared\n", dev_dbg(dev, "%s(), error, gpio type %d not prepared\n",
__func__, type); __func__, type);
return -EIO; return -EIO;
} }
...@@ -122,7 +122,7 @@ static int mt8186_afe_gpio_select(struct device *dev, ...@@ -122,7 +122,7 @@ static int mt8186_afe_gpio_select(struct device *dev,
ret = pinctrl_select_state(aud_pinctrl, ret = pinctrl_select_state(aud_pinctrl,
aud_gpios[type].gpioctrl); aud_gpios[type].gpioctrl);
if (ret) { if (ret) {
dev_err(dev, "%s(), error, can not set gpio type %d\n", dev_dbg(dev, "%s(), error, can not set gpio type %d\n",
__func__, type); __func__, type);
return ret; return ret;
} }
...@@ -137,25 +137,25 @@ static int mt8186_afe_gpio_adda_dl(struct device *dev, bool enable) ...@@ -137,25 +137,25 @@ static int mt8186_afe_gpio_adda_dl(struct device *dev, bool enable)
if (enable) { if (enable) {
ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_CLK_MOSI_ON); ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_CLK_MOSI_ON);
if (ret) { if (ret) {
dev_err(dev, "%s(), MOSI CLK ON select fail!\n", __func__); dev_dbg(dev, "%s(), MOSI CLK ON select fail!\n", __func__);
return ret; return ret;
} }
ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_DAT_MOSI_ON); ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_DAT_MOSI_ON);
if (ret) { if (ret) {
dev_err(dev, "%s(), MOSI DAT ON select fail!\n", __func__); dev_dbg(dev, "%s(), MOSI DAT ON select fail!\n", __func__);
return ret; return ret;
} }
} else { } else {
ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_DAT_MOSI_OFF); ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_DAT_MOSI_OFF);
if (ret) { if (ret) {
dev_err(dev, "%s(), MOSI DAT OFF select fail!\n", __func__); dev_dbg(dev, "%s(), MOSI DAT OFF select fail!\n", __func__);
return ret; return ret;
} }
ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_CLK_MOSI_OFF); ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_CLK_MOSI_OFF);
if (ret) { if (ret) {
dev_err(dev, "%s(), MOSI CLK ON select fail!\n", __func__); dev_dbg(dev, "%s(), MOSI CLK ON select fail!\n", __func__);
return ret; return ret;
} }
} }
...@@ -170,25 +170,25 @@ static int mt8186_afe_gpio_adda_ul(struct device *dev, bool enable) ...@@ -170,25 +170,25 @@ static int mt8186_afe_gpio_adda_ul(struct device *dev, bool enable)
if (enable) { if (enable) {
ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_CLK_MISO_ON); ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_CLK_MISO_ON);
if (ret) { if (ret) {
dev_err(dev, "%s(), MISO CLK ON select fail!\n", __func__); dev_dbg(dev, "%s(), MISO CLK ON select fail!\n", __func__);
return ret; return ret;
} }
ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_DAT_MISO_ON); ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_DAT_MISO_ON);
if (ret) { if (ret) {
dev_err(dev, "%s(), MISO DAT ON select fail!\n", __func__); dev_dbg(dev, "%s(), MISO DAT ON select fail!\n", __func__);
return ret; return ret;
} }
} else { } else {
ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_DAT_MISO_OFF); ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_DAT_MISO_OFF);
if (ret) { if (ret) {
dev_err(dev, "%s(), MISO DAT OFF select fail!\n", __func__); dev_dbg(dev, "%s(), MISO DAT OFF select fail!\n", __func__);
return ret; return ret;
} }
ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_CLK_MISO_OFF); ret = mt8186_afe_gpio_select(dev, MT8186_AFE_GPIO_CLK_MISO_OFF);
if (ret) { if (ret) {
dev_err(dev, "%s(), MISO CLK OFF select fail!\n", __func__); dev_dbg(dev, "%s(), MISO CLK OFF select fail!\n", __func__);
return ret; return ret;
} }
} }
...@@ -230,7 +230,7 @@ int mt8186_afe_gpio_request(struct device *dev, bool enable, ...@@ -230,7 +230,7 @@ int mt8186_afe_gpio_request(struct device *dev, bool enable,
sel = enable ? MT8186_AFE_GPIO_PCM_ON : MT8186_AFE_GPIO_PCM_OFF; sel = enable ? MT8186_AFE_GPIO_PCM_ON : MT8186_AFE_GPIO_PCM_OFF;
break; break;
default: default:
dev_err(dev, "%s(), invalid dai %d\n", __func__, dai); dev_dbg(dev, "%s(), invalid dai %d\n", __func__, dai);
goto unlock; goto unlock;
} }
......
...@@ -110,7 +110,7 @@ static unsigned int adda_dl_rate_transform(struct mtk_base_afe *afe, ...@@ -110,7 +110,7 @@ static unsigned int adda_dl_rate_transform(struct mtk_base_afe *afe,
case 192000: case 192000:
return MTK_AFE_ADDA_DL_RATE_192K; return MTK_AFE_ADDA_DL_RATE_192K;
default: default:
dev_info(afe->dev, "%s(), rate %d invalid, use 48kHz!!!\n", dev_dbg(afe->dev, "%s(), rate %d invalid, use 48kHz!!!\n",
__func__, rate); __func__, rate);
} }
...@@ -134,7 +134,7 @@ static unsigned int adda_ul_rate_transform(struct mtk_base_afe *afe, ...@@ -134,7 +134,7 @@ static unsigned int adda_ul_rate_transform(struct mtk_base_afe *afe,
case 192000: case 192000:
return MTK_AFE_ADDA_UL_RATE_192K; return MTK_AFE_ADDA_UL_RATE_192K;
default: default:
dev_info(afe->dev, "%s(), rate %d invalid, use 48kHz!!!\n", dev_dbg(afe->dev, "%s(), rate %d invalid, use 48kHz!!!\n",
__func__, rate); __func__, rate);
} }
......
...@@ -1061,7 +1061,7 @@ static int mt8186_mt6366_da7219_max98357_dev_probe(struct platform_device *pdev) ...@@ -1061,7 +1061,7 @@ static int mt8186_mt6366_da7219_max98357_dev_probe(struct platform_device *pdev)
card->name = card->topology_shortname; card->name = card->topology_shortname;
sof_on = 1; sof_on = 1;
} else { } else {
dev_info(&pdev->dev, "Probe without adsp\n"); dev_dbg(&pdev->dev, "Probe without adsp\n");
} }
if (of_property_read_bool(pdev->dev.of_node, "mediatek,dai-link")) { if (of_property_read_bool(pdev->dev.of_node, "mediatek,dai-link")) {
......
...@@ -95,7 +95,7 @@ static int dmic_set(struct snd_kcontrol *kcontrol, ...@@ -95,7 +95,7 @@ static int dmic_set(struct snd_kcontrol *kcontrol,
priv->dmic_switch = ucontrol->value.integer.value[0]; priv->dmic_switch = ucontrol->value.integer.value[0];
if (priv->dmic_sel) { if (priv->dmic_sel) {
gpiod_set_value(priv->dmic_sel, priv->dmic_switch); gpiod_set_value(priv->dmic_sel, priv->dmic_switch);
dev_info(dapm->card->dev, "dmic_set_value %d\n", dev_dbg(dapm->card->dev, "dmic_set_value %d\n",
priv->dmic_switch); priv->dmic_switch);
} }
return 0; return 0;
...@@ -139,7 +139,7 @@ static int primary_codec_init(struct snd_soc_pcm_runtime *rtd) ...@@ -139,7 +139,7 @@ static int primary_codec_init(struct snd_soc_pcm_runtime *rtd)
} }
if (!priv->dmic_sel) { if (!priv->dmic_sel) {
dev_info(card->dev, "dmic_sel is null\n"); dev_dbg(card->dev, "dmic_sel is null\n");
return 0; return 0;
} }
...@@ -1152,7 +1152,7 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev) ...@@ -1152,7 +1152,7 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev)
card->name = card->topology_shortname; card->name = card->topology_shortname;
sof_on = 1; sof_on = 1;
} else { } else {
dev_info(&pdev->dev, "Probe without adsp\n"); dev_dbg(&pdev->dev, "Probe without adsp\n");
} }
if (of_property_read_bool(pdev->dev.of_node, "mediatek,dai-link")) { if (of_property_read_bool(pdev->dev.of_node, "mediatek,dai-link")) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment