STRUCT HDA_DAI_WIDGET_DMA_OPS(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ struct hda_dai_widget_dma_ops โ€” NAME โœจ

okay so, bestie, this is struct hda_dai_widget_dma_ops, and it's the DAI DMA ops struct ๐Ÿ’… โ€” and here's the vibe: it's optional by default unless you specify otherwise. That's it, that's the whole personality. From the Kernel API Manual, obviously ๐Ÿ‘‘


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

no cap, here's the whole struct, character for character, don't @ me:

struct hda_dai_widget_dma_ops {
    struct hdac_ext_stream *(*get_hext_stream)(struct snd_sof_dev *sdev,
struct snd_soc_dai *cpu_dai, struct snd_pcm_substream *substream);
    struct hdac_ext_stream *(*assign_hext_stream)(struct snd_sof_dev
*sdev, struct snd_soc_dai *cpu_dai, struct snd_pcm_substream *substream,
struct hdac_ext_link *hlink);
    void (*release_hext_stream)(struct snd_sof_dev *sdev, struct
snd_soc_dai *cpu_dai, struct snd_pcm_substream *substream);
    void (*setup_hext_stream)(struct snd_sof_dev *sdev, struct
hdac_ext_stream *hext_stream, unsigned int format_val);
    void (*reset_hext_stream)(struct snd_sof_dev *sdev, struct
hdac_ext_stream *hext_sream);
    int (*pre_trigger)(struct snd_sof_dev *sdev, struct snd_soc_dai
*cpu_dai, struct snd_pcm_substream *substream, int cmd);
    int (*trigger)(struct snd_sof_dev *sdev, struct snd_soc_dai
*cpu_dai, struct snd_pcm_substream *substream, int cmd);
    int (*post_trigger)(struct snd_sof_dev *sdev, struct snd_soc_dai
*cpu_dai, struct snd_pcm_substream *substream, int cmd);
    void (*codec_dai_set_stream)(struct snd_sof_dev *sdev, struct
snd_pcm_substream *substream, struct hdac_stream *hstream);
    unsigned int (*calc_stream_format)(struct snd_sof_dev *sdev, struct
snd_pcm_substream *substream, struct snd_pcm_hw_params *params);
    struct hdac_ext_link * (*get_hlink)(struct snd_sof_dev *sdev, struct
snd_pcm_substream *substream);
 };

(yes, hext_sream in reset_hext_stream is spelled exactly like that in the source โ€” not me, I would never ๐Ÿ™ˆ โ€” and yes, get_hlink has that lil space before the (. copying faithfully is the whole assignment ๐Ÿซถ)


๐Ÿ’– Members ๐Ÿ’–

okay so let's go member by member, this is the main character section:

  • get_hext_stream โ€” ngl this one is mandatory, bestie. it's the function pointer that grabs the saved pointer to struct hdac_ext_stream. you literally cannot skip it. periodt.
  • assign_hext_stream โ€” function pointer that assigns a hdac_ext_stream. lowkey essential to the plot.
  • release_hext_stream โ€” function pointer that releases the hdac_ext_stream. letting it go, giving it space to heal ๐ŸŒธ
  • setup_hext_stream โ€” function pointer for hdac_ext_stream setup. the getting-ready-for-the-party part โœจ
  • reset_hext_stream โ€” function pointer for hdac_ext_stream reset. hitting refresh, we love a fresh start ๐Ÿฆ‹
  • pre_trigger โ€” function pointer for DAI DMA pre-trigger actions. the before energy.
  • trigger โ€” function pointer for DAI DMA trigger actions. the main event, the moment, the slay ๐Ÿ”ฅ
  • post_trigger โ€” function pointer for DAI DMA post-trigger actions. the after energy, the debrief.
  • codec_dai_set_stream โ€” function pointer that sets the codec-side stream information. codec side said "I also have lore" ๐Ÿ’€
  • calc_stream_format โ€” function pointer that determines the stream format from hw_params, and for HDaudio codec DAI it does it from the .sig bits. the math girlie of the group ๐Ÿงฎ
  • get_hlink โ€” mandatory function pointer โŒ›๏ธ no skipping! it retrieves the hlink, mainly to program LOSIDV for legacy HDaudio links, or to program HDaudio Extended Link registers. iconic behavior, tbh ๐Ÿ‘‘

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

  • Kernel file ./sound/soc/sof/intel/hda.h โ€” go read it, iykyk ๐Ÿ’œ

fr fr: everything this struct does is optional by default unless specified otherwise โ€” except get_hext_stream and get_hlink, those two are mandatory and they know it ๐Ÿ‘€

and that's the whole page, bestie!! ๐ŸŽ€ source is ./sound/soc/sof/intel, dated October 2026, from the Kernel API Manual โ€” mwah, go forth and program those Extended Link registers ๐Ÿ’…โœจ๐ŸŒˆ

๐Ÿ“ฆ where this page comes from