mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-14 14:55:41 +00:00
I've been using these tweaks to enable the sound driver to talk to the
(mutant) Crystal CSS4236 chip on the Intel PR440FX SMP motherboard. XXX this uses some rather ugly PnP bootstrap code that is *NOT* compatable with 'controller pnp0' or *ANY* other PnP devices. If you use some other PnP devices, enabling css0 will burn your house down. :-] The "simplified" PnP init sequence directly blats your config(8) settings onto the chip. I'm pretty sure 'css0' will conflict with 'mss0', this whole area desperately needs a cleanup. I have been using the following with some success on the PR440FX: controller snd0 device css0 at isa? port 0x534 irq 5 drq 1 flags 0x08 vector adintr device opl0 at isa? port 0x388 device mpu0 at isa? port 0x330 irq 10 vector mpuintr
This commit is contained in:
parent
156b574b56
commit
5eaf45f67b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31682
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.383 1997/12/07 08:07:17 yokota Exp $
|
||||
# $Id: LINT,v 1.384 1997/12/09 12:04:44 jamil Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -988,6 +988,7 @@ options NATM #native ATM
|
||||
# gus: Gravis Ultrasound - Ultrasound, Ultrasound 16, Ultrasound MAX
|
||||
# gusxvi: Gravis Ultrasound 16-bit PCM (do not use)
|
||||
# mss: Microsoft Sound System
|
||||
# css: Crystal Sound System (CSS 423x PnP)
|
||||
# sscape: Ensoniq Soundscape MIDI interface
|
||||
# sscape_mss: Ensoniq Soundscape PCM (requires sscape)
|
||||
# opl: Yamaha OPL-2 and OPL-3 FM - SB, SB Pro, SB 16, ProAudioSpectrum
|
||||
@ -1044,6 +1045,7 @@ device awe0 at isa? port 0x620
|
||||
device gus0 at isa? port 0x220 irq 12 drq 1 vector gusintr
|
||||
#device gus0 at isa? port 0x220 irq 12 drq 1 flags 0x3 vector gusintr
|
||||
device mss0 at isa? port 0x530 irq 10 drq 1 vector adintr
|
||||
#device css0 at isa? port 0x534 irq 5 drq 1 flags 0x08 vector adintr
|
||||
device sscape0 at isa? port 0x330 irq 9 drq 0 vector sscapeintr
|
||||
device sscape_mss0 at isa? port 0x534 irq 5 drq 1 vector sndintr
|
||||
device opl0 at isa? port 0x388
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This file tells config what files go into building a kernel,
|
||||
# files marked standard are always included.
|
||||
#
|
||||
# $Id: files.i386,v 1.180 1997/12/01 09:29:50 ahasty Exp $
|
||||
# $Id: files.i386,v 1.181 1997/12/09 12:04:49 jamil Exp $
|
||||
#
|
||||
# The long compile-with and dependency lines are required because of
|
||||
# limitations in config: backslash-newline doesn't work in strings, and
|
||||
@ -182,11 +182,14 @@ i386/isa/sound/gus_vol.c optional gus device-driver
|
||||
i386/isa/sound/gus_wave.c optional gus device-driver
|
||||
i386/isa/sound/ics2101.c optional gus device-driver
|
||||
i386/isa/sound/sound_timer.c optional gus device-driver
|
||||
i386/isa/sound/sound_timer.c optional css device-driver
|
||||
i386/isa/sound/sound_timer.c optional mss device-driver
|
||||
i386/isa/sound/midi_synth.c optional gus device-driver
|
||||
i386/isa/sound/midibuf.c optional gus device-driver
|
||||
i386/isa/sound/ad1848.c optional gusxvi device-driver
|
||||
i386/isa/sound/ad1848.c optional gus device-driver
|
||||
i386/isa/sound/ad1848.c optional mss device-driver
|
||||
i386/isa/sound/ad1848.c optional css device-driver
|
||||
i386/isa/sound/sound_timer.c optional mss device-driver
|
||||
i386/isa/sound/midi_synth.c optional mss device-driver
|
||||
i386/isa/sound/midibuf.c optional mss device-driver
|
||||
@ -209,7 +212,9 @@ i386/isa/sound/sb16_dsp.c optional sbxvi device-driver
|
||||
i386/isa/sound/sb16_midi.c optional sbmidi device-driver
|
||||
i386/isa/sound/uart6850.c optional uart device-driver
|
||||
i386/isa/sound/midi_synth.c optional uart device-driver
|
||||
i386/isa/sound/midi_synth.c optional css device-driver
|
||||
i386/isa/sound/midibuf.c optional uart device-driver
|
||||
i386/isa/sound/midibuf.c optional css device-driver
|
||||
i386/isa/sound/trix.c optional trix device-driver
|
||||
i386/isa/sound/adlib_card.c optional trix device-driver
|
||||
i386/isa/sound/opl3.c optional trix device-driver
|
||||
@ -222,6 +227,7 @@ i386/isa/sound/mpu401.c optional sscape device-driver
|
||||
i386/isa/sound/midi_synth.c optional sscape device-driver
|
||||
i386/isa/sound/midibuf.c optional sscape device-driver
|
||||
i386/isa/sound/awe_wave.c optional awe device-driver
|
||||
i386/isa/sound/cs4232.c optional css device-driver
|
||||
i386/isa/spigot.c optional spigot device-driver
|
||||
i386/isa/spkr.c optional speaker device-driver
|
||||
i386/isa/stallion.c optional stl device-driver
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.383 1997/12/07 08:07:17 yokota Exp $
|
||||
# $Id: LINT,v 1.384 1997/12/09 12:04:44 jamil Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -988,6 +988,7 @@ options NATM #native ATM
|
||||
# gus: Gravis Ultrasound - Ultrasound, Ultrasound 16, Ultrasound MAX
|
||||
# gusxvi: Gravis Ultrasound 16-bit PCM (do not use)
|
||||
# mss: Microsoft Sound System
|
||||
# css: Crystal Sound System (CSS 423x PnP)
|
||||
# sscape: Ensoniq Soundscape MIDI interface
|
||||
# sscape_mss: Ensoniq Soundscape PCM (requires sscape)
|
||||
# opl: Yamaha OPL-2 and OPL-3 FM - SB, SB Pro, SB 16, ProAudioSpectrum
|
||||
@ -1044,6 +1045,7 @@ device awe0 at isa? port 0x620
|
||||
device gus0 at isa? port 0x220 irq 12 drq 1 vector gusintr
|
||||
#device gus0 at isa? port 0x220 irq 12 drq 1 flags 0x3 vector gusintr
|
||||
device mss0 at isa? port 0x530 irq 10 drq 1 vector adintr
|
||||
#device css0 at isa? port 0x534 irq 5 drq 1 flags 0x08 vector adintr
|
||||
device sscape0 at isa? port 0x330 irq 9 drq 0 vector sscapeintr
|
||||
device sscape_mss0 at isa? port 0x534 irq 5 drq 1 vector sndintr
|
||||
device opl0 at isa? port 0x388
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.383 1997/12/07 08:07:17 yokota Exp $
|
||||
# $Id: LINT,v 1.384 1997/12/09 12:04:44 jamil Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -988,6 +988,7 @@ options NATM #native ATM
|
||||
# gus: Gravis Ultrasound - Ultrasound, Ultrasound 16, Ultrasound MAX
|
||||
# gusxvi: Gravis Ultrasound 16-bit PCM (do not use)
|
||||
# mss: Microsoft Sound System
|
||||
# css: Crystal Sound System (CSS 423x PnP)
|
||||
# sscape: Ensoniq Soundscape MIDI interface
|
||||
# sscape_mss: Ensoniq Soundscape PCM (requires sscape)
|
||||
# opl: Yamaha OPL-2 and OPL-3 FM - SB, SB Pro, SB 16, ProAudioSpectrum
|
||||
@ -1044,6 +1045,7 @@ device awe0 at isa? port 0x620
|
||||
device gus0 at isa? port 0x220 irq 12 drq 1 vector gusintr
|
||||
#device gus0 at isa? port 0x220 irq 12 drq 1 flags 0x3 vector gusintr
|
||||
device mss0 at isa? port 0x530 irq 10 drq 1 vector adintr
|
||||
#device css0 at isa? port 0x534 irq 5 drq 1 flags 0x08 vector adintr
|
||||
device sscape0 at isa? port 0x330 irq 9 drq 0 vector sscapeintr
|
||||
device sscape_mss0 at isa? port 0x534 irq 5 drq 1 vector sndintr
|
||||
device opl0 at isa? port 0x388
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This file tells config what files go into building a kernel,
|
||||
# files marked standard are always included.
|
||||
#
|
||||
# $Id: files.i386,v 1.180 1997/12/01 09:29:50 ahasty Exp $
|
||||
# $Id: files.i386,v 1.181 1997/12/09 12:04:49 jamil Exp $
|
||||
#
|
||||
# The long compile-with and dependency lines are required because of
|
||||
# limitations in config: backslash-newline doesn't work in strings, and
|
||||
@ -182,11 +182,14 @@ i386/isa/sound/gus_vol.c optional gus device-driver
|
||||
i386/isa/sound/gus_wave.c optional gus device-driver
|
||||
i386/isa/sound/ics2101.c optional gus device-driver
|
||||
i386/isa/sound/sound_timer.c optional gus device-driver
|
||||
i386/isa/sound/sound_timer.c optional css device-driver
|
||||
i386/isa/sound/sound_timer.c optional mss device-driver
|
||||
i386/isa/sound/midi_synth.c optional gus device-driver
|
||||
i386/isa/sound/midibuf.c optional gus device-driver
|
||||
i386/isa/sound/ad1848.c optional gusxvi device-driver
|
||||
i386/isa/sound/ad1848.c optional gus device-driver
|
||||
i386/isa/sound/ad1848.c optional mss device-driver
|
||||
i386/isa/sound/ad1848.c optional css device-driver
|
||||
i386/isa/sound/sound_timer.c optional mss device-driver
|
||||
i386/isa/sound/midi_synth.c optional mss device-driver
|
||||
i386/isa/sound/midibuf.c optional mss device-driver
|
||||
@ -209,7 +212,9 @@ i386/isa/sound/sb16_dsp.c optional sbxvi device-driver
|
||||
i386/isa/sound/sb16_midi.c optional sbmidi device-driver
|
||||
i386/isa/sound/uart6850.c optional uart device-driver
|
||||
i386/isa/sound/midi_synth.c optional uart device-driver
|
||||
i386/isa/sound/midi_synth.c optional css device-driver
|
||||
i386/isa/sound/midibuf.c optional uart device-driver
|
||||
i386/isa/sound/midibuf.c optional css device-driver
|
||||
i386/isa/sound/trix.c optional trix device-driver
|
||||
i386/isa/sound/adlib_card.c optional trix device-driver
|
||||
i386/isa/sound/opl3.c optional trix device-driver
|
||||
@ -222,6 +227,7 @@ i386/isa/sound/mpu401.c optional sscape device-driver
|
||||
i386/isa/sound/midi_synth.c optional sscape device-driver
|
||||
i386/isa/sound/midibuf.c optional sscape device-driver
|
||||
i386/isa/sound/awe_wave.c optional awe device-driver
|
||||
i386/isa/sound/cs4232.c optional css device-driver
|
||||
i386/isa/spigot.c optional spigot device-driver
|
||||
i386/isa/spkr.c optional speaker device-driver
|
||||
i386/isa/stallion.c optional stl device-driver
|
||||
|
@ -57,7 +57,9 @@
|
||||
#include <i386/isa/sound/ad1848_mixer.h>
|
||||
#include <i386/isa/sound/iwdefs.h>
|
||||
|
||||
#if !defined(CONFIG_CS4232)
|
||||
extern struct isa_driver mssdriver;
|
||||
#endif
|
||||
|
||||
extern void IwaveStopDma(BYTE path);
|
||||
|
||||
@ -83,8 +85,9 @@ typedef struct {
|
||||
#define MD_1848 1
|
||||
#define MD_4231 2
|
||||
#define MD_4231A 3
|
||||
#define MD_1845 4
|
||||
#define MD_MAXMODE 5
|
||||
#define MD_4236 4
|
||||
#define MD_1845 5
|
||||
#define MD_MAXMODE 6
|
||||
|
||||
/* Mixer parameters */
|
||||
int recmask;
|
||||
@ -124,7 +127,8 @@ static int ad_format_mask[MD_MAXMODE /* devc->mode */ ] =
|
||||
*/
|
||||
|
||||
/* 3 - CS4231A */ AFMT_U8 | AFMT_S16_LE | AFMT_MU_LAW | AFMT_A_LAW,
|
||||
/* 4 - AD1845 */ AFMT_U8 | AFMT_S16_LE | AFMT_MU_LAW | AFMT_A_LAW
|
||||
/* 4 - AD1845 */ AFMT_U8 | AFMT_S16_LE | AFMT_MU_LAW | AFMT_A_LAW,
|
||||
/* 5 - CS4236 */ AFMT_U8 | AFMT_S16_LE | AFMT_MU_LAW | AFMT_A_LAW,
|
||||
};
|
||||
|
||||
static ad1848_info dev_info[MAX_AUDIO_DEV];
|
||||
@ -147,7 +151,6 @@ static void ad1848_halt_output(int dev);
|
||||
static void ad1848_trigger(int dev, int bits);
|
||||
static int ad1848_tmr_install(int dev);
|
||||
static void ad1848_tmr_reprogram(int dev);
|
||||
void adintr(int);
|
||||
|
||||
/*
|
||||
* AD_WAIT_INIT waits if we are initializing the board and we cannot modify
|
||||
@ -166,7 +169,11 @@ adintr(unit)
|
||||
if (unit_to_irq[unit] > 0)
|
||||
ad1848_interrupt(unit_to_irq[unit]);
|
||||
else {
|
||||
#if defined(CONFIG_CS4232)
|
||||
dev = find_isadev(isa_devtab_null, &cssdriver, unit);
|
||||
#else
|
||||
dev = find_isadev(isa_devtab_null, &mssdriver, unit);
|
||||
#endif
|
||||
if (!dev)
|
||||
printf("ad1848: Couldn't determine unit\n");
|
||||
else {
|
||||
@ -555,7 +562,7 @@ static struct audio_operations ad1848_pcm_operations[MAX_AUDIO_DEV] =
|
||||
|
||||
static struct mixer_operations ad1848_mixer_operations =
|
||||
{
|
||||
"AD1848/CS4248/CS4231",
|
||||
"AD1848/CS4248/CS4231/CS4236",
|
||||
ad1848_mixer_ioctl
|
||||
};
|
||||
|
||||
@ -1311,6 +1318,11 @@ ad1848_detect(int io_base, int *ad_flags, sound_os_info * osp)
|
||||
break;
|
||||
|
||||
case 0x83: /* CS4236 */
|
||||
case 0x03: /* Mutant CS4236 on Intel PR440fx board */
|
||||
devc->chip_name = "CS4236";
|
||||
devc->mode = MD_4236;
|
||||
break;
|
||||
|
||||
default: /* Assume CS4231 */
|
||||
printf("unknown id 0x%02x, assuming CS4231\n", id);
|
||||
devc->mode = MD_4231;
|
||||
|
@ -112,8 +112,6 @@ probe_cs4232(struct address_info * hw_config)
|
||||
|
||||
CS_OUT2(0x15, 0x00); /* Select logical device 0 (WSS/SB/FM) */
|
||||
CS_OUT2(0x33, 0x00); /* Inactivate logical dev 0 */
|
||||
if (ad1848_detect(hw_config->io_base, NULL, hw_config->osp))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Then set some config bytes. First logical device 0
|
||||
|
@ -60,6 +60,13 @@
|
||||
#undef CONFIG_CS4232
|
||||
#endif
|
||||
|
||||
#include "css.h"
|
||||
#if NCSS != 0
|
||||
#define CONFIG_AD1848
|
||||
#undef CONFIG_MSS
|
||||
#define CONFIG_CS4232
|
||||
#endif
|
||||
|
||||
#include "sbxvi.h"
|
||||
#if NSBXVI != 0 && !defined(CONFIG_SB16)
|
||||
#define CONFIG_SB16
|
||||
|
@ -126,6 +126,7 @@ struct isa_driver gusxvidriver = {sndprobe, sndattach, "gusxvi"};
|
||||
struct isa_driver gusmaxdriver = {sndprobe, sndattach, "gusmax"};
|
||||
struct isa_driver uartdriver = {sndprobe, sndattach, "uart"};
|
||||
struct isa_driver mssdriver = {sndprobe, sndattach, "mss"};
|
||||
struct isa_driver cssdriver = {sndprobe, sndattach, "css"};
|
||||
struct isa_driver sscapedriver = {sndprobe, sndattach, "sscape"};
|
||||
struct isa_driver sscape_mssdriver = {sndprobe, sndattach, "sscape_mss"};
|
||||
|
||||
@ -314,6 +315,8 @@ driver_to_voxunit(struct isa_driver * driver)
|
||||
return (SNDCARD_GUS16);
|
||||
else if (driver == &mssdriver)
|
||||
return (SNDCARD_MSS);
|
||||
else if (driver == &cssdriver)
|
||||
return (SNDCARD_CS4232);
|
||||
else if (driver == &sscapedriver)
|
||||
return(SNDCARD_SSCAPE);
|
||||
else if (driver == &sscape_mssdriver)
|
||||
|
Loading…
Reference in New Issue
Block a user