STRUCT SDW_INTEL_LINK_RES(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay so picture this: you're deep in the SoundWire Intel sauce, and you need the struct that holds, like, all the link resources. That's this one. It's called sdw_intel_link_res, and ngl it's literally described as "Soundwire Intel link resource structure, typically populated by the controller driver" β€” so the controller driver is the one doing the filling-in, you're just here to read it. 🫢


✨ SYNOPSIS ✨

struct sdw_intel_link_res {
    const struct sdw_intel_hw_ops *hw_ops;
    void __iomem *mmio_base;
    void __iomem *registers;
    u32 ip_offset;
    void __iomem *shim;
    void __iomem *shim_vs;
    void __iomem *alh;
    int irq;
    const struct sdw_intel_ops *ops;
    struct device *dev;
    struct mutex *shim_lock;
    u32 *shim_mask;
    u32 clock_stop_quirks;
    bool mic_privacy;
    u32 link_mask;
    struct sdw_cdns *cdns;
    struct list_head list;
    struct hdac_bus *hbus;
 };

Like, look at her. Eighteen fields of pure main character energy. πŸ‘‘


πŸŽ€ Members πŸŽ€

Time for the roster. Every single one, no skipping, periodt. πŸ’…

  • hw_ops β€” the platform-specific ops. iykyk.
  • mmio_base β€” mmio base of SoundWire registers. That's the address you start from, bestie.
  • registers β€” Link IO registers base. Different base, same vibe. ✨
  • ip_offset β€” offset for MCP_IP registers. Little hop from the start of things.
  • shim β€” Audio shim pointer. That's it, that's the whole thing.
  • shim_vs β€” Audio vendor-specific shim pointer. The ✨vendor✨ one. Fancy.
  • alh β€” ALH (Audio Link Hub) pointer. The hub! The moment!
  • irq β€” Interrupt line. It's an int and it WILL interrupt you. πŸ’€
  • ops β€” Shim callback ops. Callback girlies rise.
  • dev β€” device implementing hw_params and free callbacks. She's the one doing the work fr fr.
  • shim_lock β€” mutex to handle access to shared SHIM registers. Shared = you gotta lock it, no cap. πŸ”’
  • shim_mask β€” global pointer to check SHIM register initialization. "Global pointer", mind you β€” note the u32 *, not a u32, bestie.
  • clock_stop_quirks β€” mask defining requested behavior on pm_suspend. Quirks are always the spicy part. 🌢️
  • mic_privacy β€” ACE version supports microphone privacy. A bool. Respect the privacy. πŸ™ˆ
  • link_mask β€” global mask needed for power-up/down sequences. Needed, not optional β€” needed.
  • cdns β€” Cadence master descriptor. Cadence is the master here, we just live in her house. πŸ‘‘
  • list β€” used to walk-through all masters exposed by the same controller. Group chat of masters, basically. πŸ¦‹
  • hbus β€” hdac_bus pointer, needed for power management. Pointer. Power. Necessary. πŸ’œ
Heads up: shim_lock and shim_mask are pointers and shim_mask is a global pointer β€” if you're poking at those without locking, that's a you problem and the kernel will make it a you problem even harder. 😭

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/soundwire/intel.h β€” go read it, it's giving context.
  • struct sdw_intel_bpt(9) β€” the other one, also a whole thing.

And that's the page, bestie! This masterpiece came to you from ./drivers/soundwire, dated October 2026, in the Kernel API Manual β€” go forth and populate your link resources responsibly. πŸŽ€πŸ’–πŸŒΈβ­πŸ§šβ€β™€οΈπŸ”₯

πŸ“¦ where this page comes from