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);
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;
}
/*
* Flip the polarity for the "CPU" end of a CODEC<->CODEC link
- * the component which has non_legacy_dai_naming is Codec
*/
inv_dai_fmt = snd_soc_daifmt_clock_provider_fliped(dai_fmt);
for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
unsigned int fmt = dai_fmt;
- if (cpu_dai->component->driver->non_legacy_dai_naming)
+ if (snd_soc_component_is_codec(cpu_dai->component))
fmt = inv_dai_fmt;
ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
for (i = 0; i < count; i++) {
dai = snd_soc_register_dai(component, dai_drv + i, count == 1 &&
- !component->driver->non_legacy_dai_naming);
+ !snd_soc_component_is_codec(component));
if (dai == NULL) {
ret = -ENOMEM;
goto err;