diff options
author | scottl <scottl@FreeBSD.org> | 2002-01-25 04:14:12 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2002-01-25 04:14:12 +0000 |
commit | 96d2f68a834c0946ed292f01a7ec3d9f03645db6 (patch) | |
tree | a881d355b3905e4df6b8949491498ef830cebdff /sys/dev | |
parent | ba4ccad7af410a746ed01fec7f04aea5b1eb10ac (diff) | |
download | FreeBSD-src-96d2f68a834c0946ed292f01a7ec3d9f03645db6.zip FreeBSD-src-96d2f68a834c0946ed292f01a7ec3d9f03645db6.tar.gz |
Fix code that had rotted behind debugging macros.
Approved by: cg (in principle)
MFC after: 2 weeks
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sound/isa/ess.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/isa/sb16.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/isa/sb8.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pcm/buffer.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pcm/channel.c | 6 | ||||
-rw-r--r-- | sys/dev/sound/pcm/channel.h | 1 | ||||
-rw-r--r-- | sys/dev/sound/pcm/dsp.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pcm/sound.c | 1 |
8 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c index 624f81c..48b6288 100644 --- a/sys/dev/sound/isa/ess.c +++ b/sys/dev/sound/isa/ess.c @@ -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); diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c index 7aef4e3..94e5f91 100644 --- a/sys/dev/sound/isa/sb16.c +++ b/sys/dev/sound/isa/sb16.c @@ -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; diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c index e8b2011..be4e670 100644 --- a/sys/dev/sound/isa/sb8.c +++ b/sys/dev/sound/isa/sb8.c @@ -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; diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index 8e00e62..1081fdf 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -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 diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index df18261..5789a3d 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -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; diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index cc3a3ea..87149a5 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -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; diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 2f1462c..b7eb4b9 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -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; } diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 94065bc..cbd1bc1 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -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); |