Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1098630ybe; Fri, 13 Sep 2019 11:00:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKVBx4ZFpt6YwULCwKszOD1hFkSijkGkTgvoHnQTScfZ6bKa/WY1fpIPWhS1kFtg67S5A8 X-Received: by 2002:a17:906:f207:: with SMTP id gt7mr40213057ejb.126.1568397643765; Fri, 13 Sep 2019 11:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568397643; cv=none; d=google.com; s=arc-20160816; b=GfeJ8GwriGWw+M/+OJYbOh/hz0ZiIufOvOiWCUebapi5OsMrZxIl/2Vh4cXW28BII2 yNe8u/9epXP2O06ETwqwhfU1rOub4C8vfvofk1qiuE1EvIjVfyCQV2azYxhUkI2p8h35 Zdp902zvMVCB2QtARJ3qnNcv/McrUgvBaTrI/RkXZWhWqyj21qhc6xBV7ogEwZWAuA9v 9MVac5T2YwSPuLMm2NGOryr01r1qnaeHr+r9T/oqyklyP4U3JcHUJGoBmlSPmQfZjYw8 ORvXkDopy9vQEkMKa6EfrxqkZLwds+cqo6xvNiJVU7cy6FRScpy7c2ciAaF0UR3hC8fD kfTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dok1OVo4YxKOsGyf7VtBixWA5UvbtHvCxUcQJx7NKzI=; b=P0TRSDuTn3GhEZw2sEZsangbvpKhbtor/N3gI7e+N/691FpSncsaKyHWddKP2v23m6 qgeZbcMFMLTTue3rpwElPNW7kVKLYgZS4PRTopVQy3iHhK3Tkh77m/GqoZ139gLQ4loD sJsCbe8InsWRZCzg4Qd1Ppp3khmqUUwXv4dwBooq/nNh8H8wBTXEYV4W7KyrHmVTvyyc H73LY/6AZYy9jHPHG/atQC5ADIUoDKvlWiPPuIE4CsXpaaKbK1ANCP1jBdncLAYKr2Lv J/ilEYiHF1WPUqa9SSfWLT2xiLgXbN+qoJOIl9vnuc6P/fSKwNH5/Ig+DKDtuv/eMJJI W2Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ixtodDtG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g23si15306693edr.147.2019.09.13.11.00.19; Fri, 13 Sep 2019 11:00:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ixtodDtG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388771AbfIMNKa (ORCPT + 99 others); Fri, 13 Sep 2019 09:10:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:35286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388734AbfIMNK1 (ORCPT ); Fri, 13 Sep 2019 09:10:27 -0400 Received: from localhost (unknown [104.132.45.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 853DD206BB; Fri, 13 Sep 2019 13:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568380227; bh=boF61tNb6XatUKNw1ZGpKnGUN8RpjdfWG2vpBkeuOsU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ixtodDtG8X1iU0V7LwvbuazYMYtL4IHK7BSoollsUG77iNRCn3EUk49lAL/UzeZP7 0z/VAoaBStSdjUHvdsFXP68AedYKkkqIjqP49EcORGe8HKpb/HmFfGWuh6WnUEhaKn 4+syxWRBrPUvQgEon+ubg4Ffbm3k0VedfXkqgIiw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 4.14 02/21] ALSA: hda/realtek - Fix overridden device-specific initialization Date: Fri, 13 Sep 2019 14:06:55 +0100 Message-Id: <20190913130502.714475863@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190913130501.285837292@linuxfoundation.org> References: <20190913130501.285837292@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai commit 89781d0806c2c4f29072d3f00cb2dd4274aabc3d upstream. The recent change to shuffle the codec initialization procedure for Realtek via commit 607ca3bd220f ("ALSA: hda/realtek - EAPD turn on later") caused the silent output on some machines. This change was supposed to be safe, but it isn't actually; some devices have quirk setups to override the EAPD via COEF or BTL in the additional verb table, which is applied at the beginning of snd_hda_gen_init(). And this EAPD setup is again overridden in alc_auto_init_amp(). For recovering from the regression, tell snd_hda_gen_init() not to apply the verbs there by a new flag, then apply the verbs in alc_init(). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204727 Fixes: 607ca3bd220f ("ALSA: hda/realtek - EAPD turn on later") Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/hda_generic.c | 3 ++- sound/pci/hda/hda_generic.h | 1 + sound/pci/hda/patch_realtek.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -5854,7 +5854,8 @@ int snd_hda_gen_init(struct hda_codec *c if (spec->init_hook) spec->init_hook(codec); - snd_hda_apply_verbs(codec); + if (!spec->skip_verbs) + snd_hda_apply_verbs(codec); init_multi_out(codec); init_extra_out(codec); --- a/sound/pci/hda/hda_generic.h +++ b/sound/pci/hda/hda_generic.h @@ -237,6 +237,7 @@ struct hda_gen_spec { unsigned int indep_hp_enabled:1; /* independent HP enabled */ unsigned int have_aamix_ctl:1; unsigned int hp_mic_jack_modes:1; + unsigned int skip_verbs:1; /* don't apply verbs at snd_hda_gen_init() */ /* additional mute flags (only effective with auto_mute_via_amp=1) */ u64 mute_bits; --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -781,9 +781,11 @@ static int alc_init(struct hda_codec *co if (spec->init_hook) spec->init_hook(codec); + spec->gen.skip_verbs = 1; /* applied in below */ snd_hda_gen_init(codec); alc_fix_pll(codec); alc_auto_init_amp(codec, spec->init_amp); + snd_hda_apply_verbs(codec); /* apply verbs here after own init */ snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT);