snd_pcm_period_elapsed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ’œ:


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