From patchwork Tue Nov 18 09:57:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 5326901 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 640609F1E1 for ; Tue, 18 Nov 2014 10:00:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0920520173 for ; Tue, 18 Nov 2014 10:00:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 0D3F720165 for ; Tue, 18 Nov 2014 10:00:09 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3F882265132; Tue, 18 Nov 2014 11:00:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SUBJ_OBFU_PUNCT_MANY, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 28E2F2650B3; Tue, 18 Nov 2014 10:59:59 +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 994092650B3; Tue, 18 Nov 2014 10:59:57 +0100 (CET) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by alsa0.perex.cz (Postfix) with ESMTP id 0EA7F265074 for ; Tue, 18 Nov 2014 10:59:51 +0100 (CET) Received: by mail-pa0-f43.google.com with SMTP id kx10so4021799pab.30 for ; Tue, 18 Nov 2014 01:59:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BD1d77uazeMjfT0DbIEpukhCe335RjYjz3CvoEHxOQs=; b=g3fgeWreqKKETPMDCohvMtV4q2NqYfhjBFpJ0W+WcxCQ1nzU6dSrKfQGwZBNmB3Osx U3CuSqrnGYCG4XLtTiMGw+KTRj5JSdqgFmunpS01Ax+dy9NYq555k81T8E69VnkM9OLd //jcz8il9qtGIll2b/B3YoQRRVbe0RdQAbOA0LOed4VOK9WSDWTe8Igl8naG46ZvQwKP DUJgb0xebOMJYDKqVxpofL99X2Ja6lkOac+anAHZ5wt9pDmtnCBer4u5FFAiUPZN1zpW iCvB5L+9eSxjM2Vdq0tIlHQpEjnODmN/omo0F1d8CpT8JOrRhRvltrsDOCrY+3zzcfOR FLlA== X-Gm-Message-State: ALoCoQmqYqsNtpFSVg+oj93m8x5vVzNgFt0yKUAmIH7DCsm0mpc6y+2R3c2pRbIcOV1D35y6fYqm X-Received: by 10.70.100.170 with SMTP id ez10mr35608971pdb.73.1416304789348; Tue, 18 Nov 2014 01:59:49 -0800 (PST) Received: from localhost.localdomain ([116.213.191.74]) by mx.google.com with ESMTPSA id fn7sm6894665pad.38.2014.11.18.01.59.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Nov 2014 01:59:48 -0800 (PST) From: Hui Wang To: tiwai@suse.de Date: Tue, 18 Nov 2014 17:57:40 +0800 Message-Id: <1416304661-13243-1-git-send-email-hui.wang@canonical.com> X-Mailer: git-send-email 1.9.1 Cc: hui.wang@canonical.com, alsa-devel@alsa-project.org, po-hsu.lin@canonical.com Subject: [alsa-devel] [PATCH 1/2] ALSA: hda - move DELL_WMI_MIC_MUTE_LED to the tail in the quirk chain 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 We have one more Dell machine needs DELL_WMI_MIC_MUTE_LED quirk, but the machine uses alc293 instead of alc255. So if DELL_WMI_MIC_MUTE_LED still chain ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, the machine can't use this quirk. To change this situation, let the DELL_WMI_MIC_MUTE_LED to be a standalone quirk, and let other quirks chain it. After this change, this quirk can be chained to any existing quirks, and as a result, it is possible that this quirk is applied to a non-Dell machine or a Dell machine without mic mute led on it, but it is still safe since alc_fixup_dell_wmi() will return an error in these situations. And remove the quirk for machine with subsystem id 0x6010 and 0x601f, these two machines will fall back to the quirk ALC255_FIXUP_DELL1_MIC_NO_PRESENCE-->ALC255_FIXUP_HEADSET_MODE--> ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED through pin_fixup_tbl[]. BugLink: https://bugs.launchpad.net/bugs/1381856 Reported-and-Tested-by: Po-Hsu Lin Signed-off-by: Hui Wang --- sound/pci/hda/patch_realtek.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 1723954..9da5798 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4709,6 +4709,8 @@ static const struct hda_fixup alc269_fixups[] = { [ALC255_FIXUP_HEADSET_MODE] = { .type = HDA_FIXUP_FUNC, .v.func = alc_fixup_headset_mode_alc255, + .chained = true, + .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED }, [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = { .type = HDA_FIXUP_FUNC, @@ -4744,8 +4746,6 @@ static const struct hda_fixup alc269_fixups[] = { [ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED] = { .type = HDA_FIXUP_FUNC, .v.func = alc_fixup_dell_wmi, - .chained_before = true, - .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE }, [ALC282_FIXUP_ASPIRE_V5_PINS] = { .type = HDA_FIXUP_PINS, @@ -4783,10 +4783,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), - SND_PCI_QUIRK(0x1028, 0x0610, "Dell", ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED), SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), - SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED), SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS_HSJACK), SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),