diff options
author | cg <cg@FreeBSD.org> | 1999-12-19 22:25:26 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 1999-12-19 22:25:26 +0000 |
commit | 51ac669d2230d2774d4a1246644f25a429eae772 (patch) | |
tree | c0f0c32f6fc2e73760d07a3e9d5b441237d238ec /sys | |
parent | 3df5935fa2a39fdb17304bcffb7ff6f0d7f7a005 (diff) | |
download | FreeBSD-src-51ac669d2230d2774d4a1246644f25a429eae772.zip FreeBSD-src-51ac669d2230d2774d4a1246644f25a429eae772.tar.gz |
fix for ess cards to use auto-init dma mode, so they work
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sound/isa/sb.c | 8 | ||||
-rw-r--r-- | sys/dev/sound/isa/sb16.c | 8 | ||||
-rw-r--r-- | sys/dev/sound/isa/sb8.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/sound/isa/sb.c b/sys/dev/sound/isa/sb.c index dac8c44..3d39c63 100644 --- a/sys/dev/sound/isa/sb.c +++ b/sys/dev/sound/isa/sb.c @@ -412,7 +412,7 @@ sb_alloc_resources(struct sb_info *sb, device_t dev) &rid, 0, ~0, 1, RF_ACTIVE); rid = 1; - if (!sb->drq2) + if (!sb->drq2 && !(sb->bd_flags & BD_F_ESS)) sb->drq2 = bus_alloc_resource(dev, SYS_RES_DRQ, &rid, 0, ~0, 1, RF_ACTIVE); @@ -707,8 +707,8 @@ ess_format(struct sb_chinfo *ch, u_int32_t format) u_char c; ch->fmt = format; sb_reset_dsp(sb); - /* normal DMA mode */ - ess_write(sb, 0xb8, play ? 0x00 : 0x0a); + /* auto-init DMA mode */ + ess_write(sb, 0xb8, play ? 0x04 : 0x0e); /* mono/stereo */ c = (ess_read(sb, 0xa8) & ~0x03) | 1; if (!stereo) c++; @@ -761,7 +761,7 @@ ess_start(struct sb_chinfo *ch) * clear bit 0 of register B8h */ #if 1 - c1 = play ? 0x00 : 0x0a; + c1 = play ? 0x04 : 0x0e; ess_write(sb, 0xb8, c1++); #else c1 = ess_read(sb, 0xb8) & 0xfe; diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c index dac8c44..3d39c63 100644 --- a/sys/dev/sound/isa/sb16.c +++ b/sys/dev/sound/isa/sb16.c @@ -412,7 +412,7 @@ sb_alloc_resources(struct sb_info *sb, device_t dev) &rid, 0, ~0, 1, RF_ACTIVE); rid = 1; - if (!sb->drq2) + if (!sb->drq2 && !(sb->bd_flags & BD_F_ESS)) sb->drq2 = bus_alloc_resource(dev, SYS_RES_DRQ, &rid, 0, ~0, 1, RF_ACTIVE); @@ -707,8 +707,8 @@ ess_format(struct sb_chinfo *ch, u_int32_t format) u_char c; ch->fmt = format; sb_reset_dsp(sb); - /* normal DMA mode */ - ess_write(sb, 0xb8, play ? 0x00 : 0x0a); + /* auto-init DMA mode */ + ess_write(sb, 0xb8, play ? 0x04 : 0x0e); /* mono/stereo */ c = (ess_read(sb, 0xa8) & ~0x03) | 1; if (!stereo) c++; @@ -761,7 +761,7 @@ ess_start(struct sb_chinfo *ch) * clear bit 0 of register B8h */ #if 1 - c1 = play ? 0x00 : 0x0a; + c1 = play ? 0x04 : 0x0e; ess_write(sb, 0xb8, c1++); #else c1 = ess_read(sb, 0xb8) & 0xfe; diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c index dac8c44..3d39c63 100644 --- a/sys/dev/sound/isa/sb8.c +++ b/sys/dev/sound/isa/sb8.c @@ -412,7 +412,7 @@ sb_alloc_resources(struct sb_info *sb, device_t dev) &rid, 0, ~0, 1, RF_ACTIVE); rid = 1; - if (!sb->drq2) + if (!sb->drq2 && !(sb->bd_flags & BD_F_ESS)) sb->drq2 = bus_alloc_resource(dev, SYS_RES_DRQ, &rid, 0, ~0, 1, RF_ACTIVE); @@ -707,8 +707,8 @@ ess_format(struct sb_chinfo *ch, u_int32_t format) u_char c; ch->fmt = format; sb_reset_dsp(sb); - /* normal DMA mode */ - ess_write(sb, 0xb8, play ? 0x00 : 0x0a); + /* auto-init DMA mode */ + ess_write(sb, 0xb8, play ? 0x04 : 0x0e); /* mono/stereo */ c = (ess_read(sb, 0xa8) & ~0x03) | 1; if (!stereo) c++; @@ -761,7 +761,7 @@ ess_start(struct sb_chinfo *ch) * clear bit 0 of register B8h */ #if 1 - c1 = play ? 0x00 : 0x0a; + c1 = play ? 0x04 : 0x0e; ess_write(sb, 0xb8, c1++); #else c1 = ess_read(sb, 0xb8) & 0xfe; |