diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-12-01 08:51:25 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-12-09 12:13:37 +0000 |
commit | a9faca15a644ff754a9d6e3c9e81f91cb8ca59bd (patch) | |
tree | 4560bf212d318a786a6bd8b21f5319f609ffcfd6 /sound/hda | |
parent | 474e3abb91189fcdc01f8ef82c7d075f2705a4f0 (diff) | |
download | linux-a9faca15a644ff754a9d6e3c9e81f91cb8ca59bd.tar.bz2 |
ASoC: soc-pcm: remove dpcm_do_trigger()
dpcm_be_dai_trigger() is calling dpcm_do_trigger()
at each SNDRV_PCM_TRIGGER_xxx (1).
int dpcm_be_dai_trigger(...)
{
for_each_dpcm_be(fe, stream, dpcm) {
(B) ...
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
...
(1) ret = dpcm_do_trigger(...);
...
case SNDRV_PCM_TRIGGER_RESUME:
...
(1) ret = dpcm_do_trigger(...);
...
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
...
(1) ret = dpcm_do_trigger(...);
...
case SNDRV_PCM_TRIGGER_STOP:
...
(1) ret = dpcm_do_trigger(...);
...
case SNDRV_PCM_TRIGGER_SUSPEND:
...
(1) ret = dpcm_do_trigger(...);
...
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
...
(1) ret = dpcm_do_trigger(...);
...
}
}
}
But it is just very verbose and duplicated function.
Because We can indicate dev_dbg() (A) at dpcm_be_dai_trigger() (B).
And dev_err() (C) is not needed because soc_pcm_trigger() itself
indicates error message when error.
static int dpcm_do_trigger(...)
{
int ret;
(A) dev_dbg(...);
ret = soc_pcm_trigger(substream, cmd);
if (ret < 0)
(C) dev_err(...);
return ret;
}
This patch replace dpcm_do_trigger() to soc_pcm_trigger().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87blfecssk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/hda')
0 files changed, 0 insertions, 0 deletions