* [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
@ 2017-12-19 3:38 Shih-Yuan Lee (FourDollars)
2017-12-19 8:34 ` Pali Rohár
2017-12-19 9:06 ` Pali Rohár
0 siblings, 2 replies; 11+ messages in thread
From: Shih-Yuan Lee (FourDollars) @ 2017-12-19 3:38 UTC (permalink / raw)
To: platform-driver-x86
Cc: Matthew Garrett, Pali Rohár, Darren Hart, Andy Shevchenko
The Dell Latitude 5495 has the mic mute key.
Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
---
drivers/platform/x86/dell-wmi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index fb25b20..d40f803 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
* override them.
*/
static const struct key_entry dell_wmi_keymap_type_0010[] = {
+ /* Mic mute */
+ { KE_KEY, 0x150, { KEY_F20 } },
+
/* Fn-lock */
{ KE_IGNORE, 0x151, { KEY_RESERVED } },
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
2017-12-19 3:38 [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495 Shih-Yuan Lee (FourDollars)
@ 2017-12-19 8:34 ` Pali Rohár
[not found] ` <CAApEhgh1XfzeoWL6JQN-oOn9yGvJWB74jdfFKtL==UEyhNQs7Q@mail.gmail.com>
2017-12-19 9:06 ` Pali Rohár
1 sibling, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2017-12-19 8:34 UTC (permalink / raw)
To: Shih-Yuan Lee (FourDollars)
Cc: platform-driver-x86, Matthew Garrett, Darren Hart, Andy Shevchenko
On Tuesday 19 December 2017 11:38:34 Shih-Yuan Lee (FourDollars) wrote:
> The Dell Latitude 5495 has the mic mute key.
>
> Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
> ---
> drivers/platform/x86/dell-wmi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
> index fb25b20..d40f803 100644
> --- a/drivers/platform/x86/dell-wmi.c
> +++ b/drivers/platform/x86/dell-wmi.c
> @@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
> * override them.
> */
> static const struct key_entry dell_wmi_keymap_type_0010[] = {
> + /* Mic mute */
> + { KE_KEY, 0x150, { KEY_F20 } },
Hi! Are you sure that this key code needs to be in 0010 table? Because
primary this table is constructed from DMI information. See
array bios_to_linux_keycode[].
> +
> /* Fn-lock */
> { KE_IGNORE, 0x151, { KEY_RESERVED } },
>
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
[not found] ` <CAApEhgh1XfzeoWL6JQN-oOn9yGvJWB74jdfFKtL==UEyhNQs7Q@mail.gmail.com>
@ 2017-12-19 8:41 ` Pali Rohár
2017-12-19 8:45 ` Shih-Yuan Lee (FourDollars)
0 siblings, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2017-12-19 8:41 UTC (permalink / raw)
To: Shih-Yuan Lee (FourDollars)
Cc: platform-driver-x86, Matthew Garrett, Darren Hart, Andy Shevchenko
On Tuesday 19 December 2017 16:38:32 Shih-Yuan Lee (FourDollars) wrote:
> On Tue, Dec 19, 2017 at 4:34 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>
> > On Tuesday 19 December 2017 11:38:34 Shih-Yuan Lee (FourDollars) wrote:
> > > The Dell Latitude 5495 has the mic mute key.
> > >
> > > Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
> > > ---
> > > drivers/platform/x86/dell-wmi.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/platform/x86/dell-wmi.c
> > b/drivers/platform/x86/dell-wmi.c
> > > index fb25b20..d40f803 100644
> > > --- a/drivers/platform/x86/dell-wmi.c
> > > +++ b/drivers/platform/x86/dell-wmi.c
> > > @@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
> > > * override them.
> > > */
> > > static const struct key_entry dell_wmi_keymap_type_0010[] = {
> > > + /* Mic mute */
> > > + { KE_KEY, 0x150, { KEY_F20 } },
> >
> > Hi! Are you sure that this key code needs to be in 0010 table? Because
> > primary this table is constructed from DMI information. See
> > array bios_to_linux_keycode[].
> >
> Because I saw "dell_wmi: Unknown key with type 0x0010 and code 0x0150
> pressed" in dmesg when pressing the mic mute key.
And do you see following message?
"firmware scancode 0x%x maps to unrecognized keycode 0x%x\n"
> >
> > > +
> > > /* Fn-lock */
> > > { KE_IGNORE, 0x151, { KEY_RESERVED } },
> > >
> >
> > --
> > Pali Rohár
> > pali.rohar@gmail.com
> >
>
>
>
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
2017-12-19 8:41 ` Pali Rohár
@ 2017-12-19 8:45 ` Shih-Yuan Lee (FourDollars)
2017-12-19 9:00 ` Pali Rohár
0 siblings, 1 reply; 11+ messages in thread
From: Shih-Yuan Lee (FourDollars) @ 2017-12-19 8:45 UTC (permalink / raw)
To: Pali Rohár
Cc: platform-driver-x86, Matthew Garrett, Darren Hart, Andy Shevchenko
On Tue, Dec 19, 2017 at 4:41 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Tuesday 19 December 2017 16:38:32 Shih-Yuan Lee (FourDollars) wrote:
>> On Tue, Dec 19, 2017 at 4:34 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>>
>> > On Tuesday 19 December 2017 11:38:34 Shih-Yuan Lee (FourDollars) wrote:
>> > > The Dell Latitude 5495 has the mic mute key.
>> > >
>> > > Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
>> > > ---
>> > > drivers/platform/x86/dell-wmi.c | 3 +++
>> > > 1 file changed, 3 insertions(+)
>> > >
>> > > diff --git a/drivers/platform/x86/dell-wmi.c
>> > b/drivers/platform/x86/dell-wmi.c
>> > > index fb25b20..d40f803 100644
>> > > --- a/drivers/platform/x86/dell-wmi.c
>> > > +++ b/drivers/platform/x86/dell-wmi.c
>> > > @@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
>> > > * override them.
>> > > */
>> > > static const struct key_entry dell_wmi_keymap_type_0010[] = {
>> > > + /* Mic mute */
>> > > + { KE_KEY, 0x150, { KEY_F20 } },
>> >
>> > Hi! Are you sure that this key code needs to be in 0010 table? Because
>> > primary this table is constructed from DMI information. See
>> > array bios_to_linux_keycode[].
>> >
>> Because I saw "dell_wmi: Unknown key with type 0x0010 and code 0x0150
>> pressed" in dmesg when pressing the mic mute key.
>
> And do you see following message?
> "firmware scancode 0x%x maps to unrecognized keycode 0x%x\n"
No, do I put some specific kernel parameter to see it?
>
>> >
>> > > +
>> > > /* Fn-lock */
>> > > { KE_IGNORE, 0x151, { KEY_RESERVED } },
>> > >
>> >
>> > --
>> > Pali Rohár
>> > pali.rohar@gmail.com
>> >
>>
>>
>>
>
> --
> Pali Rohár
> pali.rohar@gmail.com
--
Shih-Yuan Lee (FourDollars) | Software Engineer / Debian Developer |
Delivery | Customer Engineering | Devices | Canonical
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
2017-12-19 8:45 ` Shih-Yuan Lee (FourDollars)
@ 2017-12-19 9:00 ` Pali Rohár
2017-12-19 9:02 ` Shih-Yuan Lee (FourDollars)
0 siblings, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2017-12-19 9:00 UTC (permalink / raw)
To: Shih-Yuan Lee (FourDollars)
Cc: platform-driver-x86, Matthew Garrett, Darren Hart, Andy Shevchenko
On Tuesday 19 December 2017 16:45:44 Shih-Yuan Lee (FourDollars) wrote:
> On Tue, Dec 19, 2017 at 4:41 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> > On Tuesday 19 December 2017 16:38:32 Shih-Yuan Lee (FourDollars) wrote:
> >> On Tue, Dec 19, 2017 at 4:34 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> >>
> >> > On Tuesday 19 December 2017 11:38:34 Shih-Yuan Lee (FourDollars) wrote:
> >> > > The Dell Latitude 5495 has the mic mute key.
> >> > >
> >> > > Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
> >> > > ---
> >> > > drivers/platform/x86/dell-wmi.c | 3 +++
> >> > > 1 file changed, 3 insertions(+)
> >> > >
> >> > > diff --git a/drivers/platform/x86/dell-wmi.c
> >> > b/drivers/platform/x86/dell-wmi.c
> >> > > index fb25b20..d40f803 100644
> >> > > --- a/drivers/platform/x86/dell-wmi.c
> >> > > +++ b/drivers/platform/x86/dell-wmi.c
> >> > > @@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
> >> > > * override them.
> >> > > */
> >> > > static const struct key_entry dell_wmi_keymap_type_0010[] = {
> >> > > + /* Mic mute */
> >> > > + { KE_KEY, 0x150, { KEY_F20 } },
> >> >
> >> > Hi! Are you sure that this key code needs to be in 0010 table? Because
> >> > primary this table is constructed from DMI information. See
> >> > array bios_to_linux_keycode[].
> >> >
> >> Because I saw "dell_wmi: Unknown key with type 0x0010 and code 0x0150
> >> pressed" in dmesg when pressing the mic mute key.
> >
> > And do you see following message?
> > "firmware scancode 0x%x maps to unrecognized keycode 0x%x\n"
> No, do I put some specific kernel parameter to see it?
It is print in same way as above Unknown key with type ...
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
2017-12-19 9:00 ` Pali Rohár
@ 2017-12-19 9:02 ` Shih-Yuan Lee (FourDollars)
2017-12-19 9:06 ` Pali Rohár
0 siblings, 1 reply; 11+ messages in thread
From: Shih-Yuan Lee (FourDollars) @ 2017-12-19 9:02 UTC (permalink / raw)
To: Pali Rohár
Cc: platform-driver-x86, Matthew Garrett, Darren Hart, Andy Shevchenko
On Tue, Dec 19, 2017 at 5:00 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Tuesday 19 December 2017 16:45:44 Shih-Yuan Lee (FourDollars) wrote:
>> On Tue, Dec 19, 2017 at 4:41 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>> > On Tuesday 19 December 2017 16:38:32 Shih-Yuan Lee (FourDollars) wrote:
>> >> On Tue, Dec 19, 2017 at 4:34 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>> >>
>> >> > On Tuesday 19 December 2017 11:38:34 Shih-Yuan Lee (FourDollars) wrote:
>> >> > > The Dell Latitude 5495 has the mic mute key.
>> >> > >
>> >> > > Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
>> >> > > ---
>> >> > > drivers/platform/x86/dell-wmi.c | 3 +++
>> >> > > 1 file changed, 3 insertions(+)
>> >> > >
>> >> > > diff --git a/drivers/platform/x86/dell-wmi.c
>> >> > b/drivers/platform/x86/dell-wmi.c
>> >> > > index fb25b20..d40f803 100644
>> >> > > --- a/drivers/platform/x86/dell-wmi.c
>> >> > > +++ b/drivers/platform/x86/dell-wmi.c
>> >> > > @@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
>> >> > > * override them.
>> >> > > */
>> >> > > static const struct key_entry dell_wmi_keymap_type_0010[] = {
>> >> > > + /* Mic mute */
>> >> > > + { KE_KEY, 0x150, { KEY_F20 } },
>> >> >
>> >> > Hi! Are you sure that this key code needs to be in 0010 table? Because
>> >> > primary this table is constructed from DMI information. See
>> >> > array bios_to_linux_keycode[].
>> >> >
>> >> Because I saw "dell_wmi: Unknown key with type 0x0010 and code 0x0150
>> >> pressed" in dmesg when pressing the mic mute key.
>> >
>> > And do you see following message?
>> > "firmware scancode 0x%x maps to unrecognized keycode 0x%x\n"
>> No, do I put some specific kernel parameter to see it?
>
> It is print in same way as above Unknown key with type ...
OK, I saw "dell_wmi: Unknown key with type 0x0010 and code 0x0150 pressed".
There is no "firmware scancode 0x%x maps to unrecognized keycode 0x%x\n" at all.
--
Shih-Yuan Lee (FourDollars) | Software Engineer / Debian Developer |
Delivery | Customer Engineering | Devices | Canonical
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
2017-12-19 9:02 ` Shih-Yuan Lee (FourDollars)
@ 2017-12-19 9:06 ` Pali Rohár
0 siblings, 0 replies; 11+ messages in thread
From: Pali Rohár @ 2017-12-19 9:06 UTC (permalink / raw)
To: Shih-Yuan Lee (FourDollars)
Cc: platform-driver-x86, Matthew Garrett, Darren Hart, Andy Shevchenko
On Tuesday 19 December 2017 17:02:52 Shih-Yuan Lee (FourDollars) wrote:
> On Tue, Dec 19, 2017 at 5:00 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> > On Tuesday 19 December 2017 16:45:44 Shih-Yuan Lee (FourDollars) wrote:
> >> On Tue, Dec 19, 2017 at 4:41 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> >> > On Tuesday 19 December 2017 16:38:32 Shih-Yuan Lee (FourDollars) wrote:
> >> >> On Tue, Dec 19, 2017 at 4:34 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> >> >>
> >> >> > On Tuesday 19 December 2017 11:38:34 Shih-Yuan Lee (FourDollars) wrote:
> >> >> > > The Dell Latitude 5495 has the mic mute key.
> >> >> > >
> >> >> > > Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
> >> >> > > ---
> >> >> > > drivers/platform/x86/dell-wmi.c | 3 +++
> >> >> > > 1 file changed, 3 insertions(+)
> >> >> > >
> >> >> > > diff --git a/drivers/platform/x86/dell-wmi.c
> >> >> > b/drivers/platform/x86/dell-wmi.c
> >> >> > > index fb25b20..d40f803 100644
> >> >> > > --- a/drivers/platform/x86/dell-wmi.c
> >> >> > > +++ b/drivers/platform/x86/dell-wmi.c
> >> >> > > @@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
> >> >> > > * override them.
> >> >> > > */
> >> >> > > static const struct key_entry dell_wmi_keymap_type_0010[] = {
> >> >> > > + /* Mic mute */
> >> >> > > + { KE_KEY, 0x150, { KEY_F20 } },
> >> >> >
> >> >> > Hi! Are you sure that this key code needs to be in 0010 table? Because
> >> >> > primary this table is constructed from DMI information. See
> >> >> > array bios_to_linux_keycode[].
> >> >> >
> >> >> Because I saw "dell_wmi: Unknown key with type 0x0010 and code 0x0150
> >> >> pressed" in dmesg when pressing the mic mute key.
> >> >
> >> > And do you see following message?
> >> > "firmware scancode 0x%x maps to unrecognized keycode 0x%x\n"
> >> No, do I put some specific kernel parameter to see it?
> >
> > It is print in same way as above Unknown key with type ...
> OK, I saw "dell_wmi: Unknown key with type 0x0010 and code 0x0150 pressed".
> There is no "firmware scancode 0x%x maps to unrecognized keycode 0x%x\n" at all.
Ok, then adding additional entry is needed.
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
2017-12-19 3:38 [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495 Shih-Yuan Lee (FourDollars)
2017-12-19 8:34 ` Pali Rohár
@ 2017-12-19 9:06 ` Pali Rohár
2017-12-19 9:17 ` Shih-Yuan Lee (FourDollars)
1 sibling, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2017-12-19 9:06 UTC (permalink / raw)
To: Shih-Yuan Lee (FourDollars)
Cc: platform-driver-x86, Matthew Garrett, Darren Hart, Andy Shevchenko
On Tuesday 19 December 2017 11:38:34 Shih-Yuan Lee (FourDollars) wrote:
> The Dell Latitude 5495 has the mic mute key.
>
> Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
> ---
> drivers/platform/x86/dell-wmi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
> index fb25b20..d40f803 100644
> --- a/drivers/platform/x86/dell-wmi.c
> +++ b/drivers/platform/x86/dell-wmi.c
> @@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
> * override them.
> */
> static const struct key_entry dell_wmi_keymap_type_0010[] = {
> + /* Mic mute */
> + { KE_KEY, 0x150, { KEY_F20 } },
Why F20 for mic mute? We have KEY_MICMUTE.
> +
> /* Fn-lock */
> { KE_IGNORE, 0x151, { KEY_RESERVED } },
>
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
2017-12-19 9:06 ` Pali Rohár
@ 2017-12-19 9:17 ` Shih-Yuan Lee (FourDollars)
2017-12-19 9:33 ` Pali Rohár
0 siblings, 1 reply; 11+ messages in thread
From: Shih-Yuan Lee (FourDollars) @ 2017-12-19 9:17 UTC (permalink / raw)
To: Pali Rohár
Cc: platform-driver-x86, Matthew Garrett, Darren Hart, Andy Shevchenko
n Tue, Dec 19, 2017 at 5:06 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Tuesday 19 December 2017 11:38:34 Shih-Yuan Lee (FourDollars) wrote:
>> The Dell Latitude 5495 has the mic mute key.
>>
>> Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
>> ---
>> drivers/platform/x86/dell-wmi.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
>> index fb25b20..d40f803 100644
>> --- a/drivers/platform/x86/dell-wmi.c
>> +++ b/drivers/platform/x86/dell-wmi.c
>> @@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
>> * override them.
>> */
>> static const struct key_entry dell_wmi_keymap_type_0010[] = {
>> + /* Mic mute */
>> + { KE_KEY, 0x150, { KEY_F20 } },
>
> Why F20 for mic mute? We have KEY_MICMUTE.
Because X Window System doesn't support KEY_MICMUTE [1] directly, it
still relies on systemd/udev rule [2] to convert it to KEY_F20 again
in the user space.
So I am also wondering why not using KEY_F20 directly and I am also
thinking about changing the bios_to_linux_keycode's KEY_MICMUTE to
KEY_F20 for compatibility.
[1]: https://bugs.freedesktop.org/show_bug.cgi?id=54171
[2]: https://github.com/systemd/systemd/commit/fc6e082622c73eb9a22ce16a278d8c4dd7594cbb
>
>> +
>> /* Fn-lock */
>> { KE_IGNORE, 0x151, { KEY_RESERVED } },
>>
>
> --
> Pali Rohár
> pali.rohar@gmail.com
--
Shih-Yuan Lee (FourDollars) | Software Engineer / Debian Developer |
Delivery | Customer Engineering | Devices | Canonical
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
2017-12-19 9:17 ` Shih-Yuan Lee (FourDollars)
@ 2017-12-19 9:33 ` Pali Rohár
2017-12-19 9:38 ` Shih-Yuan Lee (FourDollars)
0 siblings, 1 reply; 11+ messages in thread
From: Pali Rohár @ 2017-12-19 9:33 UTC (permalink / raw)
To: Shih-Yuan Lee (FourDollars)
Cc: platform-driver-x86, Matthew Garrett, Darren Hart, Andy Shevchenko
On Tuesday 19 December 2017 17:17:24 Shih-Yuan Lee (FourDollars) wrote:
> n Tue, Dec 19, 2017 at 5:06 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> > On Tuesday 19 December 2017 11:38:34 Shih-Yuan Lee (FourDollars) wrote:
> >> The Dell Latitude 5495 has the mic mute key.
> >>
> >> Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
> >> ---
> >> drivers/platform/x86/dell-wmi.c | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
> >> index fb25b20..d40f803 100644
> >> --- a/drivers/platform/x86/dell-wmi.c
> >> +++ b/drivers/platform/x86/dell-wmi.c
> >> @@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
> >> * override them.
> >> */
> >> static const struct key_entry dell_wmi_keymap_type_0010[] = {
> >> + /* Mic mute */
> >> + { KE_KEY, 0x150, { KEY_F20 } },
> >
> > Why F20 for mic mute? We have KEY_MICMUTE.
> Because X Window System doesn't support KEY_MICMUTE [1] directly,
This is not an argument why adding hacks into kernel code. If one
userspace application is buggy and cannot handle new key code (e.g.
KEY_MICMUTE), then userspace application needs to be fixed.
There are also other userspace applications which uses input devices.
> it
> still relies on systemd/udev rule [2] to convert it to KEY_F20 again
> in the user space.
That sounds like another bug which should be fixed. Translating correct
key to incorrect one is a bad idea.
> So I am also wondering why not using KEY_F20 directly and I am also
> thinking about changing the bios_to_linux_keycode's KEY_MICMUTE to
> KEY_F20 for compatibility.
NACK. This does not make sense as we already have a key code for mic
mute. KEY_MICMUTE was created specially for mic mute key and KEY_F20 for
F20 key. Those are two different keys.
Also such change would be regression for all applications which expects
KEY_MICMUTE for mic mute key.
> [1]: https://bugs.freedesktop.org/show_bug.cgi?id=54171
> [2]: https://github.com/systemd/systemd/commit/fc6e082622c73eb9a22ce16a278d8c4dd7594cbb
> >
> >> +
> >> /* Fn-lock */
> >> { KE_IGNORE, 0x151, { KEY_RESERVED } },
> >>
> >
> > --
> > Pali Rohár
> > pali.rohar@gmail.com
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495
2017-12-19 9:33 ` Pali Rohár
@ 2017-12-19 9:38 ` Shih-Yuan Lee (FourDollars)
0 siblings, 0 replies; 11+ messages in thread
From: Shih-Yuan Lee (FourDollars) @ 2017-12-19 9:38 UTC (permalink / raw)
To: Pali Rohár
Cc: platform-driver-x86, Matthew Garrett, Darren Hart, Andy Shevchenko
On Tue, Dec 19, 2017 at 5:33 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Tuesday 19 December 2017 17:17:24 Shih-Yuan Lee (FourDollars) wrote:
>> n Tue, Dec 19, 2017 at 5:06 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>> > On Tuesday 19 December 2017 11:38:34 Shih-Yuan Lee (FourDollars) wrote:
>> >> The Dell Latitude 5495 has the mic mute key.
>> >>
>> >> Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
>> >> ---
>> >> drivers/platform/x86/dell-wmi.c | 3 +++
>> >> 1 file changed, 3 insertions(+)
>> >>
>> >> diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
>> >> index fb25b20..d40f803 100644
>> >> --- a/drivers/platform/x86/dell-wmi.c
>> >> +++ b/drivers/platform/x86/dell-wmi.c
>> >> @@ -261,6 +261,9 @@ static const u16 bios_to_linux_keycode[256] = {
>> >> * override them.
>> >> */
>> >> static const struct key_entry dell_wmi_keymap_type_0010[] = {
>> >> + /* Mic mute */
>> >> + { KE_KEY, 0x150, { KEY_F20 } },
>> >
>> > Why F20 for mic mute? We have KEY_MICMUTE.
>> Because X Window System doesn't support KEY_MICMUTE [1] directly,
>
> This is not an argument why adding hacks into kernel code. If one
> userspace application is buggy and cannot handle new key code (e.g.
> KEY_MICMUTE), then userspace application needs to be fixed.
>
> There are also other userspace applications which uses input devices.
>
>> it
>> still relies on systemd/udev rule [2] to convert it to KEY_F20 again
>> in the user space.
>
> That sounds like another bug which should be fixed. Translating correct
> key to incorrect one is a bad idea.
>
>> So I am also wondering why not using KEY_F20 directly and I am also
>> thinking about changing the bios_to_linux_keycode's KEY_MICMUTE to
>> KEY_F20 for compatibility.
>
> NACK. This does not make sense as we already have a key code for mic
> mute. KEY_MICMUTE was created specially for mic mute key and KEY_F20 for
> F20 key. Those are two different keys.
>
> Also such change would be regression for all applications which expects
> KEY_MICMUTE for mic mute key.
OK. Let me send a different version for this patch.
>
>> [1]: https://bugs.freedesktop.org/show_bug.cgi?id=54171
>> [2]: https://github.com/systemd/systemd/commit/fc6e082622c73eb9a22ce16a278d8c4dd7594cbb
>> >
>> >> +
>> >> /* Fn-lock */
>> >> { KE_IGNORE, 0x151, { KEY_RESERVED } },
>> >>
>> >
>> > --
>> > Pali Rohár
>> > pali.rohar@gmail.com
>
> --
> Pali Rohár
> pali.rohar@gmail.com
--
Shih-Yuan Lee (FourDollars) | Software Engineer / Debian Developer |
Delivery | Customer Engineering | Devices | Canonical
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-12-19 9:38 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-19 3:38 [PATCH] platform/x86: dell-wmi: Add an event created by Dell Latitude 5495 Shih-Yuan Lee (FourDollars)
2017-12-19 8:34 ` Pali Rohár
[not found] ` <CAApEhgh1XfzeoWL6JQN-oOn9yGvJWB74jdfFKtL==UEyhNQs7Q@mail.gmail.com>
2017-12-19 8:41 ` Pali Rohár
2017-12-19 8:45 ` Shih-Yuan Lee (FourDollars)
2017-12-19 9:00 ` Pali Rohár
2017-12-19 9:02 ` Shih-Yuan Lee (FourDollars)
2017-12-19 9:06 ` Pali Rohár
2017-12-19 9:06 ` Pali Rohár
2017-12-19 9:17 ` Shih-Yuan Lee (FourDollars)
2017-12-19 9:33 ` Pali Rohár
2017-12-19 9:38 ` Shih-Yuan Lee (FourDollars)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.