From patchwork Wed Feb 12 16:45:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 3639241 X-Patchwork-Delegate: tiwai@suse.de 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 742869F334 for ; Wed, 12 Feb 2014 16:45:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F8CE20160 for ; Wed, 12 Feb 2014 16:45:36 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3265E20142 for ; Wed, 12 Feb 2014 16:45:35 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7B67E2610B0; Wed, 12 Feb 2014 17:45:33 +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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 1D82C26084D; Wed, 12 Feb 2014 17:45:23 +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 D9F3E260851; Wed, 12 Feb 2014 17:45:21 +0100 (CET) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 9BB9D26007E for ; Wed, 12 Feb 2014 17:45:14 +0100 (CET) Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 78A3DABA6; Wed, 12 Feb 2014 16:45:14 +0000 (UTC) Date: Wed, 12 Feb 2014 17:45:14 +0100 Message-ID: From: Takashi Iwai To: Martin Kepplinger In-Reply-To: References: <1392221363-5447-1-git-send-email-martink@posteo.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: hui.wang@canonical.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, david.henningsson@canonical.com Subject: Re: [alsa-devel] [BUG]3.14-rc2 [PATCH] Revert "ALSA: hda/realtek - Avoid invalid COEFs for ALC271X" 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP At Wed, 12 Feb 2014 17:20:21 +0100, Takashi Iwai wrote: > > At Wed, 12 Feb 2014 17:09:23 +0100, > Martin Kepplinger wrote: > > > > This reverts commit d3c56568f43807135f2c2a09582a69f809f0d8b7. > > > > The reverted commit breaks audio through headphone line out on > > the Acer TravelMate B113 (Type1Sku0) Notebook, my main work > > machine. I don't know much about it but this fixes my problem. > > Bisected and tested. > > > > Tested-by: Martin Kepplinger > > Signed-off-by: Martin Kepplinger > > Too bad, we need COEF for some machine but it breaks for some. > Since reverting breaks obviously another machine, we need a different > approach, e.g. checking the machine ID. Please give alsa-info.sh > output of your machine. Thinking it again, I'll take your patch as is, and put an additional fix for AO725 as below. Could you try it to see whether it brings any regressions? It's to be applied after your revert patch. thanks, Takashi -- 8< -- From: Takashi Iwai Subject: [PATCH] ALSA: hda - Better fix for invalid COEF setup on Acer AO725 Instead of disabling the COEF setup for all ALC271X codec (like commit d3c56568), do it only if needed. Currently, Acer AO725 is known to show the problem, so clear the bad init_hook in the fixup. The explicit call of alc269_fill_coef() in patch_alc269() is also removed, since the function will be called anyway at init callback. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52181 Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a9a83b85517a..eaff10598f67 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3817,6 +3817,14 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec, } } +static void alc_fixup_clear_init_hook(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + struct alc_spec *spec = codec->spec; + if (action == HDA_FIXUP_ACT_PROBE) + spec->init_hook = NULL; +} + /* for hda_fixup_thinkpad_acpi() */ #include "thinkpad_helper.c" @@ -3858,6 +3866,7 @@ enum { ALC271_FIXUP_HP_GATE_MIC_JACK, ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, ALC269_FIXUP_ACER_AC700, + ALC271_FIXUP_ACER_AO725, ALC269_FIXUP_LIMIT_INT_MIC_BOOST, ALC269VB_FIXUP_ASUS_ZENBOOK, ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, @@ -4250,13 +4259,19 @@ static const struct hda_fixup alc269_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = alc_fixup_headset_mode_alc255, }, + [ALC271_FIXUP_ACER_AO725] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_clear_init_hook, + .chained = true, + .chain_id = ALC271_FIXUP_HP_GATE_MIC_JACK, + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC), SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700), - SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), + SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_ACER_AO725), SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), @@ -4523,7 +4538,6 @@ static int patch_alc269(struct hda_codec *codec) if (err < 0) goto error; spec->init_hook = alc269_fill_coef; - alc269_fill_coef(codec); break; case 0x10ec0280: