From patchwork Thu Oct 29 09:46:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 56436 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9T9kANp003253 for ; Thu, 29 Oct 2009 09:46:10 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 423629EB0C; Thu, 29 Oct 2009 02:46:10 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E3239E938 for ; Thu, 29 Oct 2009 02:46:07 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 29 Oct 2009 02:46:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,645,1249282800"; d="scan'208";a="205123548" Received: from wu-ls.sh.intel.com (HELO localhost.localdomain) ([10.239.48.136]) by azsmga001.ch.intel.com with ESMTP; 29 Oct 2009 02:46:05 -0700 Received: from wfg by localhost.localdomain with local (Exim 4.69) (envelope-from ) id 1N3RZy-0002z5-45; Thu, 29 Oct 2009 17:46:02 +0800 Date: Thu, 29 Oct 2009 17:46:02 +0800 From: Wu Fengguang To: David =?utf-8?B?SMOkcmRlbWFu?= Message-ID: <20091029094602.GA3589@localhost> References: <20091011214513.GB12771@hardeman.nu> <20091014015455.GI13364@zhen-devel.sh.intel.com> <20091014020044.GA10032@localhost> <20091014174053.GA31149@hardeman.nu> <20091020012600.GA6548@localhost> <20091020224353.GA23186@csy.ca> <2da93e57183a480510f5b67c24ba11d0.squirrel@www.hardeman.nu> <20091028044621.GA18453@localhost> <0323437dc2fc33a33ec9285505a36434.squirrel@www.hardeman.nu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0323437dc2fc33a33ec9285505a36434.squirrel@www.hardeman.nu> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: "alsa-user@lists.sourceforge.net" , "intel-gfx@lists.freedesktop.org" , Shane W Subject: Re: [Intel-gfx] Problems with HDMI audio on Intel DG45FC motherboard X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org intelhdmi - remove checksum field from infoframe David noticed that G45's audio infoframe buffer size is 13, while the current infoframe size is 14. Which is a strong indication that the checksum field is auto-generated by hardware and should be removed from driver. HDA spec says: The HDMI specification defines a data island packet with a header of 4 bytes (3 bytes content + 1 byte ECC) and packet body of 32 bytes (28 bytes content and 4 bytes ECC). Note that the ECC bytes are not present in the DIP content populated by software and are hardware generated. CC: David Härdeman Signed-off-by: Wu Fengguang --- sound/pci/hda/patch_intelhdmi.c | 14 -------------- 1 file changed, 14 deletions(-) --- sound-2.6.orig/sound/pci/hda/patch_intelhdmi.c 2009-10-29 17:37:14.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_intelhdmi.c 2009-10-29 17:43:53.000000000 +0800 @@ -75,7 +75,6 @@ struct hdmi_audio_infoframe { u8 ver; /* 0x01 */ u8 len; /* 0x0a */ - u8 checksum; /* PB0 */ u8 CC02_CT47; /* CC in bits 0:2, CT in 4:7 */ u8 SS01_SF24; u8 CXT04; @@ -494,18 +493,6 @@ static void hdmi_clear_dip_buffers(struc #endif } -static void hdmi_checksum_audio_infoframe(struct hdmi_audio_infoframe *ai) -{ - u8 *bytes = (u8 *)ai; - u8 sum = 0; - int i; - - for (i = 0; i < sizeof(*ai); i++) - sum += bytes[i]; - - ai->checksum = - sum; -} - static void hdmi_fill_audio_infoframe(struct hda_codec *codec, hda_nid_t pin_nid, struct hdmi_audio_infoframe *ai) @@ -667,7 +654,6 @@ static void hdmi_setup_audio_infoframe(s printk("HDMI: hdmi_setup_audio_infoframe\n"); hdmi_setup_channel_allocation(codec, nid, &ai); hdmi_setup_channel_mapping(codec, nid, &ai); - hdmi_checksum_audio_infoframe(&ai); for (i = 0; i < spec->num_pins; i++) { if (spec->pin_cvt[i] != nid)