All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: tiwai@suse.com
Cc: hui.wang@canonical.com, alsa-devel@alsa-project.org,
	Kai-Heng Feng <kai.heng.feng@canonical.com>
Subject: [PATCH] ALSA: hda: ignore assoc when comparing pin configurations
Date: Tue,  6 Dec 2016 14:39:41 +0800	[thread overview]
Message-ID: <20161206063941.13876-1-kai.heng.feng@canonical.com> (raw)

Commit [64047d7f4912 ALSA: hda - ignore the assoc and seq when comparing
pin configurations] may still fail to match pins on some machines,
because the bitmask it used only ignore seq but not assoc.
Change the bitmask to also ignore assoc.

Thanks to Hui Wang for the analysis.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 sound/pci/hda/hda_auto_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
index 4ad29f8..fdc30d0 100644
--- a/sound/pci/hda/hda_auto_parser.c
+++ b/sound/pci/hda/hda_auto_parser.c
@@ -901,7 +901,7 @@ static bool pin_config_match(struct hda_codec *codec,
 		for (; t_pins->nid; t_pins++) {
 			if (t_pins->nid == nid) {
 				found = 1;
-				if ((t_pins->val & 0xfffffff0) == (cfg & 0xfffffff0))
+				if ((t_pins->val & 0xffffff00) == (cfg & 0xffffff00))
 					break;
 				else if ((cfg & 0xf0000000) == 0x40000000 && (t_pins->val & 0xf0000000) == 0x40000000)
 					break;
-- 
2.10.2

             reply	other threads:[~2016-12-06  6:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06  6:39 Kai-Heng Feng [this message]
2016-12-06  7:07 ` [PATCH] ALSA: hda: ignore assoc when comparing pin configurations Takashi Iwai
2016-12-06  7:24   ` Hui Wang
2016-12-06  8:12     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161206063941.13876-1-kai.heng.feng@canonical.com \
    --to=kai.heng.feng@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=hui.wang@canonical.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.