/* generic dynamic object - all dynamic objects belong to this struct */ struct snd_soc_dobj { enum snd_soc_dobj_type type; unsignedint index; /* objects can belong in different groups */ struct list_head list; int (*unload)(struct snd_soc_component *comp, struct snd_soc_dobj *dobj); union { struct snd_soc_dobj_control control; struct snd_soc_dobj_widget widget;
}; void *private; /* core does not touch this */
};
/* * Kcontrol operations - used to map handlers onto firmware based controls.
*/ struct snd_soc_tplg_kcontrol_ops {
u32 id; int (*get)(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); int (*put)(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); int (*info)(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
};
/* * DAPM widget event handlers - used to map handlers onto widgets.
*/ struct snd_soc_tplg_widget_events {
u16 type; int (*event_handler)(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event);
};
/* * Public API - Used by component drivers to load and unload dynamic objects * and their resources.
*/ struct snd_soc_tplg_ops {
/* external kcontrol init - used for any driver specific init */ int (*control_load)(struct snd_soc_component *, int index, struct snd_kcontrol_new *, struct snd_soc_tplg_ctl_hdr *); int (*control_unload)(struct snd_soc_component *, struct snd_soc_dobj *);
/* DAPM graph route element loading and unloading */ int (*dapm_route_load)(struct snd_soc_component *, int index, struct snd_soc_dapm_route *route); int (*dapm_route_unload)(struct snd_soc_component *, struct snd_soc_dobj *);
/* external widget init - used for any driver specific init */ int (*widget_load)(struct snd_soc_component *, int index, struct snd_soc_dapm_widget *, struct snd_soc_tplg_dapm_widget *); int (*widget_ready)(struct snd_soc_component *, int index, struct snd_soc_dapm_widget *, struct snd_soc_tplg_dapm_widget *); int (*widget_unload)(struct snd_soc_component *, struct snd_soc_dobj *);
/* FE DAI - used for any driver specific init */ int (*dai_load)(struct snd_soc_component *, int index, struct snd_soc_dai_driver *dai_drv, struct snd_soc_tplg_pcm *pcm, struct snd_soc_dai *dai);
int (*dai_unload)(struct snd_soc_component *, struct snd_soc_dobj *);
/* DAI link - used for any driver specific init */ int (*link_load)(struct snd_soc_component *, int index, struct snd_soc_dai_link *link, struct snd_soc_tplg_link_config *cfg); int (*link_unload)(struct snd_soc_component *, struct snd_soc_dobj *);
/* callback to handle vendor bespoke data */ int (*vendor_load)(struct snd_soc_component *, int index, struct snd_soc_tplg_hdr *); int (*vendor_unload)(struct snd_soc_component *, struct snd_soc_tplg_hdr *);
/* completion - called at completion of firmware loading */ int (*complete)(struct snd_soc_component *comp);
/* manifest - optional to inform component of manifest */ int (*manifest)(struct snd_soc_component *, int index, struct snd_soc_tplg_manifest *);
/* vendor specific kcontrol handlers available for binding */ conststruct snd_soc_tplg_kcontrol_ops *io_ops; int io_ops_count;
/* vendor specific bytes ext handlers available for binding */ conststruct snd_soc_tplg_bytes_ext_ops *bytes_ext_ops; int bytes_ext_ops_count;
};
#ifdef CONFIG_SND_SOC_TOPOLOGY
/* gets a pointer to data from the firmware block header */ staticinlineconstvoid *snd_soc_tplg_get_data(struct snd_soc_tplg_hdr *hdr)
{ constvoid *ptr = hdr;
return ptr + sizeof(*hdr);
}
/* Dynamic Object loading and removal for component drivers */ int snd_soc_tplg_component_load(struct snd_soc_component *comp, conststruct snd_soc_tplg_ops *ops, conststruct firmware *fw); int snd_soc_tplg_component_remove(struct snd_soc_component *comp);
/* Binds event handlers to dynamic widgets */ int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget *w, conststruct snd_soc_tplg_widget_events *events, int num_events,
u16 event_type);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.