From patchwork Thu Jan 15 09:19:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 5637961 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E43B0C058D for ; Thu, 15 Jan 2015 09:20:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06B7D20142 for ; Thu, 15 Jan 2015 09:20:12 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 87D6420138 for ; Thu, 15 Jan 2015 09:20:10 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2F42E260434; Thu, 15 Jan 2015 10:20:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 7778B260418; Thu, 15 Jan 2015 10:20:00 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id BF73226041A; Thu, 15 Jan 2015 10:19:59 +0100 (CET) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id D87FC260411 for ; Thu, 15 Jan 2015 10:19:52 +0100 (CET) Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A5989AB09; Thu, 15 Jan 2015 09:19:52 +0000 (UTC) From: Takashi Iwai To: alsa-devel@alsa-project.org Date: Thu, 15 Jan 2015 10:19:51 +0100 Message-Id: <1421313591-28245-1-git-send-email-tiwai@suse.de> X-Mailer: git-send-email 2.2.1 Cc: David Henningsson Subject: [alsa-devel] [PATCH] ALSA: hda - Select INPUT for Realtek HD-audio codec X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The commit commit [33f4acd3b214: ALSA: hda - Enable mic mute hotkey and LEDs for an HP machine] introduced a quirk for a HP machine involving with the input event handling. Although the relevant code is protected via IS_ENABLED(CONFIG_INPUT), this doesn't suffice when the audio driver is built in while the input is module. As an easy workaround, this patch forcibly selects CONFIG_INPUT in Kconfig. This shouldn't be a practical problem since CONFIG_INPUT is almost mandatory for all systems. Also, this allows to remove the ugly ifdefs in the code. Signed-off-by: Takashi Iwai Acked-by: David Henningsson --- sound/pci/hda/Kconfig | 1 + sound/pci/hda/patch_realtek.c | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig index ebf4c2fb99df..7f0f2c5a4e97 100644 --- a/sound/pci/hda/Kconfig +++ b/sound/pci/hda/Kconfig @@ -107,6 +107,7 @@ config SND_HDA_PATCH_LOADER config SND_HDA_CODEC_REALTEK tristate "Build Realtek HD-audio codec support" select SND_HDA_GENERIC + select INPUT help Say Y or M here to include Realtek HD-audio codec support in snd-hda-intel driver, such as ALC880. diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a50e15e166c6..1720f8a457d1 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -121,9 +121,7 @@ struct alc_spec { hda_nid_t pll_nid; unsigned int pll_coef_idx, pll_coef_bit; unsigned int coef0; -#if IS_ENABLED(CONFIG_INPUT) struct input_dev *kb_dev; -#endif }; /* @@ -3476,7 +3474,6 @@ static void alc280_fixup_hp_gpio4(struct hda_codec *codec, } } -#if IS_ENABLED(CONFIG_INPUT) static void gpio2_mic_hotkey_event(struct hda_codec *codec, struct hda_jack_callback *event) { @@ -3489,12 +3486,10 @@ static void gpio2_mic_hotkey_event(struct hda_codec *codec, input_report_key(spec->kb_dev, KEY_MICMUTE, 0); input_sync(spec->kb_dev); } -#endif static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec *codec, const struct hda_fixup *fix, int action) { -#if IS_ENABLED(CONFIG_INPUT) /* GPIO1 = set according to SKU external amp GPIO2 = mic mute hotkey GPIO3 = mute LED @@ -3550,7 +3545,6 @@ static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec *codec, input_unregister_device(spec->kb_dev); spec->kb_dev = NULL; } -#endif } static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec,