Received: by 10.213.65.68 with SMTP id h4csp1735252imn; Mon, 19 Mar 2018 11:49:44 -0700 (PDT) X-Google-Smtp-Source: AG47ELvvHOoKMFw+YfjCwUzb0TvTFjtnRw4m0eX34WeLy4+E66Swpv11ixDHl00n9O7Kq7Lb0oIx X-Received: by 2002:a17:902:144:: with SMTP id 62-v6mr13719582plb.202.1521485384562; Mon, 19 Mar 2018 11:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521485384; cv=none; d=google.com; s=arc-20160816; b=QP9HZ6oX2x1v69+BpVNxuufUSRjw6WZWS/25gpFRVsJn8k42LkMqu25bH8iXGRN1bb Faw9mzYa7EaK4I4aP197E66FUymXeJtl19S4GTjSyl0Rw9C5esj4iIHd04U4bq5dSV2c so8MP79GAWC9EU1bd3z3EyoZRziYgQlOg73bmv2wVF0sDL4RaheHRVWtECiKs/R/gZrr tahjLx9d7upm33yDQQcJbaAr+yXVflW/WWY/ruxlgrUZRk7RytLJ8755z+XWCrO8/qeq 7hARShDm0nJRQ1f0/mxQCTTbw0UOJzjE2RNKaJfJKn2j4gIWsK/ioY+bKQLluN1lBVkd qOsg== 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=HeD2m38JQq7tRWNFem7eJ3+06dq8Y6JmgdkTXldXTE8=; b=xTjtJjVzirBLbmkQs3/amEvBrmGtSiMkJSAvgmBceWNyW2pEV9R31WOqsuSMVtFmTY pYqM6ouNRW5HNmbPO5UYPXJCM2884wJMoQGVLbtXOduQexzu8BajoJLdgv2Xyh2iBH7c 8jrsQ9dQaDvZAt2E2kHVjENZfu5uOd2RH6c96nfFg9F0xemN5i66NRjTxJHqd1W+ioKH ZBOb4fQildZSKFuyEcU1qoSDI3ZhRtK5f+fLS0EdxXEre+KBveLzEuMyAbFg1Djmkw+y ZobpVaYzxh6GI7afqwwbXLs+f7HKMnb0SNG/Uxrv2F06tj3a48cDJj/+PxWN/0Js3tgi 865A== 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 d71si340522pgc.411.2018.03.19.11.49.29; Mon, 19 Mar 2018 11:49:44 -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 S1032090AbeCSSbV (ORCPT + 99 others); Mon, 19 Mar 2018 14:31:21 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53498 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032052AbeCSSbQ (ORCPT ); Mon, 19 Mar 2018 14:31:16 -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 C39E61139; Mon, 19 Mar 2018 18:31:15 +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.15 12/52] ALSA: hda - Revert power_save option default value Date: Mon, 19 Mar 2018 19:08:10 +0100 Message-Id: <20180319180735.811105444@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180734.976730813@linuxfoundation.org> References: <20180319180734.976730813@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.15-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 @@ -181,11 +181,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. @@ -2300,10 +2304,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",