STRUCT CS_DSP_CLIENT_OPS(9)
π struct cs_dsp_client_ops(9) β client callbacks
okay so bestie, welcome to struct cs_dsp_client_ops(9) from the Kernel API Manual (section 9, yes, the kernel one π§). this is the little bundle of function pointers that lets a cs_dsp client get pinged when stuff happens β and the whole point is that it can do its thing atomically β¨. let's get into it.
πΈ SYNOPSIS
struct cs_dsp_client_ops {
int (*control_add)(struct cs_dsp_coeff_ctl *ctl);
void (*control_remove)(struct cs_dsp_coeff_ctl *ctl);
int (*pre_run)(struct cs_dsp *dsp);
int (*post_run)(struct cs_dsp *dsp);
void (*pre_stop)(struct cs_dsp *dsp);
void (*post_stop)(struct cs_dsp *dsp);
void (*watchdog_expired)(struct cs_dsp *dsp);
};
like, exactly that. no cap, copy it character for character if you're typing it out π«Ά
π Members
control_addβint (*control_add)(struct cs_dsp_coeff_ctl *ctl);β called under thepwr_lockwhen a control is created πcontrol_removeβvoid (*control_remove)(struct cs_dsp_coeff_ctl *ctl);β called under thepwr_lockwhen a control is destroyed πpre_runβint (*pre_run)(struct cs_dsp *dsp);β called under thepwr_lockbycs_dsp_runbefore the core is started πpost_runβint (*post_run)(struct cs_dsp *dsp);β called under thepwr_lockbycs_dsp_runafter the core is started π₯pre_stopβvoid (*pre_stop)(struct cs_dsp *dsp);β called under thepwr_lockbycs_dsp_stopbefore the core is stopped πpost_stopβvoid (*post_stop)(struct cs_dsp *dsp);β called under thepwr_lockbycs_dsp_stopafter the core is stopped πwatchdog_expiredβvoid (*watchdog_expired)(struct cs_dsp *dsp);β called when a watchdog expiry is detected β°π
bestie pls note: all of the pwr_lock ones are called while holding that lock. that's the whole vibe β atomic, no racing, no chaos. act accordingly π
π¦ Description
these callbacks give the cs_dsp client an opportunity to respond to events, or to perform actions atomically π. that's literally it, that's the whole flex. it's giving "here's your moment, do it safely" energy.
β¨ SEE ALSO
kernel file ./include/linux/firmware/cirrus/cs_dsp.h, plus: struct cs_dsp_region(9), struct cs_dsp_alg_region(9), struct cs_dsp_coeff_ctl(9), struct cs_dsp(9), struct cs_dsp_wseq(9), struct cs_dsp_chunk(9), cs_dsp_chunk(9), cs_dsp_chunk_end(9), cs_dsp_chunk_bytes(9), cs_dsp_chunk_valid_addr(9) β go read them, iykyk ππ
mwah π this page lives in ./include/linux/firmware/cirrus, dated October 2026, and it's struct cs_dsp_client_ops(9) β go slay your firmware, bestie π§β
π¦ 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