STRUCT SOF_IPC_TPLG_OPS(9)
โจ 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 sizeSND_SOF_DAPM_TYPE_COUNTโ like, one per widget type, periodt. unsupported widget types get initialized to0โจ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 frtoken_listโ list of all tokens supported by the IPC version. the size of thetoken_listarray should beSOF_TOKEN_COUNT, and any unused elements in the array get initialized to0โ 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
- 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