[PATCH v6 2/2] ASoC: rt715:add micmute led state control supports

Mark Brown broonie at kernel.org
Wed Apr 7 17:15:34 CEST 2021


On Sun, Apr 04, 2021 at 04:31:59PM +0800, Perry Yuan wrote:

> +static bool micmute_led_set;
> +static int  dmi_matched(const struct dmi_system_id *dmi)
> +{
> +	micmute_led_set = 1;
> +	return 1;
> +}

This isn't how we usually record DMI quirks, usually we'd query once on
probe and store the data in the driver data struct - see other users for
examples.

> @@ -358,6 +388,7 @@ static int rt715_sdca_put_volsw(struct snd_kcontrol *kcontrol,
>  	unsigned int mask = (1 << fls(max)) - 1;

> +	dmi_check_system(micmute_led_dmi_table);
> +	if (invert && micmute_led_set) {

This check for invert is odd and could probably use a comment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210407/35285801/attachment.sig>


More information about the Alsa-devel mailing list