From patchwork Wed Apr 1 10:43:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Henningsson X-Patchwork-Id: 6139321 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 28E51BF4A6 for ; Wed, 1 Apr 2015 10:43:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4EA8C202EC for ; Wed, 1 Apr 2015 10:43:22 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6E803202BE for ; Wed, 1 Apr 2015 10:43:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0ADA02651AF; Wed, 1 Apr 2015 12:43:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 9C1E4265189; Wed, 1 Apr 2015 12:43:10 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id CBA1326518B; Wed, 1 Apr 2015 12:43:09 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by alsa0.perex.cz (Postfix) with ESMTP id AF82426087E for ; Wed, 1 Apr 2015 12:43:02 +0200 (CEST) Received: from c83-254-139-117.bredband.comhem.se ([83.254.139.117] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YdG6v-0005F9-9p; Wed, 01 Apr 2015 10:43:01 +0000 From: David Henningsson To: tiwai@suse.de, alsa-devel@alsa-project.org Date: Wed, 1 Apr 2015 12:43:00 +0200 Message-Id: <1427884980-18548-1-git-send-email-david.henningsson@canonical.com> X-Mailer: git-send-email 1.9.1 Cc: tienfu.chen@canonical.com, David Henningsson Subject: [alsa-devel] [PATCH] ALSA: hda - Fix subsystem ID read regression X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP A regression was introduced in 7639a06c23c7d4cda3: if AC_PAR_SUBSYSTEM_ID reads as zero, one should retry using AC_VERB_GET_SUBSYSTEM_ID. This seems to hit many codecs (my own laptop included), and causes quirks for some machines not to apply correctly. Reported-by: TienFu Chen Signed-off-by: David Henningsson --- sound/hda/hdac_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c index 6e8ee1d..53b6b95 100644 --- a/sound/hda/hdac_device.c +++ b/sound/hda/hdac_device.c @@ -91,7 +91,7 @@ int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus, codec->power_caps = snd_hdac_read_parm(codec, fg, AC_PAR_POWER_STATE); /* reread ssid if not set by parameter */ - if (codec->subsystem_id == -1) + if (codec->subsystem_id == -1 || codec->subsystem_id == 0) snd_hdac_read(codec, fg, AC_VERB_GET_SUBSYSTEM_ID, 0, &codec->subsystem_id);