From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: tiwai@suse.com, "Jaroslav Kysela" <perex@perex.cz>,
"Wenwen Wang" <wenwen@cs.uga.edu>,
"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
"Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
"Hui Wang" <hui.wang@canonical.com>,
"Kailang Yang" <kailang@realtek.com>,
"Jian-Hong Pan" <jian-hong@endlessm.com>,
"Tomas Espeleta" <tomas.espeleta@gmail.com>,
"Thomas Hebb" <tommyhebb@gmail.com>,
"moderated list:SOUND" <alsa-devel@alsa-project.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] ALSA: hda/realtek: Add COEF controlled micmute LED support
Date: Thu, 18 Jun 2020 18:16:15 +0800 [thread overview]
Message-ID: <50F84AE3-CA74-4231-86F2-30D7C7920B4D@canonical.com> (raw)
In-Reply-To: <s5hwo44ygku.wl-tiwai@suse.de>
> On Jun 18, 2020, at 15:32, Takashi Iwai <tiwai@suse.de> wrote:
>
> On Thu, 18 Jun 2020 07:15:21 +0200,
> Kai-Heng Feng wrote:
>>
>>
>>
>>> On Jun 17, 2020, at 23:50, Takashi Iwai <tiwai@suse.de> wrote:
>>>
>>> On Wed, 17 Jun 2020 17:24:30 +0200,
>>> Kai-Heng Feng wrote:
>>>>
>>>>
>>>>
>>>>> On Jun 17, 2020, at 19:55, Takashi Iwai <tiwai@suse.de> wrote:
>>>>>
>>>>> On Wed, 17 Jun 2020 12:29:01 +0200,
>>>>> Kai-Heng Feng wrote:
>>>>>>
>>>>>> Currently, HDA codec LED class can only be used by GPIO controlled LED.
>>>>>> However, there are some new systems that control LED via COEF instead of
>>>>>> GPIO.
>>>>>>
>>>>>> In order to support those systems, create a new helper that can be
>>>>>> facilitated by both COEF controlled and GPIO controlled LED.
>>>>>>
>>>>>> In addition to that, add LED_CORE_SUSPENDRESUME flag since some systems
>>>>>> don't restore the LED properly after suspend.
>>>>>>
>>>>>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>>>>>
>>>>> Thanks for the quick follow up, the issues I pointed were fixed.
>>>>>
>>>>> But, now looking at the code change again, I'm no longer sure whether
>>>>> it's the right move.
>>>>>
>>>>> Basically, the led cdev should serve only for turning on/off the LED
>>>>> as given. But your patch changes it to call the generic mixer
>>>>> updater, which is rather the one who would call the led cdev state
>>>>> update itself. That is, it's other way round.
>>>>>
>>>>> IMO, what we need is to make all places calling
>>>>> snd_hda_gen_add_micmute_led() to create led cdev, and change those
>>>>> calls with snd_hda_gen_fixup_micmute_led().
>>>>
>>>> Ok, so it's the same as patch v1.
>>>> How should we handle vendors other than HP?
>>>> Only create led cdev if the ID matches to HP?
>>>
>>> It's fine to create a LED classdev for other vendors, too. But the
>>> problem is that it wasn't consistent. With the LED classdev, we
>>> should use only cdev, instead of mixing up different ways.
>>
>> Ok, now I get what you meant...
>>
>>>
>>> I wrote a few patches to convert those mic-mute LED stuff to classdev,
>>> including some cleanups. The patches are found in
>>> topic/hda-micmute-led branch of sound git tree. Could you check it?
>>>
>>> Note that it's totally untested. Also it doesn't contain yet
>>> LED_CORE_SUSPENDRESUME, which should be done in another patch in
>>> anyway.
>>
>> Other than LED_CORE_SUSPENDRESUME, it works great!
>>
>> Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>
> Good to hear!
>
>>>>> It'll be a bit more changes and likely not fitting with 5.8, but the
>>>>> whole result will be more consistent.
>>>>
>>>> A bit off topic, but do you think it's reasonable to also create led cdev for mute LED, in addition to micmute LED?
>>>> I just found that the LEDs are still on during system suspend, and led cdev has the ability to turn off the LEDs on system suspend.
>>>
>>> Yes, it makes sense, too. But the playback mute handling is a bit
>>> more complicated than the mic-mute LED because it's implemented with a
>>> vmaster hook. I'll take a look later.
>>
>> Thanks. I'll be happy to test it.
>
> OK, I worked on this further and converted the whole mute LED handling
> with LED classdev.
>
> The topic/hda-micmute-led branch was updated again. Could you give it
> a try? If that's OK, I'll add your tested-by tag and submit the
> patches to ML later.
Thanks for the work, it works great.
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>
> The old patchset is saved in topic/hda-micmute-led-old branch just for
> a reference.
>
>
> thanks,
>
> Takashi
next prev parent reply other threads:[~2020-06-18 10:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-17 10:29 [PATCH v3 1/2] ALSA: hda/realtek: Add COEF controlled micmute LED support Kai-Heng Feng
2020-06-17 10:29 ` [PATCH v3 2/2] ALSA: hda/realtek: Add mute LED and micmute LED support for HP systems Kai-Heng Feng
2020-06-17 11:55 ` Takashi Iwai
2020-06-17 15:25 ` Kai-Heng Feng
2020-06-17 15:44 ` Takashi Iwai
2020-06-17 11:55 ` [PATCH v3 1/2] ALSA: hda/realtek: Add COEF controlled micmute LED support Takashi Iwai
2020-06-17 15:24 ` Kai-Heng Feng
2020-06-17 15:50 ` Takashi Iwai
2020-06-18 5:15 ` Kai-Heng Feng
2020-06-18 7:32 ` Takashi Iwai
2020-06-18 10:16 ` Kai-Heng Feng [this message]
2020-06-18 11:00 ` Takashi Iwai
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=50F84AE3-CA74-4231-86F2-30D7C7920B4D@canonical.com \
--to=kai.heng.feng@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=hui.wang@canonical.com \
--cc=jian-hong@endlessm.com \
--cc=kailang@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
--cc=tomas.espeleta@gmail.com \
--cc=tommyhebb@gmail.com \
--cc=wenwen@cs.uga.edu \
/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;
as well as URLs for NNTP newsgroup(s).