STRUCT SOF_IPC_TPLG_WIDGET_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 in token_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 that ipc_prepare and ipc_unprepare are 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