snd_pcm_period_elapsed(9)
π snd_pcm_period_elapsed β the Kernel API Manual tea π§
okay so bestie, welcome to the snd_pcm_period_elapsed(9) page, straight out of the Kernel API Manual. pull up a chair, grab a boba, and let's get into it β¨
πΈ NAME πΈ
snd_pcm_period_elapsed β it updates the status of the runtime for the next period, and it does it by acquiring the lock of the PCM substream. that's the whole vibe. no cap π
β¨ SYNOPSIS β¨
void snd_pcm_period_elapsed (struct snd_pcm_substream *substream );
like, that's it. one function, one argument, void return. clean, minimal, iconic π
π«Ά ARGUMENTS π«Ά
substreamβ the actual instance of the PCM substream. yes, THE substream. the one and only. main character energy fr fr π
π₯ DESCRIPTION π₯
so here's the tea. this function is mostly similar to snd_pcm_period_elapsed_under_stream_lock β like, they're basically siblings β except that this one acquires the lock of the PCM substream voluntarily. yes bestie, it takes the lock itself. independent. self-sufficient. we love to see it π
typically, it gets called by any type of IRQ handler when a hardware IRQ occurs, and its whole job is to notify the event that the batch of audio data frames β same size as the period of the buffer, no more no less β is already processed in the audio data transmission. so basically it's the "hey, that chunk is done!!" announcement, and it slays at it π
π§ quick reminder: this one voluntarily grabs the PCM substream lock, whereas snd_pcm_period_elapsed_under_stream_lock is the one you'd reach for when the lock is already held. don't mix them up, that's the whole distinction, iykyk π
π SEE ALSO π
the kernel file ./sound/core/pcm_lib.c has the receipts, and honestly the whole friend group is listed here, so let's give them all their moment π:
snd_pcm_set_ops(9)snd_pcm_set_sync_per_card(9)snd_interval_refine(9)snd_interval_div(9)snd_interval_muldivk(9)snd_interval_mulkdiv(9)snd_interval_ratnum(9)snd_interval_ratden(9)snd_interval_list(9)snd_interval_ranges(9)snd_pcm_hw_rule_add(9)snd_pcm_hw_constraint_mask(9)snd_pcm_hw_constraint_mask64(9)snd_pcm_hw_constraint_integer(9)snd_pcm_hw_constraint_minmax(9)snd_pcm_hw_constraint_list(9)snd_pcm_hw_constraint_ranges(9)snd_pcm_hw_constraint_ratnums(9)snd_pcm_hw_constraint_ratdens(9)snd_pcm_hw_constraint_msbits(9)snd_pcm_hw_constraint_step(9)snd_pcm_hw_constraint_pow2(9)snd_pcm_hw_rule_noresample(9)snd_pcm_hw_param_value(9)snd_pcm_hw_param_first(9)snd_pcm_hw_param_last(9)snd_pcm_hw_params_bits(9)snd_pcm_lib_ioctl(9)snd_pcm_period_elapsed_under_stream_lock(9)snd_pcm_add_chmap_ctls(9)
and that's the page!! sourced from ./sound/core, dated October 2026, and living forever as snd_pcm_period_elapsed(9) in the Kernel API Manual. go forth and notify those IRQ events bestie, you're gonna absolutely ate it π¦ππ
π¦ 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