summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>1999-01-04 20:06:38 +0000
committerluigi <luigi@FreeBSD.org>1999-01-04 20:06:38 +0000
commit7593ef4cbdd685a9195c1ebf53977dfabc35fa70 (patch)
tree12df9cf098de912c8bd652108682fa51c4db1d6b /sys
parent46c636cd84f5c33710e7d9d123d5077f72c1623c (diff)
downloadFreeBSD-src-7593ef4cbdd685a9195c1ebf53977dfabc35fa70.zip
FreeBSD-src-7593ef4cbdd685a9195c1ebf53977dfabc35fa70.tar.gz
Fix YMF719 detection (report by jose@we.lc.ehu.es).
Fix compile problems without "controller pnp0" (fix by German Tischler)
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pcm/isa/mss.c13
-rw-r--r--sys/dev/sound/isa/mss.c13
-rw-r--r--sys/i386/isa/snd/ad1848.c13
3 files changed, 27 insertions, 12 deletions
diff --git a/sys/dev/pcm/isa/mss.c b/sys/dev/pcm/isa/mss.c
index 7777e4b..0284995 100644
--- a/sys/dev/pcm/isa/mss.c
+++ b/sys/dev/pcm/isa/mss.c
@@ -79,12 +79,13 @@ static void ad_write(snddev_info *d, int reg, u_char data);
static void ad_write_cnt(snddev_info *d, int reg, u_short data);
static int ad_read(snddev_info *d, int reg);
+#if NPNP > 0 /* the ad1816 is pnp only */
/* ad1816 prototypes */
/* IO primitives */
static int ad1816_wait_init(snddev_info * d, int x);
-static unsigned short ad1816_read(snddev_info * d, unsigned int reg);
-static void ad1816_write(snddev_info * d, unsigned int reg, unsigned short data);
+static u_short ad1816_read(snddev_info * d, u_int reg);
+static void ad1816_write(snddev_info * d, u_int reg, u_short data);
/* intr and callback functions */
static irq_proc_t ad1816_intr;
static snd_callback_t ad1816_callback;
@@ -97,6 +98,7 @@ static int ad1816_set_recsrc(snddev_info * d, int mask);
static void ad1816_mixer_reset(snddev_info * d);
/* ad1816 prototypes end */
+#endif
/*
* device descriptors for the boards supported by this module.
@@ -202,6 +204,7 @@ mss_probe_end:
return mss_detect(dev) ? 8 : 0 ; /* mss uses 8 regs */
}
+#if NPNP > 0
static int
ad1816_attach(struct isa_device *dev)
{
@@ -226,6 +229,7 @@ ad1816_attach(struct isa_device *dev)
ad1816_mixer_reset(d);
return 0 ;
}
+#endif /* NPNP */
/*
* the address passed as io_base for mss_attach is also the old
@@ -243,9 +247,10 @@ mss_attach(struct isa_device *dev)
d->name, dev->id_unit,
d->io_base, d->irq, d->dbuf_out.chan, d->dbuf_in.chan, dev->id_flags);
+#if NPNP > 0
if (d->bd_id == MD_AD1816)
return ad1816_attach(dev);
-
+#endif
dev->id_alive = 8 ; /* number of io ports */
/* should be already set but just in case... */
@@ -1453,7 +1458,7 @@ cs423x_probe(u_long csn, u_long vend_id)
s = "Yamaha SA2";
else if ( id == 0x3000a865)
s = "Yamaha SA3";
- else if (vend_id == 0x0000a865)
+ else if ( id == 0x0000a865)
s = "Yamaha YMF719 OPL-SA3";
else if (vend_id == 0x8140d315)
s = "SoundscapeVIVO";
diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c
index 7777e4b..0284995 100644
--- a/sys/dev/sound/isa/mss.c
+++ b/sys/dev/sound/isa/mss.c
@@ -79,12 +79,13 @@ static void ad_write(snddev_info *d, int reg, u_char data);
static void ad_write_cnt(snddev_info *d, int reg, u_short data);
static int ad_read(snddev_info *d, int reg);
+#if NPNP > 0 /* the ad1816 is pnp only */
/* ad1816 prototypes */
/* IO primitives */
static int ad1816_wait_init(snddev_info * d, int x);
-static unsigned short ad1816_read(snddev_info * d, unsigned int reg);
-static void ad1816_write(snddev_info * d, unsigned int reg, unsigned short data);
+static u_short ad1816_read(snddev_info * d, u_int reg);
+static void ad1816_write(snddev_info * d, u_int reg, u_short data);
/* intr and callback functions */
static irq_proc_t ad1816_intr;
static snd_callback_t ad1816_callback;
@@ -97,6 +98,7 @@ static int ad1816_set_recsrc(snddev_info * d, int mask);
static void ad1816_mixer_reset(snddev_info * d);
/* ad1816 prototypes end */
+#endif
/*
* device descriptors for the boards supported by this module.
@@ -202,6 +204,7 @@ mss_probe_end:
return mss_detect(dev) ? 8 : 0 ; /* mss uses 8 regs */
}
+#if NPNP > 0
static int
ad1816_attach(struct isa_device *dev)
{
@@ -226,6 +229,7 @@ ad1816_attach(struct isa_device *dev)
ad1816_mixer_reset(d);
return 0 ;
}
+#endif /* NPNP */
/*
* the address passed as io_base for mss_attach is also the old
@@ -243,9 +247,10 @@ mss_attach(struct isa_device *dev)
d->name, dev->id_unit,
d->io_base, d->irq, d->dbuf_out.chan, d->dbuf_in.chan, dev->id_flags);
+#if NPNP > 0
if (d->bd_id == MD_AD1816)
return ad1816_attach(dev);
-
+#endif
dev->id_alive = 8 ; /* number of io ports */
/* should be already set but just in case... */
@@ -1453,7 +1458,7 @@ cs423x_probe(u_long csn, u_long vend_id)
s = "Yamaha SA2";
else if ( id == 0x3000a865)
s = "Yamaha SA3";
- else if (vend_id == 0x0000a865)
+ else if ( id == 0x0000a865)
s = "Yamaha YMF719 OPL-SA3";
else if (vend_id == 0x8140d315)
s = "SoundscapeVIVO";
diff --git a/sys/i386/isa/snd/ad1848.c b/sys/i386/isa/snd/ad1848.c
index 7777e4b..0284995 100644
--- a/sys/i386/isa/snd/ad1848.c
+++ b/sys/i386/isa/snd/ad1848.c
@@ -79,12 +79,13 @@ static void ad_write(snddev_info *d, int reg, u_char data);
static void ad_write_cnt(snddev_info *d, int reg, u_short data);
static int ad_read(snddev_info *d, int reg);
+#if NPNP > 0 /* the ad1816 is pnp only */
/* ad1816 prototypes */
/* IO primitives */
static int ad1816_wait_init(snddev_info * d, int x);
-static unsigned short ad1816_read(snddev_info * d, unsigned int reg);
-static void ad1816_write(snddev_info * d, unsigned int reg, unsigned short data);
+static u_short ad1816_read(snddev_info * d, u_int reg);
+static void ad1816_write(snddev_info * d, u_int reg, u_short data);
/* intr and callback functions */
static irq_proc_t ad1816_intr;
static snd_callback_t ad1816_callback;
@@ -97,6 +98,7 @@ static int ad1816_set_recsrc(snddev_info * d, int mask);
static void ad1816_mixer_reset(snddev_info * d);
/* ad1816 prototypes end */
+#endif
/*
* device descriptors for the boards supported by this module.
@@ -202,6 +204,7 @@ mss_probe_end:
return mss_detect(dev) ? 8 : 0 ; /* mss uses 8 regs */
}
+#if NPNP > 0
static int
ad1816_attach(struct isa_device *dev)
{
@@ -226,6 +229,7 @@ ad1816_attach(struct isa_device *dev)
ad1816_mixer_reset(d);
return 0 ;
}
+#endif /* NPNP */
/*
* the address passed as io_base for mss_attach is also the old
@@ -243,9 +247,10 @@ mss_attach(struct isa_device *dev)
d->name, dev->id_unit,
d->io_base, d->irq, d->dbuf_out.chan, d->dbuf_in.chan, dev->id_flags);
+#if NPNP > 0
if (d->bd_id == MD_AD1816)
return ad1816_attach(dev);
-
+#endif
dev->id_alive = 8 ; /* number of io ports */
/* should be already set but just in case... */
@@ -1453,7 +1458,7 @@ cs423x_probe(u_long csn, u_long vend_id)
s = "Yamaha SA2";
else if ( id == 0x3000a865)
s = "Yamaha SA3";
- else if (vend_id == 0x0000a865)
+ else if ( id == 0x0000a865)
s = "Yamaha YMF719 OPL-SA3";
else if (vend_id == 0x8140d315)
s = "SoundscapeVIVO";
OpenPOWER on IntegriCloud