Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED
From: Takashi Iwai
Date: Fri Nov 09 2018 - 08:28:17 EST
On Fri, 09 Nov 2018 14:20:47 +0100,
Ayman Bagabas wrote:
>
> [1 <text/plain; UTF-8 (7bit)>]
>
> On Fri, Nov 9, 2018, 4:01 AM Takashi Iwai <tiwai@xxxxxxx wrote:
>
> On Thu, 08 Nov 2018 18:16:55 +0100,
> Ayman Bagabas wrote:
> >
> > diff --git a/drivers/platform/x86/huawei_wmi.c b/drivers/platform/x86/
> huawei_wmi.c
> > index 658c44ab2126..f06aa967c311 100644
> > --- a/drivers/platform/x86/huawei_wmi.c
> > +++ b/drivers/platform/x86/huawei_wmi.c
> > @@ -23,6 +23,7 @@
> >Â #include <linux/input.h>
> >Â #include <linux/input/sparse-keymap.h>
>
> >Â #include <linux/module.h>
> > +#include <linux/platform_data/x86/huawei_wmi.h>
> >Â
> >Â MODULE_AUTHOR("Ayman Bagabas <ayman.bagabas@xxxxxxxxx>");
> >Â MODULE_DESCRIPTION("Huawei WMI hotkeys");
> > diff --git a/include/linux/platform_data/x86/huawei_wmi.h b/include/
> linux/platform_data/x86/huawei_wmi.h
> > new file mode 100644
> > index 000000000000..dd251780ee5c
> > --- /dev/null
> > +++ b/include/linux/platform_data/x86/huawei_wmi.h
> > @@ -0,0 +1,9 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +#if IS_ENABLED(CONFIG_HUAWEI_LAPTOP)
> > +#ifndef __HUAWEI_WMI_H__
> > +#define __HUAWEI_WMI_H__
> > +
> > +int huawei_wmi_micmute_led_set(bool on);
> > +
> > +#endif
> > +#endif
>
> These changes should belong to the WMI patch.
>
> > @@ -5765,6 +5769,10 @@ static const struct hda_fixup alc269_fixups[] = {
> >Â Â Â Â Â Â Â Â.chained = true,
> >Â Â Â Â Â Â Â Â.chain_id = ALC269_FIXUP_HEADSET_MIC
> >Â Â Â Â},
> > +Â Â Â[ALC256_FIXUP_HUAWEI_WMI_MICMUTE_LED] = {
> > +Â Â Â Â Â Â Â.type = HDA_FIXUP_FUNC,
> > +Â Â Â Â Â Â Â.v.func = alc_fixup_huawei_wmi
> > +Â Â Â},
> >Â Â Â Â[ALC256_FIXUP_HUAWEI_MBXP_PINS] = {
> >Â Â Â Â Â Â Â Â.type = HDA_FIXUP_PINS,
> >Â Â Â Â Â Â Â Â.v.pins = (const struct hda_pintbl[]) {
> > @@ -5779,7 +5787,9 @@ static const struct hda_fixup alc269_fixups[] = {
> >Â Â Â Â Â Â Â Â Â Â Â Â{0x1e, 0x411111f0},
> >Â Â Â Â Â Â Â Â Â Â Â Â{0x21, 0x04211020},
> >Â Â Â Â Â Â Â Â Â Â Â Â{ }
> > -Â Â Â Â Â Â Â}
> > +Â Â Â Â Â Â Â},
> > +Â Â Â Â Â Â Â.chained = true,
> > +Â Â Â Â Â Â Â.chain_id = ALC256_FIXUP_HUAWEI_WMI_MICMUTE_LED
> >Â Â Â Â},
> >Â Â Â Â[ALC269_FIXUP_ASUS_X101_FUNC] = {
> >Â Â Â Â Â Â Â Â.type = HDA_FIXUP_FUNC,
>
> This means that ALC256_FIXUP_HUAWEI_MBXP_PINS performs both the pin
> config fixup and the mic-mute LED enablement.
>
> > @@ -6609,6 +6619,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl
> [] = {
> >Â Â Â ÂSND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad",
> ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
> >Â Â Â ÂSND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad",
> ALC298_FIXUP_TPT470_DOCK),
> >Â Â Â ÂSND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad",
> ALC298_FIXUP_TPT470_DOCK),
> > +Â Â ÂSND_PCI_QUIRK(0x19e5, 0x3200, "Huawei MBX",
> ALC256_FIXUP_HUAWEI_WMI_MICMUTE_LED),
> >Â Â Â ÂSND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MBXP",
> ALC256_FIXUP_HUAWEI_MBXP_PINS),
> >Â Â Â ÂSND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
> >Â Â Â ÂSND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB",
> ALC269_FIXUP_LENOVO_EAPD),
>
> ... and yet you add a new entry for performing only mic-mute LED.
> I guess the chaining is done wrongly above?
>
> They are suppose to be two different devices. MBXP should apply both, but the
> MBX should only perform the LED.
Then please write it the changelog. Otherwise readers have no idea
whether it's an intentional change or an oversight.
thanks,
Takashi