summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-06-04 17:07:24 +0900
committerMark Brown <broonie@kernel.org>2020-06-15 18:21:23 +0100
commit047511198639649bdaacb1a34d9691429ccc5698 (patch)
tree477273345973123ddefe40438cc9ff551fed3c63 /sound/soc/soc-pcm.c
parente1bafa828e3a0622ac24d238e00937f3059ed585 (diff)
downloadlinux-stable-047511198639649bdaacb1a34d9691429ccc5698.tar.gz
linux-stable-047511198639649bdaacb1a34d9691429ccc5698.tar.bz2
linux-stable-047511198639649bdaacb1a34d9691429ccc5698.zip
ASoC: soc-component: add snd_soc_pcm_component_hw_free()
We have 2 type of component functions snd_soc_component_xxx() is focusing to component itself, snd_soc_pcm_component_xxx() is focusing to rtd related component. Now we can update snd_soc_component_hw_free() to snd_soc_pcm_component_hw_free(). This patch do it. 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/87lfl3w8xv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index e5eef48af167..cbce15c5721e 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -898,25 +898,6 @@ static void soc_pcm_codec_params_fixup(struct snd_pcm_hw_params *params,
interval->max = channels;
}
-static int soc_pcm_components_hw_free(struct snd_pcm_substream *substream,
- struct snd_soc_component *last)
-{
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct snd_soc_component *component;
- int i, r, ret = 0;
-
- for_each_rtd_components(rtd, i, component) {
- if (component == last)
- break;
-
- r = snd_soc_component_hw_free(component, substream);
- if (r < 0)
- ret = r; /* use last ret */
- }
-
- return ret;
-}
-
/*
* Called by ALSA when the hardware params are set by application. This
* function can also be called multiple times and can allocate buffers
@@ -1018,7 +999,7 @@ out:
return ret;
component_err:
- soc_pcm_components_hw_free(substream, component);
+ snd_soc_pcm_component_hw_free(substream, component);
i = rtd->num_cpus;
@@ -1077,7 +1058,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
snd_soc_link_hw_free(substream);
/* free any component resources */
- soc_pcm_components_hw_free(substream, NULL);
+ snd_soc_pcm_component_hw_free(substream, NULL);
/* now free hw params for the DAIs */
for_each_rtd_dais(rtd, i, dai) {