STRUCT SOF_IPC_TPLG_OPS(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ struct sof_ipc_tplg_ops(9) โœจ

okay bestie, so this is the kernel API manual for struct sof_ipc_tplg_ops โ€” it's literally the IPC-specific topology ops struct and it's giving main character energy in the SOF audio world ๐Ÿ’…


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

struct sof_ipc_tplg_ops {
    const struct sof_ipc_tplg_widget_ops *widget;
    const struct sof_ipc_tplg_control_ops *control;
    int (*route_setup)(struct snd_sof_dev *sdev, struct snd_sof_route *sroute);
    int (*route_free)(struct snd_sof_dev *sdev, struct snd_sof_route *sroute);
    const struct sof_token_info *token_list;
    int (*control_setup)(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol);
    int (*control_free)(struct snd_sof_dev *sdev, struct snd_sof_control *scontrol);
    int (*pipeline_complete)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget);
    int (*widget_setup)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget);
    int (*widget_free)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget);
    int (*dai_config)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget, unsigned int flags, struct snd_sof_dai_config_data *data);
    void (*host_config)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget, struct snd_sof_platform_stream_params *platform_params);
    int (*dai_get_param)(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int param_type);
    int (*set_up_all_pipelines)(struct snd_sof_dev *sdev, bool verify);
    int (*tear_down_all_pipelines)(struct snd_sof_dev *sdev, bool verify);
    int (*parse_manifest)(struct snd_soc_component *scomp, int index, struct snd_soc_tplg_manifest *man);
    int (*link_setup)(struct snd_sof_dev *sdev, struct snd_soc_dai_link *link);
 };

๐ŸŒธ Members ๐ŸŒธ

okay so let's break down every single one of these, no skipping, we're doing the full tour ๐Ÿซถ

  • widget โ€” array of pointers to IPC-specific ops for widgets, and it's lowkey important that this should always be of size SND_SOF_DAPM_TYPE_COUNT โ€” like, one per widget type, periodt. unsupported widget types get initialized to 0 โœจ
  • control โ€” pointer to the IPC-specific ops for topology kcontrol IO, iconic behavior honestly ๐Ÿ’…
  • route_setup โ€” function pointer for setting up pipeline connections ๐Ÿ”ฅ
  • route_free โ€” function pointer for freeing pipeline connections, the cleanup crew fr fr
  • token_list โ€” list of all tokens supported by the IPC version. the size of the token_list array should be SOF_TOKEN_COUNT, and any unused elements in the array get initialized to 0 โ€” no cap ๐Ÿ’€
  • control_setup โ€” function pointer for setting up kcontrol IPC-specific data, it's giving preparation queen energy ๐Ÿ‘‘
  • control_free โ€” function pointer for freeing kcontrol IPC-specific data, release the data bestie ๐Ÿฆ‹
  • pipeline_complete โ€” function pointer for pipeline complete IPC, we love a finished pipeline moment โญ
  • widget_setup โ€” function pointer for setting up setup in the DSP, yes it literally says "setting up setup" and we're not questioning it, just vibing ๐Ÿ˜ญ
  • widget_free โ€” function pointer for freeing widget in the DSP, goodbye widget, you served ๐Ÿ’–
  • dai_config โ€” function pointer for sending DAI config IPC to the DSP, talk to 'em ๐Ÿ“ข
  • host_config โ€” function pointer for setting the DMA ID for host widgets, very demure, very mindful ๐ŸŒธ
  • dai_get_param โ€” function pointer for getting the DAI parameter, go get that info โœจ
  • set_up_all_pipelines โ€” function pointer for setting up all topology pipelines, ALL of them, not just some, bestie ๐Ÿ’…
  • tear_down_all_pipelines โ€” function pointer for tearing down all topology pipelines, dramatic exit energy ๐Ÿ’€
  • parse_manifest โ€” function pointer for ipc4 specific parsing of topology manifest, ipc4 said "I'll handle this one" ๐ŸŒˆ
  • link_setup โ€” function pointer for IPC-specific DAI link set up, link it up ๐Ÿ”—

๐Ÿ’œ Note ๐Ÿ’œ

okay so this is important โ€” the function pointers (ops) are optional. not required. they're like, the accessories of the struct. wear them if you want to ๐Ÿ’…โœจ


๐Ÿงš SEE ALSO ๐Ÿงš

  • 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_widget_ops(9)
  • struct sof_topology_token(9)
  • struct snd_sof_pcm_stream_pipeline_list(9)

this page came from ./sound/soc/sof and the version is dated October 2026 โ€” so like, from the future bestie, slay ๐Ÿ”ฎ๐Ÿ’–

okay that's the whole struct, every single member accounted for, we ate and left no crumbs ๐Ÿ‘‘ periodt ๐ŸŽ€

๐Ÿ“ฆ where this page comes from