Received: by 10.223.176.5 with SMTP id f5csp1014142wra; Fri, 2 Feb 2018 09:43:18 -0800 (PST) X-Google-Smtp-Source: AH8x225F2av7bzhc9CAbeopmwTn2L+A/m4DdylgMRpuzDyogfV9t9i9crYO9WbAJ3/9h5pdpp+ZQ X-Received: by 2002:a17:902:b60b:: with SMTP id b11-v6mr14745810pls.210.1517593398334; Fri, 02 Feb 2018 09:43:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517593398; cv=none; d=google.com; s=arc-20160816; b=QUePfoY3RuQYSa1qN87GFacTYAQxKmHPT11UK+OlwNhkEaHikFD7uzvtqo26fzGCQo kovI8DpMq8BpinVTnP68/KEqCnDMWWaS7T3W3IdkNAykXPcszp6N/LIsCvzjDp1QoVeO zxCq58VydqHJyUiB5uk7G/sRVOLEk+nMzc/LSHwOyNodrkGQg4ivvn6Z1lP9aK++aHav bb92NlVsd1B5qwHlmqfO07bHJF/jntWXC4K14pQbcor/wul7VMLET+z5UeavAAh3vGmF PYwc516urh3TyJitgoqyEDFvYQjm9xJ9FgOva7OQ94Tmn3BAejYoLxVv7dVWgyHD6LsH TKIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=M526taa+xYQEu/iEqCo8zptYdjr+gS0Fzlp9yx91KGo=; b=jPcXf3Dherr72U8WbtW+lDh5MPn5yCnBz3+mb0jDW72XtZcYi0e5D3KU0ZCqIutQoG Bb45Pto1d08tUpGmBb+YyFuTpXTeRirz0L5GBJv0cP+RBexHAb2VSGwxqTWa6N0NU3yi HnlI8E2oDOz3KmPAx6bEoasDAzbQfw97/N4nymULRMrxKjVEFshqTXZe/FpAB9IBQL2J NU4YPky217g97Ul5a1VoqTaG9zvBtqHSiRSEVOLiUMbxu/E09ZY1dvgs8FrJLk7Ou00M oi93p1rXv5UJik5mq13SvJRHeqbzXwULfetJo3S7azcbjk3q9ZBxJQAa6yAArhHcSBfN y3WA== ARC-Authentication-Results: i=1; mx.google.com; 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 i3-v6si2191298plt.369.2018.02.02.09.43.03; Fri, 02 Feb 2018 09:43:18 -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; 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 S1752802AbeBBRl7 (ORCPT + 99 others); Fri, 2 Feb 2018 12:41:59 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40702 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752765AbeBBRPQ (ORCPT ); Fri, 2 Feb 2018 12:15:16 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D0B62AD8; Fri, 2 Feb 2018 17:15:15 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Menzel , Takashi Iwai Subject: [PATCH 4.15 05/55] ALSA: hda - Reduce the suspend time consumption for ALC256 Date: Fri, 2 Feb 2018 17:58:23 +0100 Message-Id: <20180202140826.536527880@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140826.117602411@linuxfoundation.org> References: <20180202140826.117602411@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit 1c9609e3a8cf5997bd35205cfda1ff2218ee793b upstream. ALC256 has its own quirk to override the shutup call, and it contains the COEF update for pulling down the headset jack control. Currently, the COEF update is called after clearing the headphone pin, and this seems triggering a stall of the codec communication, and results in a long delay over a second at suspend. A quick resolution is to swap the calls: at first with the COEF update, then clear the headphone pin. Fixes: 4a219ef8f370 ("ALSA: hda/realtek - Add ALC256 HP depop function") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198503 Reported-by: Paul Menzel Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3154,11 +3154,13 @@ static void alc256_shutup(struct hda_cod if (hp_pin_sense) msleep(85); + /* 3k pull low control for Headset jack. */ + /* NOTE: call this before clearing the pin, otherwise codec stalls */ + alc_update_coef_idx(codec, 0x46, 0, 3 << 12); + snd_hda_codec_write(codec, hp_pin, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); - alc_update_coef_idx(codec, 0x46, 0, 3 << 12); /* 3k pull low control for Headset jack. */ - if (hp_pin_sense) msleep(100);