STRUCT SH_MEM_PULL_PUSH_MODE_POSITION_BUFFER(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms