return 1;
}
+static inline unsigned int snd_soc_enum_val_to_item(struct soc_enum *e,
+ unsigned int val)
+{
+ unsigned int i;
+
+ if (!e->values)
+ return val;
+
+ for (i = 0; i < e->items; i++)
+ if (val == e->values[i])
+ return i;
+
+ return 0;
+}
+
+static inline unsigned int snd_soc_enum_item_to_val(struct soc_enum *e,
+ unsigned int item)
+{
+ if (!e->values)
+ return item;
+
+ return e->values[item];
+}
+
+ 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 snd_soc_component_is_active(&codec->component);
+ }
+
int snd_soc_util_init(void);
void snd_soc_util_exit(void);