STRUCT STM32_SPDIFRX_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct stm32_spdifrx_data(9) β€” the Kernel API Manual's newest main character ✨

Okay bestie, so the Kernel API Manual literally has a whole entry for this one struct and it's giving "backstage pass to the SPDIFRX" energy. Let's get into it, no cap.


🌸 NAME 🌸

struct stm32_spdifrx_data β€” the private data of SPDIFRX. Like, it's the struct's personal diary, iykyk. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

Here's the exact shape of it, copied with love and zero typos:

struct stm32_spdifrx_data {
    struct platform_device *pdev;
    void __iomem *base;
    struct regmap *regmap;
    const struct regmap_config *regmap_conf;
    struct completion cs_completion;
    struct clk *kclk;
    struct snd_dmaengine_dai_dma_data dma_params;
    struct snd_pcm_substream *substream;
    struct snd_dma_buffer *dmab;
    struct dma_chan *ctrl_chan;
    struct dma_async_tx_descriptor *desc;
    struct dma_slave_config slave_config;
    dma_addr_t phys_addr;
    spinlock_t lock;
    spinlock_t irq_lock;
    unsigned char cs[SPDIFRX_CS_BYTES_NB];
    unsigned char ub[SPDIFRX_UB_BYTES_NB];
    int irq;
    int refcount;
 };

✨ Members ✨

Not me listing every single one because bestie, we do not skip. 🫢

  • pdev β€” the device data pointer, like, here's who we're dealing with πŸ’β€β™€οΈ
  • base β€” the mmio register base virtual address, aka where the vibes live in memory
  • regmap β€” SPDIFRX register map pointer, iconic
  • regmap_conf β€” SPDIFRX register map configuration pointer, the config bestie
  • cs_completion β€” channel status retrieving completion, the "wait for it…" moment 😭
  • kclk β€” the kernel clock feeding the SPDIFRX clock generator, slay ⏰
  • dma_params β€” dma configuration data for the rx channel, literally the rx channel's whole setup
  • substream β€” PCM substream data pointer, main character energy
  • dmab β€” dma buffer info pointer, the buffer's info era
  • ctrl_chan β€” dma channel for S/PDIF control bits, control bits only, periodt
  • desc β€” dma async transaction descriptor, the receipt for the async transaction 🧾
  • slave_config β€” dma slave channel runtime config pointer, runtime config realness
  • phys_addr β€” SPDIFRX registers physical base address, the physical address bestie, fr fr
  • lock β€” synchronization enabling lock, the lock that enables synchronization, we love a specific lock πŸ”’
  • irq_lock β€” prevent race condition with IRQ on stream state, like, no racing on the stream state πŸ™ˆ
  • cs β€” channel status buffer, buffering the channel status
  • ub β€” user data buffer, buffering the user data, twin behavior with cs πŸŽ€
  • irq β€” SPDIFRX interrupt line, the interrupt line itself
  • refcount β€” keep count of opened DMA channels, the literal keeper of the count πŸ’…

πŸ” SEE ALSO πŸ”

Bestie you literally have to see also this kernel file:

  • Kernel file ./sound/soc/stm/stm32_spdifrx.c

So that's the whole thing. This masterpiece of a manpage came from ./sound/soc/stm and is dated October 2026 β€” write it in your notes bestie, that's the tea. πŸ¦‹πŸ’–

πŸ“¦ where this page comes from