STRUCT SOF_IPC_TPLG_WIDGET_OPS(9)
π struct sof_ipc_tplg_widget_ops(9) π
okay bestie, welcome to the Kernel API Manual β¨ and more specifically, the page for struct sof_ipc_tplg_widget_ops(9) β the official home of IPC-specific ops for topology widgets π. yes, it's exactly as much of a mouthful as it sounds, and yes, you're gonna understand it. let's go π«Ά
β¨ NAME β¨
struct sof_ipc_tplg_widget_ops β IPC-specific ops for topology widgets π
so basically this struct is the lil' bundle of function pointers and token metadata that tells the topology layer how to do its IPC-ish widget stuff. it's giving backstage crew energy: you don't see it, but nothing runs without it π
πΈ SYNOPSIS πΈ
here's the whole struct, no cap, every line exactly as it is:
struct sof_ipc_tplg_widget_ops {
int (*ipc_setup)(struct snd_sof_widget *swidget);
void (*ipc_free)(struct snd_sof_widget *swidget);
enum sof_tokens *token_list;
int token_list_size;
int (*bind_event)(struct snd_soc_component *scomp, struct
snd_sof_widget *swidget, u16 event_type);
int (*ipc_prepare)(struct snd_sof_widget *swidget, struct
snd_pcm_hw_params *fe_params, struct snd_sof_platform_stream_params
*platform_params, struct snd_pcm_hw_params *source_params, int dir);
void (*ipc_unprepare)(struct snd_sof_widget *swidget);
};
literally every single member, copied character for character, because we do not do sloppy around here π
π¦ Members π¦
okay now the fun part, the actual rundown of what each one does π
ipc_setupβ function pointer for setting up widget IPC params β¨ this is the one that does the setup thing.ipc_freeβ function pointer for freeing widget IPC params π§ cleanup crew, iconic behaviour.token_listβ list of token ID's that should be parsed for the widget π (yes, "ID's" with the apostrophe, we're quoting the original vibe here, bestie).token_list_sizeβ number of elements intoken_listπ’ so, like, how many tokens you're actually working with. vibe check on the array length.bind_eventβ function pointer for binding events to the widget π events β widget. matching service, honestly.ipc_prepareβ optional op for preparing a widget for set up β key word: optional. if you don't need it, you don't need it.ipc_unprepareβ optional op for unpreparing a widget π also optional, also there when you need the undo button.
not me pointing out thatipc_prepareandipc_unprepareare the two explicitly marked optional here β everything else is just a member, so don't assume the same default behaviour for those, bestie π
π₯ SEE ALSO π₯
go poke the kernel file for the real source of truth, and then go meet the whole extended friend group π«Ά
- Kernel file
./sound/soc/sof/sof-audio.h struct sof_ipc_pcm_ops(9)struct sof_ipc_tplg_control_ops(9)struct sof_ipc_tplg_ops(9)struct sof_topology_token(9)struct snd_sof_pcm_stream_pipeline_list(9)
thaaat's the page! π¦ nothing skipped, nothing dropped, every flag and member and reference present and accounted for π this whole thing lives out of ./sound/soc/sof and the vibe is stamped October 2026 β so like, mark your calendars, bestie ππ slay, you're done, go read struct sof_ipc_pcm_ops(9) next ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms