Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev/hdaudio Pull up following revision(s) (requested ...
details: https://anonhg.NetBSD.org/src/rev/f705f59a89e9
branches: netbsd-8
changeset: 434217:f705f59a89e9
user: snj <snj%NetBSD.org@localhost>
date: Sun Aug 20 04:50:38 2017 +0000
description:
Pull up following revision(s) (requested by mrg in ticket #210):
sys/dev/hdaudio/hdafg.c: revision 1.13
sys/dev/hdaudio/hdafg_dd.c: revision 1.2
put all the ELD debugging messages under #ifdef HDAFG_HDMI_DEBUG.
this silences a frequent and largely useless series of messages
in my dmesg. ok jmcneill.
diffstat:
sys/dev/hdaudio/hdafg.c | 12 ++++++++++--
sys/dev/hdaudio/hdafg_dd.c | 16 ++++++++++++++--
2 files changed, 24 insertions(+), 4 deletions(-)
diffs (136 lines):
diff -r 99da4a02ff11 -r f705f59a89e9 sys/dev/hdaudio/hdafg.c
--- a/sys/dev/hdaudio/hdafg.c Mon Aug 14 23:57:50 2017 +0000
+++ b/sys/dev/hdaudio/hdafg.c Sun Aug 20 04:50:38 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hdafg.c,v 1.12 2017/06/01 02:45:10 chs Exp $ */
+/* $NetBSD: hdafg.c,v 1.12.2.1 2017/08/20 04:50:38 snj Exp $ */
/*
* Copyright (c) 2009 Precedence Technologies Ltd <support%precedence.co.uk@localhost>
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.12 2017/06/01 02:45:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.12.2.1 2017/08/20 04:50:38 snj Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -879,15 +879,19 @@
res = (*cmd)(sc->sc_codec, as->as_pins[pin],
CORB_GET_HDMI_ELD_DATA, i);
if (!(res & COP_ELD_VALID)) {
+#ifdef HDAFG_HDMI_DEBUG
hda_error(sc, "bad ELD size (%u/%u)\n",
i, elddatalen);
+#endif
break;
}
elddata[i] = COP_ELD_DATA(res);
}
if (hdafg_dd_parse_info(elddata, elddatalen, &hdi) != 0) {
+#ifdef HDAFG_HDMI_DEBUG
hda_error(sc, "failed to parse ELD data\n");
+#endif
return;
}
@@ -4342,7 +4346,9 @@
switch (tag) {
case HDAUDIO_UNSOLTAG_EVENT_DD:
+#ifdef HDAFG_HDMI_DEBUG
hda_print(sc, "unsol: display device hotplug\n");
+#endif
for (i = 0; i < sc->sc_nassocs; i++) {
if (as[i].as_displaydev == false)
continue;
@@ -4354,7 +4360,9 @@
}
break;
default:
+#ifdef HDAFG_HDMI_DEBUG
hda_print(sc, "unsol: tag=%u\n", tag);
+#endif
break;
}
diff -r 99da4a02ff11 -r f705f59a89e9 sys/dev/hdaudio/hdafg_dd.c
--- a/sys/dev/hdaudio/hdafg_dd.c Mon Aug 14 23:57:50 2017 +0000
+++ b/sys/dev/hdaudio/hdafg_dd.c Sun Aug 20 04:50:38 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hdafg_dd.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $ */
+/* $NetBSD: hdafg_dd.c,v 1.1.12.1 2017/08/20 04:50:38 snj Exp $ */
/*
* Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdafg_dd.c,v 1.1 2015/03/28 14:09:59 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdafg_dd.c,v 1.1.12.1 2017/08/20 04:50:38 snj Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -50,12 +50,16 @@
struct eld_baseline_block *block = &hdi->eld;
unsigned int i;
+#ifdef HDAFG_HDMI_DEBUG
printf("hdafg_dd_parse_info: datalen=%u\n", (unsigned int)datalen);
+#endif
memset(hdi, 0, sizeof(*hdi));
if (datalen < sizeof(block->header)) {
+#ifdef HDAFG_HDMI_DEBUG
printf(" no room for header\n");
+#endif
return EINVAL;
}
@@ -65,7 +69,9 @@
if (datalen < block->header.baseline_eld_len * 4 ||
datalen < sizeof(*block) - sizeof(block->header)) {
+#ifdef HDAFG_HDMI_DEBUG
printf(" ack!\n");
+#endif
return EINVAL;
}
@@ -76,7 +82,9 @@
datalen -= sizeof(*block) - sizeof(block->header);
if (datalen < ELD_MNL(block)) {
+#ifdef HDAFG_HDMI_DEBUG
printf(" MNL=%u\n", ELD_MNL(block));
+#endif
return EINVAL;
}
@@ -85,10 +93,12 @@
datalen -= ELD_MNL(block);
if (datalen != ELD_SAD_COUNT(block) * sizeof(hdi->sad[0])) {
+#ifdef HDAFG_HDMI_DEBUG
printf(" datalen %u sadcount %u sizeof sad %u\n",
(unsigned int)datalen,
ELD_SAD_COUNT(block),
(unsigned int)sizeof(hdi->sad[0]));
+#endif
return EINVAL;
}
hdi->nsad = ELD_SAD_COUNT(block);
@@ -98,7 +108,9 @@
datalen -= sizeof(hdi->sad[i]);
}
+#ifdef HDAFG_HDMI_DEBUG
printf("datalen = %u\n", (unsigned int)datalen);
+#endif
KASSERT(datalen == 0);
return 0;
Home |
Main Index |
Thread Index |
Old Index