Commit f52366e6 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-pcm: don't indicate error message for dpcm_be_dai_hw_free()

dpcm_be_dai_hw_free() never fail, error message is not needed.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87blblutaf.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e20c9c4f
...@@ -153,7 +153,7 @@ void dpcm_be_dai_stop(struct snd_soc_pcm_runtime *fe, int stream, ...@@ -153,7 +153,7 @@ void dpcm_be_dai_stop(struct snd_soc_pcm_runtime *fe, int stream,
int do_hw_free, struct snd_soc_dpcm *last); int do_hw_free, struct snd_soc_dpcm *last);
void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream); void dpcm_be_disconnect(struct snd_soc_pcm_runtime *fe, int stream);
void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream); void dpcm_clear_pending_state(struct snd_soc_pcm_runtime *fe, int stream);
int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream); void dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream);
int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int tream); int dpcm_be_dai_hw_params(struct snd_soc_pcm_runtime *fe, int tream);
int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd); int dpcm_be_dai_trigger(struct snd_soc_pcm_runtime *fe, int stream, int cmd);
int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream); int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream);
......
...@@ -175,7 +175,6 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream) ...@@ -175,7 +175,6 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream)
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0); struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0);
struct snd_soc_dpcm *dpcm; struct snd_soc_dpcm *dpcm;
int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */ int stream = cstream->direction; /* SND_COMPRESS_xxx is same as SNDRV_PCM_STREAM_xxx */
int ret;
mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME);
...@@ -183,9 +182,7 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream) ...@@ -183,9 +182,7 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream)
fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE; fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
ret = dpcm_be_dai_hw_free(fe, stream); dpcm_be_dai_hw_free(fe, stream);
if (ret < 0)
dev_err(fe->dev, "Compressed ASoC: hw_free failed: %d\n", ret);
dpcm_be_dai_shutdown(fe, stream); dpcm_be_dai_shutdown(fe, stream);
......
...@@ -1808,7 +1808,7 @@ static int dpcm_fe_dai_shutdown(struct snd_pcm_substream *substream) ...@@ -1808,7 +1808,7 @@ static int dpcm_fe_dai_shutdown(struct snd_pcm_substream *substream)
return 0; return 0;
} }
int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream) void dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream)
{ {
struct snd_soc_dpcm *dpcm; struct snd_soc_dpcm *dpcm;
...@@ -1847,14 +1847,12 @@ int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream) ...@@ -1847,14 +1847,12 @@ int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream)
be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE;
} }
return 0;
} }
static int dpcm_fe_dai_hw_free(struct snd_pcm_substream *substream) static int dpcm_fe_dai_hw_free(struct snd_pcm_substream *substream)
{ {
struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream); struct snd_soc_pcm_runtime *fe = asoc_substream_to_rtd(substream);
int err, stream = substream->stream; int stream = substream->stream;
mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME); mutex_lock_nested(&fe->card->mutex, SND_SOC_CARD_CLASS_RUNTIME);
dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE); dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_FE);
...@@ -1866,9 +1864,7 @@ static int dpcm_fe_dai_hw_free(struct snd_pcm_substream *substream) ...@@ -1866,9 +1864,7 @@ static int dpcm_fe_dai_hw_free(struct snd_pcm_substream *substream)
/* only hw_params backends that are either sinks or sources /* only hw_params backends that are either sinks or sources
* to this frontend DAI */ * to this frontend DAI */
err = dpcm_be_dai_hw_free(fe, stream); dpcm_be_dai_hw_free(fe, stream);
if (err < 0)
dev_err(fe->dev, "ASoC: hw_free BE failed %d\n", err);
fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE; fe->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE;
dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO); dpcm_set_fe_update_state(fe, stream, SND_SOC_DPCM_UPDATE_NO);
...@@ -2330,9 +2326,7 @@ static int dpcm_run_update_shutdown(struct snd_soc_pcm_runtime *fe, int stream) ...@@ -2330,9 +2326,7 @@ static int dpcm_run_update_shutdown(struct snd_soc_pcm_runtime *fe, int stream)
err = dpcm_be_dai_trigger(fe, stream, SNDRV_PCM_TRIGGER_STOP); err = dpcm_be_dai_trigger(fe, stream, SNDRV_PCM_TRIGGER_STOP);
} }
err = dpcm_be_dai_hw_free(fe, stream); dpcm_be_dai_hw_free(fe, stream);
if (err < 0)
dev_err(fe->dev,"ASoC: hw_free FE failed %d\n", err);
dpcm_be_dai_shutdown(fe, stream); dpcm_be_dai_shutdown(fe, stream);
......
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