Received: by 10.213.65.68 with SMTP id h4csp39257imn; Mon, 19 Mar 2018 18:49:56 -0700 (PDT) X-Google-Smtp-Source: AG47ELvPcqaPvuzwjsR54dBfOxJFd3dHX2cm/y6r6TPJbg+fHIqtC+Z3dLx6/VqIWXTmTG3MJ3aE X-Received: by 2002:a17:902:5814:: with SMTP id m20-v6mr13635867pli.311.1521510596616; Mon, 19 Mar 2018 18:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521510596; cv=none; d=google.com; s=arc-20160816; b=NHAkUoSclCe1OuvypgpX55aE/tBO40u1+nSWfJfa/hTjO19iOd6gOZj9Vzn61SFLXf FnVB6T0Rk35SchyuYLLQf04gPvdjKFYLTVFAnZr9xmkQOcxPrXwy7Hlnst0UcgeK3UK4 n1uhAkPajHgjlegnYKTpZHaUs9m015fssySq9RyQJHn0oFkunaMngywXpFkwKjEa3Hs4 lq+ji4CEA5c5Bj81S7I0wCQspPzN9Wy7acxaP1zFfGQAJcj67ek4a2DY/oLvIaTTIwC5 jpaaT/QkrlEbAmjpDxmYhBebjHqOsIB2Cmtk7lpejbunu/7ZifE4pMheRImOi8OC+U1b BVRw== 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=9df6y9CWJML+NrrE5f8+g5eOWxqlFDp8oWNjsO5so98=; b=X5nTWtVmmodsly6db2uWhDU8ycJxjDPS13e+pNJIbViYZyvYmUoCJMHID2ipSQraX/ 6O8SgjOys7S2nY4G/Vt2kP6FWMTFIV958eYRXkDZDsilx7ijItxNvt5Kaw51M+UHUf2q 52qpRaxx2mlxuLpspNsf9TzanK9JM69i0LV00C5gyaDFdEOnt4WXwjwiC2Np5BmNKSyI hoU2XNj2dHWzCHx4vZgucvWwpQzXJS2juGtDqHSTZEcN6FhJXuxuiKMCqHI8DTxB7+8u eUcD8evAqkG9n4v/+fRGbHGF5wV0uHb+ScRqM2aafRSdNLofXrTUcL6Yz2Ebd2b6nGkO sRDQ== 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 n1-v6si460637pld.87.2018.03.19.18.49.43; Mon, 19 Mar 2018 18:49:56 -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; 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 S1031089AbeCSUDb (ORCPT + 99 others); Mon, 19 Mar 2018 16:03:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45864 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969251AbeCSSSG (ORCPT ); Mon, 19 Mar 2018 14:18:06 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 453DB1270; Mon, 19 Mar 2018 18:18:05 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Takashi Iwai Subject: [PATCH 4.4 117/134] ALSA: hda - Revert power_save option default value Date: Mon, 19 Mar 2018 19:06:40 +0100 Message-Id: <20180319171906.169181408@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit 40088dc4e1ead7df31728c73f5b51d71da18831d upstream. With the commit 1ba8f9d30817 ("ALSA: hda: Add a power_save blacklist"), we changed the default value of power_save option to -1 for processing the power-save blacklist. Unfortunately, this seems breaking user-space applications that actually read the power_save parameter value via sysfs and judge / adjust the power-saving status. They see the value -1 as if the power-save is turned off, although the actual value is taken from CONFIG_SND_HDA_POWER_SAVE_DEFAULT and it can be a positive. So, overall, passing -1 there was no good idea. Let's partially revert it -- at least for power_save option default value is restored again to CONFIG_SND_HDA_POWER_SAVE_DEFAULT. Meanwhile, in this patch, we keep the blacklist behavior and make is adjustable via the new option, pm_blacklist. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199073 Fixes: 1ba8f9d30817 ("ALSA: hda: Add a power_save blacklist") Acked-by: Hans de Goede Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/hda_intel.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -179,11 +179,15 @@ static const struct kernel_param_ops par }; #define param_check_xint param_check_int -static int power_save = -1; +static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT; module_param(power_save, xint, 0644); MODULE_PARM_DESC(power_save, "Automatic power-saving timeout " "(in second, 0 = disable)."); +static bool pm_blacklist = true; +module_param(pm_blacklist, bool, 0644); +MODULE_PARM_DESC(pm_blacklist, "Enable power-management blacklist"); + /* reset the HD-audio controller in power save mode. * this may give more power-saving, but will take longer time to * wake up. @@ -2164,10 +2168,9 @@ static int azx_probe_continue(struct azx val = power_save; #ifdef CONFIG_PM - if (val == -1) { + if (pm_blacklist) { const struct snd_pci_quirk *q; - val = CONFIG_SND_HDA_POWER_SAVE_DEFAULT; q = snd_pci_quirk_lookup(chip->pci, power_save_blacklist); if (q && val) { dev_info(chip->card->dev, "device %04x:%04x is on the power_save blacklist, forcing power_save to 0\n",