diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-02-11 02:22:30 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-02-11 03:09:07 -0500 |
commit | 9a957a24e3b4008d84e204cdf25849ae4d5592a2 (patch) | |
tree | 58f5794b82700e035f1362b6337eb8090b9b723c /sound/pci | |
parent | 606c0cee695bbd0c2bf32132999e35cff5a6dd9e (diff) |
ALSA: hda - compute checksum in HDMI audio infoframe
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_intelhdmi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c index f2610d67e187..90b11374a0a8 100644 --- a/sound/pci/hda/patch_intelhdmi.c +++ b/sound/pci/hda/patch_intelhdmi.c | |||
@@ -366,11 +366,16 @@ static void hdmi_fill_audio_infoframe(struct hda_codec *codec, | |||
366 | struct hdmi_audio_infoframe *ai) | 366 | struct hdmi_audio_infoframe *ai) |
367 | { | 367 | { |
368 | u8 *params = (u8 *)ai; | 368 | u8 *params = (u8 *)ai; |
369 | u8 sum = 0; | ||
369 | int i; | 370 | int i; |
370 | 371 | ||
371 | hdmi_debug_dip_size(codec); | 372 | hdmi_debug_dip_size(codec); |
372 | hdmi_clear_dip_buffers(codec); /* be paranoid */ | 373 | hdmi_clear_dip_buffers(codec); /* be paranoid */ |
373 | 374 | ||
375 | for (i = 0; i < sizeof(ai); i++) | ||
376 | sum += params[i]; | ||
377 | ai->checksum = - sum; | ||
378 | |||
374 | hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); | 379 | hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0); |
375 | for (i = 0; i < sizeof(ai); i++) | 380 | for (i = 0; i < sizeof(ai); i++) |
376 | hdmi_write_dip_byte(codec, PIN_NID, params[i]); | 381 | hdmi_write_dip_byte(codec, PIN_NID, params[i]); |