STRUCT CS_DSP_CLIENT_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the pwr_lock when a control is created πŸ‘‘
  • control_remove β€” void (*control_remove)(struct cs_dsp_coeff_ctl *ctl); β€” called under the pwr_lock when a control is destroyed πŸ’€
  • pre_run β€” int (*pre_run)(struct cs_dsp *dsp); β€” called under the pwr_lock by cs_dsp_run before the core is started 🏁
  • post_run β€” int (*post_run)(struct cs_dsp *dsp); β€” called under the pwr_lock by cs_dsp_run after the core is started πŸ”₯
  • pre_stop β€” void (*pre_stop)(struct cs_dsp *dsp); β€” called under the pwr_lock by cs_dsp_stop before the core is stopped πŸ›‘
  • post_stop β€” void (*post_stop)(struct cs_dsp *dsp); β€” called under the pwr_lock by cs_dsp_stop after 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