tasdevice_se...e_profile_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tasdevice_set_capture_profile_id

okay so first things first, bestie β€” this page lives in the Kernel API Manual, and the function we're stanning today is tasdevice_set_capture_profile_id. say it with me: set. capture. profile. id. slay. πŸŽ€


✨ NAME ✨

tasdevice_set_capture_profile_id β€” sets the runtime capture profile index via an ALSA control, and honestly? it's giving gatekeeper-but-make-it-helpful πŸ’…


🌸 SYNOPSIS 🌸

int tasdevice_set_capture_profile_id (struct snd_kcontrol *kcontrol ,
   struct snd_ctl_elem_value *ucontrol );

like yes that's the whole signature, no cap, two args and a dream ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • kcontrol β€” the ALSA kcontrol handle, aka the little guy who triggers this whole operation. main character energy fr πŸ”₯
  • ucontrol β€” the user space control value, and it's literally carrying the brand-new profile index in its lil hands 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so here's the vibe check on what this mixer control handler actually does:

it takes the capture profile ID the user handed over and validates it against the maximum valid index β€” and that max? it was parsed from the loaded DSP firmware, so it's not just vibes, it's data. then it updates the runtime-stored capture profile ID, but only if the new value differs from the current active one. like, if you're not changing anything, why are you even here? πŸ’€

and if the submitted profile ID falls outside the valid range? immediate -EINVAL, no hesitation, no second chances. and yes, that includes the edge case where no valid configuration blocks are detected in firmware at all β€” that's also -EINVAL city, sorry bestie 😭

🚨 lowkey important: no actual DSP register write happens in this handler. none. zero. it's not that kind of function. the updated profile ID gets applied to the hardware when the next ALSA capture stream starts up, so it's more of a "save it for later" situation πŸ’…

and the caller doesn't need to take any extra codec lock here β€” the ALSA control core already guarantees serialized execution, so you can put that lock down, it's handled, we're fine, everything's fine 🧚✨


⭐ RETURN ⭐

  • 1 β€” the profile ID value was changed, we did the thing, iconic behavior πŸŽ‰
  • 0 β€” no modification needed, nothing to see here, we stay unbothered πŸ’…
  • -EINVAL β€” the input profile ID is out of valid range. respectfully? rejected. πŸ™ˆ

🌈 SEE ALSO 🌈


and that's the page, bestie! stay hydrated, keep your profile IDs in range, and remember this came to you from ./sound/soc/codecs, dated October 2026 β€” yes, the future, we're ahead of schedule, periodt πŸ’œπŸŒΈπŸ¦‹

πŸ“¦ where this page comes from