This is part 23/26 of patchset for add support NEC PC-9800 architecture,
against 2.5.43.
Summary:
ALSA sound driver related modules.
- add feature to support CS4231+OPL3 (not PNP)
- add hardware specific initialization.
diffstat:
include/sound/mpu401.h | 4
include/sound/pc9801_118_magic.h | 411 +++++++++++++++++++++++++++++++++++++
include/sound/sound_pc9800.h | 23 ++
sound/core/Makefile | 4
sound/core/seq/Makefile | 4
sound/core/seq/instr/Makefile | 3
sound/drivers/Config.in | 3
sound/drivers/mpu401/mpu401_uart.c | 173 +++++++++++++++
sound/drivers/opl3/Makefile | 6
sound/drivers/opl3/opl3_lib.c | 29 ++
sound/isa/cs423x/cs4231.c | 32 ++
sound/isa/cs423x/cs4231_lib.c | 74 ++++++
12 files changed, 765 insertions(+), 1 deletion(-)
patch:
diff -urN linux/sound/core/Makefile linux98/sound/core/Makefile
--- linux/sound/core/Makefile Tue Oct 8 10:56:22 2002
+++ linux98/sound/core/Makefile Tue Oct 8 11:01:42 2002
@@ -53,7 +53,11 @@
obj-$(CONFIG_SND_SGALAXY) += snd-pcm.o snd-timer.o snd.o
obj-$(CONFIG_SND_AD1816A) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o snd-hwdep.o
obj-$(CONFIG_SND_AD1848) += snd-pcm.o snd-timer.o snd.o
+ifeq ($(CONFIG_PC9800),y)
+obj-$(CONFIG_SND_CS4231) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o snd-hwdep.o
+else
obj-$(CONFIG_SND_CS4231) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o
+endif
obj-$(CONFIG_SND_CS4232) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o snd-hwdep.o
obj-$(CONFIG_SND_CS4236) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o snd-hwdep.o
obj-$(CONFIG_SND_ES1688) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o snd-hwdep.o
diff -urN linux/sound/core/seq/Makefile linux98/sound/core/seq/Makefile
--- linux/sound/core/seq/Makefile Sun Sep 1 07:05:34 2002
+++ linux98/sound/core/seq/Makefile Fri Sep 6 15:52:01 2002
@@ -39,7 +39,11 @@
obj-$(CONFIG_SND_ES18XX) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
obj-$(CONFIG_SND_OPL3SA2) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
obj-$(CONFIG_SND_AD1816A) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
+ifeq ($(CONFIG_PC9800),y)
+obj-$(CONFIG_SND_CS4231) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
+else
obj-$(CONFIG_SND_CS4231) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o
+endif
obj-$(CONFIG_SND_CS4232) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
obj-$(CONFIG_SND_CS4236) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
obj-$(CONFIG_SND_ES1688) += snd-seq-midi.o snd-seq.o snd-seq-device.o snd-seq-midi-event.o snd-seq-midi-emul.o snd-seq-instr.o
diff -urN linux/sound/core/seq/instr/Makefile linux98/sound/core/seq/instr/Makefile
--- linux/sound/core/seq/instr/Makefile Sun Sep 1 07:04:53 2002
+++ linux98/sound/core/seq/instr/Makefile Fri Sep 6 15:55:28 2002
@@ -17,6 +17,9 @@
obj-$(CONFIG_SND_ES18XX) += snd-ainstr-fm.o
obj-$(CONFIG_SND_OPL3SA2) += snd-ainstr-fm.o
obj-$(CONFIG_SND_AD1816A) += snd-ainstr-fm.o
+ifeq ($(CONFIG_PC9800),y)
+ obj-$(CONFIG_SND_CS4231) += snd-ainstr-fm.o
+endif
obj-$(CONFIG_SND_CS4232) += snd-ainstr-fm.o
obj-$(CONFIG_SND_CS4236) += snd-ainstr-fm.o
obj-$(CONFIG_SND_ES1688) += snd-ainstr-fm.o
diff -urN linux/sound/drivers/Config.in linux98/sound/drivers/Config.in
--- linux/sound/drivers/Config.in Tue Sep 10 02:35:08 2002
+++ linux98/sound/drivers/Config.in Thu Sep 12 11:56:08 2002
@@ -8,5 +8,8 @@
dep_tristate 'MOTU MidiTimePiece AV multiport MIDI' CONFIG_SND_MTPAV $CONFIG_SND
dep_tristate 'UART16550 - MIDI only driver' CONFIG_SND_SERIAL_U16550 $CONFIG_SND
dep_tristate 'Generic MPU-401 UART driver' CONFIG_SND_MPU401 $CONFIG_SND
+if [ "$CONFIG_SND_MPU401" != "n" -a "$CONFIG_PC9800" = "y" ]; then
+ dep_bool ' Roland MPU-PC98II support' CONFIG_MPU_PC98II y
+fi
endmenu
diff -urN linux/sound/drivers/mpu401/mpu401_uart.c linux98/sound/drivers/mpu401/mpu401_uart.c
--- linux/sound/drivers/mpu401/mpu401_uart.c Tue Sep 10 02:35:08 2002
+++ linux98/sound/drivers/mpu401/mpu401_uart.c Thu Sep 12 22:59:27 2002
@@ -181,7 +181,12 @@
if (mpu->open_input && (err = mpu->open_input(mpu)) < 0)
return err;
if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) {
+#ifndef CONFIG_PC9800x
snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1);
+#else
+ snd_mpu401_uart_cmd(mpu, MPU401_RESET, 0);
+ mdelay(10);
+#endif
snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1);
}
mpu->substream_input = substream;
@@ -198,7 +203,12 @@
if (mpu->open_output && (err = mpu->open_output(mpu)) < 0)
return err;
if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) {
+#ifndef CONFIG_PC9800x
snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1);
+#else
+ snd_mpu401_uart_cmd(mpu, MPU401_RESET, 0);
+ mdelay(10);
+#endif
snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1);
}
mpu->substream_output = substream;
@@ -400,7 +410,12 @@
spin_lock_init(&mpu->timer_lock);
mpu->hardware = hardware;
if (!integrated) {
- if ((mpu->res = request_region(port, 2, "MPU401 UART")) == NULL) {
+#ifndef CONFIG_MPU_PC98II
+ if ((mpu->res = request_region(port, 2, "MPU401 UART")) == NULL)
+#else
+ if ((mpu->res = request_region(port, 4, "MPU401 UART")) == NULL)
+#endif
+ {
snd_device_free(card, rmidi);
return -EBUSY;
}
@@ -415,6 +430,162 @@
mpu->irq = irq;
mpu->irq_flags = irq_flags;
}
+
+#ifdef CONFIG_PC9800
+ {
+ #include <sound/pc9801_118_magic.h>
+ #define outp118(reg,data) outb((reg),0x148e);outb((data),0x148f)
+ #define WAIT118 outb(0x00,0x5f)
+ int mpu_intr, count;
+#ifdef OOKUBO_ORIGINAL
+ int err = 0;
+#endif /* OOKUBO_ORIGINAL */
+
+ switch (irq)
+ {
+ case 3:
+ mpu_intr = 3;
+ break;
+ case 5:
+ mpu_intr = 2;
+ break;
+ case 6:
+ mpu_intr = 1;
+ break;
+ case 10:
+ mpu_intr = 0;
+ break;
+ default:
+ snd_printk("Bad IRQ %d\n", irq);
+ snd_device_free(card, rmidi);
+ return -EBUSY;
+ }
+
+ outp118(0x21, mpu_intr);
+ WAIT118;
+ outb(0x00, 0x148e);
+ if (inb(0x148f) & 0x08)
+ {
+ snd_printk("No MIDI daughter board found\n");
+ goto skip118;
+ }
+
+ outp118(0x20, 0x00);
+ outp118(0x05, 0x04);
+ for (count = 0; count < 35000; count ++)
+ WAIT118;
+ outb(0x05, 0x148e);
+ for (count = 0; count < 65000; count ++)
+ if (inb(0x148f) == 0x04)
+ goto set_mode_118;
+ snd_printk("MIDI daughter board initalize failed at stage1\n\n");
+ snd_device_free(card, rmidi);
+ return -EBUSY;
+
+ set_mode_118:
+ outp118(0x05, 0x0c);
+ outb(0xaa, 0x485);
+ outb(0x99, 0x485);
+ outb(0x2a, 0x485);
+ for (count = 0; count < sizeof(Data0485_99); count ++)
+ {
+ outb(Data0485_99[count], 0x485);
+ WAIT118;
+ }
+
+ outb(0x00, 0x486);
+ outb(0xaa, 0x485);
+ outb(0x9e, 0x485);
+ outb(0x2a, 0x485);
+ for (count = 0; count < sizeof(Data0485_9E); count ++)
+ if (inb(0x485) != Data0485_9E[count])
+ {
+#ifdef OOKUBO_ORIGINAL
+ err = 1;
+#endif /* OOKUBO_ORIGINAL */
+ break;
+ }
+ outb(0x00, 0x486);
+ for (count = 0; count < 2000; count ++)
+ WAIT118;
+#ifdef OOKUBO_ORIGINAL
+ if (!err)
+ {
+ outb(0xaa, 0x485);
+ outb(0x36, 0x485);
+ outb(0x28, 0x485);
+ for (count = 0; count < sizeof(Data0485_36); count ++)
+ outb(Data0485_36[count], 0x485);
+ outb(0x00, 0x486);
+ for (count = 0; count < 1500; count ++)
+ WAIT118;
+ outp118(0x05, inb(0x148f) | 0x08);
+ outb(0xff, 0x148c);
+ outp118(0x05, inb(0x148f) & 0xf7);
+ for (count = 0; count < 1500; count ++)
+ WAIT118;
+ }
+#endif /* OOKUBO_ORIGINAL */
+
+ outb(0xaa, 0x485);
+ outb(0xa9, 0x485);
+ outb(0x21, 0x485);
+ for (count = 0; count < sizeof(Data0485_A9); count ++)
+ {
+ outb(Data0485_A9[count], 0x485);
+ WAIT118;
+ }
+
+ outb(0x00, 0x486);
+ outb(0xaa, 0x485);
+ outb(0x0c, 0x485);
+ outb(0x20, 0x485);
+ for (count = 0; count < sizeof(Data0485_0C); count ++)
+ {
+ outb(Data0485_0C[count], 0x485);
+ WAIT118;
+ }
+
+ outb(0x00, 0x486);
+ outb(0xaa, 0x485);
+ outb(0x66, 0x485);
+ outb(0x20, 0x485);
+ for (count = 0; count < sizeof(Data0485_66); count ++)
+ {
+ outb(Data0485_66[count], 0x485);
+ WAIT118;
+ }
+
+ outb(0x00, 0x486);
+ outb(0xaa, 0x485);
+ outb(0x60, 0x485);
+ outb(0x20, 0x485);
+ for (count = 0; count < sizeof(Data0485_60); count ++)
+ {
+ outb(Data0485_60[count], 0x485);
+ WAIT118;
+ }
+
+ outb(0x00, 0x486);
+ outp118(0x05, 0x04);
+ outp118(0x05, 0x00);
+ for (count = 0; count < 35000; count ++)
+ WAIT118;
+ outb(0x05, 0x148e);
+ for (count = 0; count < 65000; count ++)
+ if (inb(0x148f) == 0x00)
+ goto end_mode_118;
+ snd_printk("MIDI daughter board initalize failed at stage2\n\n");
+ snd_device_free(card, rmidi);
+ return -EBUSY;
+
+ end_mode_118:
+ outb(0x3f, 0x148d);
+ snd_printk("MIDI daughter board initalized\n");
+ skip118:
+ }
+#endif /* CONFIG_PC9800 */
+
strcpy(rmidi->name, "MPU-401 (UART)");
snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_mpu401_uart_output);
snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_mpu401_uart_input);
diff -urN linux/sound/drivers/opl3/Makefile linux98/sound/drivers/opl3/Makefile
--- linux/sound/drivers/opl3/Makefile Sun Sep 1 07:04:47 2002
+++ linux98/sound/drivers/opl3/Makefile Fri Sep 6 15:20:50 2002
@@ -38,6 +38,9 @@
obj-$(CONFIG_SND_FM801) += snd-opl3-lib.o
obj-$(CONFIG_SND_SONICVIBES) += snd-opl3-lib.o
obj-$(CONFIG_SND_YMFPCI) += snd-opl3-lib.o
+ifeq ($(CONFIG_PC9800),y)
+ obj-$(CONFIG_SND_CS4231) += snd-opl3-lib.o
+endif
ifeq ($(subst m,y,$(CONFIG_SND_SEQUENCER)),y)
obj-$(CONFIG_SND_ALS100) += snd-opl3-synth.o
obj-$(CONFIG_SND_AZT2320) += snd-opl3-synth.o
@@ -63,6 +66,9 @@
obj-$(CONFIG_SND_FM801) += snd-opl3-synth.o
obj-$(CONFIG_SND_SONICVIBES) += snd-opl3-synth.o
obj-$(CONFIG_SND_YMFPCI) += snd-opl3-synth.o
+ ifeq ($(CONFIG_PC9800),y)
+ obj-$(CONFIG_SND_CS4231) += snd-opl3-synth.o
+ endif
endif
obj-m := $(sort $(obj-m))
diff -urN linux/sound/drivers/opl3/opl3_lib.c linux98/sound/drivers/opl3/opl3_lib.c
--- linux/sound/drivers/opl3/opl3_lib.c Tue Oct 8 10:56:24 2002
+++ linux98/sound/drivers/opl3/opl3_lib.c Tue Oct 8 11:01:42 2002
@@ -31,6 +31,10 @@
#include <linux/ioport.h>
#include <sound/minors.h>
+#ifdef CONFIG_PC9800
+#include <sound/sound_pc9800.h>
+#endif
+
MODULE_AUTHOR("Jaroslav Kysela <[email protected]>, Hannu Savolainen 1993-1996, Rob Hooft");
MODULE_DESCRIPTION("Routines for control of AdLib FM cards (OPL2/OPL3/OPL4 chips)");
MODULE_LICENSE("GPL");
@@ -438,6 +442,31 @@
opl3->command = &snd_opl3_command;
}
}
+
+#ifdef CONFIG_PC9800
+ /* ??? */
+ outb(0x00, opl3->l_port + 6);
+ inb(opl3->l_port + 7);
+ /* Enable OPL-3 Function */
+ outb(inb(PC9800_SOUND_IO_ID) | 0x03, PC9800_SOUND_IO_ID);
+
+ /* Initialize? */
+ opl3->command(opl3, OPL3_RIGHT | 0x05, 0x05);
+ opl3->command(opl3, OPL3_RIGHT | 0x08, 0x04);
+ opl3->command(opl3, OPL3_RIGHT | 0x08, 0x00);
+ opl3->command(opl3, OPL3_LEFT | 0xf7, 0x00);
+ opl3->command(opl3, OPL3_LEFT | 0x04, 0x60);
+ opl3->command(opl3, OPL3_LEFT | 0x04, 0x80);
+ inb(opl3->l_port);
+
+ opl3->command(opl3, OPL3_LEFT | 0x02, 0xff);
+ opl3->command(opl3, OPL3_LEFT | 0x04, 0x21);
+ inb(opl3->l_port);
+
+ opl3->command(opl3, OPL3_LEFT | 0x04, 0x60);
+ opl3->command(opl3, OPL3_LEFT | 0x04, 0x80);
+#endif
+
opl3->command(opl3, OPL3_LEFT | OPL3_REG_TEST, OPL3_ENABLE_WAVE_SELECT);
opl3->command(opl3, OPL3_LEFT | OPL3_REG_PERCUSSION, 0x00); /* Melodic mode */
diff -urN linux/sound/isa/cs423x/cs4231.c linux98/sound/isa/cs423x/cs4231.c
--- linux/sound/isa/cs423x/cs4231.c Sun Sep 1 07:04:46 2002
+++ linux98/sound/isa/cs423x/cs4231.c Fri Sep 6 19:09:31 2002
@@ -27,6 +27,9 @@
#include <sound/core.h>
#include <sound/cs4231.h>
#include <sound/mpu401.h>
+#ifdef CONFIG_PC9800
+#include <sound/opl3.h>
+#endif
#define SNDRV_GET_ID
#include <sound/initval.h>
@@ -42,6 +45,9 @@
static char *snd_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
static int snd_enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */
static long snd_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
+#ifdef CONFIG_PC9800
+static long snd_fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
+#endif
static long snd_mpu_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */
static int snd_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,11,12,15 */
static int snd_mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 9,11,12,15 */
@@ -63,6 +69,11 @@
MODULE_PARM(snd_mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
MODULE_PARM_DESC(snd_mpu_port, "MPU-401 port # for CS4231 driver.");
MODULE_PARM_SYNTAX(snd_mpu_port, SNDRV_PORT12_DESC);
+#ifdef CONFIG_PC9800
+MODULE_PARM(snd_fm_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+MODULE_PARM_DESC(snd_fm_port, "FM port # for CS4231 driver.");
+MODULE_PARM_SYNTAX(snd_fm_port, SNDRV_PORT12_DESC);
+#endif
MODULE_PARM(snd_irq, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
MODULE_PARM_DESC(snd_irq, "IRQ # for CS4231 driver.");
MODULE_PARM_SYNTAX(snd_irq, SNDRV_IRQ_DESC);
@@ -85,6 +96,9 @@
struct snd_card_cs4231 *acard;
snd_pcm_t *pcm = NULL;
cs4231_t *chip;
+#ifdef CONFIG_PC9800
+ opl3_t *opl3;
+#endif
int err;
if (snd_port[dev] == SNDRV_AUTO_PORT) {
@@ -128,6 +142,21 @@
return err;
}
+#ifdef CONFIG_PC9800
+ if (snd_fm_port[dev] >=0 && snd_fm_port[dev] != SNDRV_AUTO_PORT) {
+ if (snd_opl3_create(card,
+ snd_fm_port[dev], snd_fm_port[dev] + 2,
+ OPL3_HW_OPL3_CS, 0, &opl3) < 0) {
+ printk(KERN_ERR "CS4231: OPL3 not detected\n");
+ } else {
+ if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
+ snd_card_free(card);
+ return err;
+ }
+ }
+ }
+#endif
+
if (snd_mpu_irq[dev] >= 0 && snd_mpu_irq[dev] != SNDRV_AUTO_IRQ) {
if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
snd_mpu_port[dev], 0,
@@ -196,6 +225,9 @@
get_option(&str,&pnp) == 2 &&
get_option(&str,(int *)&snd_port[nr_dev]) == 2 &&
get_option(&str,(int *)&snd_mpu_port[nr_dev]) == 2 &&
+#ifdef CONFIG_PC9800
+ get_option(&str,(int *)&snd_fm_port[nr_dev]) == 2 &&
+#endif
get_option(&str,&snd_irq[nr_dev]) == 2 &&
get_option(&str,&snd_mpu_irq[nr_dev]) == 2 &&
get_option(&str,&snd_dma1[nr_dev]) == 2 &&
diff -urN linux/sound/isa/cs423x/cs4231_lib.c linux98/sound/isa/cs423x/cs4231_lib.c
--- linux/sound/isa/cs423x/cs4231_lib.c Tue Oct 8 10:56:24 2002
+++ linux98/sound/isa/cs423x/cs4231_lib.c Tue Oct 8 11:01:42 2002
@@ -37,6 +37,10 @@
#include <sound/cs4231.h>
#include <sound/pcm_params.h>
+#ifdef CONFIG_PC9800
+#include <sound/sound_pc9800.h>
+#endif
+
MODULE_AUTHOR("Jaroslav Kysela <[email protected]>");
MODULE_DESCRIPTION("Routines for control of CS4231(A)/CS4232/InterWave & compatible chips");
MODULE_LICENSE("GPL");
@@ -1405,6 +1409,10 @@
};
cs4231_t *chip;
int err;
+#ifdef CONFIG_PC9800
+ int intr_bits, intr_bits2, dma_bits;
+ unsigned long flags;
+#endif
*rchip = NULL;
chip = snd_magic_kcalloc(cs4231_t, 0, GFP_KERNEL);
@@ -1436,6 +1444,13 @@
return -EBUSY;
}
chip->dma1 = dma1;
+#ifdef CONFIG_PC9800
+ if (dma2 > 3 || dma2 == 2) {
+ snd_cs4231_free(chip);
+ snd_printk("Bad DMA %d\n", dma2);
+ return -EBUSY;
+ }
+#endif
if (!(hwshare & CS4231_HWSHARE_DMA2) && dma1 != dma2 && dma2 >= 0 && request_dma(dma2, "CS4231 - 2")) {
snd_cs4231_free(chip);
return -EBUSY;
@@ -1456,6 +1471,65 @@
memcpy(&chip->image, &snd_cs4231_original_image, sizeof(snd_cs4231_original_image));
/* global setup */
+
+#ifdef CONFIG_PC9800
+ switch (irq) {
+ case 3:
+ intr_bits = 0x08;
+ intr_bits2 = 0x03;
+ break;
+ case 5:
+ intr_bits = 0x10;
+ intr_bits2 = 0x08;
+ break;
+ case 10:
+ intr_bits = 0x18;
+ intr_bits2 = 0x02;
+ break;
+ case 12:
+ intr_bits = 0x20;
+ intr_bits2 = 0x00;
+ break;
+ default:
+ snd_cs4231_free(chip);
+ snd_printk("Bad IRQ %d\n", irq);
+ return -EBUSY;
+ }
+
+ switch (dma1) {
+ case 0:
+ dma_bits = 0x01;
+ break;
+ case 1:
+ dma_bits = 0x02;
+ break;
+ case 3:
+ dma_bits = 0x03;
+ break;
+ default:
+ snd_cs4231_free(chip);
+ snd_printk("Bad DMA %d\n", dma1);
+ return -EBUSY;
+ }
+
+ if (chip->single_dma != 1)
+ intr_bits |= 0x04;
+
+ if (PC9800_SOUND_ID() == PC9800_SOUND_ID_118) {
+ /* Set up CanBe control registers. */
+ snd_printk("Setting up CanBe Sound System\n");
+ spin_lock_irqsave(&chip->reg_lock, flags);
+ outb(inb(PC9800_SOUND_IO_ID) | 0x03, PC9800_SOUND_IO_ID);
+ outb(0x01, 0x0f4a);
+ outb(intr_bits2, 0x0f4b);
+ } else {
+ spin_lock_irqsave(&chip->reg_lock, flags);
+ }
+
+ outb(intr_bits | dma_bits, 0xf40);
+ spin_unlock_irqrestore(&chip->reg_lock, flags);
+#endif /* CONFIG_PC9800 */
+
if (snd_cs4231_probe(chip) < 0) {
snd_cs4231_free(chip);
return -ENODEV;
diff -urN linux/include/sound/mpu401.h linux98/include/sound/mpu401.h
--- linux/include/sound/mpu401.h Tue Oct 8 10:56:20 2002
+++ linux98/include/sound/mpu401.h Tue Oct 8 11:01:42 2002
@@ -89,7 +89,11 @@
/* I/O ports */
+#ifndef CONFIG_MPU_PC98II
#define MPU401C(mpu) ((mpu)->port + 1)
+#else
+#define MPU401C(mpu) ((mpu)->port + 2)
+#endif
#define MPU401D(mpu) ((mpu)->port + 0)
/*
diff -urN linux/include/sound/pc9801_118_magic.h linux98/include/sound/pc9801_118_magic.h
--- linux/include/sound/pc9801_118_magic.h Thu Jan 1 09:00:00 1970
+++ linux98/include/sound/pc9801_118_magic.h Sat Apr 27 13:01:29 2002
@@ -0,0 +1,411 @@
+ static unsigned char Data0485_A9[] = {
+ 0x12, 0x03, 0x90, 0xc2, 0x2a, 0x75, 0x1e, 0x20,
+ 0xe4, 0x12, 0x2b, 0x9b, 0x22, 0xa9, 0x16, 0x77,
+ 0x33, 0xe9, 0x04, 0x54, 0x03, 0x44, 0xa8, 0xf5,
+ 0x16, 0xc2, 0x2f, 0x22, 0xa9, 0x16, 0x77, 0x42,
+ 0xe9, 0x04, 0x54, 0x03, 0x44, 0xa8, 0xf9, 0x77,
+ 0xf8, 0x04, 0x54, 0x03, 0x44, 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18, 0x77, 0x75, 0x3a, 0x00, 0x12, 0x1a,
+ 0x77, 0x02, 0x18, 0x1b, 0x20, 0x4b, 0x04, 0x75,
+ 0x4e, 0x03, 0x22, 0xe5, 0x35, 0x24, 0xff, 0xf5,
+ 0x35, 0xe5, 0x36, 0x34, 0xff, 0xf5, 0x36, 0x75,
+ 0x4e, 0x03, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x02, 0x2c,
+ 0x70, 0xd2, 0x00, 0x78, 0x11, 0xe2, 0x44, 0x11,
+ 0xf5, 0x3f, 0xc2, 0x08, 0x12, 0x29, 0xa3, 0x02,
+ 0x23, 0x93, 0x21, 0x62, 0x61, 0x40, 0x01, 0x3a,
+ 0x01, 0x73, 0x21, 0x76, 0x61, 0xa8, 0x21, 0x39,
+ 0x21, 0x4a, 0x02, 0x2a, 0x7b, 0x79, 0x06, 0xf3,
+ 0xc0, 0xd0, 0x12, 0x03, 0xd9, 0x78, 0x00, 0xf2,
+ 0xd0, 0xd0, 0x22, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x2c, 0xb4, 0x78, 0x11, 0xe2, 0x44, 0x11, 0x54,
+ 0x0f, 0xf8, 0xc4, 0x48, 0xd2, 0x05, 0xf5, 0x48,
+ 0xc2, 0x0d, 0x31, 0xa3, 0x02, 0x23, 0x93, 0x20,
+ 0x4b, 0x04, 0x75, 0x4e, 0x01, 0x22, 0xe5, 0x35,
+ 0x24, 0xff, 0xf5, 0x35, 0xe5, 0x36, 0x34, 0xff,
+ 0xf5, 0x36, 0x75, 0x4e, 0x01, 0x22, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x79, 0xd0, 0x77, 0x1b, 0x79, 0xd1, 0x77, 0x18,
+ 0x79, 0xd2, 0x77, 0x77, 0x79, 0xd3, 0x77, 0x18,
+ 0x22, 0x75, 0x29, 0x00, 0x75, 0x25, 0x00, 0x75,
+ 0x34, 0x03, 0x75, 0x22, 0x00, 0x75, 0x23, 0x05,
+ 0x75, 0x4f, 0x00, 0x75, 0x50, 0x00, 0x75, 0x30,
+ 0x00, 0x79, 0xdc, 0x77, 0x03, 0xc2, 0x8e, 0x75,
+ 0x17, 0xa8, 0x75, 0x16, 0xa8, 0x74, 0xaa, 0x79,
+ 0x01, 0xf3, 0x79, 0xd7, 0x77, 0x74, 0x79, 0xd8,
+ 0x77, 0xff, 0x79, 0xd9, 0x77, 0x07, 0x79, 0xda,
+ 0x77, 0x00, 0x12, 0x25, 0x6f, 0x43, 0x08, 0x40,
+ 0x71, 0x32, 0x79, 0x0e, 0xe3, 0x10, 0x51, 0x1c,
+ 0x74, 0x06, 0x71, 0x9b, 0xe5, 0x11, 0x44, 0x80,
+ 0x79, 0x05, 0xf3, 0xf5, 0x11, 0x74, 0x07, 0x71,
+ 0x9b, 0xe5, 0x12, 0x44, 0x80, 0x79, 0x05, 0xf3,
+ 0xf5, 0x12, 0x80, 0x18, 0x53, 0x27, 0xa0, 0x53,
+ 0x28, 0x01, 0x75, 0x20, 0xf7, 0x12, 0x23, 0x4c,
+ 0x75, 0x11, 0x80, 0x75, 0x12, 0x80, 0x12, 0x1f,
+ 0xc0, 0x12, 0x21, 0xdc, 0x79, 0x06, 0xf3, 0x22,
+ 0xd2, 0x02, 0x78, 0x11, 0xe2, 0x44, 0x11, 0xf5,
+ 0x43, 0xc2, 0x0a, 0x12, 0x29, 0xa3, 0x02, 0x23,
+ 0x93, 0x78, 0x11, 0xe2, 0x44, 0x11, 0xf5, 0x44,
+ 0xc2, 0x0b, 0x12, 0x29, 0xa3, 0x02, 0x23, 0x93,
+ 0x78, 0x00, 0xe2, 0x90, 0x25, 0x9f, 0x02, 0x23,
+ 0x93, 0x78, 0x11, 0xe2, 0x75, 0x20, 0xf7, 0x75,
+ 0x21, 0x3f, 0x75, 0x49, 0x11, 0x75, 0x4c, 0x11,
+ 0x31, 0xa3, 0x02, 0x23, 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 0x04,
+ 0x83, 0x22, 0xff, 0x01, 0xff, 0x01, 0x00, 0x00,
+ 0x00, 0x02, 0x22, 0x32, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x83,
+ 0x22, 0x8a, 0x01, 0x20, 0x01, 0x0b, 0xea, 0xf3,
+ 0xf9, 0x8b, 0x7e, 0x6b, 0xd5, 0x01, 0x00, 0x01,
+ 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x3a, 0x01, 0x38, 0x01, 0x4b, 0x01,
+ 0x49, 0x01, 0x5c, 0x01, 0x5a, 0x01, 0x08, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x15, 0x24, 0x48, 0x83, 0x22, 0x04,
+ 0x83, 0x22, 0x00, 0x01, 0x02, 0x03, 0x04, 0x06,
+ 0x07, 0x08, 0x00, 0x03, 0x05, 0x07, 0x09, 0x0d,
+ 0x0f, 0x81, 0x00, 0x06, 0x0a, 0x0e, 0x82, 0x8a,
+ 0x8e, 0x22, 0x00, 0x0c, 0x84, 0x8c, 0x24, 0x2c,
+ 0xa4, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xaa, 0x35, 0xab, 0x36,
+ 0x02, 0x27, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+ 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x25,
+ 0x03, 0x03, 0x2b, 0x03, 0x00, 0x03, 0x00, 0x03,
+ 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x83, 0x22,
+ 0x00, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02,
+ 0x2b, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02,
+ 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x02, 0x01,
+ 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x02,
+ 0x02, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02,
+ 0x21, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00,
+ 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x21,
+ 0x01, 0x02, 0x21, 0x02, 0x02, 0x02, 0x00, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x20, 0xb5, 0x05,
+ 0x79, 0x0f, 0xf3, 0xc2, 0x11, 0x22, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5,
+ 0x15, 0xa2, 0xe0, 0xb0, 0xe6, 0x50, 0x01, 0x22,
+ 0xa2, 0xe1, 0xb0, 0xe7, 0x22, 0x02, 0x00};
+ static unsigned char Data0485_0C[] = {
+ 0x02, 0x27, 0x69};
+ static unsigned char Data0485_66[] = {
+ 0x02, 0x25, 0x47, 0x02, 0x25, 0x60};
+ static unsigned char Data0485_60[] = {
+ 0x02, 0x22, 0x7e};
+ static unsigned char Data0485_99[] = {
+ 0xc2, 0x53, 0x02, 0x12, 0x86};
+ static unsigned char Data0485_9E[] = {
+ 0x70, 0xf9, 0x22};
+#ifdef OOKUBO_ORIGINAL
+ static unsigned char Data0485_36[] = {
+ 0x78, 0x00, 0xf2, 0xc2, 0x53, 0x74, 0x86, 0xc0,
+ 0xe0, 0x74, 0x12, 0xc0, 0xe0, 0x32};
+#endif /* OOKUBO_ORIGINAL */
diff -urN linux/include/sound/sound_pc9800.h linux98/include/sound/sound_pc9800.h
--- linux/include/sound/sound_pc9800.h Thu Jan 1 09:00:00 1970
+++ linux98/include/sound/sound_pc9800.h Fri Aug 17 22:33:07 2001
@@ -0,0 +1,23 @@
+#ifndef _SOUND_PC9800_H_
+#define _SOUND_PC9800_H_
+
+#include <asm/io.h>
+
+#define PC9800_SOUND_IO_ID 0xa460
+
+/* Sound Functions ID. */
+#define PC9800_SOUND_ID() ((inb(PC9800_SOUND_IO_ID) >> 4) & 0x0f)
+
+#define PC9800_SOUND_ID_DO 0x0 /* PC-98DO+ Internal */
+#define PC9800_SOUND_ID_GS 0x1 /* PC-98GS Internal */
+#define PC9800_SOUND_ID_73 0x2 /* PC-9801-73 (base 0x18x) */
+#define PC9800_SOUND_ID_73A 0x3 /* PC-9801-73/76 (base 0x28x) */
+#define PC9800_SOUND_ID_86 0x4 /* PC-9801-86 and compatible (base 0x18x) */
+#define PC9800_SOUND_ID_86A 0x5 /* PC-9801-86 (base 0x28x) */
+#define PC9800_SOUND_ID_NF 0x6 /* PC-9821Nf/Np Internal */
+#define PC9800_SOUND_ID_XMATE 0x7 /* X-Mate Internal and compatible */
+#define PC9800_SOUND_ID_118 0x8 /* PC-9801-118 and compatible(CanBe Internal, etc.) */
+
+#define PC9800_SOUND_ID_UNKNOWN 0xf /* Unknown (No Sound System or PC-9801-26) */
+
+#endif