diff options
author | luigi <luigi@FreeBSD.org> | 1999-01-04 10:40:14 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 1999-01-04 10:40:14 +0000 |
commit | ca0883293604a732bb1f0677db1554a154639595 (patch) | |
tree | 36320751487d949cc715752b6b6c4ef6d608d038 /sys/i386/isa/snd/sound.c | |
parent | 30ad5c00bb23aae0b44ff207fc1083fb62e5e3c4 (diff) | |
download | FreeBSD-src-ca0883293604a732bb1f0677db1554a154639595.zip FreeBSD-src-ca0883293604a732bb1f0677db1554a154639595.tar.gz |
Bring in ad1816 patches from German Tischler.
Fix 'device not configured' problem that people were experiencing
when only PCI devices are present.
Diffstat (limited to 'sys/i386/isa/snd/sound.c')
-rw-r--r-- | sys/i386/isa/snd/sound.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/i386/isa/snd/sound.c b/sys/i386/isa/snd/sound.c index 1cbbe8a..f8b5cfb 100644 --- a/sys/i386/isa/snd/sound.c +++ b/sys/i386/isa/snd/sound.c @@ -238,7 +238,6 @@ pcmattach(struct isa_device * dev) snddev_info *d = NULL ; struct isa_device *dvp; int stat = 0; - dev_t isadev; dev->id_ointr = pcmintr; @@ -284,8 +283,6 @@ pcmattach(struct isa_device * dev) if (FULL_DUPLEX(d)) isa_dma_acquire(d->dbuf_in.chan); - isadev = makedev(CDEV_MAJOR, 0); - cdevsw_add(&isadev, &snd_cdevsw, NULL); /* * should try and find a suitable value for id_id, otherwise @@ -331,6 +328,10 @@ pcminit(snddev_info *d, int unit) #ifdef DEVFS void *cookie; #endif + dev_t isadev; + + isadev = makedev(CDEV_MAJOR, 0); + cdevsw_add(&isadev, &snd_cdevsw, NULL); /* * initialize standard parameters for the device. This can be @@ -604,6 +605,14 @@ sndread(dev_t i_dev, struct uio * buf, int flag) return uiomove(p, l, buf) ; } + /* + * XXX read from the ad1816 with a single DMA channel is unsupported. + * This is really not the place for machine-dependent functions, + * a proper device routine will be supplied in the future - luigi + */ + if ((d->bd_id == MD_AD1816) && (!(FULL_DUPLEX(d)))) + return EIO; + if (d->read) /* device-specific read */ return d->read(i_dev, buf, flag); |