From: Takashi Iwai Subject: Re: [PATCH 1/1] ALSA: hda - bug fix for invalid connection list of Haswell HDMI codec pin Date: Fri, 14 Dec 2012 08:49:41 +0100 Message-ID: References: <1355511450-2031-1-git-send-email-mengdong.lin@intel.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 (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 3BE55261704 for ; Fri, 14 Dec 2012 08:49:42 +0100 (CET) In-Reply-To: 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: "Lin, Mengdong" Cc: "alsa-devel@alsa-project.org" , "Wang, Xingchao" List-Id: alsa-devel@alsa-project.org At Fri, 14 Dec 2012 07:26:28 +0000, Lin, Mengdong wrote: > > > -----Original Message----- > > From: alsa-devel-bounces@alsa-project.org > > [mailto:alsa-devel-bounces@alsa-project.org] On Behalf Of Takashi Iwai > > Sent: Friday, December 14, 2012 3:10 PM > > > > +static void intel_haswell_fixup_connect_list(struct hda_codec *codec, > > > + const struct hda_fixup *fix, int action) { > > > + hda_nid_t list[3] = {0x2, 0x3, 0x4}; > > > + unsigned int vendor_param; > > > + > > > + if (action != HDA_FIXUP_ACT_PROBE) > > > + return; > > > > Is this ACT_PROBE, that is, applied only after parsing the codec? > > Usually a fixup for overriding the connection list is applied before parsing the > > tree. > > > Yes, this fixup is applied after parsing the codec. > Because during parsing, the pin nid#6 may still report invalid connection list entries 0x00000000 > in snd_hda_get_raw_connections(), which should be 0x00040302 to stand for 3 output convertors. > So we need to overwrite its connection list with the proper value. > > But, do you mean we can change this to the pre-probe stage, so that snd_hda_get_raw_connections() > need not be called during the parsing the codec? I'll do a test. Yes. It may work currently but it might be broken if the parser code is changed, for example. I see no reason why the fixup must be applied after parsing the tree. Takashi