[PATCH 56/56] ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu May 19 18:02:33 PDT 2022


Hi

This is not related to this patch, but...

> -static inline int snd_soc_component_is_codec(struct snd_soc_component *component)
> -{
> -	return component->driver->non_legacy_dai_naming;
> -}
(snip)
> +static inline int asoc_simple_component_is_codec(struct snd_soc_component *component)
> +{
> +	return component->driver->endianness;
> +}

I have added "endianness" "non_legacy_dai_naming" to component
when convert old "Codec style" into current "Component style".
All codec needs to have these 2.

	69941bab7c7aeaa7bf7e84397e294c17f0b7c6df
	("ASoC: snd_soc_component_driver has non_legacy_dai_naming")

	273d778ef38a8861f880e9df5799029dc82bd55d
	("ASoC: snd_soc_component_driver has endianness")

The reason why I didn't use "codec" was that try to keep
original style as much as possible.
But it seems this is good time to use "codec" for it ?
I think the code will be more understandable.

-	.endianness
-	.non_legacy_dai_naming
+	.is_codec

Thank you for your help !!

Best regards
---
Kuninori Morimoto



More information about the Linux-rockchip mailing list