[PATCH v4 06/22] ASoC: ops: Introduce 'soc_set_enum_kctl'
Mark Brown
broonie at kernel.org
Mon Nov 9 12:59:38 PST 2026
> The new function is to be used to set enumerated controls to desired
> values. It is something a machine driver may call in fixup_controls.
The subject has soc_set_enum_kctl() but the code has
snd_soc_set_enum_kctl().
> +/**
> + * snd_soc_set_enum_kctl - Set enumerated control matching a name
> + *
> + * @card: where to look for the controls
> + * @name: name
> + * @value: string value to set the controls to
> + *
> + * Return 0 on success, else error.
> + */
> + for (i = 0; i < info->count; i++)
> + evalue->value.enumerated.item[i] = sel;
> +
> + return kctl->put(kctl, evalue);
> +}
put() returns 1 on change which is not what the kerneldoc says, the code
is the better choice here.
--
Mark Brown <broonie at kernel.org>
More information about the Linux-mediatek
mailing list