snd_soc_cnew(9)
β¨ NAME β¨
snd_soc_cnew β create new control π
Like, it literally makes a brand-new control. That's the whole vibe. π
πΈ SYNOPSIS πΈ
struct snd_kcontrol * snd_soc_cnew (const struct snd_kcontrol_new
*_template , void *data , const char *long_name , const char *prefix );
okay bestie, yes, that return type is a struct snd_kcontrol * and yes, it's a whole lot of characters. copy it exactly, don't @ me. π«Ά
π¦ ARGUMENTS π¦
_templateβ the control template, aka the blueprint you're copying from. main character of the operation, honestly. πdataβ the control's private data. it's giving "personal business, keep it moving." πlong_nameβ the control's long name. yes, the long one. πprefixβ the control name prefix, sitting right there at the front like a little label. π·οΈ
β DESCRIPTION β
So the whole thing is: create a new mixer control from a template control. That's it, that's the function. Template in, control out, slay. β¨
Returns 0 for success, else error. no cap β zero is the good number here. if you get anything else, something went sideways. π
π SEE ALSO π
Kernel file ./sound/soc/soc-core.c β the source file, right there in ./sound/soc, go read it if you're feeling brave. π
And the whole friend group of related calls, in order, no one left out:
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_add_component_controls(9)snd_soc_add_card_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 off, read all of them, iykyk π₯
okay that's the whole page, bestie π
this one lives in ./sound/soc, the version/date stamp on it is October 2026, and the page is called snd_soc_cnew(9) β part of the Kernel API Manual, obviously. mwah, go create some controls, you're gonna eat. πππ
π¦ 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