Unverified Commit 62462e01 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6r5utaa.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f52366e6
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -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,12 +1418,9 @@ 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;
	}
	}

	/*
	 * Flip the polarity for the "CPU" end of a CODEC<->CODEC link
@@ -1455,12 +1448,9 @@ 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;
}
+6 −18
Original line number Diff line number Diff line
@@ -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;
		}

+2 −8
Original line number Diff line number Diff line
@@ -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);