ASoC: don't indicate error message for snd_soc_[pcm_]dai_xxx()

All snd_soc_dai_xxx() and snd_soc_pcm_dai_xxx() itself
indicate error message if failed.
Its caller doesn't need to indicate duplicated error message.
This patch removes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6r5utaa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2021-03-15 09:58:37 +09:00 committed by Mark Brown
parent f52366e683
commit 62462e0182
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
3 changed files with 11 additions and 39 deletions

View File

@ -1088,12 +1088,8 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card,
/* create compress_device if possible */ /* create compress_device if possible */
ret = snd_soc_dai_compress_new(cpu_dai, rtd, num); ret = snd_soc_dai_compress_new(cpu_dai, rtd, num);
if (ret != -ENOTSUPP) { if (ret != -ENOTSUPP)
if (ret < 0)
dev_err(card->dev, "ASoC: can't create compress %s\n",
dai_link->stream_name);
return ret; return ret;
}
/* create the pcm */ /* create the pcm */
ret = soc_new_pcm(rtd, num); ret = soc_new_pcm(rtd, num);
@ -1422,11 +1418,8 @@ int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
for_each_rtd_codec_dais(rtd, i, codec_dai) { for_each_rtd_codec_dais(rtd, i, codec_dai) {
ret = snd_soc_dai_set_fmt(codec_dai, dai_fmt); ret = snd_soc_dai_set_fmt(codec_dai, dai_fmt);
if (ret != 0 && ret != -ENOTSUPP) { if (ret != 0 && ret != -ENOTSUPP)
dev_warn(codec_dai->dev,
"ASoC: Failed to set DAI format: %d\n", ret);
return ret; return ret;
}
} }
/* /*
@ -1455,11 +1448,8 @@ int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
fmt = inv_dai_fmt; fmt = inv_dai_fmt;
ret = snd_soc_dai_set_fmt(cpu_dai, fmt); ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
if (ret != 0 && ret != -ENOTSUPP) { if (ret != 0 && ret != -ENOTSUPP)
dev_warn(cpu_dai->dev,
"ASoC: Failed to set DAI format: %d\n", ret);
return ret; return ret;
}
} }
return 0; return 0;

View File

@ -3831,11 +3831,9 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
source = path->source->priv; source = path->source->priv;
ret = snd_soc_dai_startup(source, substream); ret = snd_soc_dai_startup(source, substream);
if (ret < 0) { if (ret < 0)
dev_err(source->dev,
"ASoC: startup() failed: %d\n", ret);
goto out; goto out;
}
snd_soc_dai_activate(source, substream->stream); snd_soc_dai_activate(source, substream->stream);
} }
@ -3844,11 +3842,9 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
sink = path->sink->priv; sink = path->sink->priv;
ret = snd_soc_dai_startup(sink, substream); ret = snd_soc_dai_startup(sink, substream);
if (ret < 0) { if (ret < 0)
dev_err(sink->dev,
"ASoC: startup() failed: %d\n", ret);
goto out; goto out;
}
snd_soc_dai_activate(sink, substream->stream); snd_soc_dai_activate(sink, substream->stream);
} }
@ -3943,11 +3939,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
snd_soc_dapm_widget_for_each_sink_path(w, path) { snd_soc_dapm_widget_for_each_sink_path(w, path) {
sink = path->sink->priv; sink = path->sink->priv;
ret = snd_soc_dai_digital_mute(sink, 0, snd_soc_dai_digital_mute(sink, 0, SNDRV_PCM_STREAM_PLAYBACK);
SNDRV_PCM_STREAM_PLAYBACK);
if (ret != 0 && ret != -ENOTSUPP)
dev_warn(sink->dev,
"ASoC: Failed to unmute: %d\n", ret);
ret = 0; ret = 0;
} }
break; break;
@ -3956,11 +3948,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
snd_soc_dapm_widget_for_each_sink_path(w, path) { snd_soc_dapm_widget_for_each_sink_path(w, path) {
sink = path->sink->priv; sink = path->sink->priv;
ret = snd_soc_dai_digital_mute(sink, 1, snd_soc_dai_digital_mute(sink, 1, SNDRV_PCM_STREAM_PLAYBACK);
SNDRV_PCM_STREAM_PLAYBACK);
if (ret != 0 && ret != -ENOTSUPP)
dev_warn(sink->dev,
"ASoC: Failed to mute: %d\n", ret);
ret = 0; ret = 0;
} }

View File

@ -832,10 +832,8 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
goto out; goto out;
ret = snd_soc_pcm_dai_prepare(substream); ret = snd_soc_pcm_dai_prepare(substream);
if (ret < 0) { if (ret < 0)
dev_err(rtd->dev, "ASoC: DAI prepare error: %d\n", ret);
goto out; goto out;
}
/* cancel any delayed stream shutdown that is pending */ /* cancel any delayed stream shutdown that is pending */
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
@ -2317,8 +2315,6 @@ static int dpcm_run_update_shutdown(struct snd_soc_pcm_runtime *fe, int stream)
fe->dai_link->name); fe->dai_link->name);
err = snd_soc_pcm_dai_bespoke_trigger(substream, SNDRV_PCM_TRIGGER_STOP); err = snd_soc_pcm_dai_bespoke_trigger(substream, SNDRV_PCM_TRIGGER_STOP);
if (err < 0)
dev_err(fe->dev,"ASoC: trigger FE failed %d\n", err);
} else { } else {
dev_dbg(fe->dev, "ASoC: trigger FE %s cmd stop\n", dev_dbg(fe->dev, "ASoC: trigger FE %s cmd stop\n",
fe->dai_link->name); fe->dai_link->name);
@ -2395,10 +2391,8 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream)
fe->dai_link->name); fe->dai_link->name);
ret = snd_soc_pcm_dai_bespoke_trigger(substream, SNDRV_PCM_TRIGGER_START); ret = snd_soc_pcm_dai_bespoke_trigger(substream, SNDRV_PCM_TRIGGER_START);
if (ret < 0) { if (ret < 0)
dev_err(fe->dev,"ASoC: bespoke trigger FE failed %d\n", ret);
goto hw_free; goto hw_free;
}
} else { } else {
dev_dbg(fe->dev, "ASoC: trigger FE %s cmd start\n", dev_dbg(fe->dev, "ASoC: trigger FE %s cmd start\n",
fe->dai_link->name); fe->dai_link->name);