Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp874991ybe; Fri, 13 Sep 2019 07:38:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFcSI+ZzB3RAIqCb7hi4cuACUa01Lc3WTH6IdE7XE+SDtc3cbb/unokTGHTirLJTVNM2CI X-Received: by 2002:a17:906:9414:: with SMTP id q20mr39810657ejx.139.1568385531693; Fri, 13 Sep 2019 07:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568385531; cv=none; d=google.com; s=arc-20160816; b=ZwbiTX9b5r2LnJjZaf+RcKhVlVNHlrY2MvR2GeuPJruK9boizxFlbYhashRMR1iWoQ U/pT9RX6YGpU+1T9HMKuExcNdUF6zcXk8qW/x3ry+2bsW83z9+i4cWnRv65qNLfmhUWs xfoj2m4aN0NJ55p/i4kaaZQ0gBEzMBsQFCQoHYCjPDS+xV4LTpHN11UY6V5+Bf8AZk6z w7nI7mkuEfskZsJkIRIdv52447zM98IHEXClmGJmsQTINANNf7vqomQn//yx7F6AilVT Qt2VHpkjtrW/UxSQO2j9Z7T+CjZyir1404eFARShhaSWJdrdtp+jUKGjo08pItNgeBuA ByTg== 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=889uJkvZ86iSa20yCpMt0HQftV5ir4acFAtKzlDyU24=; b=0FOVAcL1ity+BGYhYlP1ufAExq2t+sM7dMXmOVttgcMIG+N1q/ImYohQH2gb8EWHt0 X6CyPsDXzcMAnf/ubQfQg8voxxgOJsV8BRGjx/8blfN+ymUBfCynPJhvNvV7BrKbufhY ioPm8TBBCR0fU3c79QHxrvyPupSS9v0zxsd3lI/nQElTH3jOkzlJ/9uR8dCwTlRiIKaW AjAP6e9FpOiaeVGGHhsskCyLWq+ZVVdWobq7OO239JpazLU0A26tpzwU3aZVGQVeGA88 ktpnlVRM3i99y64FozRcoioU1PDuQQ2qlCwnE7lxi5Tfc3NTrByJnoQJreFB3fqsQgUv CMGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="H3/vBVau"; 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 j51si17775505ede.301.2019.09.13.07.38.28; Fri, 13 Sep 2019 07:38:51 -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="H3/vBVau"; 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 S2388908AbfIMNLK (ORCPT + 99 others); Fri, 13 Sep 2019 09:11:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:36140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388155AbfIMNLI (ORCPT ); Fri, 13 Sep 2019 09:11:08 -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 6290820CC7; Fri, 13 Sep 2019 13:11:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568380268; bh=vFb8oPaK1xgVyrzWYiq1+5cdaw7DxdgvLTnk6o4vJ1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H3/vBVauQEJbo1Ju0yuhjRyLMmbwg3hczvKaXRPr2lYmXJYW+sh/TEuNOE4+R7LAn u64Erl2eYTGoIEoxanHy7vrMHsz6rWKtft2rI5PYH3qBfgkRZs7DCkc0A6kW+e2mt8 0VqR5xO3XX0dDYKKYXXHOp+au4HMMAAFC8n6/FUY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 4.19 002/190] ALSA: hda/realtek - Fix overridden device-specific initialization Date: Fri, 13 Sep 2019 14:04:17 +0100 Message-Id: <20190913130559.859089919@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190913130559.669563815@linuxfoundation.org> References: <20190913130559.669563815@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 @@ -5991,7 +5991,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 @@ -247,6 +247,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 @@ -836,9 +836,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);