mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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:
parent
f52366e683
commit
62462e0182
@ -1088,12 +1088,8 @@ static int soc_init_pcm_runtime(struct snd_soc_card *card,
|
||||
|
||||
/* create compress_device if possible */
|
||||
ret = snd_soc_dai_compress_new(cpu_dai, rtd, num);
|
||||
if (ret != -ENOTSUPP) {
|
||||
if (ret < 0)
|
||||
dev_err(card->dev, "ASoC: can't create compress %s\n",
|
||||
dai_link->stream_name);
|
||||
if (ret != -ENOTSUPP)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* create the pcm */
|
||||
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) {
|
||||
ret = snd_soc_dai_set_fmt(codec_dai, dai_fmt);
|
||||
if (ret != 0 && ret != -ENOTSUPP) {
|
||||
dev_warn(codec_dai->dev,
|
||||
"ASoC: Failed to set DAI format: %d\n", ret);
|
||||
if (ret != 0 && ret != -ENOTSUPP)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1455,11 +1448,8 @@ int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
|
||||
fmt = inv_dai_fmt;
|
||||
|
||||
ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
|
||||
if (ret != 0 && ret != -ENOTSUPP) {
|
||||
dev_warn(cpu_dai->dev,
|
||||
"ASoC: Failed to set DAI format: %d\n", ret);
|
||||
if (ret != 0 && ret != -ENOTSUPP)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -3831,11 +3831,9 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
|
||||
source = path->source->priv;
|
||||
|
||||
ret = snd_soc_dai_startup(source, substream);
|
||||
if (ret < 0) {
|
||||
dev_err(source->dev,
|
||||
"ASoC: startup() failed: %d\n", ret);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
ret = snd_soc_dai_startup(sink, substream);
|
||||
if (ret < 0) {
|
||||
dev_err(sink->dev,
|
||||
"ASoC: startup() failed: %d\n", ret);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
}
|
||||
|
||||
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) {
|
||||
sink = path->sink->priv;
|
||||
|
||||
ret = snd_soc_dai_digital_mute(sink, 0,
|
||||
SNDRV_PCM_STREAM_PLAYBACK);
|
||||
if (ret != 0 && ret != -ENOTSUPP)
|
||||
dev_warn(sink->dev,
|
||||
"ASoC: Failed to unmute: %d\n", ret);
|
||||
snd_soc_dai_digital_mute(sink, 0, SNDRV_PCM_STREAM_PLAYBACK);
|
||||
ret = 0;
|
||||
}
|
||||
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) {
|
||||
sink = path->sink->priv;
|
||||
|
||||
ret = snd_soc_dai_digital_mute(sink, 1,
|
||||
SNDRV_PCM_STREAM_PLAYBACK);
|
||||
if (ret != 0 && ret != -ENOTSUPP)
|
||||
dev_warn(sink->dev,
|
||||
"ASoC: Failed to mute: %d\n", ret);
|
||||
snd_soc_dai_digital_mute(sink, 1, SNDRV_PCM_STREAM_PLAYBACK);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
|
@ -832,10 +832,8 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
|
||||
goto out;
|
||||
|
||||
ret = snd_soc_pcm_dai_prepare(substream);
|
||||
if (ret < 0) {
|
||||
dev_err(rtd->dev, "ASoC: DAI prepare error: %d\n", ret);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* cancel any delayed stream shutdown that is pending */
|
||||
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);
|
||||
|
||||
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 {
|
||||
dev_dbg(fe->dev, "ASoC: trigger FE %s cmd stop\n",
|
||||
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);
|
||||
|
||||
ret = snd_soc_pcm_dai_bespoke_trigger(substream, SNDRV_PCM_TRIGGER_START);
|
||||
if (ret < 0) {
|
||||
dev_err(fe->dev,"ASoC: bespoke trigger FE failed %d\n", ret);
|
||||
if (ret < 0)
|
||||
goto hw_free;
|
||||
}
|
||||
} else {
|
||||
dev_dbg(fe->dev, "ASoC: trigger FE %s cmd start\n",
|
||||
fe->dai_link->name);
|
||||
|
Loading…
Reference in New Issue
Block a user