aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc-component.h
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-10-18 11:05:24 +0900
committerMark Brown <broonie@kernel.org>2021-10-18 13:56:37 +0100
commit01e90ee15e81f57d309d0ce1f0e16869e011b800 (patch)
tree2faeebd7b92100cea94bbac7ef4e602798b0c6dc /include/sound/soc-component.h
parentASoC: soc-pcm: tidyup soc_pcm_hw_clean() - step2 (diff)
downloadlinux-dev-01e90ee15e81f57d309d0ce1f0e16869e011b800.tar.xz
linux-dev-01e90ee15e81f57d309d0ce1f0e16869e011b800.zip
ASoC: soc-component: add snd_soc_component_is_codec()
Checking .non_legacy_dai_naming is not readable. Let's add new snd_soc_component_is_codec(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87h7dft7dn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/soc-component.h')
-rw-r--r--include/sound/soc-component.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 3a35d149e92f..a4317144ab62 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -333,6 +333,11 @@ static inline int snd_soc_component_cache_sync(
return regcache_sync(component->regmap);
}
+static inline int snd_soc_component_is_codec(struct snd_soc_component *component)
+{
+ return component->driver->non_legacy_dai_naming;
+}
+
void snd_soc_component_set_aux(struct snd_soc_component *component,
struct snd_soc_aux_dev *aux);
int snd_soc_component_init(struct snd_soc_component *component);