From patchwork Mon Sep 12 10:44:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Wassenberg X-Patchwork-Id: 9326127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4358360839 for ; Mon, 12 Sep 2016 10:45:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A17328C6F for ; Mon, 12 Sep 2016 10:45:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A58528C7C; Mon, 12 Sep 2016 10:45:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D25C528C6F for ; Mon, 12 Sep 2016 10:45:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754771AbcILKpy (ORCPT ); Mon, 12 Sep 2016 06:45:54 -0400 Received: from a.mx.secunet.com ([62.96.220.36]:58471 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751955AbcILKpx (ORCPT ); Mon, 12 Sep 2016 06:45:53 -0400 Received: from localhost (alg1 [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 64E721A06BD; Mon, 12 Sep 2016 12:45:45 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7XA6uN8SvfCA; Mon, 12 Sep 2016 12:45:44 +0200 (CEST) Received: from mail-essen-01.secunet.de (unknown [10.53.40.204]) by a.mx.secunet.com (Postfix) with ESMTP id 0CA661A0627; Mon, 12 Sep 2016 12:45:44 +0200 (CEST) Received: from [10.182.7.39] (10.182.7.39) by mail-essen-01.secunet.de (10.53.40.204) with Microsoft SMTP Server (TLS) id 14.3.301.0; Mon, 12 Sep 2016 12:45:49 +0200 From: Dennis Wassenberg Subject: [PATCH 1/4] hda: Rename fixup thinkpad_acpi to fixup_thinkpad Organization: secunet Security Networks To: , , , , , "Benjamin Tissoires" , Andrew Duggan , , , , , , Message-ID: <5cb009b2-11a0-fb19-e751-965a874903b0@secunet.com> Date: Mon, 12 Sep 2016 12:44:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 X-Originating-IP: [10.182.7.39] X-G-Data-MailSecurity-for-Exchange-SpamLevel: 0 X-G-Data-MailSecurity-for-Exchange-SpamFilter: 0; 1; str=0001.0A0C0202.57D6875D.019B,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-G-Data-MailSecurity-for-Exchange-State: 0 X-G-Data-MailSecurity-for-Exchange-Error: 0 X-G-Data-MailSecurity-for-Exchange-Sender: 32 X-G-Data-MailSecurity-for-Exchange-Server: d65e63f7-5c15-413f-8f63-c0d707471c93 X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-G-Data-MailSecurity-for-Exchange-Guid: 549C34A1-1815-4A69-BFFE-4E34D6CA1579 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is some preparatory work to not only support led control in thinkpad_helper over thinkpad_acpi. A further patch will introduce led control over hid-lenovo. This will make it possible to use the thinkpad_helper not only with lenovo devices via acpi but also with hid-lenovo driver if there is a hid-lenovo compatible device found. Signed-off-by: Dennis Wassenberg --- sound/pci/hda/patch_conexant.c | 14 +++++++------- sound/pci/hda/patch_realtek.c | 24 ++++++++++++------------ sound/pci/hda/thinkpad_helper.c | 4 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 56fefbd..d54ffd9 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -254,7 +254,7 @@ enum { CXT_FIXUP_HEADPHONE_MIC, CXT_FIXUP_GPIO1, CXT_FIXUP_ASPIRE_DMIC, - CXT_FIXUP_THINKPAD_ACPI, + CXT_FIXUP_THINKPAD, CXT_FIXUP_OLPC_XO, CXT_FIXUP_CAP_MIX_AMP, CXT_FIXUP_TOSHIBA_P105, @@ -263,7 +263,7 @@ enum { CXT_FIXUP_MUTE_LED_EAPD, }; -/* for hda_fixup_thinkpad_acpi() */ +/* for hda_fixup_thinkpad() */ #include "thinkpad_helper.c" static void cxt_fixup_stereo_dmic(struct hda_codec *codec, @@ -670,7 +670,7 @@ static void cxt_fixup_cap_mix_amp_5047(struct hda_codec *codec, .type = HDA_FIXUP_PINS, .v.pins = cxt_pincfg_lenovo_tp410, .chained = true, - .chain_id = CXT_FIXUP_THINKPAD_ACPI, + .chain_id = CXT_FIXUP_THINKPAD, }, [CXT_PINCFG_LEMOTE_A1004] = { .type = HDA_FIXUP_PINS, @@ -727,9 +727,9 @@ static void cxt_fixup_cap_mix_amp_5047(struct hda_codec *codec, .chained = true, .chain_id = CXT_FIXUP_GPIO1, }, - [CXT_FIXUP_THINKPAD_ACPI] = { + [CXT_FIXUP_THINKPAD] = { .type = HDA_FIXUP_FUNC, - .v.func = hda_fixup_thinkpad_acpi, + .v.func = hda_fixup_thinkpad, }, [CXT_FIXUP_OLPC_XO] = { .type = HDA_FIXUP_FUNC, @@ -828,7 +828,7 @@ static void cxt_fixup_cap_mix_amp_5047(struct hda_codec *codec, SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC), SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), - SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI), + SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD), SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004), SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205), {} @@ -839,7 +839,7 @@ static void cxt_fixup_cap_mix_amp_5047(struct hda_codec *codec, { .id = CXT_FIXUP_GPIO1, .name = "gpio1" }, { .id = CXT_FIXUP_HEADPHONE_MIC_PIN, .name = "headphone-mic-pin" }, { .id = CXT_PINCFG_LENOVO_TP410, .name = "tp410" }, - { .id = CXT_FIXUP_THINKPAD_ACPI, .name = "thinkpad" }, + { .id = CXT_FIXUP_THINKPAD, .name = "thinkpad" }, { .id = CXT_PINCFG_LEMOTE_A1004, .name = "lemote-a1004" }, { .id = CXT_PINCFG_LEMOTE_A1205, .name = "lemote-a1205" }, { .id = CXT_FIXUP_OLPC_XO, .name = "olpc-xo" }, diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 1fe8750..6d78d76 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4754,7 +4754,7 @@ static void alc280_fixup_hp_9480m(struct hda_codec *codec, } } -/* for hda_fixup_thinkpad_acpi() */ +/* for hda_fixup_thinkpad() */ #include "thinkpad_helper.c" /* for dell wmi mic mute led */ @@ -4819,8 +4819,8 @@ enum { ALC290_FIXUP_MONO_SPEAKERS_HSJACK, ALC290_FIXUP_SUBWOOFER, ALC290_FIXUP_SUBWOOFER_HSJACK, - ALC269_FIXUP_THINKPAD_ACPI, - ALC269_FIXUP_DMIC_THINKPAD_ACPI, + ALC269_FIXUP_THINKPAD, + ALC269_FIXUP_DMIC_THINKPAD, ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, ALC255_FIXUP_HEADSET_MODE, @@ -5052,7 +5052,7 @@ enum { .type = HDA_FIXUP_FUNC, .v.func = alc269_fixup_pincfg_no_hp_to_lineout, .chained = true, - .chain_id = ALC269_FIXUP_THINKPAD_ACPI, + .chain_id = ALC269_FIXUP_THINKPAD, }, [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = { .type = HDA_FIXUP_PINS, @@ -5175,7 +5175,7 @@ enum { .type = HDA_FIXUP_FUNC, .v.func = alc269_fixup_limit_int_mic_boost, .chained = true, - .chain_id = ALC269_FIXUP_THINKPAD_ACPI, + .chain_id = ALC269_FIXUP_THINKPAD, }, [ALC269VB_FIXUP_ASUS_ZENBOOK] = { .type = HDA_FIXUP_FUNC, @@ -5261,17 +5261,17 @@ enum { .chained = true, .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, }, - [ALC269_FIXUP_THINKPAD_ACPI] = { + [ALC269_FIXUP_THINKPAD] = { .type = HDA_FIXUP_FUNC, - .v.func = hda_fixup_thinkpad_acpi, + .v.func = hda_fixup_thinkpad, .chained = true, .chain_id = ALC269_FIXUP_SKU_IGNORE, }, - [ALC269_FIXUP_DMIC_THINKPAD_ACPI] = { + [ALC269_FIXUP_DMIC_THINKPAD] = { .type = HDA_FIXUP_FUNC, .v.func = alc_fixup_inv_dmic, .chained = true, - .chain_id = ALC269_FIXUP_THINKPAD_ACPI, + .chain_id = ALC269_FIXUP_THINKPAD, }, [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = { .type = HDA_FIXUP_PINS, @@ -5471,7 +5471,7 @@ enum { .type = HDA_FIXUP_FUNC, .v.func = alc_fixup_disable_aamix, .chained = true, - .chain_id = ALC269_FIXUP_THINKPAD_ACPI + .chain_id = ALC269_FIXUP_THINKPAD }, [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = { .type = HDA_FIXUP_FUNC, @@ -5691,7 +5691,7 @@ enum { SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460), SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), - SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), + SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD), SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), SND_PCI_QUIRK(0x17aa, 0x3978, "IdeaPad Y410P", ALC269_FIXUP_NO_SHUTUP), SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), @@ -5766,7 +5766,7 @@ enum { SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED), SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), - SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), + SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD), {} }; diff --git a/sound/pci/hda/thinkpad_helper.c b/sound/pci/hda/thinkpad_helper.c index f0955fd..62741a7 100644 --- a/sound/pci/hda/thinkpad_helper.c +++ b/sound/pci/hda/thinkpad_helper.c @@ -38,7 +38,7 @@ static void update_tpacpi_micmute_led(struct hda_codec *codec, } } -static void hda_fixup_thinkpad_acpi(struct hda_codec *codec, +static void hda_fixup_thinkpad(struct hda_codec *codec, const struct hda_fixup *fix, int action) { struct hda_gen_spec *spec = codec->spec; @@ -81,7 +81,7 @@ static void hda_fixup_thinkpad_acpi(struct hda_codec *codec, #else /* CONFIG_THINKPAD_ACPI */ -static void hda_fixup_thinkpad_acpi(struct hda_codec *codec, +static void hda_fixup_thinkpad(struct hda_codec *codec, const struct hda_fixup *fix, int action) { }