const char *name;
int id;
struct device *dev;
+
+ unsigned int active;
+
struct list_head list;
struct snd_soc_dai_driver *dai_drv;
/* runtime */
struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */
- unsigned int active;
unsigned int cache_bypass:1; /* Suppress access to the cache */
unsigned int suspended:1; /* Codec is in suspend PM state */
unsigned int probed:1; /* Codec has been probed */
return 1;
}
+static inline bool snd_soc_component_is_active(
+ struct snd_soc_component *component)
+{
+ return component->active != 0;
+}
+
static inline bool snd_soc_codec_is_active(struct snd_soc_codec *codec)
{
- return codec->active != 0;
+ return snd_soc_component_is_active(&codec->component);
}
int snd_soc_util_init(void);
cpu_dai->active++;
codec_dai->active++;
- if (cpu_dai->codec)
- cpu_dai->codec->active++;
- codec_dai->codec->active++;
+ cpu_dai->component->active++;
+ codec_dai->component->active++;
}
/**
cpu_dai->active--;
codec_dai->active--;
- if (cpu_dai->codec)
- cpu_dai->codec->active--;
- codec_dai->codec->active--;
+ cpu_dai->component->active--;
+ codec_dai->component->active--;
}
/**