ASoC: soc-dai: add snd_soc_dai_compr_shutdown()
dai related function should be implemented at soc-dai.c. This patch adds snd_soc_dai_compr_shutdown(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-By: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/87o8rhssj3.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b5ae4ccea5
commit
2b25f81d43
@ -172,6 +172,8 @@ int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream,
|
|||||||
|
|
||||||
int snd_soc_dai_compr_startup(struct snd_soc_dai *dai,
|
int snd_soc_dai_compr_startup(struct snd_soc_dai *dai,
|
||||||
struct snd_compr_stream *cstream);
|
struct snd_compr_stream *cstream);
|
||||||
|
void snd_soc_dai_compr_shutdown(struct snd_soc_dai *dai,
|
||||||
|
struct snd_compr_stream *cstream);
|
||||||
|
|
||||||
struct snd_soc_dai_ops {
|
struct snd_soc_dai_ops {
|
||||||
/*
|
/*
|
||||||
|
@ -114,8 +114,7 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
|
|||||||
machine_err:
|
machine_err:
|
||||||
soc_compr_components_free(cstream, component);
|
soc_compr_components_free(cstream, component);
|
||||||
|
|
||||||
if (cpu_dai->driver->cops && cpu_dai->driver->cops->shutdown)
|
snd_soc_dai_compr_shutdown(cpu_dai, cstream);
|
||||||
cpu_dai->driver->cops->shutdown(cstream, cpu_dai);
|
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&rtd->card->pcm_mutex);
|
mutex_unlock(&rtd->card->pcm_mutex);
|
||||||
pm_err:
|
pm_err:
|
||||||
@ -204,8 +203,7 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
|
|||||||
machine_err:
|
machine_err:
|
||||||
soc_compr_components_free(cstream, component);
|
soc_compr_components_free(cstream, component);
|
||||||
open_err:
|
open_err:
|
||||||
if (cpu_dai->driver->cops && cpu_dai->driver->cops->shutdown)
|
snd_soc_dai_compr_shutdown(cpu_dai, cstream);
|
||||||
cpu_dai->driver->cops->shutdown(cstream, cpu_dai);
|
|
||||||
out:
|
out:
|
||||||
dpcm_path_put(&list);
|
dpcm_path_put(&list);
|
||||||
be_err:
|
be_err:
|
||||||
@ -244,8 +242,7 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
|
|||||||
|
|
||||||
soc_compr_components_free(cstream, NULL);
|
soc_compr_components_free(cstream, NULL);
|
||||||
|
|
||||||
if (cpu_dai->driver->cops && cpu_dai->driver->cops->shutdown)
|
snd_soc_dai_compr_shutdown(cpu_dai, cstream);
|
||||||
cpu_dai->driver->cops->shutdown(cstream, cpu_dai);
|
|
||||||
|
|
||||||
snd_soc_dapm_stream_stop(rtd, stream);
|
snd_soc_dapm_stream_stop(rtd, stream);
|
||||||
|
|
||||||
@ -301,8 +298,7 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream)
|
|||||||
|
|
||||||
soc_compr_components_free(cstream, NULL);
|
soc_compr_components_free(cstream, NULL);
|
||||||
|
|
||||||
if (cpu_dai->driver->cops && cpu_dai->driver->cops->shutdown)
|
snd_soc_dai_compr_shutdown(cpu_dai, cstream);
|
||||||
cpu_dai->driver->cops->shutdown(cstream, cpu_dai);
|
|
||||||
|
|
||||||
mutex_unlock(&fe->card->mutex);
|
mutex_unlock(&fe->card->mutex);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -517,3 +517,12 @@ int snd_soc_dai_compr_startup(struct snd_soc_dai *dai,
|
|||||||
return soc_dai_ret(dai, ret);
|
return soc_dai_ret(dai, ret);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(snd_soc_dai_compr_startup);
|
EXPORT_SYMBOL_GPL(snd_soc_dai_compr_startup);
|
||||||
|
|
||||||
|
void snd_soc_dai_compr_shutdown(struct snd_soc_dai *dai,
|
||||||
|
struct snd_compr_stream *cstream)
|
||||||
|
{
|
||||||
|
if (dai->driver->cops &&
|
||||||
|
dai->driver->cops->shutdown)
|
||||||
|
dai->driver->cops->shutdown(cstream, dai);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(snd_soc_dai_compr_shutdown);
|
||||||
|
Loading…
Reference in New Issue
Block a user