STRUCT SND_COMPR_TSTAMP64(9)
π struct snd_compr_tstamp64(9) π
okay so bestie, welcome to the kernel API manual β this one lives in section 9 and it's literally called struct snd_compr_tstamp64. it's the timestamp descriptor, but make it 64-bit. the way that everything here is about *counting things really precisely*β¦ we love a data structure that knows its own worth π
β¨ NAME β¨
struct snd_compr_tstamp64 β a timestamp descriptor with its fields in 64 bit. yeah. that's the whole vibe. 64-bit fields. iconic. πΈ
π SYNOPSIS π
struct snd_compr_tstamp64 {
__u32 byte_offset;
__u64 copied_total;
__u64 pcm_frames;
__u64 pcm_io_frames;
__u32 sampling_rate;
};
look at her. five fields. perfectly balanced. the __u32s are the little ones and the __u64s are the big ones and honestly? she ate. β¨
π Members π
byte_offsetβ the byte offset in the ring buffer to the DSP. that's it, that's the field. πcopied_totalβ total number of bytes copied from/to the ring buffer to/by the DSP. a running total, no cap. πpcm_framesβ frames decoded or encoded by the DSP. β οΈ okay so listen: this field evolves by large steps, so it's only for monitoring your encoding/decoding progress. it shall not be used for timing estimates. do not try it. i'm serious. it is not that girl for timing. πpcm_io_framesβ frames rendered or received by the DSP into a mixer or an audio output/input. this is the one you use for A/V sync or time estimates. this is the main character for timing. use her. πsampling_rateβ sampling rate of audio. the rate at which the audio is being sampled. told you. simple. slay. π¦
π SEE ALSO π
kernel file ./include/uapi/sound/compress_offload.h β plus the whole friend group, fr fr:
struct snd_compressed_buffer(9)struct snd_compr_params(9)struct snd_compr_tstamp(9)struct snd_compr_avail(9)struct snd_compr_avail64(9)struct snd_compr_caps(9)struct snd_compr_codec_caps(9)enum sndrv_compress_encoder(9)struct snd_compr_metadata(9)struct snd_compr_task(9)enum snd_compr_state(9)struct snd_compr_task_status(9)
π«Ά reminder bestie:pcm_frames= vibes only, for watching progress.pcm_io_frames= the real one, for A/V sync and time estimates. don't mix them up, i'm begging π
and that's the page!! source/version is ./include/uapi/sound and the date is October 2026, and the whole thing is filed under struct snd_compr_tstamp64(9). mwah, go forth and timestamp responsibly ππ§β
π¦ 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