STRUCT SND_COMPR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct snd_compr(9) πŸ’–

okay bestie, so this one's from the Kernel API Manual and it's literally all about struct snd_compr β€” the compressed device. like, the whole vibe is "audio that's been squished down and needs a driver to unsquish it." it's giving kernel-internals main character energy and honestly? we're obsessed πŸŽ€


✨ NAME ✨

struct snd_compr β€” compressed device, no cap πŸ’…


🌸 SYNOPSIS 🌸

struct snd_compr {
    const char *name;
    struct device *dev;
    struct snd_compr_ops *ops;
    void *private_data;
    struct snd_card *card;
    unsigned int direction;
    struct mutex lock;
    int device;
    bool use_pause_in_draining;
  #ifdef CONFIG_SND_VERBOSE_PROCFS;
 };

like yes, that #ifdef CONFIG_SND_VERBOSE_PROCFS; line is sitting there looking a little unhinged, but bestie we do not touch it. we copy it exactly. periodt 🫢


πŸ¦‹ Members πŸ¦‹

  • name β€” the DSP device name. it's the device's whole identity, its little name tag at the party 🏷️
  • dev β€” the associated device instance, aka the actual device buddy this struct is linked up with πŸ’ž
  • ops β€” pointer to the DSP callbacks. this is where the function pointers live, iykyk πŸ”₯
  • private_data β€” pointer to the DSP private data, the driver's own little stash of secrets πŸ™ˆ
  • card β€” sound card pointer. that's your snd_card, the mama card of the whole operation πŸ‘‘
  • direction β€” playback or capture direction. pick a lane, bestie 🎧
  • lock β€” the device lock, a struct mutex, here to keep everything from getting messy ✨
  • device β€” the device id, its number, its whole identifier situation πŸ”’
  • use_pause_in_draining β€” allow pause in draining, true when set. yes that's really the field name and yes it's iconic πŸ’€

🌈 SEE ALSO 🌈

kernel file ./include/sound/compress_driver.h β€” plus these absolute legends:

go read them, they're all linked up in the same friend group fr fr 🧚


πŸ’€ quick vibe check: that #ifdef CONFIG_SND_VERBOSE_PROCFS; inside the struct is exactly how the page shows it. not me fixing it, not you fixing it. we leave it. that's the rule πŸ’…

and that's the whole page, bestie! this one comes to you straight from ./include/sound, dated October 2026 β€” so like, future vibes only ⭐ mwah, go forth and compress responsibly πŸ’œ

πŸ“¦ where this page comes from