STRUCT SH_MEM_PULL_PUSH_MODE_POSITION_BUFFER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct sh_mem_pull_push_mode_position_buffer(9)

okay so bestie, we're in the Kernel API Manual, section 9 β€” and today's main character is literally a shared position buffer. yes, that one. it's called struct sh_mem_pull_push_mode_position_buffer and honestly? iconic. πŸŽ€


✨ NAME ✨

struct sh_mem_pull_push_mode_position_buffer β€” the shared position buffer, no cap πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

she's small, she's structured, she's giving "four uint32_t and a dream":

struct sh_mem_pull_push_mode_position_buffer {
    uint32_t frame_counter;
    uint32_t index;
    uint32_t timestamp_us_lsw;
    uint32_t timestamp_us_msw;
 };

🌸 Members 🌸

okay so let's meet the girls one by one 🫢

  • frame_counter β€” the synchronization counter. she's the vibe check for the whole struct, that's her job πŸ’…
  • index β€” the current read/write index, measured in bytes. yes, bytes, bestie, don't get it twisted πŸ“
  • timestamp_us_lsw β€” the lower 32 bits of the timestamp, in microseconds. the little spoon πŸ₯„
  • timestamp_us_msw β€” the upper 32 bits of the timestamp, in microseconds. the big spoon πŸ₯„βœ¨

πŸ”₯ Description πŸ”₯

okay this is the important part so listen up 😭

you should read the frame counter before and after the other fields. like, both times. why? because that's how you make sure the DSP did not update those fields while they were being read. no cap, that's the whole safety mechanism β€” split the read, check the counter, stay safe 🧚✨

bestie please don't skip the double-read, it's literally the entire point πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, they're all in the kernel file ./sound/soc/qcom/qdsp6/audioreach.h and they all ate πŸ’œ

  • struct event_cfg_sh_mem_pull_push_mode_watermark_t(9)
  • struct apm_module_register_events(9)
  • struct apm_module_event(9)
  • struct param_id_hw_ep_frame_duration(9)
  • struct param_id_sh_mem_pull_push_mode_cfg(9)

and that's the whole page, bestie 🌈 this one came to you straight out of ./sound/soc/qcom/qdsp6 and it's dated October 2026 β€” periodt, slay, go read your structs πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from