snd_pcm_trigger_done(9)
β¨ snd_pcm_trigger_done(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's a lil function called snd_pcm_trigger_done, and honestly? it's giving "quiet main character of the trigger loop" energy. let's get into it π
πΈ NAME πΈ
snd_pcm_trigger_done β mark the master substream π
π¦ SYNOPSIS π¦
void snd_pcm_trigger_done (struct snd_pcm_substream *substream , struct
snd_pcm_substream *master );
π ARGUMENTS π
substreamβ the pcm substream instance, aka the one you're touching rn π«Άmasterβ the linked master substream, aka the one actually running the show π
π DESCRIPTION π
okay so picture this: multiple substreams of the same card are linked together, and the hardware supports single-shot operation. in that case, the driver calls this function inside the loop in snd_pcm_group_for_each_entry β and what it does is mark the substream as "done" β
.
then, because of that mark, most of the trigger operations get performed only to the given master substream. like, the master is the one carrying the whole group, no cap π
and the trigger_master mark? it gets cleared at timestamp updates at the end of trigger operations. so it doesn't linger, it's not messy, it knows when to leave the party π. literally the cleanest little lifecycle.
ngl this is one of those tiny functions that looks like nothing and then you realize the entire group trigger flow depends on it. respect the icon π«‘
β SEE ALSO β
Kernel file ./include/sound/pcm.h β plus the whole extended friend group:
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)frame_aligned(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)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)
and that's the whole page, bestie!! π§π« this lil drop of wisdom lives in ./include/sound, stamped October 2026 β scream it, cite it, cite it again, periodt π
π
π¦ 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