diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-07-26 07:50:19 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-08-05 18:18:57 +0300 |
commit | 245c539a1206d74e8508a07550fb7c99d0817b8c (patch) | |
tree | aba4092dbe5a3bba94a19e1f4f4542ba7b6ece27 /sound/soc/soc-pcm.c | |
parent | 6d53723380ed73a2ced648d6e92774b39e5af1bd (diff) | |
download | linux-245c539a1206d74e8508a07550fb7c99d0817b8c.tar.xz |
ASoC: soc-component: add snd_soc_component_hw_params()
Current ALSA SoC is directly using component->driver->ops->xxx,
thus, it is deep nested, and makes code difficult to read,
and is not good for encapsulation.
This patch adds new snd_soc_component_hw_params() and use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87blxh5rnf.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.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index c7fee67bc0dc..8be1d22dc87a 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -951,11 +951,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream, for_each_rtdcom(rtd, rtdcom) { component = rtdcom->component; - if (!component->driver->ops || - !component->driver->ops->hw_params) - continue; - - ret = component->driver->ops->hw_params(substream, params); + ret = snd_soc_component_hw_params(component, substream, params); if (ret < 0) { dev_err(component->dev, "ASoC: %s hw params failed: %d\n", |