Hi tech@.
If there is a need to debug something in azalia.c, defining DIAGNOSTIC
is overkill so replace two instances of DIAGNOSTIC with AZALIA_DEBUG
(DPRINTF->printf suggested by ratchov@).
Also, entirely remove 3rd instance of DIAGNOSTIC. Normally it is not
compiled and, ratchov@ thinks, related to deleted code.
Okays? Comments?
--- azalia.c.orig Wed Sep 23 16:10:19 2015
+++ azalia.c Wed Sep 23 16:11:47 2015
@@ -1170,9 +1170,9 @@
uint32_t verb;
uint16_t corbwp;
-#ifdef DIAGNOSTIC
+#ifdef AZALIA_DEBUG
if ((AZ_READ_1(az, CORBCTL) & HDA_CORBCTL_CORBRUN) == 0) {
- DPRINTF(("%s: CORB is not running.\n", XNAME(az)));
+ printf(("%s: CORB is not running.\n", XNAME(az)));
return(-1);
}
#endif
@@ -1196,9 +1196,9 @@
int i;
uint16_t wp;
-#ifdef DIAGNOSTIC
+#ifdef AZALIA_DEBUG
if ((AZ_READ_1(az, RIRBCTL) & HDA_RIRBCTL_RIRBDMAEN) == 0) {
- DPRINTF(("%s: RIRB is not running.\n", XNAME(az)));
+ printf(("%s: RIRB is not running.\n", XNAME(az)));
return(-1);
}
#endif
@@ -4054,12 +4054,6 @@
/* number of blocks must be <= HDA_BDL_MAX */
az = v;
size = az->pstream.buffer.size;
-#ifdef DIAGNOSTIC
- if (size <= 0) {
- printf("%s: size is 0", __func__);
- return 256;
- }
-#endif
if (size > HDA_BDL_MAX * blk) {
blk = size / HDA_BDL_MAX;
if (blk & 0x7f)