Module Name: src
Committed By: jmcneill
Date: Sat Nov 14 18:04:05 UTC 2015
Modified Files:
src/sys/external/bsd/drm2/include/linux: hdmi.h
Log Message:
hdmi_audio_infoframe_pack: Initialize the entire output buffer.
hdmi_infoframe_checksum: Fix HDMI infoframe checksum calculations.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/include/linux/hdmi.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/include/linux/hdmi.h
diff -u src/sys/external/bsd/drm2/include/linux/hdmi.h:1.5 src/sys/external/bsd/drm2/include/linux/hdmi.h:1.6
--- src/sys/external/bsd/drm2/include/linux/hdmi.h:1.5 Mon Nov 24 01:27:07 2014
+++ src/sys/external/bsd/drm2/include/linux/hdmi.h Sat Nov 14 18:04:05 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: hdmi.h,v 1.5 2014/11/24 01:27:07 riastradh Exp $ */
+/* $NetBSD: hdmi.h,v 1.6 2015/11/14 18:04:05 jmcneill Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -217,7 +217,7 @@ hdmi_infoframe_checksum(void *buf, size_
uint8_t checksum = 0;
while (length--)
- checksum = *p++;
+ checksum += *p++;
p = buf;
p[3] = (256 - checksum);
@@ -283,7 +283,13 @@ hdmi_audio_infoframe_pack(const struct h
p[4] = __SHIFTIN(frame->downmix_inhibit? 1 : 0, __BIT(7));
- /* XXX p[5], p[6], p[7], p[8], p[9]? */
+ /* PB6 to PB10 are reserved */
+ p[5] = 0;
+ p[6] = 0;
+ p[7] = 0;
+ p[8] = 0;
+ p[9] = 0;
+
CTASSERT(HDMI_AUDIO_INFOFRAME_SIZE == 10);
hdmi_infoframe_checksum(buf, length);