From: Takashi Iwai Subject: Re: [PATCH] ALSA: hda: ignore assoc when comparing pin configurations Date: Tue, 06 Dec 2016 09:12:33 +0100 Message-ID: References: <20161206063941.13876-1-kai.heng.feng@canonical.com> <893e133e-ce3d-4f46-91bf-f89739c38401@canonical.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id EFADD266AE1 for ; Tue, 6 Dec 2016 09:12:33 +0100 (CET) In-Reply-To: <893e133e-ce3d-4f46-91bf-f89739c38401@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Hui Wang Cc: alsa-devel@alsa-project.org, Kai-Heng Feng List-Id: alsa-devel@alsa-project.org On Tue, 06 Dec 2016 08:24:24 +0100, Hui Wang wrote: > > On 12/06/2016 03:07 PM, Takashi Iwai wrote: > > On Tue, 06 Dec 2016 07:39:41 +0100, > > Kai-Heng Feng wrote: > >> 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. > > So you are ignoring *both* assoc and seq numbers? > > Or did you intend to ignore only assoc number? > The original intention is to ignoring both assoc and seq numbers. But > my patch only ignored the seq, so this patch can fix my previous > patch. OK, it wasn't clear in the changelog description. Please put it to v2 patch for comprehensive information. > > In anyway, it'd be better to use a macro like > > > > if ((t_pins->val & ~AC_DEFCFGDEF_ASSOC) == (cfg & ~AC_DEFCFG_ASSOC)) > Yes, it is better to use the macro. Let us use the macro in the V2 patch. Great. thanks, Takashi