snd_soc_add_card_controls(9)
β¨ snd_soc_add_card_controls π
okay so bestie, welcome to the snd_soc_add_card_controls(9) page in the Kernel API Manual β yes that's the whole title, we're not copying it again, it's right there π this one's short and sweet and honestly kind of iconic for it.
πΈ NAME πΈ
snd_soc_add_card_controls β add an array of controls to a SoC card. it's basically a convenience function to add a list of controls, that's the whole vibe π
π¦ SYNOPSIS π¦
int snd_soc_add_card_controls (struct snd_soc_card *soc_card , const
struct snd_kcontrol_new *controls , int num_controls );
like, three args, returns an int, no drama β¨
π ARGUMENTS π
soc_cardβ the SoC card you're adding controls to π«Ά the main character, honestlycontrolsβ the array of controls to add, all lined up ready to gonum_controlsβ number of elements in the array, so the kernel knows how far to walk down the list πΆββοΈ
π DESCRIPTION π
returns 0 for success, otherwise error. that's it. that's the whole description bestie, no cap π literally a one-liner and I respect it so much π
fr fr, if you get something that isn't 0 back, that's an error and you should handle it β that part's not a joke π
π₯ SEE ALSO π₯
kernel file ./sound/soc/soc-core.c is where the magic lives, and here's the whole squad of related functions, all of them, no skips π
snd_soc_find_dai(9)snd_soc_remove_pcm_runtime(9)snd_soc_add_pcm_runtime(9)snd_soc_runtime_set_dai_fmt(9)snd_soc_set_dmi_name(9)snd_soc_cnew(9)snd_soc_add_component_controls(9)snd_soc_add_dai_controls(9)snd_soc_register_card(9)snd_soc_unregister_card(9)snd_soc_register_dai(9)snd_soc_unregister_dais(9)snd_soc_register_dais(9)snd_soc_unregister_component_by_driver(9)
go read them, they're all lowkey obsessed with the same subsystem π§
anyway bestie, this page came from ./sound/soc and it's dated October 2026 β so when you're done adding your controls, go touch some grass and remember who told you πβ¨π
π¦ 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