1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Fix code that had rotted behind debugging macros.

Approved by:	cg (in principle)
MFC after:	2 weeks
This commit is contained in:
Scott Long 2002-01-25 04:14:12 +00:00
parent be27d718c0
commit 436c9b651a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89774
8 changed files with 10 additions and 8 deletions

View File

@ -270,7 +270,7 @@ ess_reset_dsp(struct ess_info *sc)
ess_wr(sc, SBDSP_RST, 0);
if (ess_get_byte(sc) != 0xAA) {
DEB(printf("ess_reset_dsp 0x%lx failed\n",
rman_get_start(d->io_base)));
rman_get_start(sc->io_base)));
return ENXIO; /* Sorry */
}
ess_cmd(sc, 0xc6);

View File

@ -272,7 +272,7 @@ sb_reset_dsp(struct sb_info *sb)
sb_unlock(sb);
if (b != 0xAA) {
DEB(printf("sb_reset_dsp 0x%lx failed\n",
rman_get_start(d->io_base)));
rman_get_start(sb->io_base)));
return ENXIO; /* Sorry */
}
return 0;

View File

@ -246,7 +246,7 @@ sb_reset_dsp(struct sb_info *sb)
sb_wr(sb, SBDSP_RST, 0);
if (sb_get_byte(sb) != 0xAA) {
DEB(printf("sb_reset_dsp 0x%lx failed\n",
rman_get_start(d->io_base)));
rman_get_start(sb->io_base)));
return ENXIO; /* Sorry */
}
return 0;

View File

@ -619,7 +619,7 @@ sndbuf_isadma(struct snd_dbuf *b, int go)
DEB(printf("buf 0x%p ISA DMA %s, channel %d\n",
b,
(go == PCMTRIG_START)? "started" : "stopped",
b->chan));
b->isadmachan));
}
int

View File

@ -156,7 +156,7 @@ chn_dmaupdate(struct pcm_channel *c)
DEB(
if (delta >= ((sndbuf_getsize(b) * 15) / 16)) {
if (!(c->flags & (CHN_F_CLOSING | CHN_F_ABORTING)))
device_printf(c->parentsnddev->dev, "hwptr went backwards %d -> %d\n", old, hwptr);
device_printf(c->dev, "hwptr went backwards %d -> %d\n", old, hwptr);
}
);
@ -257,13 +257,13 @@ chn_write(struct pcm_channel *c, struct uio *buf)
* the write operation avoids blocking.
*/
if ((c->flags & CHN_F_NBIO) && buf->uio_resid > sndbuf_getblksz(bs)) {
DEB(device_printf(c->parentsnddev->dev, "broken app, nbio and tried to write %d bytes with fragsz %d\n",
DEB(device_printf(c->dev, "broken app, nbio and tried to write %d bytes with fragsz %d\n",
buf->uio_resid, sndbuf_getblksz(bs)));
newsize = 16;
while (newsize < min(buf->uio_resid, CHN_2NDBUFMAXSIZE / 2))
newsize <<= 1;
chn_setblocksize(c, sndbuf_getblkcnt(bs), newsize);
DEB(device_printf(c->parentsnddev->dev, "frags reset to %d x %d\n", sndbuf_getblkcnt(bs), sndbuf_getblksz(bs)));
DEB(device_printf(c->dev, "frags reset to %d x %d\n", sndbuf_getblkcnt(bs), sndbuf_getblksz(bs)));
}
ret = 0;

View File

@ -60,6 +60,7 @@ struct pcm_channel {
struct snddev_info *parentsnddev;
struct pcm_channel *parentchannel;
void *devinfo;
device_t dev;
char name[CHN_NAMELEN];
void *lock;
SLIST_HEAD(, pcmchan_children) children;

View File

@ -966,7 +966,7 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
case SOUND_PCM_READ_FILTER:
/* dunno what these do, don't sound important */
default:
DEB(printf("default ioctl chan%d fn 0x%08lx fail\n", chan, cmd));
DEB(printf("default ioctl fn 0x%08lx fail\n", cmd));
ret = EINVAL;
break;
}

View File

@ -379,6 +379,7 @@ pcm_chn_create(struct snddev_info *d, struct pcm_channel *parent, kobj_class_t c
ch->pid = -1;
ch->parentsnddev = d;
ch->parentchannel = parent;
ch->dev = d->dev;
snprintf(ch->name, 32, "%s:%s:%d", device_get_nameunit(d->dev), dirs, ch->num);
err = chn_init(ch, devinfo, dir);