Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2748039imj; Mon, 11 Feb 2019 07:55:01 -0800 (PST) X-Google-Smtp-Source: AHgI3IYuCsQfZ5xaNqvzi68m7V09YZ99QIx5OxxM8KB4++OUmPZV2+Rznd8eaLMaA/BFpcfOm1NC X-Received: by 2002:a17:902:4d46:: with SMTP id o6mr36836590plh.302.1549900501016; Mon, 11 Feb 2019 07:55:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549900501; cv=none; d=google.com; s=arc-20160816; b=kuyknL5SjM780+CFxY8Ixdd4fTOTHHdTlYGdV5o/icMO+W1OwQdZi4cIhg1nRZP8d1 oWRvx3gZy3/6oMWPW1JRpG0fxvBLXrsiKFkG7Ahhvwz8ytBGyfEsHu8TAVwqdgUUVMR6 AUm0nUyaLaye6PzjyU7wxJ5VAnux8TOI8TsVJdcWJd1csHp2gYfj1bH2BNdZgZnTbuYq fMIUKe99jmiQo45i9Z3zd5Z4hxS1dN5B834wnezVN9YKx+5ts6V3TPk66GQ4e0n+1LVL R2g1oktYv9AMMHLu+YCL6uTtG7Gl+EeSB2lroMAq/dLSH3x+1poh5cPGtPdrRsNCnvBL G1UA== 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=/yqE/l7+JgLoCLmhAohphgu+A6TiOcSm0+lpGyeDZx0=; b=NPaG0mflu+MqBz7d8lmbVT0MXIjUD1MXmTl5Zkc0iV3ZqQJzgQLE4svVndQagaSjqA 3J/5cgPSbMk/zNFL0JL9JDrZHxN7PCXppbtXuaRdKNXjw/0H5D6BPRRVTjkRY9RM9Goa 7DFl5XOgPWdQl158ri3h2oFAPByltfP7SuGeh8MRbYzE6c6B2QdzTvwWm4qAnAXCueL8 tuY8vzpAbjZjFBmxtHtEBUeB7G6SfxWV0G/RfiJ4ZYtNEXvfg5B0fn0gxYs8Z5fDSZgX /8IPa8JIRsGn1brL/VFR7GCuWpHD1en8V7FuXTQdziaHIFP9HbR5cyC2gPyuQzL63Rqd r89A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="cKe7FIQ/"; 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 c10si1056925pls.271.2019.02.11.07.54.44; Mon, 11 Feb 2019 07:55:01 -0800 (PST) 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="cKe7FIQ/"; 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 S1731203AbfBKOgM (ORCPT + 99 others); Mon, 11 Feb 2019 09:36:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:45158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731200AbfBKOgK (ORCPT ); Mon, 11 Feb 2019 09:36:10 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 ABD5A2080F; Mon, 11 Feb 2019 14:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895769; bh=m5qiC6koBQ9WfjcfnEg9XMOPLUx78YRsQm5rreya+RE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cKe7FIQ/ZepKRtg8Mdyk7U5qlla304zILKDJpLfG2Fawu3cB0pQFc1mhiSjzUN7Ow x4JVdhXiphb8zlxeKNhiIlpJ/R9Fpl7Kz+GQ9QFqW83VecqBVylpnAFunfg4cgncyA wjTaEONoS3xTEKlnfhZ9Ph5Lq8T/4BKAWOYsaAMo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kailang Yang , Takashi Iwai Subject: [PATCH 4.20 317/352] ALSA: hda/realtek - Fix lose hp_pins for disable auto mute Date: Mon, 11 Feb 2019 15:19:04 +0100 Message-Id: <20190211141906.995509492@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kailang Yang commit d561aa0a70bb2e1dd85fde98b6a5561e4175ac3e upstream. When auto_mute = no or spec->suppress_auto_mute = 1, cfg->hp_pins will lose value. Add this patch to find hp_pins value. I add fixed for ALC282 ALC225 ALC256 ALC294 and alc_default_init() alc_default_shutup(). Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2963,6 +2963,11 @@ static void alc282_init(struct hda_codec bool hp_pin_sense; int coef78; + if (!spec->gen.autocfg.hp_outs && spec->gen.suppress_auto_mute) { + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) + hp_pin = spec->gen.autocfg.line_out_pins[0]; + } + alc282_restore_default_value(codec); if (!hp_pin) @@ -3000,6 +3005,11 @@ static void alc282_shutup(struct hda_cod bool hp_pin_sense; int coef78; + if (!spec->gen.autocfg.hp_outs && spec->gen.suppress_auto_mute) { + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) + hp_pin = spec->gen.autocfg.line_out_pins[0]; + } + if (!hp_pin) { alc269_shutup(codec); return; @@ -3159,6 +3169,11 @@ static void alc256_init(struct hda_codec hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0]; bool hp_pin_sense; + if (!spec->gen.autocfg.hp_outs && spec->gen.suppress_auto_mute) { + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) + hp_pin = spec->gen.autocfg.line_out_pins[0]; + } + if (!hp_pin) return; @@ -3195,6 +3210,11 @@ static void alc256_shutup(struct hda_cod hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0]; bool hp_pin_sense; + if (!spec->gen.autocfg.hp_outs && spec->gen.suppress_auto_mute) { + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) + hp_pin = spec->gen.autocfg.line_out_pins[0]; + } + if (!hp_pin) { alc269_shutup(codec); return; @@ -3231,6 +3251,11 @@ static void alc225_init(struct hda_codec hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0]; bool hp1_pin_sense, hp2_pin_sense; + if (!spec->gen.autocfg.hp_outs && spec->gen.suppress_auto_mute) { + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) + hp_pin = spec->gen.autocfg.line_out_pins[0]; + } + if (!hp_pin) return; @@ -3274,6 +3299,11 @@ static void alc225_shutup(struct hda_cod hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0]; bool hp1_pin_sense, hp2_pin_sense; + if (!spec->gen.autocfg.hp_outs && spec->gen.suppress_auto_mute) { + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) + hp_pin = spec->gen.autocfg.line_out_pins[0]; + } + if (!hp_pin) { alc269_shutup(codec); return; @@ -3318,6 +3348,11 @@ static void alc_default_init(struct hda_ hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0]; bool hp_pin_sense; + if (!spec->gen.autocfg.hp_outs && spec->gen.suppress_auto_mute) { + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) + hp_pin = spec->gen.autocfg.line_out_pins[0]; + } + if (!hp_pin) return; @@ -3347,6 +3382,11 @@ static void alc_default_shutup(struct hd hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0]; bool hp_pin_sense; + if (!spec->gen.autocfg.hp_outs && spec->gen.suppress_auto_mute) { + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) + hp_pin = spec->gen.autocfg.line_out_pins[0]; + } + if (!hp_pin) { alc269_shutup(codec); return; @@ -3379,6 +3419,11 @@ static void alc294_hp_init(struct hda_co hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0]; int i, val; + if (!spec->gen.autocfg.hp_outs && spec->gen.suppress_auto_mute) { + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) + hp_pin = spec->gen.autocfg.line_out_pins[0]; + } + if (!hp_pin) return;