include/sound/soc-topology.h
Source file repositories/reference/linux-study-clean/include/sound/soc-topology.h
File Facts
- System
- Linux kernel
- Corpus path
include/sound/soc-topology.h- Extension
.h- Size
- 5888 bytes
- Lines
- 199
- Domain
- Driver Families
- Bucket
- include/sound
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
sound/asoc.hlinux/list.h
Detected Declarations
struct firmwarestruct snd_kcontrolstruct snd_soc_tplg_pcm_bestruct snd_ctl_elem_valuestruct snd_ctl_elem_infostruct snd_soc_dapm_widgetstruct snd_soc_componentstruct snd_soc_tplg_pcm_festruct snd_soc_dapm_contextstruct snd_soc_cardstruct snd_kcontrol_newstruct snd_soc_dai_linkstruct snd_soc_dai_driverstruct snd_soc_daistruct snd_soc_dapm_routestruct snd_soc_dobj_controlstruct snd_soc_dobj_widgetstruct snd_soc_dobjstruct snd_soc_tplg_kcontrol_opsstruct snd_soc_tplg_bytes_ext_opsstruct snd_soc_tplg_widget_eventsstruct snd_soc_tplg_opsenum snd_soc_dobj_typefunction snd_soc_tplg_component_remove
Annotated Snippet
struct snd_soc_dobj_control {
struct snd_kcontrol *kcontrol;
char **dtexts;
unsigned long *dvalues;
};
/* dynamic widget object */
struct snd_soc_dobj_widget {
unsigned int *kcontrol_type; /* kcontrol type: mixer, enum, bytes */
};
/* generic dynamic object - all dynamic objects belong to this struct */
struct snd_soc_dobj {
enum snd_soc_dobj_type type;
unsigned int 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);
};
/* Bytes ext operations, for TLV byte controls */
struct snd_soc_tplg_bytes_ext_ops {
u32 id;
int (*get)(struct snd_kcontrol *kcontrol, unsigned int __user *bytes,
unsigned int size);
int (*put)(struct snd_kcontrol *kcontrol,
const unsigned int __user *bytes, unsigned int size);
};
/*
* 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 *);
Annotation
- Immediate include surface: `sound/asoc.h`, `linux/list.h`.
- Detected declarations: `struct firmware`, `struct snd_kcontrol`, `struct snd_soc_tplg_pcm_be`, `struct snd_ctl_elem_value`, `struct snd_ctl_elem_info`, `struct snd_soc_dapm_widget`, `struct snd_soc_component`, `struct snd_soc_tplg_pcm_fe`, `struct snd_soc_dapm_context`, `struct snd_soc_card`.
- Atlas domain: Driver Families / include/sound.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.