STRUCT SND_COMPR_TSTAMP64(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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