From: Mark Brown <broonie@kernel.org>
To: Perry Yuan <Perry.Yuan@dell.com>
Cc: pobrn@protonmail.com, pierre-louis.bossart@linux.intel.com,
oder_chiou@realtek.com, perex@perex.cz, tiwai@suse.com,
hdegoede@redhat.com, mgross@linux.intel.com,
Mario.Limonciello@dell.com, lgirdwood@gmail.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v4 2/2] ASoC: rt715:add micmute led state control supports
Date: Mon, 8 Mar 2021 17:24:09 +0000 [thread overview]
Message-ID: <20210308172409.GF4656@sirena.org.uk> (raw)
In-Reply-To: <20210301093834.19524-1-Perry_Yuan@Dell.com>
[-- Attachment #1: Type: text/plain, Size: 642 bytes --]
On Mon, Mar 01, 2021 at 05:38:34PM +0800, Perry Yuan wrote:
> + /* Micmute LED state changed by muted/unmute switch */
> + if (mc->invert) {
> + if (ucontrol->value.integer.value[0] || ucontrol->value.integer.value[1]) {
> + micmute_led = LED_OFF;
> + } else {
> + micmute_led = LED_ON;
> + }
> + ledtrig_audio_set(LED_AUDIO_MICMUTE, micmute_led);
> + }
These conditionals on inversion seem weird and counterintuitive. If
we're going with this approach it would probably be clearer to define a
custom operation for the affected controls that wraps the standard one
and adds the LED setting rather than keying off invert like this.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-03-08 17:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 9:38 [PATCH v4 2/2] ASoC: rt715:add micmute led state control supports Perry Yuan
2021-03-01 14:30 ` Pierre-Louis Bossart
2021-03-08 17:24 ` Mark Brown [this message]
2021-03-22 9:25 ` Yuan, Perry
2021-03-22 14:37 ` Jaroslav Kysela
2021-03-22 15:01 ` Hans de Goede
2021-03-25 14:11 ` Yuan, Perry
2021-03-25 15:07 ` Hans de Goede
2021-03-26 7:20 ` Yuan, Perry
2021-03-25 8:19 ` Yuan, Perry
2021-03-25 9:37 ` Jaroslav Kysela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210308172409.GF4656@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Mario.Limonciello@dell.com \
--cc=Perry.Yuan@dell.com \
--cc=alsa-devel@alsa-project.org \
--cc=hdegoede@redhat.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=pobrn@protonmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox