snd_soc_dapm_add_routes(9)
πΈ NAME πΈ
snd_soc_dapm_add_routes β okay so this is literally the function that adds routes between DAPM widgets, bestie. It's from the Kernel API Manual and it's gonna be your new fave, no cap. π
β¨ SYNOPSIS β¨
int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
const struct snd_soc_dapm_route *route,
int num);
π ARGUMENTS π
dapmβ the DAPM context, aka the whole vibe zone you're working inside. π«Άrouteβ the audio routes themselves, like the actual path map you're serving up. πnumβ how many routes you're bringing to the function, lowkey important so it knows when to stop. β
π DESCRIPTION π
So basically this function connects 2 DAPM widgets together via a named audio path, and it's giving matchmaker energy fr fr. π
The sink is the widget receiving the audio signal (the one catching the vibe), and the source is the one sending the audio signal (the one serving it). The way that sink/source pair works is literally the main character energy of this whole function. π¦
It returns 0 for success, and if something goes sideways you get an error instead. On error, all resources can be freed with a call to snd_soc_card_free, so don't leave your bestie hanging with leaked memory, bestie. Clean up your mess. π
Not me stressing about error handling in kernel code β but seriously, on error, call snd_soc_card_free to free all resources. Periodt. π₯
π SEE ALSO π
All the related functions and the kernel file itself, because the lore is deep and you should know the whole friend group:
- Kernel file
./sound/soc/soc-dapm.c snd_soc_dapm_kcontrol_to_widget(9)snd_soc_dapm_kcontrol_to_dapm(9)snd_soc_dapm_kcontrol_to_component(9)snd_soc_dapm_force_bias_level(9)snd_soc_dapm_init_bias_level(9)snd_soc_dapm_set_bias_level(9)snd_soc_dapm_get_bias_level(9)snd_soc_dapm_dai_get_connected_widgets(9)snd_soc_dapm_free_widget(9)snd_soc_dapm_sync_unlocked(9)snd_soc_dapm_sync(9)snd_soc_dapm_del_routes(9)snd_soc_dapm_new_widgets(9)snd_soc_dapm_get_volsw(9)snd_soc_dapm_put_volsw(9)snd_soc_dapm_get_enum_double(9)snd_soc_dapm_put_enum_double(9)snd_soc_dapm_info_pin_switch(9)snd_soc_dapm_get_pin_switch(9)snd_soc_dapm_get_component_pin_switch(9)snd_soc_dapm_put_pin_switch(9)snd_soc_dapm_put_component_pin_switch(9)snd_soc_dapm_new_control(9)snd_soc_dapm_new_controls(9)snd_soc_dapm_new_dai_widgets(9)snd_soc_dapm_stream_event(9)snd_soc_dapm_enable_pin_unlocked(9)snd_soc_dapm_enable_pin(9)snd_soc_dapm_force_enable_pin_unlocked(9)snd_soc_dapm_force_enable_pin(9)snd_soc_dapm_disable_pin_unlocked(9)snd_soc_dapm_disable_pin(9)snd_soc_dapm_get_pin_status(9)snd_soc_dapm_ignore_suspend(9)snd_soc_dapm_pin_has_prefix(9)snd_soc_dapm_free(9)
Okay that's the whole page bestie you ate that π β¨
This icon of a manpage was brought to you by ./sound/soc, dated October 2026, and it's literally snd_soc_dapm_add_routes(9) β go forth and wire up those widgets, queen. ππ¦πΈ
π¦ 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