Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-24 Thread Pavel Machek
Hi! > > > > > > > > > You have general-purpose LED, yet you are treating it as > > > > > > > > > "something > > > > > > > > > special". That means ugly code (quoted above) and lack of > > > > > > > > > flexibility. > > > > > > > > > > > > > > > I'd prefer this to be normal LED and "mic muted" t

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-24 Thread Takashi Iwai
On Sat, 24 Nov 2018 00:33:09 +0100, Pavel Machek wrote: > > Hi! > > > > > > > > > You have general-purpose LED, yet you are treating it as > > > > > > > > "something > > > > > > > > special". That means ugly code (quoted above) and lack of > > > > > > > > flexibility. > > > > > > > > > > > > I

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-23 Thread Pavel Machek
Hi! > > > > > > > You have general-purpose LED, yet you are treating it as > > > > > > > "something > > > > > > > special". That means ugly code (quoted above) and lack of > > > > > > > flexibility. > > > > > > > > > I'd prefer this to be normal LED and "mic muted" to become normal > > trigger.

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-23 Thread Pavel Machek
HI! > > > > > > > You have general-purpose LED, yet you are treating it as > > > > > > > "something > > > > > > > special". That means ugly code (quoted above) and lack of > > > > > > > flexibility. > > > > > > > > > > > > > > For example, if my notebook lacks HDD LED, I can use scrollock > > >

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-22 Thread Takashi Iwai
On Thu, 22 Nov 2018 14:18:02 +0100, Pavel Machek wrote: > > On Thu 2018-11-22 13:36:43, Andy Shevchenko wrote: > > On Tue, Nov 20, 2018 at 2:19 PM Takashi Iwai wrote: > > > > > > On Tue, 20 Nov 2018 12:51:59 +0100, > > > Pavel Machek wrote: > > > > > > > > Hi! > > > > > > > > > > You have general

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-22 Thread Pavel Machek
On Thu 2018-11-22 13:36:43, Andy Shevchenko wrote: > On Tue, Nov 20, 2018 at 2:19 PM Takashi Iwai wrote: > > > > On Tue, 20 Nov 2018 12:51:59 +0100, > > Pavel Machek wrote: > > > > > > Hi! > > > > > > > > You have general-purpose LED, yet you are treating it as "something > > > > > special". That

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-22 Thread Takashi Iwai
On Thu, 22 Nov 2018 14:12:16 +0100, Pavel Machek wrote: > > On Tue 2018-11-20 13:19:26, Takashi Iwai wrote: > > On Tue, 20 Nov 2018 12:51:59 +0100, > > Pavel Machek wrote: > > > > > > Hi! > > > > > > > > You have general-purpose LED, yet you are treating it as "something > > > > > special". That

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-22 Thread Pavel Machek
On Tue 2018-11-20 13:19:26, Takashi Iwai wrote: > On Tue, 20 Nov 2018 12:51:59 +0100, > Pavel Machek wrote: > > > > Hi! > > > > > > You have general-purpose LED, yet you are treating it as "something > > > > special". That means ugly code (quoted above) and lack of flexibility. > > > > > > > > F

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-22 Thread Andy Shevchenko
On Tue, Nov 20, 2018 at 2:19 PM Takashi Iwai wrote: > > On Tue, 20 Nov 2018 12:51:59 +0100, > Pavel Machek wrote: > > > > Hi! > > > > > > You have general-purpose LED, yet you are treating it as "something > > > > special". That means ugly code (quoted above) and lack of flexibility. > > > > > > >

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-20 Thread Takashi Iwai
On Tue, 20 Nov 2018 12:51:59 +0100, Pavel Machek wrote: > > Hi! > > > > You have general-purpose LED, yet you are treating it as "something > > > special". That means ugly code (quoted above) and lack of flexibility. > > > > > > For example, if my notebook lacks HDD LED, I can use scrollock LED

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-20 Thread Pavel Machek
Hi! > > You have general-purpose LED, yet you are treating it as "something > > special". That means ugly code (quoted above) and lack of flexibility. > > > > For example, if my notebook lacks HDD LED, I can use scrollock LED for > > that instead. Or, in reverse way, maybe "mic mute" LED is not u

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-20 Thread Takashi Iwai
On Tue, 20 Nov 2018 10:36:10 +0100, Pavel Machek wrote: > > On Tue 2018-11-20 10:23:25, Takashi Iwai wrote: > > On Tue, 20 Nov 2018 10:10:39 +0100, > > Pavel Machek wrote: > > > > > > On Tue 2018-11-20 08:07:09, Takashi Iwai wrote: > > > > On Tue, 20 Nov 2018 00:57:13 +0100, > > > > Pavel Machek

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-20 Thread Pavel Machek
On Tue 2018-11-20 10:23:25, Takashi Iwai wrote: > On Tue, 20 Nov 2018 10:10:39 +0100, > Pavel Machek wrote: > > > > On Tue 2018-11-20 08:07:09, Takashi Iwai wrote: > > > On Tue, 20 Nov 2018 00:57:13 +0100, > > > Pavel Machek wrote: > > > > > > > > > +#if IS_ENABLED(CONFIG_HUAWEI_LAPTOP) > > > > >

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-20 Thread Takashi Iwai
On Tue, 20 Nov 2018 10:10:39 +0100, Pavel Machek wrote: > > On Tue 2018-11-20 08:07:09, Takashi Iwai wrote: > > On Tue, 20 Nov 2018 00:57:13 +0100, > > Pavel Machek wrote: > > > > > > > +#if IS_ENABLED(CONFIG_HUAWEI_LAPTOP) > > > > +#include > > > > + > > > > +static int (*huawei_wmi_micmute_led

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-20 Thread Pavel Machek
On Tue 2018-11-20 08:07:09, Takashi Iwai wrote: > On Tue, 20 Nov 2018 00:57:13 +0100, > Pavel Machek wrote: > > > > > +#if IS_ENABLED(CONFIG_HUAWEI_LAPTOP) > > > +#include > > > + > > > +static int (*huawei_wmi_micmute_led_set_func)(bool); > > > + > > > > So we should not be doing this. > > > >

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-19 Thread Takashi Iwai
On Tue, 20 Nov 2018 00:57:13 +0100, Pavel Machek wrote: > > > +#if IS_ENABLED(CONFIG_HUAWEI_LAPTOP) > > +#include > > + > > +static int (*huawei_wmi_micmute_led_set_func)(bool); > > + > > So we should not be doing this. > > Thinkpad ACPI module exports its LEDs there, for example. Both thinkpa

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-19 Thread Pavel Machek
Hi! > Some of Huawei laptops come with a LED in the micmute key. This patch > enables and disable this LED accordingly. > > Signed-off-by: Ayman Bagabas NAK. We already have a LED subsystem. > +#if IS_ENABLED(CONFIG_HUAWEI_LAPTOP) > +#include > + > +static int (*huawei_wmi_micmute_led_set_f

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-09 Thread Takashi Iwai
On Fri, 09 Nov 2018 14:20:47 +0100, Ayman Bagabas wrote: > > [1 ] > > On Fri, Nov 9, 2018, 4:01 AM Takashi Iwai > 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 > >

Re: [PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-09 Thread Takashi Iwai
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 @@ > #i

[PATCH v3 3/3] ALSA: hda: add support for Huawei WMI micmute LED

2018-11-08 Thread Ayman Bagabas
Some of Huawei laptops come with a LED in the micmute key. This patch enables and disable this LED accordingly. Signed-off-by: Ayman Bagabas --- drivers/platform/x86/huawei_wmi.c| 1 + include/linux/platform_data/x86/huawei_wmi.h | 9 sound/pci/hda/huawei_wmi_helper.c