From a8ee041f210ba05b47ff1b6fb8477a4c010c4f30 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Sun, 30 Oct 2022 22:25:19 +0000 Subject: [PATCH] v5.16: ASoC: soc-component: add snd_soc_component_is_codec() commit 01e90ee15e81f57d309d0ce1f0e16869e011b800 Author: Kuninori Morimoto Date: Mon Oct 18 11:05:24 2021 +0900 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 Link: https://lore.kernel.org/r/87h7dft7dn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- seeed-voicecard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seeed-voicecard.c b/seeed-voicecard.c index 399bc7e..8339df7 100644 --- a/seeed-voicecard.c +++ b/seeed-voicecard.c @@ -362,9 +362,9 @@ static int asoc_simple_init_dai_link_params(struct snd_soc_pcm_runtime *rtd) struct snd_pcm_hardware hw; int i, ret, stream; - /* Only codecs should have non_legacy_dai_naming set. */ + /* Only Codecs */ for_each_rtd_components(rtd, i, component) { - if (!component->driver->non_legacy_dai_naming) + if (!snd_soc_component_is_codec(component)) return 0; }