diff --git a/seeed-voicecard.c b/seeed-voicecard.c index 732e33e..886eb0e 100644 --- a/seeed-voicecard.c +++ b/seeed-voicecard.c @@ -354,6 +354,11 @@ static int asoc_simple_init_dai(struct snd_soc_dai *dai, } #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0) +static inline int asoc_simple_component_is_codec(struct snd_soc_component *component) +{ + return component->driver->endianness; +} + static int asoc_simple_init_dai_link_params(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_dai_link *dai_link = rtd->dai_link; @@ -364,7 +369,7 @@ static int asoc_simple_init_dai_link_params(struct snd_soc_pcm_runtime *rtd) /* Only Codecs */ for_each_rtd_components(rtd, i, component) { - if (!snd_soc_component_is_codec(component)) + if (!asoc_simple_component_is_codec(component)) return 0; }