Received: by 10.223.176.5 with SMTP id f5csp1099168wra; Fri, 2 Feb 2018 11:08:55 -0800 (PST) X-Google-Smtp-Source: AH8x226LJsgKqdsQPZm6rjP0hL6RWgprPXMkmFxmV86+WRaZ8LaCwYNr20xeYuGymt8NoG49G1JR X-Received: by 2002:a17:902:7148:: with SMTP id u8-v6mr5235344plm.91.1517598535428; Fri, 02 Feb 2018 11:08:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517598535; cv=none; d=google.com; s=arc-20160816; b=eib/SMiH0npjGEw3IT9zqMLw1A+Znl3UrZizNJShXV6+N6xWUpm8sMD5GovX3yxlyw uskI7sym2GAYNc0DTNhn/vVKkDjac/arsWIaMMhU5HxiG88V1olRpUI673fJA2cWvs8L WCbEvV1oFoC/AWSNywG3Zngv2pgfLuiFO//oPpFi7Ish0WsoR0NigR95ARp9kEWiBqnU O9UHX7L/nnLbgQBHnvN+pzGSsimI+8TqJ7VG5k+ss+B+2WgGrYCZM70NU42Kzte3SBMw qifxDOI2YpNGF7CuyBcEdh+NrH8LWAA902ZU24Zgc0T5nG7yeQGAv8xTCoYT4khcD1Z1 nJwA== 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=dUkWD2ZxVFah9jB25GZSVYAyYCOO+3+WcoDa0zFAX5Q=; b=nzV9wTfiRgqZn5PZJlTcc7TIJ3ym54nYzJhto0HyBB48TUTPb/d3TKdr4Dn6Xso24E /iGmkagZT9gGVeH9eYTSquq4E07HO1ISKBDM7rkP9m7i4ZMVw7CcAbTZqOfG4vGxww7T KcbwuteApu+cXBIEGptvNdZ7yQcgh4cS8+Y36uLhoZfxMOkV0hUmLRAsRLJ1jo9TEBbh 7QWCLzOJLyKSSEIUU2nhMfrfGCeyf05l/TjSUu1E035Bz18tBEiyP2+x34FOlKdZfvtI nb8O4uADu5kBT077+4e4j5kTZ1lRn+OqJfrhXh5IncD/Ro0K6CzoUbwDWwQnm7P1uqLD FBmw== 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 t12si1828015pgr.807.2018.02.02.11.08.40; Fri, 02 Feb 2018 11:08:55 -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 S1753687AbeBBSFE (ORCPT + 99 others); Fri, 2 Feb 2018 13:05:04 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37310 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752513AbeBBRI2 (ORCPT ); Fri, 2 Feb 2018 12:08:28 -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 EDAA9EEC; Fri, 2 Feb 2018 17:08:26 +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.14 007/156] ALSA: hda - Reduce the suspend time consumption for ALC256 Date: Fri, 2 Feb 2018 17:56:28 +0100 Message-Id: <20180202140840.650973613@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@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.14-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 @@ -3131,11 +3131,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);