From patchwork Mon May 26 08:22:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 4240461 X-Patchwork-Delegate: tiwai@suse.de 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AEA01BF90B for ; Mon, 26 May 2014 08:25:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC337201D3 for ; Mon, 26 May 2014 08:25:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 85C532017E for ; Mon, 26 May 2014 08:25:22 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1EF5E26524C; Mon, 26 May 2014 10:25:21 +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 6CE1E265055; Mon, 26 May 2014 10:23:44 +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 2C995265055; Mon, 26 May 2014 10:23:43 +0200 (CEST) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by alsa0.perex.cz (Postfix) with ESMTP id 22DD226087B for ; Mon, 26 May 2014 10:23:23 +0200 (CEST) Received: by mail-pa0-f44.google.com with SMTP id ld10so7270681pab.17 for ; Mon, 26 May 2014 01:23:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DSD2QuxnkAMmbfY75bUjM9FNG0cnqotDQQyhmh+wcZU=; b=N2rh2rhdTu5RVFOoYy82c15iFHY5hp9ZzIUZ6VEOzFnSp1uYPFx12GtRCHihIid+EU NXi8VtekShZRiGBozjq9ny+R3Zwa3ZpWzBQDwiOhPssMsp3vd4TZBrbl4N/Sz+Qss3k1 Jg35k2p1A9ZJuei0KtwvrbfuTOq/eU6caEngVDReKmypUg757yLvKEIoUUIVmtXv3zbm 56C7TYL129R/O16fjm43Kl9MvWWPgzqnsBPUQfBNh6gWn4TH7O6VV3/81mKL9v9ROj4V 0KzesKXWjxv3zj4ZJ8nMIIx25A86iVKPn3ygn+/J8BHnqeiInDY22gd+tHKTF3YzQAcd GUMA== X-Gm-Message-State: ALoCoQkpYEJt591PelV/ul8AlPIvoExq8ADa5CpcF5Sq+/xNiN+lW4LsN6eKXwaEdhVE02dxF8We X-Received: by 10.66.254.166 with SMTP id aj6mr26159704pad.11.1401092603117; Mon, 26 May 2014 01:23:23 -0700 (PDT) Received: from localhost.localdomain ([116.213.97.190]) by mx.google.com with ESMTPSA id ov4sm16964840pbc.46.2014.05.26.01.23.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 May 2014 01:23:22 -0700 (PDT) From: Hui Wang To: tiwai@suse.de, alsa-devel@alsa-project.org Date: Mon, 26 May 2014 16:22:43 +0800 Message-Id: <1401092564-14293-4-git-send-email-hui.wang@canonical.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1401092564-14293-1-git-send-email-hui.wang@canonical.com> References: <1401092564-14293-1-git-send-email-hui.wang@canonical.com> Cc: hui.wang@canonical.com, david.henningsson@canonical.com Subject: [alsa-devel] [PATCH 4/5] ALSA: hda - drop def association and sequence from pinconf comparing 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 lot a machine have the same codec, but they have different default pinconf setting just because the def association and sequence is different, as a result they can't share a hda_pintbl[], to overcome it, we don't compare def association and sequence in the pinconf matching. Signed-off-by: Hui Wang --- sound/pci/hda/hda_auto_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c index b684c6e..3cf9137 100644 --- a/sound/pci/hda/hda_auto_parser.c +++ b/sound/pci/hda/hda_auto_parser.c @@ -844,7 +844,8 @@ static bool pin_config_match(struct hda_codec *codec, { for (; pins->nid; pins++) { u32 def_conf = snd_hda_codec_get_pincfg(codec, pins->nid); - if (pins->val != def_conf) + u32 mask = 0xffffff00; + if ((pins->val & mask) != (def_conf & mask)) return false; } return true;