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 <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
sound/pci/hda/patch_intelhdmi.c | 14 --------------
1 file changed, 14 deletions(-)
@@ -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)