From: Hui Wang <hui.wang@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, stable@vger.kernel.org
Subject: Re: [alsa-devel] [PATCH 2/2] ALSA: hda - Add keycode map for alc input device
Date: Mon, 28 Dec 2015 11:04:18 +0800 [thread overview]
Message-ID: <5680A6B2.7020707@canonical.com> (raw)
In-Reply-To: <s5hd1tvufs6.wl-tiwai@suse.de>
Got it, will address them in the V2.
Thanks.
On 12/25/2015 03:51 PM, Takashi Iwai wrote:
> On Thu, 24 Dec 2015 04:46:38 +0100,
> Hui Wang wrote:
>> Then users can remap the keycode from userspace. If without the remap,
>> the input device will pass KEY_MICMUTE to userspace, but in X11 layer,
>> it uses KEY_F20 rather than KEY_MICMUTE for XF86AudioMicMute. After
>> adding the keycode map, users can remap the keycode to any value users
>> want.
>>
>> And there are two places to register the input device, to make the
>> code simple and clean, we move the two same code sections into a
>> function.
> Having this change at first would be better. Then you can avoid a
> build-and-scratch sequence but just use the new helper from the
> beginning.
>
> Also...
>
>> Cc: <stable@vger.kernel.org>
>> Signed-off-by: Hui Wang <hui.wang@canonical.com>
>> ---
>> sound/pci/hda/patch_realtek.c | 68 +++++++++++++++++++++++++------------------
>> 1 file changed, 40 insertions(+), 28 deletions(-)
>>
>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
>> index 8adff4f..97f22ad 100644
>> --- a/sound/pci/hda/patch_realtek.c
>> +++ b/sound/pci/hda/patch_realtek.c
>> @@ -67,6 +67,14 @@ enum {
>> ALC_HEADSET_TYPE_OMTP,
>> };
>>
>> +enum {
>> + ALC_KEY_MICMUTE_INDEX,
>> +};
>> +
>> +static u8 alc_mute_keycode_map[] = {
>> + KEY_MICMUTE, /* index=0, microphone mute key code */
>> +};
> You're sharing this array, and remapping will overwrite this.
> For example, if the codec is once unbound and bound again, the
> modified keymap will be passed to the new instance. Use an array in
> alc_spec instead.
>
>
> Takashi
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
next prev parent reply other threads:[~2015-12-28 3:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-24 3:46 [PATCH 1/2] ALSA: hda - Add mic mute hotkey quirk for Lenovo ThinkCentre AIO Hui Wang
2015-12-24 3:46 ` [PATCH 2/2] ALSA: hda - Add keycode map for alc input device Hui Wang
2015-12-25 7:51 ` Takashi Iwai
2015-12-28 3:04 ` Hui Wang [this message]
2015-12-24 6:44 ` [PATCH 1/2] ALSA: hda - Add mic mute hotkey quirk for Lenovo ThinkCentre AIO Takashi Iwai
2015-12-24 7:45 ` Takashi Iwai
2015-12-24 9:39 ` [alsa-devel] " Hui Wang
2015-12-24 13:03 ` Takashi Iwai
2015-12-25 2:19 ` Hui Wang
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=5680A6B2.7020707@canonical.com \
--to=hui.wang@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.de \
/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).