Commit 85eadbf3 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.34

parent 3123ed07
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 33
SUBLEVEL = 34
ARCH = i386
......
......@@ -10,10 +10,15 @@
NM := nm -B
ifdef CONFIG_CROSSCOMPILE
# enable this for linking under OSF/1:
#LINKFLAGS = -non_shared -T 0xfffffc0000310000 -N
LINKFLAGS = -non_shared -T 0xfffffc0000310000 -N
else
# enable this for linking under Linux:
LINKFLAGS = -static -T arch/alpha/vmlinux.lds -N
# GNU gcc/cc1/as can use pipes instead of temporary files
CFLAGS := $(CFLAGS) -pipe
endif
CFLAGS := $(CFLAGS) -mno-fp-regs
......
......@@ -8,10 +8,13 @@
# Copyright (C) 1994 by Linus Torvalds
#
ifdef CONFIG_CROSSCOMPILE
# enable this for linking under OSF/1:
#LINKFLAGS = -non_shared -T 0x20000000 -N
LINKFLAGS = -non_shared -T 0x20000000 -N
else
# enable this for linking under Linux:
LINKFLAGS = -static -T bootloader.lds -N
endif
.S.s:
$(CC) -D__ASSEMBLY__ -traditional -E -o $*.o $<
......
......@@ -5,6 +5,12 @@
comment 'General setup'
if [ "`uname`" != "Linux" ]; then
define_bool CONFIG_CROSSCOMPILE y
else
define_bool CONFIG_NATIVE y
fi
tristate 'Normal floppy disk support' CONFIG_BLK_DEV_FD y
bool 'Normal (MFM/RLL) disk and IDE disk/cdrom support' CONFIG_ST506 y
if [ "$CONFIG_ST506" = "y" ]; then
......
......@@ -190,7 +190,6 @@ entIF:
* stack buildup, as we can't do system calls from kernel space.
*/
.align 3
.globl kernel_clone
.ent kernel_clone
kernel_clone:
subq $30,6*8,$30
......@@ -208,6 +207,36 @@ kernel_clone:
br ret_from_sys_call
.end kernel_clone
/*
* __kernel_thread(clone_flags, fn, arg)
*/
.align 3
.globl __kernel_thread
.ent __kernel_thread
__kernel_thread:
subq $30,4*8,$30
stq $9,0($30)
stq $10,8($30)
stq $26,16($30)
bis $17,$17,$9 /* save fn */
bis $18,$18,$10 /* save arg */
bsr $26,kernel_clone
bne $20,1f /* $20 is non-zero in child */
ldq $9,0($30)
ldq $10,8($30)
ldq $26,16($30)
addq $30,4*8,$30
ret $31,($26),1
/* this is in child: look out as we don't have any stack here.. */
1: bis $9,$9,$27 /* get fn */
bis $10,$10,$16 /* get arg */
jsr $26,($27)
bis $0,$0,$16
lda $27,sys_exit
jsr $26,($27),sys_exit
call_pal PAL_halt
.end __kernel_thread
.align 3
.ent do_switch_stack
do_switch_stack:
......
......@@ -302,11 +302,6 @@ comment '>>> Which is available from ftp://ftp.funet.fi/pub/OS/Linux/BETA/QIC-02
fi
fi
bool 'QIC-117 tape support' CONFIG_FTAPE n
if [ "$CONFIG_FTAPE" = "y" ]; then
int ' number of ftape buffers' NR_FTAPE_BUFFERS 3
fi
comment 'Sound'
tristate 'Sound card support' CONFIG_SOUND n
......
......@@ -22,7 +22,6 @@
#include <asm/pgtable.h>
extern void scsi_mem_init(unsigned long);
extern void sound_mem_init(void);
extern void die_if_kernel(char *,struct pt_regs *,long);
extern void show_net_buffers(void);
......@@ -230,9 +229,6 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
}
#ifdef CONFIG_SCSI
scsi_mem_init(high_memory);
#endif
#ifdef CONFIG_SOUND
sound_mem_init();
#endif
for (tmp = 0 ; tmp < high_memory ; tmp += PAGE_SIZE) {
if (mem_map[MAP_NR(tmp)].reserved) {
......
......@@ -15,14 +15,20 @@ ifdef CONFIG_PCI
SUB_DIRS += pci
endif
ifdef CONFIG_SCSI
ifeq ($(CONFIG_SCSI),y)
SUB_DIRS += scsi
MOD_SUB_DIRS += scsi
else
ifeq ($(CONFIG_SCSI),m)
MOD_SUB_DIRS += scsi
endif
endif
ifdef CONFIG_SOUND
ifeq ($(CONFIG_SOUND),y)
SUB_DIRS += sound
MOD_SUB_DIRS += sound
else
ifeq ($(CONFIG_SOUND),m)
MOD_SUB_DIRS += sound
endif
endif
include $(TOPDIR)/Rules.make
......@@ -32,15 +32,10 @@ restore the default behaviour.
The floppy related options include:
floppy=<mask>,allowed_drive_mask
Sets the bitmask of allowed drives to <mask>. By default, only units
0 and 1 of each floppy controller are allowed. This is done because
certain non-standard hardware (ASUS PCI motherboards) mess up the
keyboard when accessing units 2 or 3. This option is somewhat
obsoleted by the cmos option.
Obsolete. Use the floppy=<drive>,<type>,cmos option instead
floppy=all_drives
Sets the bitmask of allowed drives to all drives. Use this if you have
more than two drives connected to a floppy controller.
Obsolete. Use the floppy=<drive>,<type>,cmos option instead
floppy=asus_pci
Sets the bitmask to allow only units 0 and 1. (The default)
......@@ -60,8 +55,9 @@ restore the default behaviour.
floppy=two_fdc
floppy=<address>,two_fdc
Tells the floppy driver that you have two floppy controllers. The
second floppy controller is assumed to be at <address>. If <address>
is not given, 0x370 is assumed.
second floppy controller is assumed to be at <address>. This
option is not needed if the second controller is at address
0x370, and if you use the 'cmos' option
floppy=thinkpad
Tells the floppy driver that you have a Thinkpad. Thinkpads use an
......@@ -71,10 +67,10 @@ restore the default behaviour.
Tells the floppy driver that you don't have a Thinkpad.
floppy=<drive>,<type>,cmos
Sets the cmos type of <drive> to <type>. Additionally, this drive is
allowed in the bitmask. This is useful if you have more than two
floppy drives (only two can be described in the physical cmos), or if
your BIOS uses non-standard CMOS types. The CMOS types are:
Sets the cmos type of <drive> to <type>. This is mandatory if
you have more than two floppy drives (only two can be
described in the physical cmos), or if your BIOS uses
non-standard CMOS types. The CMOS types are:
0 - unknown or not installed
1 - 5 1/4 DD
2 - 5 1/4 HD
......@@ -110,9 +106,9 @@ package. This package also contains a new version of mtools which
allows to access high capacity disks (up to 1992K on a high density 3
1/2 disk!). It also contains additional documentation about the floppy
driver. It can be found at:
ftp.imag.fr:pub/Linux/ZLIBC/fdutils/fdutils-4.0.src.tar.gz
sunsite.unc.edu:/pub/Linux/system/Misc/fdutils-4.0.src.tar.gz
tsx-11.mit.edu:/pub/linux/sources/sbin/fdutils-4.0.src.tar.gz
ftp.imag.fr:pub/Linux/ZLIBC/fdutils/fdutils-4.1.src.tar.gz
sunsite.unc.edu:/pub/Linux/system/Misc/fdutils-4.1.src.tar.gz
tsx-11.mit.edu:/pub/linux/sources/sbin/fdutils-4.1.src.tar.gz
Alpha patches to these utilities are at:
ftp.imag.fr:pub/Linux/ZLIBC/fdutils/ALPHA
......
......@@ -363,7 +363,6 @@ static void end_request(int uptodate) {
req->bh = bh->b_reqnext;
bh->b_reqnext = NULL;
bh->b_uptodate = uptodate;
if (!uptodate) bh->b_req = 0; /* So no "Weird" errors */
unlock_buffer(bh);
if ((bh = req->bh) != NULL) {
req->current_nr_sectors = bh->b_size >> 9;
......
This diff is collapsed.
......@@ -23,7 +23,7 @@
#include <asm/pgtable.h>
#ifdef CONFIG_SOUND
int soundcard_init(void);
void soundcard_init(void);
#endif
static int read_ram(struct inode * inode, struct file * file, char * buf, int count)
......
Behaviour of cards under Multicast. This is how they currently
behave not what the hardware can do. In paticular all the 8390 based
behave not what the hardware can do. In particular all the 8390 based
cards don't use the onboard hash filter, and the lance driver doesn't
use its filter, even though the code for loading it is in the DEC
lance based driver.
......
......@@ -654,6 +654,7 @@ static void b_rxint(struct device *dev, struct pi_local *lp)
/* 'skb->data' points to the start of sk_buff data area. */
memcpy(cfix, lp->rcvbuf->data, pkt_len - 1);
skb->protocol=ntohs(ETH_P_AX25);
skb->mac.raw=skb->data;
IS_SKB(skb);
netif_rx(skb);
lp->stats.rx_packets++;
......
/* fdomain.c -- Future Domain TMC-16x0 SCSI driver
* Created: Sun May 3 18:53:19 1992 by faith@cs.unc.edu
* Revised: Sun Sep 17 00:23:26 1995 by r.faith@ieee.org
* Revised: Thu Oct 12 15:59:37 1995 by r.faith@ieee.org
* Author: Rickard E. Faith, faith@cs.unc.edu
* Copyright 1992, 1993, 1994, 1995 Rickard E. Faith
*
* $Id: fdomain.c,v 5.36 1995/09/17 04:23:42 root Exp $
* $Id: fdomain.c,v 5.39 1995/10/12 20:31:47 root Exp $
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
......@@ -209,14 +209,14 @@
#include <linux/proc_fs.h>
#include <linux/bios32.h>
#include <linux/pci.h>
#include<linux/stat.h>
#include <linux/stat.h>
struct proc_dir_entry proc_scsi_fdomain = {
PROC_SCSI_FDOMAIN, 7, "fdomain",
S_IFDIR | S_IRUGO | S_IXUGO, 2
};
#define VERSION "$Revision: 5.36 $"
#define VERSION "$Revision: 5.39 $"
/* START OF USER DEFINABLE OPTIONS */
......@@ -404,6 +404,7 @@ struct signature {
{ "Future Domain Corp. V2.0108/18/93", 5, 33, 3, 5, 0 },
{ "FUTURE DOMAIN CORP. V3.5008/18/93", 5, 34, 3, 5, 0 },
{ "FUTURE DOMAIN 18c30/18c50/1800 (C) 1994 V3.5", 5, 44, 3, 5, 0 },
{ "FUTURE DOMAIN CORP. V3.6008/18/93", 5, 34, 3, 6, 0 },
{ "FUTURE DOMAIN CORP. V3.6108/18/93", 5, 34, 3, 6, 0 },
{ "FUTURE DOMAIN TMC-18XX", 5, 22, -1, -1, 0 },
......@@ -468,9 +469,9 @@ void fdomain_setup( char *str, int *ints )
printk( "fdomain: bad LILO parameters?\n" );
}
port_base = ints[0] >= 1 ? ints[1] : 0;
interrupt_level = ints[0] >= 2 ? ints[2] : 0;
adapter_mask = ints[0] >= 3 ? (1 << ints[3]) : 0;
port_base = ints[0] >= 1 ? ints[1] : 0;
interrupt_level = ints[0] >= 2 ? ints[2] : 0;
this_id = ints[0] >= 3 ? ints[3] : 0;
bios_major = bios_minor = -1; /* Use geometry for BIOS version >= 3.4 */
}
......@@ -953,7 +954,7 @@ int fdomain_16x0_detect( Scsi_Host_Template *tpnt )
}
if (this_id) {
tpnt->this_id = (this_id & 0x7);
tpnt->this_id = (this_id & 0x07);
adapter_mask = (1 << tpnt->this_id);
} else {
if ((bios_major == 3 && bios_minor >= 2) || bios_major < 0) {
......@@ -1077,7 +1078,6 @@ const char *fdomain_16x0_info( struct Scsi_Host *ignore )
return buffer;
}
#if 0
/* First pass at /proc information routine. */
/*
* inout : decides on the direction of the dataflow and the meaning of the
......@@ -1092,17 +1092,30 @@ const char *fdomain_16x0_info( struct Scsi_Host *ignore )
int fdomain_16x0_proc_info( char *buffer, char **start, off_t offset,
int length, int hostno, int inout )
{
int len = 0;
const char *info = fdomain_16x0_info( NULL );
if (inout) return -ENOSYS;
int len;
int pos;
int begin;
if (inout) return(-ENOSYS);
begin = 0;
strcpy( buffer, info );
len += strlen( info );
strcat( buffer, "\n" );
pos = len = strlen( buffer );
return( len );
if(pos < offset) {
len = 0;
begin = pos;
}
*start = buffer + (offset - begin); /* Start of wanted data */
len -= (offset - begin);
if(len > length) len = length;
return(len);
}
#endif
#if 0
static int fdomain_arbitrate( void )
......
/* fdomain.h -- Header for Future Domain TMC-16x0 driver
* Created: Sun May 3 18:47:33 1992 by faith@cs.unc.edu
* Revised: Sat Jan 14 20:56:52 1995 by faith@cs.unc.edu
* Revised: Thu Oct 12 13:21:35 1995 by r.faith@ieee.org
* Author: Rickard E. Faith, faith@cs.unc.edu
* Copyright 1992, 1993, 1994, 1995 Rickard E. Faith
*
* $Id: fdomain.h,v 5.10 1995/01/15 01:56:56 root Exp $
* $Id: fdomain.h,v 5.12 1995/10/12 19:01:09 root Exp $
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
......@@ -32,14 +32,16 @@ const char *fdomain_16x0_info( struct Scsi_Host * );
int fdomain_16x0_reset( Scsi_Cmnd * );
int fdomain_16x0_queue( Scsi_Cmnd *, void (*done)(Scsi_Cmnd *) );
int fdomain_16x0_biosparam( Disk *, kdev_t, int * );
int fdomain_16x0_proc_info( char *buffer, char **start, off_t offset,
int length, int hostno, int inout );
extern struct proc_dir_entry proc_scsi_fdomain;
#define FDOMAIN_16X0 { NULL, \
NULL, \
NULL, \
fdomain_16x0_proc_info, \
NULL, \
NULL, \
fdomain_16x0_detect, \
NULL, \
fdomain_16x0_info, \
......
......@@ -2259,6 +2259,8 @@ int scsi_free(void *obj, unsigned int len)
}
int scsi_loadable_module_flag; /* Set after we scan builtin drivers */
void * scsi_init_malloc(unsigned int size, int priority)
{
void * retval;
......@@ -2351,6 +2353,9 @@ int scsi_dev_init(void)
/* Yes we're here... */
dispatch_scsi_info_ptr = dispatch_scsi_info;
/* Init a few things so we can "malloc" memory. */
scsi_loadable_module_flag = 0;
timer_table[SCSI_TIMER].fn = scsi_main_timeout;
timer_table[SCSI_TIMER].expires = 0;
......@@ -2436,6 +2441,8 @@ int scsi_dev_init(void)
if(sdtpnt->finish && sdtpnt->nr_dev)
(*sdtpnt->finish)();
scsi_loadable_module_flag = 1;
return 0;
}
......
......@@ -6,3 +6,7 @@
* Readme.cards (this directory) contains some card *
* specific instructions. *
*********************************************************
* NOTE!!!! THIS IS AN _EXPERIMENTAL_ ALPHA TEST VERSION *
* WHICH CERTAINLY HAS BUGS AND MAY SERIOUSLY DAMAGE YOUR*
* SYSTEM. YOU HAVE A CHANCE TO HIT CTRL-C NOW!!!!!!!! *
*********************************************************
Changelog for version 3.0.1
---------------------------
Changelog for version 3.5
-------------------------
Since 3.0.2
- Support for CS4232 based PnP cards (AcerMagic S23 etc).
- Full duplex support for some CS4231, CS4232 and AD1845 based cards
(GUA MAX, AudioTrix Pro, AcerMagic S23 and many MAD16/Mozart cards
having a codec mentioned above).
- Almost fully rewritten loadable modules support.
- Fixed some bugs.
- Huge amount of testing (more testing is still required).
- mmap() support (works with some cards). Requires much more testing.
- Sample/patch/program loading for TB Maui/Tropez. No initialization
since TB doesn't allow me to release that code.
- Using CS4231 compatible codecs as timer for /dev/music.
Since 3.0.1
- Added allocation of I/O ports, DMA channels and interrupts
to the initialization code. This may break modules support since
the driver may not free some resources on unload. Should be fixed soon.
Since 3.0
- Some important bug fixes.
......
......@@ -8,6 +8,7 @@
VERSION = `cat .version`
TARGET_OS = linux
USRINCDIR = /usr/include
MODULEDIR = /lib/modules/misc
OBJS = soundcard.o audio.o dmabuf.o sb_dsp.o dev_table.o \
opl3.o sequencer.o midibuf.o sb_card.o pas2_card.o adlib_card.o \
......@@ -15,30 +16,45 @@ OBJS = soundcard.o audio.o dmabuf.o sb_dsp.o dev_table.o \
gus_midi.o gus_vol.o patmgr.o sb_mixer.o sb16_dsp.o sb_midi.o \
sb16_midi.o sound_switch.o midi_synth.o uart6850.o sound_timer.o \
sys_timer.o ics2101.o ad1848.o pss.o sscape.o trix.o aedsp16.o \
mad16.o
mad16.o mad16_sb_midi.o cs4232.o maui.o sound_pnp.o
# Don't compile the sound driver during a normal kernel build if we have
# configured for a module build instead.
ifeq ($(CONFIG_SOUND),y)
all: local.h sound.a
else
all:
ifndef HOSTCC
#
# Running outside the kernel build.
#
CC = gcc
HOSTCC = gcc
CFLAGS = -D__KERNEL__ -DMODULE -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486
build:
@echo Compiling modularized sound driver
@make sound.o
@echo Sound module compiled.
install: sound.o
cp sound.o $(MODULEDIR)
.c.o:
$(CC) $(CFLAGS) -c $<
endif
all: local.h sound.a
include $(TOPDIR)/Rules.make
sound.a: $(OBJS)
-rm -f sound.a
$(AR) rcs sound.a $(OBJS)
sync
clean:
rm -f core core.* *.o *.a tmp_make *~ x z *%
rm -f configure
for i in *.c;do rm -f `basename $$i .c`.s;done
rm -f core core.* *.o *.a tmp_make *~ x y z *%
rm -f configure sound_stub.c
indent:
for n in *.c;do echo indent $$n;indent $$n;done
local.h:
local.h:
$(MAKE) clean
$(MAKE) setup-$(TARGET_OS)
$(MAKE) config
......@@ -49,8 +65,9 @@ config: configure
@./configure > local.h
@echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
@echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
@echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h
@echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h
# @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
# @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
@echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h
clrconf:
rm -f local.h .depend synth-ld.h trix_boot.h smw-midi0001.h
......@@ -65,11 +82,9 @@ dep:
setup-linux:
@echo Compiling Sound Driver v $(VERSION) for Linux
sound.o: sound.a
sound.o: $(OBJS)
-rm -f sound.o
$(LD) -r -o sound.o soundcard.o sound.a
modules: sound.o
(cd ../../modules; ln -fs ../drivers/sound/sound.o .)
$(LD) -r -o sound.o $(OBJS)
include $(TOPDIR)/Rules.make
modules: local.h sound.o
ln -fs `pwd`/sound.o /usr/src/linux/modules/sound.o
IMPORTANT! This version of the driver is compatible only with Linux versions
1.3.33 and later. It may work with earlier ones as a loadable
module but...
Also this is an ALPHA test version which has not been tested
with all cards. At least AEDSP16 support will not work. PAS16
and PSS supports have not been tested. /dev/dsp and /dev/audio
playback with standard GUS sounds scrambled.
Please read the SOUND-HOWTO (available from sunsite.unc.edu and other Linux ftp
sites). It contains much more information than this file.
......@@ -7,39 +16,19 @@ sites). It contains much more information than this file.
* about configuring various cards. *
*****************************************************************
VoxWare v3.0.1 release notes
----------------------------
This version is the final v3.0. All features I have planned to
include in v3.0 are there but some of them are completely untested
(see experimental.txt).
*** GUS MAX enhancements *****************************************************
Recording with GUS MAX works now. The configuration program asks
two DMA channels for GUS MAX. You have to use two different 16 bit
DMA numbers (5, 6 or 7) if you want to record (8 bit DMA channels
may or may not work). It's still possible to use just one DMA channel
with GUS MAX but recording doesn't work in this case (a hardware limitation).
Even the driver has capability to use two DMA channels, simultaneous recording
and playback is not possible with GUS MAX (will not be before v4.0
of the driver). However it's now possible to play using /dev/dsp and /dev/dsp1
at the same time (or /dev/dsp and /dev/sequencer as well).
Recording using /dev/dsp1 will not work if GUS MAX is configured to use two
DMA channels.
******************************************************************************
There are some additional device files (since v2.90-2 andv3.0-proto-94mmdd
versions).
You will need to create additional device files using the script at the
end of ./linux/Readme. Also recompile all mixer programs since there are
some new channels that are not enabled in mixers compiled with older
soundcard.h.
VoxWare v3.5-alpha2 release notes
---------------------------------
This is not an official release but just an experimental alpha
test version. The official version is included in Linux-1.3.3x
version sources.
There are some programming information (little bit old) in the
Hacker's Guide
(ftp://nic.funet.fi/pub/OS/Linux/ALPHA/sound/snd-sdk-doc-0.1.ps.gz).
Believe me: The file is really there. The directory is just hidden and
you have to cd into it before the file is visible.
you have to cd into it before the file is visible. Note: This directory
was accidently removed some time ago but it's now back.
I have got many patches from various persons during last year. Some of
them are still on my mailbox and they should be included in versions
......@@ -62,8 +51,7 @@ after v3.0 (I will not add aditional features before v3.0 is ready).
You will also need the latest version of the soundscape.co[01] file.
The old sndscape.cod will ___NOT___ work (it propably just hangs your
system completely). The latest code file is available from ftp.ensoniq.com
as part of the DOS/Windows driver distribution. See sndscape/ssinit.c
for more info.
as part of the DOS/Windows driver distribution.
- This is Linux only version. It should work in other operating systems
(SCO, UW, FreeBSD and NetBSD) too but may require some fixes before
it compiles.
......@@ -89,7 +77,7 @@ ECHO-PSS (cards based on the PSS architecture by Analog Devices.
(NOTE! WSS mode may not work (DMA channel setup problem)).
MediaTriX AudioTriX Pro (OPL4 and the optional effect daughtercard
require special initialization. There is a program (setfx) in
the audiotrix directory which does it).
the snd-util-3.0.tar.gz package which does it).
Ensoniq SoundScape (works but needs some improvements)
MV Jazz16 based soundcards (ProSonic, 3D etc).
SoundMan Wave (recording may not work, mixer support is limited)
......@@ -154,7 +142,7 @@ contributors. (I could have forgotten some names.)
Hunyue Yau Mixer support for SG NX Pro.
Marc Hoffman PSS support.
Rainer Vranken Initialization for Jazz16 (ProSonic, MV3D, SM Wave).
Peter Trattler Loadable module support for Linux.
Peter Trattler Initial version of loadable module support for Linux.
JRA Gibson 16 bit mode for Jazz16
Davor Jadrijevic MAD16 support
Gregor Hoffleit Mozart support
......@@ -173,6 +161,7 @@ Novell, Inc. UnixWare personal edition + SDK
The Santa Cruz Operation, Inc. A SCO OpenServer + SDK
Ensoniq Corp, a SoundScape card and extensive amount of assistance
MediaTriX Peripherals Inc, a AudioTriX Pro card + SDK
Acer, Inc. a pair of AcerMagic S23 cards.
In addition the following companies have provided me sufficial amount
of technical information at least some of their products (free or $$$):
......
......@@ -46,7 +46,7 @@ Gravis Ultrasound (GUS)
GUS
GUS + the 16 bit option
GUS MAX
(GUS ACE ????????????)
GUS ACE (No MIDI port and audio recording)
MPU-401 and compatibles
The driver works both with the full (intelligent mode) MPU-401
......@@ -65,7 +65,7 @@ Windows Sound System (MSS/WSS)
(AD1848 by Analog Devices and CS4231/CS4248 by Crystal Semiconductor).
Currently most soundcards are based on one of the MSS compatible codec
chip. The CS4231 is used in the high quality cards such as GUS MAX,
MediaTriX AudioTriX Pro and TB Tropez.
MediaTriX AudioTriX Pro and TB Tropez (GUS MAX is not MSS compatible).
Having a AD1848, CS4248 or CS4231 codec chip on the card is a good
sign. Even if the card is not MSS compatible, it could be easy to write
......@@ -267,6 +267,9 @@ select some options automaticly as well.
please look at the card specific instructions later in this file
before answering this question. For an unknown card you may answer
'y' if the card claims to be SB compatible.
Don't enable SB if you have a MAD16 or Mozart compatible card.
"Generic OPL2/OPL3 FM synthesizer support",
- Answer 'y' if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4).
Answering 'y' is usually a safe and recommended choice. However some
......@@ -431,7 +434,7 @@ a SB mode so the driver config program will prompt for the SB settings
do. Use I/O 0x220 and DMA1 for the SB mode. Ensure that you assign different
IRQ numbers for the SB and PAS16 modes.
With PAS16 you can use two audio devices at the same time. /dev/dsp (and
With PAS16 you can use two audio device files at the same time. /dev/dsp (and
/dev/audio) is connected to the 8/16 bit native codec and the /dev/dsp1 (and
/dev/audio1) is connected to the SB emulation (8 bit mono only).
......@@ -452,7 +455,7 @@ also contains a mixer.
Configuring GUS is simple. Just enable the GUS support and GUS MAX or
the 16 bit daughtercard if you have them. Note that enabling the daughter
card disables GUS MAX.
card disables GUS MAX driver.
With just the standard GUS enabled the configuration program prompts
for the I/O, IRQ and DMA numbers for the card. Use the same values than
......@@ -466,16 +469,18 @@ recording and /dev/dsp1 (GUS GF1) for playback.
GUS MAX uses the same I/O address and IRQ settings than the original GUS
(GUS MAX = GUS + a CS4231 codec). In addition an extra DMA channel may be used.
Using two DMA channels permits simultaneous playback using two devices but
simultaneous recording and playback is not possible (not before v4.0).
Also using two DMA channels is required if you want to record in 16 bit modes.
Using two DMA channels permits simultaneous playback using two devices
(dev/dsp0 and /dev/dsp1). The second DMA channel is required for
full duplex audio.
To enable the second DMA channels, give a valid DMA channel when the config
program asks for the GUS MAX DMA (entering 0 disables the second DMA).
Using 16 bit DMA channels (5,6 or 7) is recommended. The drawback of
using two DMA channels with GUS MAX is that recording from /dev/dsp1
(the 8 bit codec) is disabled.
program asks for the GUS MAX DMA (entering -1 disables the second DMA).
Using 16 bit DMA channels (5,6 or 7) is recommended.
If you have problems in recording with GUS MAX, you could try to use
just one 8 bit DMA channel. Recording will not work with one DMA
channel if it's a 16 bit one.
It's not guaranteed that recording using GUS MAX works (in 3.0-beta2).
MPU401 and Windows Sound System
-------------------------------
......@@ -551,7 +556,7 @@ The OPL4/OPL3 chip and the (optional) effects daughtercard require
initialization after boot. Since information about the effect processor
is not public, the initialization must be done by running a special program
after boot. The setfx program is distributed in Linux binary form (only)
in directory sound/audiotrix (of VoxWare-3.0.tar.gz package).
in snd-util-3.0.tar.gz package.
It's calls ioperm() so it must be run as root.
Another way to initialize the effects processor (and OPL4) is to boot DOS
......@@ -579,11 +584,12 @@ The configuration program asks two DMA channels and two interrupts. One IRQ
and one DMA is used by the MSS codec. The second IRQ is required for the
MPU401 mode (you have to use different IRQs for both purposes).
The second DMA channel is required for initialization of the microcontroller.
You have to use separate DMA channels.
The SoundScape card has a Motorola microcontroller which must initialized
_after_ boot (the driver doesn't initialize it during boot).
The initialization is done by running the 'ssinit' program which is
distributed in directory sound/sndscape. You have to edit two
distributed in the snd-util-3.0.tar.gz package. You have to edit two
defines in the ssinit.c and then compile the program. You may run ssinit
manually (after each boot) or add it to /etc/rc.d/rc.local.
......@@ -621,18 +627,20 @@ MAD16 (Pro) and Mozart
----------------------
You need to enable just the MAD16 /Mozart support when configuring
the driver. Don't enable SB, MPU401 or MSS. However you will need the
the driver. _Don't_ enable SB, MPU401 or MSS. However you will need the
/dev/audio, /dev/sequencer and MIDI supports.
Mozart and OPTi 82C928 (the original MAD16) chips don't support
MPU401 mode so enter just 0 when the configuration program asks the
MPU/MIDI I/O base. The MAD16 Pro (OPTi 82C929) has MPU401 mode.
TB Tropez is based on the 82C929 chip. However it has two MIDI ports.
TB Tropez is based on the 82C929 chip. It has two MIDI ports.
The one connected to the MAD16 chip is the second one (there is a second
MIDI connector/pins somewhere??). If you have not connected the second MIDI
port, just disable the MIDI port of MAD16. The 'Maui' compatible synth of
Tropez is jumper configurable and not connected to the MAD16 chip.
It can be used by enabling the stand alone MPU401 support but you have
to initialize it by using the MS-DOS SNDSETUP program.
There are some other OPTi chips which may be used in soundcards such as
82C930 and MAC32. These chips are not supported by VoxWare yet. Please
......
......@@ -27,11 +27,15 @@ IMPORTANT! Read this if you are installing a separately
- Configure and compile Linux as normally (remember to include the
sound support during "make config").
Boot time configuration (using lilo)
------------------------------------
Boot time configuration (using lilo and insmod)
-----------------------------------------------
NOTE! This information is little bit obsolete since it doesn't cover
some cards recently added to the driver.
some cards recently added to the driver. The following text
describes parameters just for some older cards. In addition
this method will not work with cards which have more than one
DMA channel or if the driver number is bigger than 15. (Driver
numbers are defined in soundcard.h).
-------------------------------------------------------------------
NOTE2! This method to configure the sound driver is not normally
......@@ -42,6 +46,15 @@ NOTE2! This method to configure the sound driver is not normally
So THE METHOD PRESENTED IN THIS CHAPTER IS NORMALLY COMPLETELY
USELESS. DON'T USE IT UNLESS YOU HAVE A VERY SPECIAL REASON TO
DO THAT.
!!!!!!!!!!!!!!!!!!!! PLEASE NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Finding a working sound= command line is a difficult !!!
!!! and timeconsuming task. For this reason I will not !!!
!!! answer to messages asking about how to do it. So !!!
!!! please don't use this method if you have any problems !!!
!!! with it. !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------------
This version of the sound driver has capability to accept the configuration
......
Linux sound-driver module
(c) Peter Trattler
License: GPL (Gnu Public License)
Idea:
I've modified the sources for the sound driver to allow simply insert and
remove the sound driver from the kernel by calling (only available for Linux)
insmod /usr/src/linux/modules/sound.o
and
rmmod sound
This may be useful if you are doing one of the following things:
1) Debugging the sound driver
2) Creating a new device within the sound-driver
3) You do not the sound driver all the time (as it wastes quite a lot of
memory for its buffers)
Compilation:
Go to /usr/src/linux and make the following steps:
a) configure the sound driver: To do that call "make config" and enable the
sound-driver -- you will be asked different questions about your
sound-hardware (remember not to use a too big DMA-Buffer size; you
should use 16kB, if you have 16Bit devices, otherwise you can use 32kB)
b) disable the sound driver in the kernel: call make config again but answer
'N' to "Sound card support"
c) run "make modules"; the sound-driver sound.o should end up in
/usr/src/linux/modules
If memory is tight:
I've allocated at about 70kB for the sound-drivers internal tables. If this
is too much, 'insmod sound.o' will generate the following warning
...
use 'insmod memsize=xxxx'
...
You can only use this command, if you have (I think) at least
modules-1.1.87 or up. You can also switch debugging on by running the command
insmod sound.o debugmem=1
Files I changed:
I've only changed the files soundcard.c(most changes) and some changes within
the Makefile, sound_config.h and the Makefile in /usr/src/linux/drivers
Bugs:
a) As the kmalloc (..., GFP_DMA) caused some unexpected errors (I don't know if
it is my fault), I created some code, which is (by default) enabled by
#define KMALLOC_DMA_BROKEN 1 (within soundcard.c).
It trys to allocate a large enough region, so that the complete dma-buffer
can be occupied in this space. If it does not fit within this region it
doubles the size of it. But this can cause problems, if the sound-buffer is
too big (as kmalloc can only handle regions at up to circa 100kB).
So take care to use for 8Bit devices a sound-DMA-buffer of 32kB (maximum)
and for 16Bit devices a maximum of 16kB. Otherwise the allocation scheme
might fail.
b) Buffers allocated by the different sound devices via calls to kmalloc are
not freed, if the sound driver is removed again (these buffers tend to be
quite small -- so it does not harm a lot)
c) If there is not enough (kernel-) memory available, the installation of
the sound-driver fails. (This happens quite often, if you did not install the
driver right after booting -- [PS: I've only got 5MB of Ram, so this might
be the source for this problem])
Author:
Peter Trattler (peter@sbox.tu-graz.ac.at)
Building a loadable sound driver
================================
Loadable module support in version 3.5 of VoxWare is mostly rewritten since
the previous version (3.0.1). This means that some things have changed.
To compile the sound driver as a loadable module you have to perform
the following steps:
1) Install modules-1.2.8.tar.gz package (or later if available).
2a) Check that symbol remap_page_range is defined in linux/init/ksyms.c.
Insert a line containing "X(remap_page_range)," if required. The driver will
not load if this line is missing.
2b) Recompile kernel with soundcard support disabled.
3) Boot the new kernel.
4) cd to the sound driver source directory (this directory). It's no
longer required that the sound driver sources are installed in the
kernel source tree (linux/drivers/sound). When installing a separately
distributed sound driver you may install the sources for example to
/usr/src/sound.
5) Execute make in the sound driver source directory. Enter
configuration parameters as described in Readme.cards. Then just wait until
the driver is compiled OK.
6) Copy sound.o to the directory where insmod expects to find it.
("make install" copies it to /lib/modules/misc).
7) Use command "insmod sound" to load the driver.
8) The sound driver can be removed using command "rmmod sound".
Parameters accepted by the loadable sound driver
================================================
Setting DMA buffer size
-----------------------
The driver allocates a DMA buffer (or two for full duplex devices)
every time the audio device (/dev/dsp or /dev/audio) is opened
and frees it when the device is closed. Size of this buffer is defined
when the driver is configured (the last question). The buffer size
can be redefined when loading the driver if required (note that this is
an optional feature which is not normally required). The buffer size
is redefined by adding dma_pagesize= parameter to the insmod command line.
For example:
insmod sound dma_buffsize=32768
Minimum buffer size is 4096 and the maximum depends on the DMA channe.
For 8 bit channels (0 to 3) the limit is 64k and for 16 bit ones (5 to 7)
it's 128k. Driver selects a suitable buffer size automaticly in case
you try to spesify an invalid size.
Q: What is the right DMA buffer size?
A: It depends on the sampling rate, machine speed and the load of the system.
Large buffers are required on slow machines, when recording/playing CD-quality
audio or when there are other processes running on the same system. Also
recording to hard disk is likely to require large buffers.
Very small buffers are sufficient when you are just playing 8kHz audio files
on an empty P133 system. Using a 128k byffer just wastes 120k (or 250k)
of valuable physical RAM memory.
The right buffer sice can be easily found by making some experiments
with the dma_buffsize= parameter. I use usually 16k buffers on a DX4/100 system
and 64k on an old 386 system.
NOTE! DMA buffers are used only by /dev/audio# and /dev/dsp# devices.
Other device files don't use them but there are two exceptions:
GUS driver uses DMA buffers when loading samples to the card.
Ensoniq SoundScape driver uses them when doanloading the microcode
file (sndscape.co[012]) to the card. Using large buffers doesn't
increase performance in these cases.
Configuring device parameters when loading the driver
-----------------------------------------------------
The loadable version of the sound driver accepts now the same
sound= parameter that has been available in the LILO command line.
In this way it's possible to change I/O port, IRQ and DMA addresses
and to enable/disable various cards at load time. Normally
the driver uses the configuration parameters entered when compiling
and configuring the driver.
Look at Readme.linux for more info.
NOTE! This method is not normally required. You should use it only when
you have to use different configuration than normally. The sound=
command line parameter is error phrone and not recommended.
This diff is collapsed.
......@@ -37,7 +37,7 @@
*/
#ifdef GUSMAX_MIXER
#define MODE1_REC_DEVICES (SOUND_MASK_LINE | SOUND_MASK_MIC | \
SOUND_MASK_CD)
SOUND_MASK_CD|SOUND_MASK_IMIX)
#define MODE1_MIXER_DEVICES (SOUND_MASK_SYNTH | SOUND_MASK_MIC | \
SOUND_MASK_CD | \
......@@ -50,7 +50,7 @@
SOUND_MASK_PCM | SOUND_MASK_IMIX)
#else /* Generic mapping */
#define MODE1_REC_DEVICES (SOUND_MASK_LINE3 | SOUND_MASK_MIC | \
SOUND_MASK_LINE1)
SOUND_MASK_LINE1|SOUND_MASK_IMIX)
#define MODE1_MIXER_DEVICES (SOUND_MASK_LINE1 | SOUND_MASK_MIC | \
SOUND_MASK_LINE2 | \
......@@ -70,6 +70,14 @@ struct mixer_def {
unsigned int nbits:4;
};
static char mix_cvt[101] = {
0, 0,3,7,10,13,16,19,21,23,26,28,30,32,34,35,37,39,40,42,
43,45,46,47,49,50,51,52,53,55,56,57,58,59,60,61,62,63,64,65,
65,66,67,68,69,70,70,71,72,73,73,74,75,75,76,77,77,78,79,79,
80,81,81,82,82,83,84,84,85,85,86,86,87,87,88,88,89,89,90,90,
91,91,92,92,93,93,94,94,95,95,96,96,96,97,97,98,98,98,99,99,
100
};
typedef struct mixer_def mixer_ent;
......@@ -83,7 +91,7 @@ typedef struct mixer_def mixer_ent;
*/
#define MIX_ENT(name, reg_l, pola_l, pos_l, len_l, reg_r, pola_r, pos_r, len_r) \
{{reg_l, pola_l, pos_r, len_l}, {reg_r, pola_r, pos_r, len_r}}
{{reg_l, pola_l, pos_l, len_l}, {reg_r, pola_r, pos_r, len_r}}
mixer_ent mix_devices[32][2] = { /* As used in GUS MAX */
MIX_ENT(SOUND_MIXER_VOLUME, 0, 0, 0, 0, 0, 0, 0, 0),
......@@ -111,9 +119,9 @@ static unsigned short default_mixer_levels[SOUND_MIXER_NRDEVICES] =
0x3232, /* Bass */
0x3232, /* Treble */
0x4b4b, /* FM */
0x6464, /* PCM */
0x4040, /* PCM */
0x4b4b, /* PC Speaker */
0x4b4b, /* Ext Line */
0x2020, /* Ext Line */
0x1010, /* Mic */
0x4b4b, /* CD */
0x0000, /* Recording monitor */
......@@ -121,9 +129,9 @@ static unsigned short default_mixer_levels[SOUND_MIXER_NRDEVICES] =
0x4b4b, /* Recording level */
0x4b4b, /* Input gain */
0x4b4b, /* Output gain */
0x4b4b, /* Line1 */
0x4b4b, /* Line2 */
0x3232 /* Line3 (usually line in)*/
0x4040, /* Line1 */
0x4040, /* Line2 */
0x2020 /* Line3 (usually line in)*/
};
#define LEFT_CHN 0
......
......@@ -35,9 +35,10 @@ long
attach_adlib_card (long mem_start, struct address_info *hw_config)
{
if (opl3_detect (FM_MONO))
if (opl3_detect (hw_config->io_base, hw_config->osp))
{
mem_start = opl3_init (mem_start);
mem_start = opl3_init (mem_start, hw_config->io_base, hw_config->osp);
request_region (hw_config->io_base, 4, "OPL3/OPL2");
}
return mem_start;
}
......@@ -45,7 +46,20 @@ attach_adlib_card (long mem_start, struct address_info *hw_config)
int
probe_adlib (struct address_info *hw_config)
{
return opl3_detect (FM_MONO);
if (check_region (hw_config->io_base, 4))
{
printk ("\n\nopl3.c: I/O port %x already in use\n\n", hw_config->io_base);
return 0;
}
return opl3_detect (hw_config->io_base, hw_config->osp);
}
void
unload_adlib (struct address_info *hw_config)
{
release_region (hw_config->io_base, 4);
}
#endif
......@@ -30,10 +30,10 @@
* headers needed by this source.
*/
#include "sound_config.h"
/*
* all but ioport.h :)
*/
#include <linux/ioport.h>
#ifndef AEDSP16_BASE
#define EXCLUDE_AEDSP16
#endif
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_AEDSP16)
/*
......@@ -209,8 +209,7 @@
- Rearranged the code to let InitAEDSP16 be more general.
- Erased the REALLY_SLOW_IO. We don't need it. Erased the linux/io.h
inclusion too. We rely on os.h
- Used the INB and OUTB #defined in os.h instead of inb and outb.
- Corrected the code for GetCardName (DSP Copyright) to get a variable
- Used the to get a variable
len string (we are not sure about the len of Copyright string).
This works with any SB and compatible.
- Added the code to request_region at device init (should go in
......@@ -370,7 +369,7 @@ WaitForDataAvail (int port)
do
{
ret = INB (port + DSP_DATAVAIL);
ret = inb (port + DSP_DATAVAIL);
/*
* Wait for data available (bit 7 of ret == 1)
*/
......@@ -388,7 +387,7 @@ ReadData (int port)
{
if (WaitForDataAvail (port))
return -1;
return INB (port + DSP_READ);
return inb (port + DSP_READ);
}
static int
......@@ -403,9 +402,9 @@ ResetBoard (int port)
/*
* Reset DSP
*/
OUTB (1, (port + DSP_RESET));
outb (1, (port + DSP_RESET));
tenmicrosec ();
OUTB (0, (port + DSP_RESET));
outb (0, (port + DSP_RESET));
tenmicrosec ();
tenmicrosec ();
return CheckDSPOkay (port);
......@@ -419,13 +418,13 @@ WriteDSPCommand (int port, int cmd)
do
{
ret = INB (port + DSP_STATUS);
ret = inb (port + DSP_STATUS);
/*
* DSP ready to receive data if bit 7 of ret == 0
*/
if (!(ret & 0x80))
{
OUTB (cmd, port + DSP_COMMAND);
outb (cmd, port + DSP_COMMAND);
return 0;
}
}
......@@ -695,6 +694,7 @@ InitAEDSP16_SBPRO (struct address_info *hw_config)
portbase = hw_config->io_base;
irq = hw_config->irq;
dma = hw_config->dma;
if (InitAEDSP16 (INIT_SBPRO))
return -1;
......@@ -762,6 +762,7 @@ InitAEDSP16_MSS (struct address_info *hw_config)
*/
irq = hw_config->irq;
dma = hw_config->dma;
if (InitAEDSP16 (INIT_MSS))
return -1;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -33,30 +33,39 @@
#include "gus_hw.h"
void gusintr (INT_HANDLER_PARMS (irq, dummy));
void gusintr (int irq, struct pt_regs *dummy);
int gus_base, gus_irq, gus_dma;
extern int gus_wave_volume;
extern int gus_pcm_volume;
extern int have_gus_max;
sound_os_info *gus_osp;
long
attach_gus_card (long mem_start, struct address_info *hw_config)
{
int io_addr;
snd_set_irq_handler (hw_config->irq, gusintr, "Gravis Ultrasound");
gus_osp = hw_config->osp;
snd_set_irq_handler (hw_config->irq, gusintr, "Gravis Ultrasound", hw_config->osp);
if (gus_wave_detect (hw_config->io_base)) /*
* Try first the default
*/
{
mem_start = gus_wave_init (mem_start, hw_config->irq, hw_config->dma);
mem_start = gus_wave_init (mem_start, hw_config);
request_region (hw_config->io_base, 16, "GUS");
request_region (hw_config->io_base + 0x100, 12, "GUS"); /* 0x10c-> is MAX */
if (sound_alloc_dma (hw_config->dma, "GUS"))
printk ("gus_card.c: Can't allocate DMA channel\n");
if (hw_config->dma2 != -1 && hw_config->dma2 != hw_config->dma)
if (sound_alloc_dma (hw_config->dma2, "GUS(2)"))
printk ("gus_card.c: Can't allocate DMA channel2\n");
#ifndef EXCLUDE_MIDI
mem_start = gus_midi_init (mem_start);
#endif
#ifndef EXCLUDE_SEQUENCER
sound_timer_init (hw_config->io_base + 8);
#endif
return mem_start;
}
......@@ -73,13 +82,19 @@ attach_gus_card (long mem_start, struct address_info *hw_config)
*/
if (gus_wave_detect (io_addr))
{
hw_config->io_base = io_addr;
printk (" WARNING! GUS found at %x, config was %x ", io_addr, hw_config->io_base);
mem_start = gus_wave_init (mem_start, hw_config->irq, hw_config->dma);
mem_start = gus_wave_init (mem_start, hw_config);
request_region (io_addr, 16, "GUS");
request_region (io_addr + 0x100, 12, "GUS"); /* 0x10c-> is MAX */
if (sound_alloc_dma (hw_config->dma, "GUS"))
printk ("gus_card.c: Can't allocate DMA channel\n");
if (hw_config->dma2 != -1 && hw_config->dma2 != hw_config->dma)
if (sound_alloc_dma (hw_config->dma2, "GUS"))
printk ("gus_card.c: Can't allocate DMA channel2\n");
#ifndef EXCLUDE_MIDI
mem_start = gus_midi_init (mem_start);
#endif
#ifndef EXCLUDE_SEQUENCER
sound_timer_init (io_addr + 8);
#endif
return mem_start;
}
......@@ -96,8 +111,12 @@ probe_gus (struct address_info *hw_config)
{
int io_addr;
if (gus_wave_detect (hw_config->io_base))
return 1;
gus_osp = hw_config->osp;
if (!check_region (hw_config->io_base, 16))
if (!check_region (hw_config->io_base + 0x100, 16))
if (gus_wave_detect (hw_config->io_base))
return 1;
#ifndef EXCLUDE_GUS_IODETECT
......@@ -109,8 +128,13 @@ probe_gus (struct address_info *hw_config)
if (io_addr != hw_config->io_base) /*
* Already tested
*/
if (gus_wave_detect (io_addr))
return 1;
if (!check_region (io_addr, 16))
if (!check_region (io_addr + 0x100, 16))
if (gus_wave_detect (io_addr))
{
hw_config->io_base = io_addr;
return 1;
}
#endif
......@@ -118,22 +142,36 @@ probe_gus (struct address_info *hw_config)
}
void
gusintr (INT_HANDLER_PARMS (irq, dummy))
unload_gus (struct address_info *hw_config)
{
gus_wave_unload ();
release_region (hw_config->io_base, 16);
release_region (hw_config->io_base + 0x100, 12); /* 0x10c-> is MAX */
snd_release_irq (hw_config->irq);
sound_free_dma (hw_config->dma);
if (hw_config->dma2 != -1 && hw_config->dma2 != hw_config->dma)
sound_free_dma (hw_config->dma2);
}
void
gusintr (int irq, struct pt_regs *dummy)
{
unsigned char src;
extern int gus_timer_enabled;
#ifdef linux
sti ();
#endif
#ifndef EXCLUDE_GUSMAX
if (have_gus_max)
ad1848_interrupt (INT_HANDLER_CALL (irq));
ad1848_interrupt (irq, NULL);
#endif
while (1)
{
if (!(src = INB (u_IrqStatus)))
if (!(src = inb (u_IrqStatus)))
return;
if (src & DMA_TC_IRQ)
......@@ -151,7 +189,11 @@ gusintr (INT_HANDLER_PARMS (irq, dummy))
if (src & (GF1_TIMER1_IRQ | GF1_TIMER2_IRQ))
{
#ifndef EXCLUDE_SEQUENCER
sound_timer_interrupt ();
if (gus_timer_enabled)
sound_timer_interrupt ();
gus_write8 (0x45, 0); /* Ack IRQ */
gus_timer_command (4, 0x80); /* Reset IRQ flags */
#else
gus_write8 (0x45, 0); /* Stop timers */
#endif
......@@ -174,7 +216,7 @@ gusintr (INT_HANDLER_PARMS (irq, dummy))
int
probe_gus_db16 (struct address_info *hw_config)
{
return ad1848_detect (hw_config->io_base);
return ad1848_detect (hw_config->io_base, NULL, hw_config->osp);
}
long
......@@ -186,8 +228,18 @@ attach_gus_db16 (long mem_start, struct address_info *hw_config)
ad1848_init ("GUS 16 bit sampling", hw_config->io_base,
hw_config->irq,
hw_config->dma,
hw_config->dma);
hw_config->dma, 0,
hw_config->osp);
return mem_start;
}
void
unload_gus_db16 (struct address_info *hw_config)
{
ad1848_unload (hw_config->io_base,
hw_config->irq,
hw_config->dma,
hw_config->dma, 0);
}
#endif
This diff is collapsed.
......@@ -138,10 +138,10 @@ gus_linear_vol (int vol, int mainvol)
else if (mainvol >= 127)
mainvol = 127;
#else
mainvol = 128;
mainvol = 127;
#endif
return gus_linearvol[(((vol * mainvol) / 128) * mixer_mainvol) / 100];
return gus_linearvol[(((vol * mainvol) / 127) * mixer_mainvol) / 100];
}
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
int midi_synth_ioctl (int dev,
unsigned int cmd, unsigned int arg);
unsigned int cmd, ioctl_arg arg);
int midi_synth_kill_note (int dev, int channel, int note, int velocity);
int midi_synth_set_instr (int dev, int channel, int instr_no);
int midi_synth_start_note (int dev, int channel, int note, int volume);
......@@ -7,7 +7,7 @@ void midi_synth_reset (int dev);
int midi_synth_open (int dev, int mode);
void midi_synth_close (int dev);
void midi_synth_hw_control (int dev, unsigned char *event);
int midi_synth_load_patch (int dev, int format, snd_rw_buf * addr,
int midi_synth_load_patch (int dev, int format, const snd_rw_buf * addr,
int offs, int count, int pmgr_flag);
void midi_synth_panning (int dev, int channel, int pressure);
void midi_synth_aftertouch (int dev, int channel, int pressure);
......@@ -16,7 +16,7 @@ int midi_synth_patchmgr (int dev, struct patmgr_info *rec);
void midi_synth_bender (int dev, int chn, int value);
void midi_synth_setup_voice (int dev, int voice, int chn);
void do_midi_msg (int synthno, unsigned char *msg, int mlen);
int midi_synth_send_sysex(int dev, unsigned char *bytes,int len);
#ifndef _MIDI_SYNTH_C_
static struct synth_info std_synth_info =
......@@ -44,6 +44,7 @@ static struct synth_operations std_midi_synth =
midi_synth_patchmgr,
midi_synth_bender,
NULL, /* alloc_voice */
midi_synth_setup_voice
midi_synth_setup_voice,
midi_synth_send_sysex
};
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -18,8 +18,8 @@
#define DSP_CMD_DMAOFF 0xD4
#define IMODE_NONE 0
#define IMODE_OUTPUT 1
#define IMODE_INPUT 2
#define IMODE_OUTPUT PCM_ENABLE_OUTPUT
#define IMODE_INPUT PCM_ENABLE_INPUT
#define IMODE_INIT 3
#define IMODE_MIDI 4
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#define SOUND_VERSION_STRING "3.0.1-950812"
#define SOUND_VERSION_STRING "3.5-alpha1-951002"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -100,6 +100,7 @@ void release(struct task_struct * p)
free_page(p->kernel_stack_page);
current->cmin_flt += p->min_flt + p->cmin_flt;
current->cmaj_flt += p->maj_flt + p->cmaj_flt;
current->cnswap += p->nswap + p->cnswap;
kfree(p);
return;
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment