[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ0PR19MB4528CC82A09AE20669BC26D084709@SJ0PR19MB4528.namprd19.prod.outlook.com>
Date: Mon, 12 Apr 2021 09:30:23 +0000
From: "Yuan, Perry" <Perry.Yuan@...l.com>
To: Mark Brown <broonie@...nel.org>
CC: "pobrn@...tonmail.com" <pobrn@...tonmail.com>,
"pierre-louis.bossart@...ux.intel.com"
<pierre-louis.bossart@...ux.intel.com>,
"oder_chiou@...ltek.com" <oder_chiou@...ltek.com>,
"perex@...ex.cz" <perex@...ex.cz>,
"tiwai@...e.com" <tiwai@...e.com>,
"hdegoede@...hat.com" <hdegoede@...hat.com>,
"mgross@...ux.intel.com" <mgross@...ux.intel.com>,
"Limonciello, Mario" <Mario.Limonciello@...l.com>,
"lgirdwood@...il.com" <lgirdwood@...il.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"platform-driver-x86@...r.kernel.org"
<platform-driver-x86@...r.kernel.org>,
"mario.limonciello@...look.com" <mario.limonciello@...look.com>,
Dell Client Kernel <Dell.Client.Kernel@...l.com>
Subject: RE: [PATCH v6 2/2] ASoC: rt715:add micmute led state control supports
Hi Mark:
> -----Original Message-----
> From: Mark Brown <broonie@...nel.org>
> Sent: 2021年4月7日 23:16
> To: Yuan, Perry
> Cc: pobrn@...tonmail.com; pierre-louis.bossart@...ux.intel.com;
> oder_chiou@...ltek.com; perex@...ex.cz; tiwai@...e.com;
> hdegoede@...hat.com; mgross@...ux.intel.com; Limonciello, Mario;
> lgirdwood@...il.com; alsa-devel@...a-project.org; linux-
> kernel@...r.kernel.org; platform-driver-x86@...r.kernel.org;
> mario.limonciello@...look.com; Dell Client Kernel
> Subject: Re: [PATCH v6 2/2] ASoC: rt715:add micmute led state control
> supports
>
> 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.
Thanks for your review.
I add one short comments for the reason in V7 patch.
I tried not to use the invert , the LED state and mute state will be not matching
So it has to use the invert to check if the mute state changed. Then notifiy the led trigger driver to set the new led state.
Perry
Powered by blists - more mailing lists