frame_aligned(9)
π frame_aligned(9) β Kernel API Manual β¨
okay so real talk, bestie: this page lives in the Kernel API Manual and it's called frame_aligned(9), and it's honestly one of those tiny little helpers that you'd never notice but like... it's doing the most for you. π«Ά
β¨ NAME β¨
frame_aligned β check whether the byte size is aligned to frames π―
like, is your byte count a whole number of frames or is it giving "off by a crumb"? that's the whole vibe check. πΈ
π SYNOPSIS π
int frame_aligned (struct snd_pcm_runtime *runtime , ssize_t bytes );
that's the whole thing. one function, two args, no drama. periodt. π
π ARGUMENTS π
runtimeβ the PCM runtime instance, aka the little universe this check belongs to. you gotta tell it which PCM we're talking about, iykyk. π¦bytesβ the size in bytes that you want checked.ssize_t, so yes it's signed, and yes that's just how it is. π
β RETURN β
it hands back true if it's aligned, or false if it is not aligned. no in-between, no "it depends", no main character ambiguity. π
π SEE ALSO π
okay bestie this list is LONG, but every single one of these is iconic in its own right and they all live together in the kernel file ./include/sound/pcm.h β the way that one header file is carrying the entire sound subsystem, honestly obsessed π§:
snd_pcm_stream_linked(9)snd_pcm_stream_lock_irqsave(9)snd_pcm_stream_lock_irqsave_nested(9)snd_pcm_group_for_each_entry(9)snd_pcm_running(9)__snd_pcm_set_state(9)bytes_to_samples(9)bytes_to_frames(9)samples_to_bytes(9)frames_to_bytes(9)snd_pcm_lib_buffer_bytes(9)snd_pcm_lib_period_bytes(9)snd_pcm_playback_avail(9)snd_pcm_capture_avail(9)snd_pcm_playback_hw_avail(9)snd_pcm_capture_hw_avail(9)snd_pcm_playback_ready(9)snd_pcm_capture_ready(9)snd_pcm_playback_data(9)snd_pcm_playback_empty(9)snd_pcm_capture_empty(9)snd_pcm_trigger_done(9)params_channels(9)params_rate(9)params_period_size(9)params_periods(9)params_buffer_size(9)params_buffer_bytes(9)snd_pcm_hw_constraint_single(9)snd_pcm_format_cpu_endian(9)snd_pcm_set_sync(9)snd_pcm_set_runtime_buffer(9)snd_pcm_gettime(9)snd_pcm_set_fixed_buffer(9)snd_pcm_set_fixed_buffer_all(9)snd_pcm_sgbuf_get_addr(9)snd_pcm_sgbuf_get_chunk_size(9)snd_pcm_limit_isa_dma_size(9)snd_pcm_direction_name(9)snd_pcm_stream_str(9)snd_pcm_chmap_substream(9)pcm_format_to_bits(9)pcm_for_each_format(9)
like, go read them. they're all your besties too now. π₯π
and that's the page, bestie! no cap, no filler, just the alignment check. π
mwah π β this lil page is served fresh from ./include/sound, October 2026 edition, and honestly? slay. β¨π
π¦ 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