snd_soc_dap...trol_to_dapm(9)
π
snd_soc_dapm_kcontrol_to_dapm β aka snd_soc_dap...trol_to_dapm(9) β¨
okay bestie, so this page is from the Kernel API Manual, and the whole vibe is one tiny lil function that hands you the dapm context that's chillin' behind a kcontrol. that's it. that's the whole gig. but like, it's important so pay attention π
πΈ NAME πΈ
snd_soc_dapm_kcontrol_to_dapm β returns the dapm context associated to a kcontrol. literally just gives you back the dapm context that goes with the kcontrol you hand it. no cap π«Ά
β¨ SYNOPSIS β¨
struct snd_soc_dapm_context * snd_soc_dapm_kcontrol_to_dapm (struct snd_kcontrol *kcontrol );
like, you give it a struct snd_kcontrol * and you get back a struct snd_soc_dapm_context *. that's the trade. iconique π«
π¦ ARGUMENTS π¦
kcontrolβ the kcontrol. that's it, that's the argument. it's the kcontrol you're asking about, the main character of this whole operation π
π₯ NOTE π₯
bestie. listen. π¨ this function must only be used on kcontrols that are known to have been registered for a CODEC. otherwise the behaviour is undefined. not "probably fine", not "eh it'll work out", β undefined. do not test it. do not f around and find out. π
like ngl this is the one rule and it's lowkey non-negotiable π
β SEE ALSO β
the whole friend group, in the kernel file ./sound/soc/soc-dapm.c:
snd_soc_dapm_kcontrol_to_widget(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_add_routes(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)
go read them. they're all in ./sound/soc/soc-dapm.c and they ate π
anyway that's the tea π this page lives under ./sound/soc and it's dated October 2026, in the Kernel API Manual. mwah, ily, go forth and only call this on CODEC-registered kcontrols ππ§ββοΈβ¨
π¦ 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