Commit b0d31909 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.41

parent 8603555a
VERSION = 2 VERSION = 2
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 40 SUBLEVEL = 41
ARCH := $(shell uname -m | sed s/i.86/i386/ | sed s/sun4u/sparc64/) ARCH := $(shell uname -m | sed s/i.86/i386/ | sed s/sun4u/sparc64/)
......
...@@ -374,7 +374,7 @@ isdn_net_stat_callback(int idx, int cmd) ...@@ -374,7 +374,7 @@ isdn_net_stat_callback(int idx, int cmd)
return 1; return 1;
} }
} }
if (clear_bit(0, (void *) &(p->dev.tbusy))) if (test_and_clear_bit(0, (void *) &(p->dev.tbusy)))
mark_bh(NET_BH); mark_bh(NET_BH);
} }
return 1; return 1;
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/malloc.h> #include <linux/malloc.h>
#include <linux/interrupt.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
......
...@@ -220,6 +220,7 @@ struct ppd *parport_register_device(struct parport *port, const char *name, ...@@ -220,6 +220,7 @@ struct ppd *parport_register_device(struct parport *port, const char *name,
tmp->preempt = pf; tmp->preempt = pf;
tmp->wakeup = kf; tmp->wakeup = kf;
tmp->private = handle; tmp->private = handle;
tmp->flags = flags;
tmp->irq_func = irq_func; tmp->irq_func = irq_func;
tmp->ctr = port->ctr; tmp->ctr = port->ctr;
tmp->ecr = port->ecr; tmp->ecr = port->ecr;
......
...@@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver. ...@@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver.
The driver is currently maintained by Kai M{kisara (email The driver is currently maintained by Kai M{kisara (email
Kai.Makisara@metla.fi) Kai.Makisara@metla.fi)
Last modified: Wed Jan 1 15:44:49 1997 by makisara@kai.makisara.fi Last modified: Tue May 27 22:29:24 1997 by makisara@home
BASICS BASICS
...@@ -159,6 +159,15 @@ where ...@@ -159,6 +159,15 @@ where
buffers is bounded also by the number of drives detected) buffers is bounded also by the number of drives detected)
MODULE PARAMETERS
The same parameters can be also set when the driver is loaded as a
module. The keywords are:
buffer_kbs=xxx the buffer size in kilobytes is set to xxx
write_threshold_kbs=xxx the write threshold in kilobytes set to xxx
max_buffers=xxx the maximum number of tape buffer set to xxx
IOCTLS IOCTLS
The tape is positioned and the drive parameters are set with ioctls The tape is positioned and the drive parameters are set with ioctls
...@@ -253,6 +262,7 @@ MTSETDRVBUFFER ...@@ -253,6 +262,7 @@ MTSETDRVBUFFER
the device dependent address. It is recommended to set the device dependent address. It is recommended to set
this flag unless there are tapes using the device this flag unless there are tapes using the device
dependent (from the old times) (global) dependent (from the old times) (global)
MT_ST_SYSV sets the SYSV sematics (mode)
MT_ST_DEBUGGING debugging (global; debugging must be MT_ST_DEBUGGING debugging (global; debugging must be
compiled into the driver) compiled into the driver)
MT_ST_SETBOOLEANS MT_ST_SETBOOLEANS
...@@ -272,6 +282,16 @@ MTSETDRVBUFFER ...@@ -272,6 +282,16 @@ MTSETDRVBUFFER
MT_ST_CLEAR_DEFAULT (0xfffff), the default will not be used MT_ST_CLEAR_DEFAULT (0xfffff), the default will not be used
any more. Otherwise the lower-most bits of the value contain any more. Otherwise the lower-most bits of the value contain
the new value of the parameter. the new value of the parameter.
MT_ST_SET_TIMEOUT
Set the normal timeout in seconds for this device. The
default is 900 seconds (15 minutes). The timeout should be
long enough for the retries done by the device while
reading/writing.
MT_ST_SET_LONG_TIMEOUT
Set the long timeout that is used for operations that are
known to take a long time. The default is 14000 seconds
(3.9 hours). For erase this value is further multiplied by
eight.
The following ioctl uses the structure mtpos: The following ioctl uses the structure mtpos:
MTIOCPOS Reads the current position from the drive. Uses MTIOCPOS Reads the current position from the drive. Uses
...@@ -331,3 +351,23 @@ within file can be obtained if ST_IN_FILE_POS is defined at compile ...@@ -331,3 +351,23 @@ within file can be obtained if ST_IN_FILE_POS is defined at compile
time or the MT_ST_CAN_BSR bit is set for the drive with an ioctl. time or the MT_ST_CAN_BSR bit is set for the drive with an ioctl.
(The driver always backs over a filemark crossed by read ahead if the (The driver always backs over a filemark crossed by read ahead if the
user does not request data that far.) user does not request data that far.)
DEBUGGING HINTS
To enable debugging messages, edit st.c and #define DEBUG 1. As seen
above, debugging can be switched off with an ioctl if debugging is
compiled into the driver. The debugging output is not not voluminuous.
If the tape seems to hang, I would be very interested to hear where
the driver is waiting. With the command 'ps -l' you can see the state
of the process using the tape. If the state is D, the process is
waiting for something. The field WCHAN tells where the driver is
waiting. If you have the current System.map in the correct place (in
/boot for the procps I use) or have updated /etc/psdatabase (for kmem
ps), ps writes the function name in the WCHAN field. If not, you have
to look up the function from System.map.
Note also that the timeouts are very long compared to most other
drivers. This means that the Linux driver may appear hung although the
real reason is that the tape firmware has got confused.
This diff is collapsed.
...@@ -20,6 +20,7 @@ typedef struct { ...@@ -20,6 +20,7 @@ typedef struct {
int writing; int writing;
int last_result; int last_result;
int last_result_fatal; int last_result_fatal;
Scsi_Cmnd *last_SCpnt;
unsigned char *b_data; unsigned char *b_data;
int orig_size; int orig_size;
unsigned char *orig_b_data; unsigned char *orig_b_data;
...@@ -78,6 +79,8 @@ typedef struct { ...@@ -78,6 +79,8 @@ typedef struct {
unsigned char scsi2_logical; unsigned char scsi2_logical;
unsigned char default_drvbuffer; /* 0xff = don't touch, value 3 bits */ unsigned char default_drvbuffer; /* 0xff = don't touch, value 3 bits */
int write_threshold; int write_threshold;
int timeout; /* timeout for normal commands */
int long_timeout; /* timeout for commands known to take long time*/
/* Mode characteristics */ /* Mode characteristics */
ST_mode modes[ST_NBR_MODES]; ST_mode modes[ST_NBR_MODES];
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Copyright 1995 Kai Makisara. Copyright 1995 Kai Makisara.
Last modified: Thu Dec 14 21:51:27 1995 by root@kai.makisara.fi Last modified: Tue May 27 22:29:15 1997 by makisara@home
*/ */
#ifndef _ST_OPTIONS_H #ifndef _ST_OPTIONS_H
...@@ -88,8 +88,14 @@ ...@@ -88,8 +88,14 @@
files and the file number status is retained. */ files and the file number status is retained. */
#define ST_FAST_MTEOM 0 #define ST_FAST_MTEOM 0
/* If ST_SCSI2LOGICAL is nonzero, the logical block addresses are used for
MTIOCPOS and MTSEEK by default. Vendor addresses are used if ST_SCSI2LOGICAL
is zero. */
#define ST_SCSI2LOGICAL 0
/* If ST_SYSV is non-zero, the tape behaves according to the SYS V semantics. /* If ST_SYSV is non-zero, the tape behaves according to the SYS V semantics.
The default is BSD semantics. */ The default is BSD semantics. */
#define ST_SYSV 0 #define ST_SYSV 0
#endif #endif
3.8-beta9 3.8a
0x030803 0x030804
Changelog for version 3.8-beta8 Changelog for version 3.8
------------------------------- --------------------------
Since 3.8-beta21
- Fixed all known bugs (I think).
Since 3.8-beta8
- Lot of fixes to audio playback code in dmabuf.c
Since 3.8-beta6 Since 3.8-beta6
- Fixed the famous Quake delay bug. - Fixed the famous Quake delay bug.
......
bool 'ProAudioSpectrum 16 support' CONFIG_PAS
bool '_TRUE_ Sound Blaster (SB, SBPro, SB16/32/64, ESS, Jazz16) support' CONFIG_SB
bool 'Generic OPL2/OPL3 FM synthesizer support' CONFIG_ADLIB
bool 'Gravis Ultrasound support' CONFIG_GUS
bool 'MPU-401 support (NOT for SB16)' CONFIG_MPU401
bool 'PSS (ECHO-ADI2111) support' CONFIG_PSS
bool '16 bit sampling option of GUS (_NOT_ GUS MAX)' CONFIG_GUS16
bool 'GUS MAX support' CONFIG_GUSMAX
bool 'Microsoft Sound System support' CONFIG_MSS
bool 'Ensoniq SoundScape support' CONFIG_SSCAPE
bool 'MediaTrix AudioTrix Pro support' CONFIG_TRIX
bool 'Support for MAD16 and/or Mozart based cards' CONFIG_MAD16
bool 'Support for Crystal CS4232 based (PnP) cards' CONFIG_CS4232
bool 'Support for Turtle Beach Wave Front (Maui, Tropez) synthesizers' CONFIG_MAUI
bool 'FM synthesizer (YM3812/OPL-3) support' CONFIG_YM3812
if [ "$CONFIG_AEDSP16" = "y" ]; then
hex 'I/O base for Audio Excel DSP 16 220 or 240' AEDSP16_BASE 220
fi
if [ "$CONFIG_SB" = "y" ]; then
hex 'I/O base for SB Check from manual of the card' SBC_BASE 220
fi
if [ "$CONFIG_SB" = "y" ]; then
int 'Sound Blaster IRQ Check from manual of the card' SBC_IRQ 7
fi
if [ "$CONFIG_SB" = "y" ]; then
int 'Sound Blaster DMA 0, 1 or 3' SBC_DMA 1
fi
if [ "$CONFIG_SB" = "y" ]; then
int 'Sound Blaster 16 bit DMA (SB16, Jazz16, SMW) 5, 6 or 7 (use 1 for 8 bit cards)' SB_DMA2 5
fi
if [ "$CONFIG_SB" = "y" ]; then
hex 'MPU401 I/O base of SB16, Jazz16 and ES1688 Check from manual of the card' SB_MPU_BASE 330
fi
if [ "$CONFIG_SB" = "y" ]; then
comment 'MPU401 IRQ is only required with Jazz16, SM Wave and ESS1688.'
fi
if [ "$CONFIG_SB" = "y" ]; then
comment 'Enter -1 to the following question if you have something else such as SB16/32.'
fi
if [ "$CONFIG_SB" = "y" ]; then
int 'SB MPU401 IRQ (Jazz16, SM Wave and ES1688) Check from manual of the card' SB_MPU_IRQ -1
fi
if [ "$CONFIG_PAS" = "y" ]; then
int 'PAS16 IRQ 3, 4, 5, 7, 9, 10, 11, 12, 14 or 15' PAS_IRQ 10
fi
if [ "$CONFIG_PAS" = "y" ]; then
int 'PAS16 DMA 0, 1, 3, 5, 6 or 7' PAS_DMA 3
fi
if [ "$CONFIG_GUS" = "y" ]; then
hex 'I/O base for GUS 210, 220, 230, 240, 250 or 260' GUS_BASE 220
fi
if [ "$CONFIG_GUS" = "y" ]; then
int 'GUS IRQ 3, 5, 7, 9, 11, 12 or 15' GUS_IRQ 15
fi
if [ "$CONFIG_GUS" = "y" ]; then
int 'GUS DMA 1, 3, 5, 6 or 7' GUS_DMA 6
fi
if [ "$CONFIG_GUS" = "y" ]; then
int 'Second DMA channel for GUS 1, 3, 5, 6 or 7' GUS_DMA2 -1
fi
if [ "$CONFIG_GUS16" = "y" ]; then
hex 'I/O base for the 16 bit daughtercard of GUS 530, 604, E80 or F40' GUS16_BASE 530
fi
if [ "$CONFIG_GUS16" = "y" ]; then
int 'GUS 16 bit daughtercard IRQ 3, 4, 5, 7, or 9' GUS16_IRQ 7
fi
if [ "$CONFIG_GUS16" = "y" ]; then
int 'GUS DMA 0, 1 or 3' GUS16_DMA 3
fi
if [ "$CONFIG_MPU401" = "y" ]; then
hex 'I/O base for MPU401 Check from manual of the card' MPU_BASE 330
fi
if [ "$CONFIG_MPU401" = "y" ]; then
int 'MPU401 IRQ Check from manual of the card' MPU_IRQ 9
fi
if [ "$CONFIG_MAUI" = "y" ]; then
comment 'ERROR! You have to use old sound configuration method with Maui.'
fi
if [ "$CONFIG_MAUI" = "y" ]; then
hex 'I/O base for Maui 210, 230, 260, 290, 300, 320, 338 or 330' MAUI_BASE 330
fi
if [ "$CONFIG_MAUI" = "y" ]; then
int 'Maui IRQ 5, 9, 12 or 15' MAUI_IRQ 9
fi
if [ "$CONFIG_UART6850" = "y" ]; then
hex 'I/O base for UART 6850 MIDI port (Unknown)' U6850_BASE 0
fi
if [ "$CONFIG_UART6850" = "y" ]; then
int 'UART6850 IRQ (Unknown)' U6850_IRQ -1
fi
if [ "$CONFIG_PSS" = "y" ]; then
comment 'ERROR! You have to use old sound configuration method with PSS cards.'
fi
if [ "$CONFIG_PSS" = "y" ]; then
hex 'PSS I/O base 220 or 240' PSS_BASE 220
fi
if [ "$CONFIG_PSS" = "y" ]; then
hex 'PSS audio I/O base 530, 604, E80 or F40' PSS_MSS_BASE 530
fi
if [ "$CONFIG_PSS" = "y" ]; then
int 'PSS audio IRQ 7, 9, 10 or 11' PSS_MSS_IRQ 11
fi
if [ "$CONFIG_PSS" = "y" ]; then
int 'PSS audio DMA 0, 1 or 3' PSS_MSS_DMA 3
fi
if [ "$CONFIG_PSS" = "y" ]; then
hex 'PSS MIDI I/O base ' PSS_MPU_BASE 330
fi
if [ "$CONFIG_PSS" = "y" ]; then
int 'PSS MIDI IRQ 3, 4, 5, 7 or 9' PSS_MPU_IRQ 9
fi
if [ "$CONFIG_MSS" = "y" ]; then
hex 'MSS/WSS I/O base 530, 604, E80 or F40' MSS_BASE 530
fi
if [ "$CONFIG_MSS" = "y" ]; then
int 'MSS/WSS IRQ 7, 9, 10 or 11' MSS_IRQ 11
fi
if [ "$CONFIG_MSS" = "y" ]; then
int 'MSS/WSS DMA 0, 1 or 3' MSS_DMA 3
fi
if [ "$CONFIG_MSS" = "y" ]; then
int 'MSS/WSS second DMA (if possible) 0, 1 or 3' MSS_DMA2 -1
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
hex 'SoundScape MIDI I/O base 320, 330, 340 or 350' SSCAPE_BASE 330
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
int 'SoundScape MIDI IRQ ' SSCAPE_IRQ 9
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
int 'SoundScape initialization DMA 0, 1 or 3' SSCAPE_DMA 3
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
hex 'SoundScape audio I/O base 534, 608, E84 or F44' SSCAPE_MSS_BASE 534
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
int 'SoundScape audio IRQ 7, 9, 10 or 11' SSCAPE_MSS_IRQ 11
fi
if [ "$CONFIG_TRIX" = "y" ]; then
comment 'ERROR! You have to use old sound configuration method with AudioTrix.'
fi
if [ "$CONFIG_TRIX" = "y" ]; then
hex 'AudioTrix audio I/O base 530, 604, E80 or F40' TRIX_BASE 530
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTrix audio IRQ 7, 9, 10 or 11' TRIX_IRQ 11
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTrix audio DMA 0, 1 or 3' TRIX_DMA 0
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTrix second (duplex) DMA 0, 1 or 3' TRIX_DMA2 3
fi
if [ "$CONFIG_TRIX" = "y" ]; then
hex 'AudioTrix MIDI I/O base 330, 370, 3B0 or 3F0' TRIX_MPU_BASE 330
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTrix MIDI IRQ 3, 4, 5, 7 or 9' TRIX_MPU_IRQ 9
fi
if [ "$CONFIG_TRIX" = "y" ]; then
hex 'AudioTrix SB I/O base 220, 210, 230, 240, 250, 260 or 270' TRIX_SB_BASE 220
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTrix SB IRQ 3, 4, 5 or 7' TRIX_SB_IRQ 7
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTrix SB DMA 1 or 3' TRIX_SB_DMA 1
fi
if [ "$CONFIG_CS4232" = "y" ]; then
hex 'CS4232 audio I/O base 530, 604, E80 or F40' CS4232_BASE 530
fi
if [ "$CONFIG_CS4232" = "y" ]; then
int 'CS4232 audio IRQ 5, 7, 9, 11, 12 or 15' CS4232_IRQ 11
fi
if [ "$CONFIG_CS4232" = "y" ]; then
int 'CS4232 audio DMA 0, 1 or 3' CS4232_DMA 0
fi
if [ "$CONFIG_CS4232" = "y" ]; then
int 'CS4232 second (duplex) DMA 0, 1 or 3' CS4232_DMA2 3
fi
if [ "$CONFIG_CS4232" = "y" ]; then
hex 'CS4232 MIDI I/O base 330, 370, 3B0 or 3F0' CS4232_MPU_BASE 330
fi
if [ "$CONFIG_CS4232" = "y" ]; then
int 'CS4232 MIDI IRQ 5, 7, 9, 11, 12 or 15' CS4232_MPU_IRQ 9
fi
if [ "$CONFIG_MAD16" = "y" ]; then
hex 'MAD16 audio I/O base 530, 604, E80 or F40' MAD16_BASE 530
fi
if [ "$CONFIG_MAD16" = "y" ]; then
int 'MAD16 audio IRQ 7, 9, 10 or 11' MAD16_IRQ 11
fi
if [ "$CONFIG_MAD16" = "y" ]; then
int 'MAD16 audio DMA 0, 1 or 3' MAD16_DMA 3
fi
if [ "$CONFIG_MAD16" = "y" ]; then
int 'MAD16 second (duplex) DMA 0, 1 or 3' MAD16_DMA2 0
fi
if [ "$CONFIG_MAD16" = "y" ]; then
hex 'MAD16 MIDI I/O base 300, 310, 320 or 330 (0 disables)' MAD16_MPU_BASE 330
fi
if [ "$CONFIG_MAD16" = "y" ]; then
int 'MAD16 MIDI IRQ 5, 7, 9 or 10' MAD16_MPU_IRQ 9
fi
# #
$MAKE -C drivers/sound kernelconfig || exit 1 # Sound driver configuration
#
#--------
# There is another confic script which is compatible with rest of
# the kernel. It can be activated by running 'make mkscript' in this
# directory. Please note that this is an _experimental_ feature which
# doesn't work with all cards (PSS, SM Wave, AudioTriX Pro, Maui).
#--------
#
$MAKE -C drivers/sound config || exit 1
bool 'Additional low level drivers' CONFIG_LOWLEVEL_SOUND bool 'Additional low level drivers' CONFIG_LOWLEVEL_SOUND
if [ "$CONFIG_LOWLEVEL_SOUND" = "y" ]; then if [ "$CONFIG_LOWLEVEL_SOUND" = "y" ]; then
...@@ -306,7 +44,7 @@ if [ "$CONFIG_LOWLEVEL_SOUND" = "y" ]; then ...@@ -306,7 +44,7 @@ if [ "$CONFIG_LOWLEVEL_SOUND" = "y" ]; then
fi fi
fi fi
if [ "$CONFIG_MIDI" = "y" ]; then if [ "$CONFIG_MPU401" = "y" ]; then
bool 'Audio Excel DSP 16 (MPU401 emulation)' CONFIG_AEDSP16_MPU401 bool 'Audio Excel DSP 16 (MPU401 emulation)' CONFIG_AEDSP16_MPU401
if [ "$CONFIG_AEDSP16_MPU401" = "y" ]; then if [ "$CONFIG_AEDSP16_MPU401" = "y" ]; then
comment 'Audio Excel DSP 16 [MPU-401]' comment 'Audio Excel DSP 16 [MPU-401]'
......
...@@ -44,7 +44,7 @@ if [ "$CONFIG_LOWLEVEL_SOUND" = "y" ]; then ...@@ -44,7 +44,7 @@ if [ "$CONFIG_LOWLEVEL_SOUND" = "y" ]; then
fi fi
fi fi
if [ "$CONFIG_MIDI" = "y" ]; then if [ "$CONFIG_MPU401" = "y" ]; then
bool 'Audio Excel DSP 16 (MPU401 emulation)' CONFIG_AEDSP16_MPU401 bool 'Audio Excel DSP 16 (MPU401 emulation)' CONFIG_AEDSP16_MPU401
if [ "$CONFIG_AEDSP16_MPU401" = "y" ]; then if [ "$CONFIG_AEDSP16_MPU401" = "y" ]; then
comment 'Audio Excel DSP 16 [MPU-401]' comment 'Audio Excel DSP 16 [MPU-401]'
......
...@@ -4,7 +4,33 @@ ...@@ -4,7 +4,33 @@
# parent makes. (hopefully) # parent makes. (hopefully)
# #
# #
#
#
ifeq ($(ARCH),m68k)
L_TARGET := sound.a
L_OBJS :=
M_OBJS :=
ifeq ($(CONFIG_DMASOUND),y)
L_OBJS += dmasound.o
else
ifeq ($(CONFIG_DMASOUND),m)
M_OBJS += dmasound.o
endif
endif
include $(TOPDIR)/Rules.make
clean:
rm -f core *.o *.a *.s
# dummy rule to keep 'make xconfig' happy
mkscript:
# More dummy targets for make [menu]config
mkscript:
kernelconfig:
else
.PHONY: dummy .PHONY: dummy
SUB_DIRS = lowlevel SUB_DIRS = lowlevel
VERSION = `head -1 .version` VERSION = `head -1 .version`
...@@ -36,6 +62,7 @@ build: ...@@ -36,6 +62,7 @@ build:
install: sound.o install: sound.o
cp sound.o $(MODULEDIR) cp sound.o $(MODULEDIR)
else
endif endif
.c.o: .c.o:
...@@ -161,3 +188,4 @@ ifeq (.depend,$(wildcard .depend)) ...@@ -161,3 +188,4 @@ ifeq (.depend,$(wildcard .depend))
include .depend include .depend
endif endif
endif endif
endif
OSS Lite version 3.8-beta release notes OSS Lite version 3.8 release notes
--------------------------------------- ----------------------------------
Most up to date information about this driver is available from Most up to date information about this driver is available from
http://www.4front-tech.com/ossfree or http://personal.eunet.fi/pp/voxware http://www.4front-tech.com/ossfree or http://personal.eunet.fi/pp/voxware
...@@ -16,10 +16,10 @@ Please check http://www.4front-tech.com/pguide for more info about programming ...@@ -16,10 +16,10 @@ Please check http://www.4front-tech.com/pguide for more info about programming
with OSS. with OSS.
==================================================== ====================================================
- THIS VERSION ____REQUIRES____ Linux 2.1.26 OR LATER. - THIS VERSION ____REQUIRES____ Linux 2.1.36 OR LATER.
==================================================== ====================================================
Packages "snd-util-3.7.tar.gz" and "snd-data-0.1.tar.Z" Packages "snd-util-3.8.tar.gz" and "snd-data-0.1.tar.Z"
contain useful utilities to be used with this driver. contain useful utilities to be used with this driver.
See http://www.4front-tech.com/ossfree/getting.html for See http://www.4front-tech.com/ossfree/getting.html for
download instructions. download instructions.
......
...@@ -43,8 +43,8 @@ IMPORTANT! This document covers only cards that were "known" when ...@@ -43,8 +43,8 @@ IMPORTANT! This document covers only cards that were "known" when
THE BIGGEST MISTAKE YOU CAN DO THE BIGGEST MISTAKES YOU CAN DO
============================== ===============================
1. Assuming that the card is Sound Blaster compatible when it's not. 1. Assuming that the card is Sound Blaster compatible when it's not.
-------------------------------------------------------------------- --------------------------------------------------------------------
...@@ -106,21 +106,24 @@ for PnP models of soudcards even you have managed to wake up the card properly. ...@@ -106,21 +106,24 @@ for PnP models of soudcards even you have managed to wake up the card properly.
Many PnP cards are simply too much different than their original non PnP Many PnP cards are simply too much different than their original non PnP
ancestors which are covered by this document. ancestors which are covered by this document.
Cards that are not (fully) supported by this driver Cards that are not (fully) supported by this driver
=================================================== ===================================================
See http://www.4front-tech.com/ossfree for information about soundcards See http://www.4front-tech.com/ossfree for information about soundcards
to be supported in future. to be supported in future.
How to use sound without recompiling kernel and/or sound driver How to use sound without recompiling kernel and/or sound driver
--------------------------------------------------------------- ===============================================================
There is commercial sound driver which should be released during Apr 96. There is commercial sound driver which should be released during Apr 96.
It comes in precompiled form and doesn't require recompiling of kernel. See It comes in precompiled form and doesn't require recompiling of kernel. See
http://www.4Front-tech.com/oss.html for more info. http://www.4Front-tech.com/oss.html for more info.
Configuring PnP cards Configuring PnP cards
--------------------- =====================
New versions of most soundcards use so called ISA PnP protocol for New versions of most soundcards use so called ISA PnP protocol for
soft configuring their I/O, IRQ, DMA and shared memory resources. soft configuring their I/O, IRQ, DMA and shared memory resources.
...@@ -170,8 +173,9 @@ See http://www.4front-tech.com/linux.html for more info. This is the way ...@@ -170,8 +173,9 @@ See http://www.4front-tech.com/linux.html for more info. This is the way
you probably like to do it if you don't waste hours of time in recompiling you probably like to do it if you don't waste hours of time in recompiling
kernel and the required tools. kernel and the required tools.
Read this before trying to configure the driver Read this before trying to configure the driver
----------------------------------------------- ===============================================
There are currently many cards that work with this driver. Some of the cards There are currently many cards that work with this driver. Some of the cards
have native support while others work since they emulate some other have native support while others work since they emulate some other
...@@ -196,12 +200,14 @@ Sound Blasters ...@@ -196,12 +200,14 @@ Sound Blasters
SB 1.0 to 2.0 SB 1.0 to 2.0
SB Pro SB Pro
SB 16 SB 16
SB32/AWE SB32/64/AWE
Configure SB32/AWE just like SB16. See lowlevel/README.awe Configure SB32/64/AWE just like SB16. See lowlevel/README.awe
for information about using the wave table synth. for information about using the wave table synth.
NOTE! AWE63/Gold and 16/32/AWE "PnP" cards need to be activated
using isapnptools before they work with OSS/Free.
SB16 compatible cards by other manufacturers than Creative. SB16 compatible cards by other manufacturers than Creative.
You have been fooled since there are _no_ SB16 compatible You have been fooled since there are _no_ SB16 compatible
cards on the market (Feb 96). It's likely that your card cards on the market (May 97). It's likely that your card
is compatible just with SB Pro but there is also a non-SB- is compatible just with SB Pro but there is also a non-SB-
compatible 16 bit mode. Usually it's MSS/WSS but it could also compatible 16 bit mode. Usually it's MSS/WSS but it could also
be a proprietary one like MV Jazz16 or ESS ES688. OPTi be a proprietary one like MV Jazz16 or ESS ES688. OPTi
...@@ -237,7 +243,7 @@ Gravis Ultrasound (GUS) ...@@ -237,7 +243,7 @@ Gravis Ultrasound (GUS)
GUS + the 16 bit option GUS + the 16 bit option
GUS MAX GUS MAX
GUS ACE (No MIDI port and audio recording) GUS ACE (No MIDI port and audio recording)
GUS PnP (in GUS MAX compatible mode) GUS PnP (with RAM)
MPU-401 and compatibles MPU-401 and compatibles
The driver works both with the full (intelligent mode) MPU-401 The driver works both with the full (intelligent mode) MPU-401
...@@ -267,10 +273,6 @@ Windows Sound System (MSS/WSS) ...@@ -267,10 +273,6 @@ Windows Sound System (MSS/WSS)
cause a conflict. So check if your card is listed in this file before cause a conflict. So check if your card is listed in this file before
enabling the MSS support. enabling the MSS support.
6850 UART MIDI
This UART chip is used in the MIDI interface of some (rare)
soundcards. It's supported by the driver in case you need it.
Yamaha FM synthesizers (OPL2, OPL3 (not OPL3-SA) and OPL4) Yamaha FM synthesizers (OPL2, OPL3 (not OPL3-SA) and OPL4)
Most soundcards have a FM synthesizer chip. The OPL2 is a 2 Most soundcards have a FM synthesizer chip. The OPL2 is a 2
operator chip used in the original AdLib card. Currently it's used operator chip used in the original AdLib card. Currently it's used
...@@ -321,7 +323,9 @@ Ensoniq SoundScape and compatibles ...@@ -321,7 +323,9 @@ Ensoniq SoundScape and compatibles
Several companies (including Ensoniq, Reveal and Spea) are selling Several companies (including Ensoniq, Reveal and Spea) are selling
cards based on this architecture. cards based on this architecture.
NOTE! The new PnP SoundScape is not supported yet. NOTE! The SoundScape PnP is not supported by OSS/Free. Ensoniq VIVO and
VIVO90 cards are not compatible with Soundscapes so the Soundscape driver
will not work with them. You may want to use OSS/Linux with these cards.
MAD16 and Mozart based cards MAD16 and Mozart based cards
The Mozart (OAK OTI-601), MAD16 (OPTi 82C928), MAD16 Pro (OPTi 82C929), The Mozart (OAK OTI-601), MAD16 (OPTi 82C928), MAD16 Pro (OPTi 82C929),
...@@ -332,20 +336,32 @@ MAD16 and Mozart based cards ...@@ -332,20 +336,32 @@ MAD16 and Mozart based cards
interface chip performs address decoding for the other chips. interface chip performs address decoding for the other chips.
NOTE! Tropez Plus is not MAD16 but CS4232 based. NOTE! Tropez Plus is not MAD16 but CS4232 based.
NOTE! MAD16 PnP cards (82C924, 82C925, 82C931) are not MAD16 compatible NOTE! MAD16 PnP cards (82C924, 82C925, 82C931) are not MAD16 compatible
in the PnP mode. You will have to use them in MAD16 mode after having in the PnP mode. You will have to use them in MSS mode after having
initialized them using isapnptools or DOS. initialized them using isapnptools or DOS. 82C931 probably requires
initialization using DOS/Windows (running isapnptools is not enough).
It's possible to use 82C931 with OSS/Free by jumpering it to non-PnP
mode (provided that the card has a jumper for this). In non-PnP mode
82C931 is compatible with 82C930 and should work with the MAD16 driver
(without need to use isapnptools or DOS to initialize it). All OPTi
chips are supported by OSS/Linux (both in PnP and non-PnP modes).
Audio Excel DSP16 Audio Excel DSP16
Support for this card was written by Riccardo Faccetti Support for this card was written by Riccardo Faccetti
(riccardo@cdc8g5.cdc.polimi.it). The AEDSP16 driver included in (riccardo@cdc8g5.cdc.polimi.it). The AEDSP16 driver included in
the lowlevel/ directory. To use it you should use the "new" config the lowlevel/ directory. To use it you should use the "new" config
script and to enable the "Additional low level drivers" option. script and to enable the "Additional low level drivers" option.
Crystal CS4232 and 4236 based cards such as AcerMagic S23, TB Tropez _Plus_ and
Crystal CS4232 and CS4236 based cards such as AcerMagic S23, TB Tropez _Plus_ and
many PC motherboards (Compaq, HP, Intel, ...) many PC motherboards (Compaq, HP, Intel, ...)
CS4232 is a PnP multimedia chip which contains a CS3231A codec, CS4232 is a PnP multimedia chip which contains a CS3231A codec,
SB and MPU401 emulations. There is support for OPL3 too. SB and MPU401 emulations. There is support for OPL3 too.
Unfortunately the MPU401 mode doesn't work (I don't know how to Unfortunately the MPU401 mode doesn't work (I don't know how to
initialize it). CS4236 is an enhanced (compatible) version of 4232. initialize it). CS4236 is an enhanced (compatible) version of CS4232.
NOTE! Don't ever try to use isapnptools with CS4232 since this just
freezes your machine (due to chip bugs). If you have problems in getting
CS4232 working you could try initializing it with DOS (CS4232C.EXE) and
then booting Linux using loadlin. CS4232C.EXE loads a secret firmware
patch which is not documented by Crystal.
Turtle Beach Maui and Tropez "classic" Turtle Beach Maui and Tropez "classic"
This driver version supports sample, patch and program loading commands This driver version supports sample, patch and program loading commands
...@@ -354,9 +370,13 @@ Turtle Beach Maui and Tropez "classic" ...@@ -354,9 +370,13 @@ Turtle Beach Maui and Tropez "classic"
the Tropez is based on the MAD16 chip (see above). the Tropez is based on the MAD16 chip (see above).
NOTE! You will have to use the "old" config script when configuring NOTE! You will have to use the "old" config script when configuring
Maui or Tropez. Maui or Tropez.
NOTE! Tropez Plus is different card than Tropez "classic" and will not
work fully in Linux. You can get audio features working by configuring
the card as a CS4232 based card (above).
Jumpers and software configuration Jumpers and software configuration
---------------------------------- ==================================
Some of the earliest soundcards were jumper configurable. You have to Some of the earliest soundcards were jumper configurable. You have to
configure the driver use I/O, IRQ and DMA settings configure the driver use I/O, IRQ and DMA settings
...@@ -388,8 +408,9 @@ how the card must be initialized. It cannot initialize unknown cards ...@@ -388,8 +408,9 @@ how the card must be initialized. It cannot initialize unknown cards
even if they are otherwise compatible with some other cards (like SB, even if they are otherwise compatible with some other cards (like SB,
MPU401 or Windows Sound System). MPU401 or Windows Sound System).
What if your card was not listed above? What if your card was not listed above?
--------------------------------------- =======================================
The first thing to do is to look at the major IC chips on the card. The first thing to do is to look at the major IC chips on the card.
Many of the latest soundcards are based on some standard chips. If you Many of the latest soundcards are based on some standard chips. If you
...@@ -518,8 +539,19 @@ select some options automatically as well. ...@@ -518,8 +539,19 @@ select some options automatically as well.
that doesn't really have a MPU401 could cause some trouble. If your that doesn't really have a MPU401 could cause some trouble. If your
card was in the list of supported cards (above), please look at card was in the list of supported cards (above), please look at
the card specific instructions later in this file. the card specific instructions later in this file.
In MOST cases this MPU401 driver should only be used with "true"
MIDI-only MPU401 professional cards. In most other cases there
is another way to get the MPU401 compatible interface of a
soundcard to work.
Support for the MPU401 compatible MIDI port of SB16, ESS1688
and MV Jazz16 cards is included in the SB driver. Use it instead
of this separate MPU401 driver with these cards. As well
Soundscape, PSS and Maui drivers include their own MPU401
options.
It's safe to answer 'y' if you have a true MPU401 MIDI interface It's safe to answer 'y' if you have a true MPU401 MIDI interface
card. card.
"6850 UART Midi support", "6850 UART Midi support",
- It's safe to answer 'n' to this question in all cases. The 6850 - It's safe to answer 'n' to this question in all cases. The 6850
UART interface is so rarely used. UART interface is so rarely used.
......
...@@ -72,171 +72,14 @@ Please check http://www.4front-tech.com/osslite for more info. ...@@ -72,171 +72,14 @@ Please check http://www.4front-tech.com/osslite for more info.
Hannu Savolainen Hannu Savolainen
hannu@voxware.pp.fi hannu@voxware.pp.fi
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NOTE!
Running the script enclosed below is usually not required. All known Linux
distributions build them automaticly during installation. You need to run
this script only if "ls /dev/sndstat" displays "No such file or directory".
In case of any other error message you should start looking for the reason
from somewhere else (see above).
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
----------------- cut here ------------------------------ ----------------- cut here ------------------------------
#!/bin/sh SURPRISE SURPRISE!!!
# *****************************************
# * NOTICE! The device file creation script that used to be here earlier is
# * obviously not here any more.
# * For security reasons read access to /dev/dsp* and /dev/audio* has been
# * disabled from other than root. Otherwise any user may be able to spy Why?
# * what is being talked about near the microphone.
# * This effectively disables audio recording by other than root. In case Because you do not need it. All Linux distributions have the
# * this capability is required, you should change AUDIOPERMS (below) to 666 device files properly created (yes they are) so you should not
# * before executing this script. try to run any scripts which create them.
# *****************************************
AUDIOPERMS=622
#
#
#
#
# Create the devices
#
# Mixer devices
#
if [ -e /dev/mixer ]; then
rm -f /dev/mixer
fi
if [ -e /dev/mixer0 ]; then
rm -f /dev/mixer0
fi
mknod -m 666 /dev/mixer0 c 14 0
ln -sf /dev/mixer0 /dev/mixer
if [ -e /dev/mixer1 ]; then
rm -f /dev/mixer1
fi
mknod -m 666 /dev/mixer1 c 14 16
# Sequencer (14, 1)
#
if [ -e /dev/sequencer ]; then
rm -f /dev/sequencer
fi
mknod -m 666 /dev/sequencer c 14 1
if [ -e /dev/patmgr0 ]; then
rm -f /dev/patmgr0
fi
mknod -m 666 /dev/patmgr0 c 14 17
if [ -e /dev/patmgr1 ]; then
rm -f /dev/patmgr1
fi
mknod -m 666 /dev/patmgr1 c 14 33
# music (14, 8)
#
if [ -e /dev/music ]; then
rm -f /dev/music
fi
mknod -m 666 /dev/music c 14 8
if [ -e /dev/sequencer2 ]; then
rm -f /dev/sequencer2
fi
ln -s /dev/music /dev/sequencer2
# Midi devices
#
if [ -e /dev/midi ]; then
rm -f /dev/midi # Old name. Don't use it
fi
if [ -e /dev/midi00 ]; then
rm -f /dev/midi00
fi
mknod -m 666 /dev/midi00 c 14 2
ln -sf /dev/midi00 /dev/midi
if [ -e /dev/midi01 ]; then
rm -f /dev/midi01
fi
mknod -m 666 /dev/midi01 c 14 18
if [ -e /dev/midi02 ]; then
rm -f /dev/midi02
fi
mknod -m 666 /dev/midi02 c 14 34
if [ -e /dev/midi03 ]; then
rm -f /dev/midi03
fi
mknod -m 666 /dev/midi03 c 14 50
#
# DSP (14, 3)
#
if [ -e /dev/dsp ]; then
rm -f /dev/dsp
fi
if [ -e /dev/dsp0 ]; then
rm -f /dev/dsp0
fi
mknod -m $AUDIOPERMS /dev/dsp0 c 14 3
ln -s /dev/dsp0 /dev/dsp
#
# DSPW (14, 5)
#
if [ -e /dev/dspW ]; then
rm -f /dev/dspW
fi
if [ -e /dev/dspW0 ]; then
rm -f /dev/dspW0
fi
mknod -m $AUDIOPERMS /dev/dspW0 c 14 5
ln -s /dev/dspW0 /dev/dspW
if [ -e /dev/dspW1 ]; then
rm -f /dev/dspW1
fi
mknod -m $AUDIOPERMS /dev/dspW1 c 14 37
#
# SPARC compatible /dev/audio (14, 4)
#
if [ -e /dev/audio ]; then
rm -f /dev/audio
fi
if [ -e /dev/audio0 ]; then
rm -f /dev/audio0
fi
mknod -m $AUDIOPERMS /dev/audio0 c 14 4
ln -s /dev/audio0 /dev/audio
#
# DSP1 (14, 19) /dev/dsp for the second soundcard.
# Also the SB emulation part of the
# PAS16 card.
#
if [ -e /dev/dsp1 ]; then
rm -f /dev/dsp1
fi
mknod -m $AUDIOPERMS /dev/dsp1 c 14 19
#
# SPARC audio1 (14, 20)
# /dev/audio for the second soundcard.
# Also the SB emulation part of the
# PAS16 card.
#
if [ -e /dev/audio1 ]; then
rm -f /dev/audio1
fi
mknod -m $AUDIOPERMS /dev/audio1 c 14 20
#
# /dev/sndstat (14,6) For debugging purposes
#
if [ -e /dev/sndstat ]; then
rm -f /dev/sndstat
fi
mknod -m 666 /dev/sndstat c 14 6
exit 0
Sound driver version v3.0 (and later)
-------------------------------------
All features of v2.90-2 should work as earlier. There could be some
omissions but they are unintentional. I started this version thread
after v2.3 so all features implemented before it are there.
New features
============
There are now two new device interfaces. The /dev/midi## is a raw
tty like interface to MIDI ports. There is a device file for each MIDI
port on your system. They are named (/dev/midi00 to /dev/midiNN).
The second addition is the /dev/music which is higher level interface
than the old /dev/sequencer. It's intended for writing device independent
applications like sequencers.
/dev/midi##
-----------
This interface should be useful for applications like MIDI sysex librarians.
There are (currently) no timing features so making music could be impossible.
There are as many /dev/midi## devices as there are MIDI ports in the system.
The /dev/midi00 is connected to the first one, /dev/midi01 to the second etc.
These devices work like tty devices in raw mode. Everything written to them is
sent out to the MIDI port. There is currently an extra delay of at most
1/100th of sec but it will be removed later.
The reading algorithm is little bit more complicated. There are two different
cases:
1) There is at least one byte in the input buffer.
The read returns as many bytes as it can without waiting for more bytes.
For example when a process reads 100 bytes and there are 10 bytes in the
buffer, the read returns just 10 bytes.
2) The input buffer is empty when the process calls read.
The read waits for the first byte and then continues as in case 1. By
default it waits infinitely but there is an ioctl for setting a timeout
for this. The ioctl(fd, SNDCTL_MIDI_PRETIME, &time) changes the timeout.
The time is given in 1/10th of seconds (10 means one second).
Other ioctl calls:
ioctl(fd, SNDCTL_MIDI_MPUMODE, &mode) is available for full MPU-401
compatible devices such as MPU-IPC-T, MQ PC Midi Card or MQX-32.
It's not available for the so called MPU UART ports of some soundcards
(PAS16, SB16 etc). By default the MIDI port is in UART mode after open.
If this ioctl is called with mode=1, the interface is put to the intelligent
(coprocessor) mode. NOTE! The MIDI port will be reset when this ioctl is called.
It could have some strange effects if not called immediately after open. This
call returns EINVAL if the midi port doesn't support the MPU-401 intelligent
mode.
ioctl(fd, SNDCTL_MIDI_MPUCMD, &cmdstruct) is valid only if the MIDI port
is put to the coprocessor mode using ioctl(SNDCTL_MIDI_MPUMODE). It's used to
send commands to a MPU-401 compatible MIDI cards. Please refer to the
MPU-401 Technical Reference Manual (or Music Quest Technical Reference
Manual) for descriptions of the commands.
The argument of SNDCTL_MIDI_MPUCOMMAND is of type mpu_command_rec. It
has the following fields:
typedef struct {
unsigned char cmd;
char nr_args, nr_returns;
unsigned char data[30];
} mpu_command_rec;
where:
cmd Contains the command number.
nr_args Number of arguments of the command.
MUST BE INITIALIZED BEFORE CALL
nr_returns Number of bytes returned by the command.
MUST BE INITIALIZED BEFORE CALL
data Buffer for the command arguments and returned
data.
Be extremely careful with the nr_args and nr_returns fields. They
must match the command. An incorrect value will put the card and
the driver out of sync. Refer to the MPU-401/MQX-32M documentation for further
details.
/dev/music (/dev/sequencer2)
----------------------------
This device file works much like the /dev/sequencer which has been present
since the beginning. The main differences are the following:
- /dev/sequencer makes the MIDI ports to look like the synth devices. In fact
the result is somewhere between the MIDI specification and the synth devices of
/dev/sequencer. Both kind of devices are accessed using the SEQ_START_NOTE()
like macros. The voice number parameters of the API macros have been redefined
to denote MIDI channels. This means that the driver allocates voices for
the channels automatically (this is a responsibility/right of an application
with /dev/sequencer). The result is that a SEQ_START_NOTE() macro has
similar effects for a synth channel than on a MIDI port. This kind of
solution provides better device independence than the /dev/sequencer. The
drawback is that the new interface doesn't permit so low level access to the
device as the /dev/sequencer does. An application developer must choose between
these two interfaces. I think the old /dev/sequencer is better for applications
like module players while the new one is better for making generic sequencer
programs.
- There are no separate MIDI devices with the /dev/sequencer2. The
ioctl(SNDCTL_SEQ_NRMIDIS) returns always zero. Instead the MIDI ports are
shown as synth devices. ioctl(SNDCTL_SEQ_NRSYNTHS) on /dev/sequencer2 will
return sum of internal synthesizers (GUS, OPL3) and MIDI ports in the systems.
- The new interface is used much like the ordinary /dev/sequencer. The
event format is new so you have to use the API macros defined in the
sys/soundcard.h. The interface is will probably change before the final 3.0
release but using the API macros should ensure compatibility in source level.
The new event format is not recognized by version 2.X so don't try to
distribute binaries compiled with soundcard.h of v3.X.
- The basic API usage is similar to the current one. There are some new
macros but the older ones should work as earlier. The most important
incompatibility is that the /dev/sequencer2 driver allocates voices itself.
The other one is that the application must send SEQ_START_TIMER() as its
first event. Otherwise the timer is not started and the application waits
infinitely.
There are several new features but I don't document them here. There are
some info in the soundcard.h (near the end). I have also included some
sample code in the directory v30. Full documentation will
appear in the Hacker's Guide later.
Don't hesitate to contact me in case you have questions or comments.
Hannu Savolainen
hannu@voxware.pp.fi
This diff is collapsed.
...@@ -48,10 +48,11 @@ ...@@ -48,10 +48,11 @@
SOUND_MASK_IGAIN | SOUND_MASK_PCM) SOUND_MASK_IGAIN | SOUND_MASK_PCM)
struct mixer_def { struct mixer_def {
unsigned int regno: 7; unsigned int regno: 5;
unsigned int polarity:1; /* 0=normal, 1=reversed */ unsigned int polarity:1; /* 0=normal, 1=reversed */
unsigned int bitpos:4; unsigned int bitpos:3;
unsigned int nbits:4; unsigned int nbits:3;
unsigned int mutepos:4;
}; };
static char mix_cvt[101] = { static char mix_cvt[101] = {
...@@ -75,47 +76,47 @@ typedef mixer_ent mixer_ents[2]; ...@@ -75,47 +76,47 @@ typedef mixer_ent mixer_ents[2];
* The current version doesn't try to compensate this. * The current version doesn't try to compensate this.
*/ */
#define MIX_ENT(name, reg_l, pola_l, pos_l, len_l, reg_r, pola_r, pos_r, len_r) \ #define MIX_ENT(name, reg_l, pola_l, pos_l, len_l, reg_r, pola_r, pos_r, len_r, mute_bit) \
{{reg_l, pola_l, pos_l, 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, mute_bit}}
static mixer_ents ad1848_mix_devices[32] = { static mixer_ents ad1848_mix_devices[32] = {
MIX_ENT(SOUND_MIXER_VOLUME, 27, 1, 0, 4, 29, 1, 0, 4), MIX_ENT(SOUND_MIXER_VOLUME, 27, 1, 0, 4, 29, 1, 0, 4, 8),
MIX_ENT(SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5), MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6), MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6, 7),
MIX_ENT(SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5), MIX_ENT(SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1), MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1, 8),
MIX_ENT(SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5), MIX_ENT(SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_IMIX, 13, 1, 2, 6, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_IMIX, 13, 1, 2, 6, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4), MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4, 8),
MIX_ENT(SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_LINE1, 2, 1, 0, 5, 3, 1, 0, 5), MIX_ENT(SOUND_MIXER_LINE1, 2, 1, 0, 5, 3, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_LINE2, 4, 1, 0, 5, 5, 1, 0, 5), MIX_ENT(SOUND_MIXER_LINE2, 4, 1, 0, 5, 5, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_LINE3, 18, 1, 0, 5, 19, 1, 0, 5) MIX_ENT(SOUND_MIXER_LINE3, 18, 1, 0, 5, 19, 1, 0, 5, 7)
}; };
static mixer_ents iwave_mix_devices[32] = { static mixer_ents iwave_mix_devices[32] = {
MIX_ENT(SOUND_MIXER_VOLUME, 25, 1, 0, 5, 27, 1, 0, 5), MIX_ENT(SOUND_MIXER_VOLUME, 25, 1, 0, 5, 27, 1, 0, 5, 8),
MIX_ENT(SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5), MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6), MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6, 7),
MIX_ENT(SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5), MIX_ENT(SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1), MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1, 8),
MIX_ENT(SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5), MIX_ENT(SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_IMIX, 16, 1, 0, 5, 17, 1, 0, 5), MIX_ENT(SOUND_MIXER_IMIX, 16, 1, 0, 5, 17, 1, 0, 5, 8),
MIX_ENT(SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4), MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4, 8),
MIX_ENT(SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_LINE1, 2, 1, 0, 5, 3, 1, 0, 5), MIX_ENT(SOUND_MIXER_LINE1, 2, 1, 0, 5, 3, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_LINE2, 4, 1, 0, 5, 5, 1, 0, 5), MIX_ENT(SOUND_MIXER_LINE2, 4, 1, 0, 5, 5, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_LINE3, 18, 1, 0, 5, 19, 1, 0, 5) MIX_ENT(SOUND_MIXER_LINE3, 18, 1, 0, 5, 19, 1, 0, 5, 7)
}; };
/* OPTi 82C930 has somewhat different port addresses. /* OPTi 82C930 has somewhat different port addresses.
...@@ -124,23 +125,23 @@ MIX_ENT(SOUND_MIXER_LINE3, 18, 1, 0, 5, 19, 1, 0, 5) ...@@ -124,23 +125,23 @@ MIX_ENT(SOUND_MIXER_LINE3, 18, 1, 0, 5, 19, 1, 0, 5)
* MIC is level of mic monitoring direct to output. Same for CD, LINE, etc. * MIC is level of mic monitoring direct to output. Same for CD, LINE, etc.
*/ */
static mixer_ents c930_mix_devices[32] = { static mixer_ents c930_mix_devices[32] = {
MIX_ENT(SOUND_MIXER_VOLUME, 22, 1, 0, 5, 23, 1, 0, 5), MIX_ENT(SOUND_MIXER_VOLUME, 22, 1, 0, 5, 23, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5), MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5, 7),
MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6), MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6, 7),
MIX_ENT(SOUND_MIXER_SPEAKER, 22, 1, 0, 5, 23, 1, 0, 5), MIX_ENT(SOUND_MIXER_SPEAKER, 22, 1, 0, 5, 23, 1, 0, 5, 8),
MIX_ENT(SOUND_MIXER_LINE, 18, 1, 1, 4, 19, 1, 1, 4), MIX_ENT(SOUND_MIXER_LINE, 18, 1, 1, 4, 19, 1, 1, 4, 7),
MIX_ENT(SOUND_MIXER_MIC, 20, 1, 0, 4, 21, 1, 0, 4), MIX_ENT(SOUND_MIXER_MIC, 20, 1, 0, 4, 21, 1, 0, 4, 8),
MIX_ENT(SOUND_MIXER_CD, 2, 1, 1, 4, 3, 1, 1, 4), MIX_ENT(SOUND_MIXER_CD, 2, 1, 1, 4, 3, 1, 1, 4, 7),
MIX_ENT(SOUND_MIXER_IMIX, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_IMIX, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4), MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4, 8),
MIX_ENT(SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0), MIX_ENT(SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0, 8),
MIX_ENT(SOUND_MIXER_LINE1, 2, 1, 1, 4, 3, 1, 1, 4), MIX_ENT(SOUND_MIXER_LINE1, 2, 1, 1, 4, 3, 1, 1, 4, 7),
MIX_ENT(SOUND_MIXER_LINE2, 4, 1, 1, 4, 5, 1, 1, 4), MIX_ENT(SOUND_MIXER_LINE2, 4, 1, 1, 4, 5, 1, 1, 4, 7),
MIX_ENT(SOUND_MIXER_LINE3, 18, 1, 1, 4, 19, 1, 1, 4) MIX_ENT(SOUND_MIXER_LINE3, 18, 1, 1, 4, 19, 1, 1, 4, 7)
}; };
static int default_mixer_levels[32] = static int default_mixer_levels[32] =
...@@ -155,12 +156,12 @@ static int default_mixer_levels[32] = ...@@ -155,12 +156,12 @@ static int default_mixer_levels[32] =
0x1010, /* Mic */ 0x1010, /* Mic */
0x4b4b, /* CD */ 0x4b4b, /* CD */
0x0000, /* Recording monitor */ 0x0000, /* Recording monitor */
0x4b4b, /* SB PCM */ 0x4b4b, /* Second PCM */
0x4b4b, /* Recording level */ 0x4b4b, /* Recording level */
0x4b4b, /* Input gain */ 0x4b4b, /* Input gain */
0x4b4b, /* Output gain */ 0x4b4b, /* Output gain */
0x4040, /* Line1 */ 0x2020, /* Line1 */
0x4040, /* Line2 */ 0x2020, /* Line2 */
0x1515 /* Line3 (usually line in)*/ 0x1515 /* Line3 (usually line in)*/
}; };
......
This diff is collapsed.
...@@ -145,7 +145,7 @@ hw_entry hw_table[] = ...@@ -145,7 +145,7 @@ hw_entry hw_table[] =
char *questions[] = char *questions[] =
{ {
"ProAudioSpectrum 16 support", "ProAudioSpectrum 16 support",
"_TRUE_ Sound Blaster (SB, SBPro, SB16/32/64, ESS, Jazz16) support", "100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support",
"Generic OPL2/OPL3 FM synthesizer support", "Generic OPL2/OPL3 FM synthesizer support",
"Gravis Ultrasound support", "Gravis Ultrasound support",
"MPU-401 support (NOT for SB16)", "MPU-401 support (NOT for SB16)",
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#define _DEV_TABLE_C_ #define _DEV_TABLE_C_
#include "sound_config.h" #include "sound_config.h"
int sb_be_quiet = 0;
int sound_started = 0; int sound_started = 0;
...@@ -43,20 +44,15 @@ start_services (void) ...@@ -43,20 +44,15 @@ start_services (void)
#ifdef CONFIG_AUDIO #ifdef CONFIG_AUDIO
if (num_audiodevs) /* Audio devices present */ if (num_audiodevs) /* Audio devices present */
{ {
DMAbuf_init (); int dev;
for (dev = 0; dev < num_audiodevs; dev++)
{
}
audio_init_devices (); audio_init_devices ();
} }
#endif #endif
#ifdef CONFIG_MIDI
if (num_midis)
MIDIbuf_init ();
#endif
#ifdef CONFIG_SEQUENCER
if (num_midis + num_synths)
sequencer_init ();
#endif
return; return;
} }
...@@ -493,17 +489,11 @@ sound_install_audiodrv (int vers, ...@@ -493,17 +489,11 @@ sound_install_audiodrv (int vers,
/* /*
* Hardcoded defaults * Hardcoded defaults
*/ */
op->buffsize = DSP_BUFFSIZE;
audio_devs[num_audiodevs] = op; audio_devs[num_audiodevs] = op;
num = num_audiodevs++; num = num_audiodevs++;
DMAbuf_init (); DMAbuf_init (num, dma1, dma2);
op->dmap_out->dma = dma1;
op->dmap_in->dma = dma2;
DMAbuf_init ();
audio_init_devices (); audio_init_devices ();
return num; return num;
#else #else
......
...@@ -70,6 +70,7 @@ struct dma_buffparms { ...@@ -70,6 +70,7 @@ struct dma_buffparms {
char *raw_buf; char *raw_buf;
unsigned long raw_buf_phys; unsigned long raw_buf_phys;
int buffsize;
/* /*
* Device state tables * Device state tables
...@@ -85,6 +86,8 @@ struct dma_buffparms { ...@@ -85,6 +86,8 @@ struct dma_buffparms {
#define DMA_SYNCING 0x00000040 #define DMA_SYNCING 0x00000040
#define DMA_DIRTY 0x00000080 #define DMA_DIRTY 0x00000080
#define DMA_POST 0x00000100 #define DMA_POST 0x00000100
#define DMA_NODMA 0x00000200
#define DMA_NOTIMEOUT 0x00000400
int open_mode; int open_mode;
...@@ -109,6 +112,7 @@ struct dma_buffparms { ...@@ -109,6 +112,7 @@ struct dma_buffparms {
int underrun_count; int underrun_count;
unsigned long byte_counter; unsigned long byte_counter;
unsigned long user_counter; unsigned long user_counter;
unsigned long max_byte_counter;
int data_rate; /* Bytes/second */ int data_rate; /* Bytes/second */
int mapping_flags; int mapping_flags;
...@@ -120,6 +124,9 @@ struct dma_buffparms { ...@@ -120,6 +124,9 @@ struct dma_buffparms {
OS_DMA_PARMS OS_DMA_PARMS
#endif #endif
int applic_profile; /* Application profile (APF_*) */ int applic_profile; /* Application profile (APF_*) */
int buf_flags[MAX_SUB_BUFFERS];
#define BUFF_EOF 0x00000001 /* Increment eof count */
#define BUFF_DIRTY 0x00000002 /* Buffer written */
}; };
/* /*
...@@ -156,6 +163,8 @@ struct audio_driver { ...@@ -156,6 +163,8 @@ struct audio_driver {
int (*set_speed)(int dev, int speed); int (*set_speed)(int dev, int speed);
unsigned int (*set_bits)(int dev, unsigned int bits); unsigned int (*set_bits)(int dev, unsigned int bits);
short (*set_channels)(int dev, short channels); short (*set_channels)(int dev, short channels);
void (*postprocess_write)(int dev); /* Device spesific postprocessing for written data */
void (*preprocess_read)(int dev); /* Device spesific preprocessing for read data */
}; };
struct audio_operations { struct audio_operations {
...@@ -167,13 +176,12 @@ struct audio_operations { ...@@ -167,13 +176,12 @@ struct audio_operations {
#define DMA_DUPLEX 0x04 #define DMA_DUPLEX 0x04
#define DMA_PSEUDO_AUTOMODE 0x08 #define DMA_PSEUDO_AUTOMODE 0x08
#define DMA_HARDSTOP 0x10 #define DMA_HARDSTOP 0x10
#define DMA_NODMA 0x20
#define DMA_EXACT 0x40 #define DMA_EXACT 0x40
#define DMA_NORESET 0x80
int format_mask; /* Bitmask for supported audio formats */ int format_mask; /* Bitmask for supported audio formats */
void *devc; /* Driver specific info */ void *devc; /* Driver specific info */
struct audio_driver *d; struct audio_driver *d;
void *portc; /* Driver spesific info */ void *portc; /* Driver spesific info */
long buffsize;
struct dma_buffparms *dmap_in, *dmap_out; struct dma_buffparms *dmap_in, *dmap_out;
struct coproc_operations *coproc; struct coproc_operations *coproc;
int mixer_dev; int mixer_dev;
...@@ -181,6 +189,7 @@ struct audio_operations { ...@@ -181,6 +189,7 @@ struct audio_operations {
int open_mode; int open_mode;
int go; int go;
int min_fragment; /* 0 == unlimited */ int min_fragment; /* 0 == unlimited */
int max_fragment; /* 0 == unlimited */
int parent_dev; /* 0 -> no parent, 1 to n -> parent=parent_dev+1 */ int parent_dev; /* 0 -> no parent, 1 to n -> parent=parent_dev+1 */
}; };
...@@ -292,7 +301,7 @@ struct sound_timer_operations { ...@@ -292,7 +301,7 @@ struct sound_timer_operations {
struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV] = {NULL}; int num_synths = 0; struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV] = {NULL}; int num_synths = 0;
struct midi_operations *midi_devs[MAX_MIDI_DEV] = {NULL}; int num_midis = 0; struct midi_operations *midi_devs[MAX_MIDI_DEV] = {NULL}; int num_midis = 0;
#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS) #if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS) && !defined(VMIDI)
extern struct sound_timer_operations default_sound_timer; extern struct sound_timer_operations default_sound_timer;
struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] =
{&default_sound_timer, NULL}; {&default_sound_timer, NULL};
...@@ -313,6 +322,15 @@ struct sound_timer_operations { ...@@ -313,6 +322,15 @@ struct sound_timer_operations {
{"PSSMPU", 0, SNDCARD_PSS_MPU, "PSS-MPU", attach_pss_mpu, probe_pss_mpu, unload_pss_mpu}, {"PSSMPU", 0, SNDCARD_PSS_MPU, "PSS-MPU", attach_pss_mpu, probe_pss_mpu, unload_pss_mpu},
{"PSSMSS", 0, SNDCARD_PSS_MSS, "PSS-MSS", attach_pss_mss, probe_pss_mss, unload_pss_mss}, {"PSSMSS", 0, SNDCARD_PSS_MSS, "PSS-MSS", attach_pss_mss, probe_pss_mss, unload_pss_mss},
#endif #endif
#ifdef CONFIG_GUS16
{"GUS16", 0, SNDCARD_GUS16, "Ultrasound 16-bit opt.", attach_gus_db16, probe_gus_db16, unload_gus_db16},
#endif
#ifdef CONFIG_GUSHW
{"GUS", 0, SNDCARD_GUS, "Gravis Ultrasound", attach_gus_card, probe_gus, unload_gus},
{"GUSPNP", 1, SNDCARD_GUSPNP, "GUS PnP", attach_gus_card, probe_gus, unload_gus},
#endif
#ifdef CONFIG_MSS #ifdef CONFIG_MSS
{"MSS", 0, SNDCARD_MSS, "MS Sound System", attach_ms_sound, probe_ms_sound, unload_ms_sound}, {"MSS", 0, SNDCARD_MSS, "MS Sound System", attach_ms_sound, probe_ms_sound, unload_ms_sound},
/* Compaq Deskpro XL */ /* Compaq Deskpro XL */
...@@ -358,15 +376,6 @@ struct sound_timer_operations { ...@@ -358,15 +376,6 @@ struct sound_timer_operations {
# endif # endif
#endif #endif
#ifdef CONFIG_GUS16
{"GUS16", 0, SNDCARD_GUS16, "Ultrasound 16-bit opt.", attach_gus_db16, probe_gus_db16, unload_gus_db16},
#endif
#ifdef CONFIG_GUSHW
{"GUS", 0, SNDCARD_GUS, "Gravis Ultrasound", attach_gus_card, probe_gus, unload_gus},
{"GUSPNP", 1, SNDCARD_GUSPNP, "GUS PnP", attach_gus_card, probe_gus, unload_gus},
#endif
#ifdef CONFIG_SSCAPEHW #ifdef CONFIG_SSCAPEHW
{"SSCAPE", 0, SNDCARD_SSCAPE, "Ensoniq SoundScape", attach_sscape, probe_sscape, unload_sscape}, {"SSCAPE", 0, SNDCARD_SSCAPE, "Ensoniq SoundScape", attach_sscape, probe_sscape, unload_sscape},
{"SSCAPEMSS", 0, SNDCARD_SSCAPE_MSS, "MS Sound System (SoundScape)", attach_ss_ms_sound, probe_ss_ms_sound, unload_ss_ms_sound}, {"SSCAPEMSS", 0, SNDCARD_SSCAPE_MSS, "MS Sound System (SoundScape)", attach_ss_ms_sound, probe_ss_ms_sound, unload_ss_ms_sound},
...@@ -377,6 +386,10 @@ struct sound_timer_operations { ...@@ -377,6 +386,10 @@ struct sound_timer_operations {
{"TRXPROMPU", 0, SNDCARD_TRXPRO_MPU, "AudioTrix MIDI", attach_trix_mpu, probe_trix_mpu, unload_trix_mpu}, {"TRXPROMPU", 0, SNDCARD_TRXPRO_MPU, "AudioTrix MIDI", attach_trix_mpu, probe_trix_mpu, unload_trix_mpu},
#endif #endif
{NULL, 0, 0, "*?*", NULL, NULL, NULL} {NULL, 0, 0, "*?*", NULL, NULL, NULL}
}; };
...@@ -439,6 +452,10 @@ struct sound_timer_operations { ...@@ -439,6 +452,10 @@ struct sound_timer_operations {
#ifdef CONFIG_MSS #ifdef CONFIG_MSS
# ifndef MSS_DMA2
# define MSS_DMA2 -1
# endif
# ifdef DESKPROXL # ifdef DESKPROXL
{SNDCARD_DESKPROXL, {MSS_BASE, MSS_IRQ, MSS_DMA, MSS_DMA2}, SND_DEFAULT_ENABLE}, {SNDCARD_DESKPROXL, {MSS_BASE, MSS_IRQ, MSS_DMA, MSS_DMA2}, SND_DEFAULT_ENABLE},
# else # else
......
This diff is collapsed.
This diff is collapsed.
/* linux/drivers/sound/dmasound.h */
/*
* Minor numbers for the sound driver.
*
* Unfortunately Creative called the codec chip of SB as a DSP. For this
* reason the /dev/dsp is reserved for digitized audio use. There is a
* device for true DSP processors but it will be called something else.
* In v3.0 it's /dev/sndproc but this could be a temporary solution.
*/
#define SND_NDEVS 256 /* Number of supported devices */
#define SND_DEV_CTL 0 /* Control port /dev/mixer */
#define SND_DEV_SEQ 1 /* Sequencer output /dev/sequencer (FM
synthesizer and MIDI output) */
#define SND_DEV_MIDIN 2 /* Raw midi access */
#define SND_DEV_DSP 3 /* Digitized voice /dev/dsp */
#define SND_DEV_AUDIO 4 /* Sparc compatible /dev/audio */
#define SND_DEV_DSP16 5 /* Like /dev/dsp but 16 bits/sample */
#define SND_DEV_STATUS 6 /* /dev/sndstat */
/* #7 not in use now. Was in 2.4. Free for use after v3.0. */
#define SND_DEV_SEQ2 8 /* /dev/sequencer, level 2 interface */
#define SND_DEV_SNDPROC 9 /* /dev/sndproc for programmable devices */
#define SND_DEV_PSS SND_DEV_SNDPROC
#define DSP_DEFAULT_SPEED 8000
#define ON 1
#define OFF 0
#define MAX_AUDIO_DEV 5
#define MAX_MIXER_DEV 2
#define MAX_SYNTH_DEV 3
#define MAX_MIDI_DEV 6
#define MAX_TIMER_DEV 3
...@@ -123,7 +123,7 @@ gusintr (int irq, void *dev_id, struct pt_regs *dummy) ...@@ -123,7 +123,7 @@ gusintr (int irq, void *dev_id, struct pt_regs *dummy)
#ifdef CONFIG_GUSMAX #ifdef CONFIG_GUSMAX
if (have_gus_max) if (have_gus_max)
ad1848_interrupt (irq, NULL, NULL); adintr (irq, NULL, NULL);
#endif #endif
while (1) while (1)
......
...@@ -248,6 +248,7 @@ gus_midi_init (void) ...@@ -248,6 +248,7 @@ gus_midi_init (void)
std_midi_synth.midi_dev = my_dev = num_midis; std_midi_synth.midi_dev = my_dev = num_midis;
midi_devs[num_midis++] = &gus_midi_operations; midi_devs[num_midis++] = &gus_midi_operations;
sequencer_init ();
return; return;
} }
......
This diff is collapsed.
...@@ -32,7 +32,7 @@ if [ "$CONFIG_LOWLEVEL_SOUND" = "y" ]; then ...@@ -32,7 +32,7 @@ if [ "$CONFIG_LOWLEVEL_SOUND" = "y" ]; then
fi fi
fi fi
if [ "$CONFIG_MIDI" = "y" ]; then if [ "$CONFIG_MPU401" = "y" ]; then
bool 'Audio Excel DSP 16 (MPU401 emulation)' CONFIG_AEDSP16_MPU401 bool 'Audio Excel DSP 16 (MPU401 emulation)' CONFIG_AEDSP16_MPU401
if [ "$CONFIG_AEDSP16_MPU401" = "y" ]; then if [ "$CONFIG_AEDSP16_MPU401" = "y" ]; then
comment 'Audio Excel DSP 16 [MPU-401]' comment 'Audio Excel DSP 16 [MPU-401]'
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
* First version written. * First version written.
* 1995-12-31 Markus Kuhn * 1995-12-31 Markus Kuhn
* Second revision, general code cleanup. * Second revision, general code cleanup.
* 1997-05-16 Hannu Savolainen * 1996-05-16 Hannu Savolainen
* Integrated with other parts of the driver. * Integrated with other parts of the driver.
* 1997-05-28 Markus Kuhn * 1996-05-28 Markus Kuhn
* Initialize CS4231A mixer, make ACI first mixer, * Initialize CS4231A mixer, make ACI first mixer,
* use new private mixer API for solo mode. * use new private mixer API for solo mode.
*/ */
......
...@@ -333,7 +333,7 @@ maui_load_patch (int dev, int format, const char *addr, ...@@ -333,7 +333,7 @@ maui_load_patch (int dev, int format, const char *addr,
{ {
unsigned char data; unsigned char data;
get_user (data, (unsigned char *) &((addr)[hdr_size + i])); get_user (*(unsigned char *) &data, (unsigned char *) &((addr)[hdr_size + i]));
if (i == 0 && !(data & 0x80)) if (i == 0 && !(data & 0x80))
return -EINVAL; return -EINVAL;
......
...@@ -537,7 +537,7 @@ midi_synth_load_patch (int dev, int format, const char *addr, ...@@ -537,7 +537,7 @@ midi_synth_load_patch (int dev, int format, const char *addr,
{ {
unsigned char data; unsigned char data;
get_user (data, (unsigned char *) &((addr)[hdr_size + i])); get_user (*(unsigned char *) &data, (unsigned char *) &((addr)[hdr_size + i]));
eox_seen = (i > 0 && data & 0x80); /* End of sysex */ eox_seen = (i > 0 && data & 0x80); /* End of sysex */
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#define MIDIBUF_C
#include "sound_config.h" #include "sound_config.h"
......
...@@ -1183,6 +1183,7 @@ attach_mpu401 (struct address_info *hw_config) ...@@ -1183,6 +1183,7 @@ attach_mpu401 (struct address_info *hw_config)
irq2dev[devc->irq] = num_midis; irq2dev[devc->irq] = num_midis;
midi_devs[num_midis++] = &mpu401_midi_operations[devc->devno]; midi_devs[num_midis++] = &mpu401_midi_operations[devc->devno];
sequencer_init ();
} }
static int static int
......
...@@ -112,6 +112,7 @@ opl3_ioctl (int dev, ...@@ -112,6 +112,7 @@ opl3_ioctl (int dev,
struct sbi_instrument ins; struct sbi_instrument ins;
memcpy ((char *) &ins, (&((char *) arg)[0]), sizeof (ins)); memcpy ((char *) &ins, (&((char *) arg)[0]), sizeof (ins));
printk("Warning: Obsolete ioctl(SNDCTL_FM_LOAD_INSTR) used. Fix the program.\n");
if (ins.channel < 0 || ins.channel >= SBFM_MAXINSTR) if (ins.channel < 0 || ins.channel >= SBFM_MAXINSTR)
{ {
...@@ -1168,6 +1169,7 @@ opl3_init (int ioaddr, int *osp) ...@@ -1168,6 +1169,7 @@ opl3_init (int ioaddr, int *osp)
opl3_operations.info = &devc->fm_info; opl3_operations.info = &devc->fm_info;
synth_devs[num_synths++] = &opl3_operations; synth_devs[num_synths++] = &opl3_operations;
sequencer_init ();
devc->v_alloc = &opl3_operations.alloc; devc->v_alloc = &opl3_operations.alloc;
devc->chn_info = &opl3_operations.chn_info[0]; devc->chn_info = &opl3_operations.chn_info[0];
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#undef NO_INLINE_ASM #undef NO_INLINE_ASM
#define SHORT_BANNERS #define SHORT_BANNERS
#define MANUAL_PNP #define MANUAL_PNP
#undef DO_TIMINGS
#ifdef MODULE #ifdef MODULE
#define __NO_VERSION__ #define __NO_VERSION__
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
#define LINUX21X #define LINUX21X
#endif #endif
#ifdef __KERNEL__
#include <linux/utsname.h> #include <linux/utsname.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/fs.h> #include <linux/fs.h>
...@@ -37,6 +39,10 @@ ...@@ -37,6 +39,10 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/pci.h>
#include <linux/bios32.h>
#else
#endif
#include <linux/wrapper.h> #include <linux/wrapper.h>
......
...@@ -283,7 +283,7 @@ detect_pas_hw (struct address_info *hw_config) ...@@ -283,7 +283,7 @@ detect_pas_hw (struct address_info *hw_config)
foo = board_id ^ 0xe0; foo = board_id ^ 0xe0;
pas_write (foo, 0x0B8B); pas_write (foo, 0x0B8B);
foo = inb (0x0B8B); foo = pas_read (0x0B8B);
pas_write (board_id, 0x0B8B); pas_write (board_id, 0x0B8B);
if (board_id != foo) if (board_id != foo)
......
...@@ -236,6 +236,7 @@ pas_midi_init (void) ...@@ -236,6 +236,7 @@ pas_midi_init (void)
std_midi_synth.midi_dev = my_dev = num_midis; std_midi_synth.midi_dev = my_dev = num_midis;
midi_devs[num_midis++] = &pas_midi_operations; midi_devs[num_midis++] = &pas_midi_operations;
sequencer_init ();
} }
void void
......
...@@ -55,12 +55,12 @@ pcm_set_speed (int arg) ...@@ -55,12 +55,12 @@ pcm_set_speed (int arg)
if (pcm_channels & 2) if (pcm_channels & 2)
{ {
foo = (596590 + (arg / 2)) / arg; foo = (596590 + (arg / 2)) / arg;
arg = 596590 / foo; arg = (596590 + (foo / 2)) / foo;
} }
else else
{ {
foo = (1193180 + (arg / 2)) / arg; foo = (1193180 + (arg / 2)) / arg;
arg = 1193180 / foo; arg = (1193180 + (foo / 2)) / foo;
} }
pcm_speed = arg; pcm_speed = arg;
......
/*
* sound/pnp.c - Temporary kludge for PnP soundcards.
*
* Copyright by Hannu Savolainen 1997.
*
* This file is just a temporary solution to be used with
* PnP soundcards until final kernel PnP support gets ready.
* The code contained in this file is largely untested and
* may cause failures in some systems. In particular it will
* cause troubles with other PnP ISA cards such as network cards.
* This file is also incompatible with (future) PnP support in kernel.
*
* For the above reasons I don't want this file to be widely distributed.
* You have permission to use this file with this particular sound driver
* and only for your own evaluation purposes. Any other use of this file
* or parts of it requires written permission by the author.
*/
extern int pnp_trace;
int pnp_trace_io = 0;
#define UDELAY(x) udelay(x)
#ifdef TEST_PNP
#include "pnp.h"
#include <malloc.h>
#include <stdio.h>
#define printk printf
#define MALLOC(sz) malloc(sz)
unsigned char res[10000];
int rp;
#else
#include "sound_config.h"
#endif
#ifndef _PNP_H_
#define _PNP_H_
#define MAX_PNP_CARDS 16
#define PNP_DEVID(a, b, c, id) \
((a-'@')<<26) | ((b-'@')<<21) | ((c-'@') << 16) | (id&0xffff)
#define NO_PORT 0
#define NO_IRQ 0
#define NO_DMA 4
struct pnp_port_resource
{
short range_min, range_max;
unsigned char align, len;
};
struct pnp_func
{
struct pnp_dev *dev;
unsigned long flags;
struct pnp_func *next;
int nports;
struct pnp_port_resource ports[8];
int nirq;
unsigned short irq[2];
int ndma;
unsigned char dma[2];
};
struct pnp_dev
{
int key; /* A PnP device id identifying this device */
char *name; /* ANSI identifier string */
int devno; /* Logical device number within a card */
int ncompat; /* Number of compatible device idents */
int compat_keys[8]; /* List of PnP compatible device idents */
struct pnp_card *card; /* Link to the card which holds this device */
struct pnp_dev *next; /* Pointer to next logical device or NULL */
int nports, nirq, ndma;
int nfunc; /* Number of dependent function records */
struct pnp_func *functions; /* List of dependent functions */
int driver; /* Driver signature or 0 */
int preconfig; /* 1 if config has been set manully */
};
struct pnp_card
{
int key; /* Unique PnP device identifier */
char *name; /* ANSI identifier string of the card */
int csn; /* Card select number */
char pnp_version;
char vendor_version;
int driven; /* 0=No driver assigned, */
/* 1=Drivers assigned to some of logical devices */
/* 2=Card and all of it's devices have a driver */
int relocated; /* 0=Card is inactive, 1=card is up and running */
int ndevs; /* Number of logical devices on the card */
struct pnp_dev *devices; /* Pointer to first function entry */
};
typedef struct pnp_card_info {
struct pnp_card card;
char name[64];
} pnp_card_info;
extern int pnp_card_count;
extern struct pnp_card *pnp_cards[MAX_PNP_CARDS];
extern struct pnp_dev *pnp_device_list;
extern int pnp_trace;
/*
* Callable functions
*/
extern void pnp_init(void); /* Called by kernel during boot */
extern void terminate_pnp(void);
extern int pnp_connect(char *driver_name);
extern void pnp_disconnect(int driver_signature);
/*
* pnp_get_descr() returns an ASCII desctription string for a device.
* The parameter is an compressed EISA identifier of the device/card.
*/
extern char *pnp_get_descr (int id);
extern void pnp_enable_device(struct pnp_dev *dev, int state);
extern void pnp_set_port(struct pnp_dev *dev, int selec, unsigned short base);
extern void pnp_set_irq(struct pnp_dev *dev, int selec, unsigned short val);
extern void pnp_set_dma(struct pnp_dev *dev, int selec, unsigned short val);
extern unsigned short pnp_get_port(struct pnp_dev *dev, int selec);
extern unsigned short pnp_get_irq(struct pnp_dev *dev, int selec);
extern unsigned short pnp_get_dma(struct pnp_dev *dev, int selec);
extern int pnp_allocate_device(int driver_sig, struct pnp_dev *dev, int basemask, int irqmask,
int dmamask, int memmask);
extern void pnp_release_device(int driver_sig, struct pnp_dev *dev);
extern int pnp_asc2devid(char *name);
extern char *pnp_devid2asc(int id);
extern void pnp_dump_resources(void);
extern int pnp_device_status (struct pnp_dev *dev);
struct pnp_dev *pnp_get_next_device(int driver_sig, struct pnp_dev *prev);
unsigned char pnp_readreg (struct pnp_dev *dev, int reg);
#endif
...@@ -105,6 +105,7 @@ typedef struct sb_devc { ...@@ -105,6 +105,7 @@ typedef struct sb_devc {
/* MIDI fields */ /* MIDI fields */
int my_mididev; int my_mididev;
int input_opened; int input_opened;
int midi_broken;
void (*midi_input_intr) (int dev, unsigned char data); void (*midi_input_intr) (int dev, unsigned char data);
} sb_devc; } sb_devc;
......
...@@ -58,10 +58,7 @@ sb_dsp_command (sb_devc * devc, unsigned char val) ...@@ -58,10 +58,7 @@ sb_dsp_command (sb_devc * devc, unsigned char val)
int i; int i;
unsigned long limit; unsigned long limit;
limit = jiffies + HZ / 10; /* limit = jiffies + HZ / 10; /* Timeout */
* The timeout is 0.1 seconds
*/
/* /*
* Note! the i<500000 is an emergency exit. The sb_dsp_command() is sometimes * Note! the i<500000 is an emergency exit. The sb_dsp_command() is sometimes
* called while interrupts are disabled. This means that the timer is * called while interrupts are disabled. This means that the timer is
...@@ -173,7 +170,8 @@ sbintr (int irq, void *dev_id, struct pt_regs *dummy) ...@@ -173,7 +170,8 @@ sbintr (int irq, void *dev_id, struct pt_regs *dummy)
break; break;
default: default:
printk ("Sound Blaster: Unexpected interrupt\n"); /* printk ("Sound Blaster: Unexpected interrupt\n"); */
;
} }
/* /*
* Acknowledge interrupts * Acknowledge interrupts
...@@ -633,6 +631,7 @@ sb_dsp_detect (struct address_info *hw_config) ...@@ -633,6 +631,7 @@ sb_dsp_detect (struct address_info *hw_config)
for (i = 0; i < 10000; i++) for (i = 0; i < 10000; i++)
inb (DSP_DATA_AVAIL); inb (DSP_DATA_AVAIL);
devc->caps = SB_NO_AUDIO | SB_NO_MIDI; /* Mixer only */ devc->caps = SB_NO_AUDIO | SB_NO_MIDI; /* Mixer only */
devc->model = MDL_AZTECH;
} }
} }
} }
...@@ -666,6 +665,7 @@ sb_dsp_init (struct address_info *hw_config) ...@@ -666,6 +665,7 @@ sb_dsp_init (struct address_info *hw_config)
sb_devc *devc; sb_devc *devc;
int n; int n;
char name[100]; char name[100];
extern int sb_be_quiet;
/* /*
* Check if we had detected a SB device earlier * Check if we had detected a SB device earlier
...@@ -776,7 +776,7 @@ sb_dsp_init (struct address_info *hw_config) ...@@ -776,7 +776,7 @@ sb_dsp_init (struct address_info *hw_config)
{ {
devc->model = hw_config->card_subtype = MDL_SBPRO; devc->model = hw_config->card_subtype = MDL_SBPRO;
if (hw_config->name == NULL) if (hw_config->name == NULL)
hw_config->name = "Sound Blaster Pro"; hw_config->name = "Sound Blaster Pro (8 BIT ONLY)";
} }
break; break;
...@@ -809,10 +809,33 @@ sb_dsp_init (struct address_info *hw_config) ...@@ -809,10 +809,33 @@ sb_dsp_init (struct address_info *hw_config)
#endif #endif
if (hw_config->name == NULL) if (hw_config->name == NULL)
hw_config->name = "Sound Blaster"; hw_config->name = "Sound Blaster (8 BIT/MONO ONLY)";
sprintf (name, "%s (%d.%d)", hw_config->name, devc->major, devc->minor); sprintf (name, "%s (%d.%d)", hw_config->name, devc->major, devc->minor);
conf_printf (name, hw_config); conf_printf (name, hw_config);
/*
* Assuming that a soundcard is Sound Blaster (compatible) is the most common
* configuration error and the mother of all problems. Usually soundcards
* emulate SB Pro but in addition they have a 16 bit native mode which should be
* used in Unix. See Readme.cards for more information about configuring OSS/Free
* properly.
*/
if (devc->model <= MDL_SBPRO)
if (devc->major == 3 && devc->minor != 1) /* "True" SB Pro should have v3.1. */
{
printk ("This soundcard doesn't seem to be fully Sound Blaster Pro compatible.\n");
printk ("Almost certainly there is another way to configure OSS so that\n");
printk ("it works properly with OSS (for example in 16 bit mode).\n");
}
else if (!sb_be_quiet && devc->model == MDL_SBPRO)
{
printk ("SB DSP version is just %d.%d which means that your card is\n",
devc->major, devc->minor);
printk ("several years old (8 bit only device)\n");
printk ("or alternatively the sound driver is incorrectly configured.\n");
}
hw_config->card_subtype = devc->model; hw_config->card_subtype = devc->model;
last_devc = devc; /* For SB MPU detection */ last_devc = devc; /* For SB MPU detection */
......
...@@ -52,6 +52,7 @@ sb_midi_open (int dev, int mode, ...@@ -52,6 +52,7 @@ sb_midi_open (int dev, int mode,
restore_flags (flags); restore_flags (flags);
devc->irq_mode = IMODE_MIDI; devc->irq_mode = IMODE_MIDI;
devc->midi_broken = 0;
sb_dsp_reset (devc); sb_dsp_reset (devc);
...@@ -96,9 +97,16 @@ sb_midi_out (int dev, unsigned char midi_byte) ...@@ -96,9 +97,16 @@ sb_midi_out (int dev, unsigned char midi_byte)
sb_devc *devc = midi_devs[dev]->devc; sb_devc *devc = midi_devs[dev]->devc;
if (devc == NULL) if (devc == NULL)
return -ENXIO; return 1;
if (devc->midi_broken)
return 1;
sb_dsp_command (devc, midi_byte); if (!sb_dsp_command (devc, midi_byte))
{
devc->midi_broken = 1;
return 1;
}
return 1; return 1;
} }
...@@ -220,6 +228,7 @@ sb_dsp_midi_init (sb_devc * devc) ...@@ -220,6 +228,7 @@ sb_dsp_midi_init (sb_devc * devc)
midi_devs[num_midis]->converter->id = "SBMIDI"; midi_devs[num_midis]->converter->id = "SBMIDI";
num_midis++; num_midis++;
sequencer_init ();
} }
#endif #endif
...@@ -24,6 +24,9 @@ static int sequencer_ok = 0; ...@@ -24,6 +24,9 @@ static int sequencer_ok = 0;
static struct sound_timer_operations *tmr; static struct sound_timer_operations *tmr;
static int tmr_no = -1; /* Currently selected timer */ static int tmr_no = -1; /* Currently selected timer */
static int pending_timer = -1; /* For timer change operation */ static int pending_timer = -1; /* For timer change operation */
extern unsigned long seq_time;
static int obsolete_api_used = 0;
/* /*
* Local counts for number of synth and MIDI devices. These are initialized * Local counts for number of synth and MIDI devices. These are initialized
...@@ -56,7 +59,6 @@ static int midi_written[MAX_MIDI_DEV] = ...@@ -56,7 +59,6 @@ static int midi_written[MAX_MIDI_DEV] =
unsigned long prev_input_time = 0; unsigned long prev_input_time = 0;
int prev_event_time; int prev_event_time;
unsigned long seq_time = 0;
#include "tuning.h" #include "tuning.h"
...@@ -312,6 +314,9 @@ sequencer_write (int dev, struct fileinfo *file, const char *buf, int count) ...@@ -312,6 +314,9 @@ sequencer_write (int dev, struct fileinfo *file, const char *buf, int count)
return -EINVAL; return -EINVAL;
} }
ev_size = 4; ev_size = 4;
if (event_rec[0] != SEQ_MIDIPUTC)
obsolete_api_used = 1;
} }
if (event_rec[0] == SEQ_MIDIPUTC) if (event_rec[0] == SEQ_MIDIPUTC)
...@@ -498,11 +503,12 @@ alloc_voice (int dev, int chn, int note) ...@@ -498,11 +503,12 @@ alloc_voice (int dev, int chn, int note)
static void static void
seq_chn_voice_event (unsigned char *event_rec) seq_chn_voice_event (unsigned char *event_rec)
{ {
unsigned char dev = event_rec[1]; #define dev event_rec[1]
unsigned char cmd = event_rec[2]; #define cmd event_rec[2]
unsigned char chn = event_rec[3]; #define chn event_rec[3]
unsigned char note = event_rec[4]; #define note event_rec[4]
unsigned char parm = event_rec[5]; #define parm event_rec[5]
int voice = -1; int voice = -1;
if ((int) dev > max_synthdev) if ((int) dev > max_synthdev)
...@@ -570,6 +576,11 @@ seq_chn_voice_event (unsigned char *event_rec) ...@@ -570,6 +576,11 @@ seq_chn_voice_event (unsigned char *event_rec)
default:; default:;
} }
#undef dev
#undef cmd
#undef chn
#undef note
#undef parm
} }
...@@ -1105,6 +1116,7 @@ sequencer_open (int dev, struct fileinfo *file) ...@@ -1105,6 +1116,7 @@ sequencer_open (int dev, struct fileinfo *file)
return -EBUSY; return -EBUSY;
} }
sequencer_busy = 1; sequencer_busy = 1;
obsolete_api_used = 0;
restore_flags (flags); restore_flags (flags);
max_mididev = num_midis; max_mididev = num_midis;
...@@ -1322,6 +1334,8 @@ sequencer_release (int dev, struct fileinfo *file) ...@@ -1322,6 +1334,8 @@ sequencer_release (int dev, struct fileinfo *file)
if (seq_mode == SEQ_2) if (seq_mode == SEQ_2)
tmr->close (tmr_no); tmr->close (tmr_no);
if (obsolete_api_used)
printk ("/dev/music: Obsolete (4 byte) API was used by this program\n");
sequencer_busy = 0; sequencer_busy = 0;
} }
...@@ -1628,6 +1642,8 @@ sequencer_ioctl (int dev, struct fileinfo *file, ...@@ -1628,6 +1642,8 @@ sequencer_ioctl (int dev, struct fileinfo *file,
break; break;
case SNDCTL_SEQ_RESETSAMPLES: case SNDCTL_SEQ_RESETSAMPLES:
case SNDCTL_SYNTH_REMOVESAMPLE:
case SNDCTL_SYNTH_CONTROL:
{ {
int err; int err;
...@@ -1870,7 +1886,7 @@ note_to_freq (int note_num) ...@@ -1870,7 +1886,7 @@ note_to_freq (int note_num)
*/ */
int note, octave, note_freq; int note, octave, note_freq;
int notes[] = static int notes[] =
{ {
261632, 277189, 293671, 311132, 329632, 349232, 261632, 277189, 293671, 311132, 329632, 349232,
369998, 391998, 415306, 440000, 466162, 493880 369998, 391998, 415306, 440000, 466162, 493880
...@@ -1937,6 +1953,8 @@ compute_finetune (unsigned long base_freq, int bend, int range, ...@@ -1937,6 +1953,8 @@ compute_finetune (unsigned long base_freq, int bend, int range,
} }
semitones = bend / 100; semitones = bend / 100;
if (semitones > 99)
semitones = 99;
cents = bend % 100; cents = bend % 100;
amount = (int) (semitone_tuning[semitones] * multiplier * cent_tuning[cents]) amount = (int) (semitone_tuning[semitones] * multiplier * cent_tuning[cents])
...@@ -1955,6 +1973,10 @@ sequencer_init (void) ...@@ -1955,6 +1973,10 @@ sequencer_init (void)
if (sequencer_ok) if (sequencer_ok)
return; return;
#ifdef CONFIG_MIDI
MIDIbuf_init ();
#endif
queue = (unsigned char *) (sound_mem_blocks[sound_nblocks] = vmalloc (SEQ_MAX_QUEUE * EV_SZ)); queue = (unsigned char *) (sound_mem_blocks[sound_nblocks] = vmalloc (SEQ_MAX_QUEUE * EV_SZ));
sound_mem_sizes[sound_nblocks] = SEQ_MAX_QUEUE * EV_SZ; sound_mem_sizes[sound_nblocks] = SEQ_MAX_QUEUE * EV_SZ;
...@@ -1971,7 +1993,7 @@ sequencer_init (void) ...@@ -1971,7 +1993,7 @@ sequencer_init (void)
sound_mem_sizes[sound_nblocks] = SEQ_MAX_QUEUE * IEV_SZ; sound_mem_sizes[sound_nblocks] = SEQ_MAX_QUEUE * IEV_SZ;
if (sound_nblocks < 1024) if (sound_nblocks < 1024)
sound_nblocks++;; sound_nblocks++;;
if (queue == NULL) if (iqueue == NULL)
{ {
printk ("Sound: Can't allocate memory for sequencer input queue\n"); printk ("Sound: Can't allocate memory for sequencer input queue\n");
return; return;
......
...@@ -10,7 +10,7 @@ int DMAbuf_rmchars(int dev, int buff_no, int c); ...@@ -10,7 +10,7 @@ int DMAbuf_rmchars(int dev, int buff_no, int c);
int DMAbuf_start_output(int dev, int buff_no, int l); int DMAbuf_start_output(int dev, int buff_no, int l);
int DMAbuf_move_wrpointer(int dev, int l); int DMAbuf_move_wrpointer(int dev, int l);
/* int DMAbuf_ioctl(int dev, unsigned int cmd, caddr_t arg, int local); */ /* int DMAbuf_ioctl(int dev, unsigned int cmd, caddr_t arg, int local); */
void DMAbuf_init(void); void DMAbuf_init(int dev, int dma1, int dma2);
void DMAbuf_deinit(int dev); void DMAbuf_deinit(int dev);
int DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode); int DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode);
int DMAbuf_open_dma (int dev); int DMAbuf_open_dma (int dev);
...@@ -20,7 +20,7 @@ void DMAbuf_outputintr(int dev, int underflow_flag); ...@@ -20,7 +20,7 @@ void DMAbuf_outputintr(int dev, int underflow_flag);
struct dma_buffparms; struct dma_buffparms;
int DMAbuf_space_in_queue (int dev); int DMAbuf_space_in_queue (int dev);
int DMAbuf_activate_recording (int dev, struct dma_buffparms *dmap); int DMAbuf_activate_recording (int dev, struct dma_buffparms *dmap);
int DMAbuf_get_buffer_pointer (int dev, struct dma_buffparms *dmap); int DMAbuf_get_buffer_pointer (int dev, struct dma_buffparms *dmap, int direction);
void DMAbuf_launch_output(int dev, struct dma_buffparms *dmap); void DMAbuf_launch_output(int dev, struct dma_buffparms *dmap);
int DMAbuf_select(int dev, struct fileinfo *file, int sel_type, poll_table * wait); int DMAbuf_select(int dev, struct fileinfo *file, int sel_type, poll_table * wait);
void DMAbuf_start_devices(unsigned int devmask); void DMAbuf_start_devices(unsigned int devmask);
...@@ -52,7 +52,8 @@ int sequencer_open (int dev, struct fileinfo *file); ...@@ -52,7 +52,8 @@ int sequencer_open (int dev, struct fileinfo *file);
void sequencer_release (int dev, struct fileinfo *file); void sequencer_release (int dev, struct fileinfo *file);
int sequencer_ioctl (int dev, struct fileinfo *file, int sequencer_ioctl (int dev, struct fileinfo *file,
unsigned int cmd, caddr_t arg); unsigned int cmd, caddr_t arg);
int sequencer_lseek (int dev, struct fileinfo *file, off_t offset, int orig); int sequencer_select(int dev, struct fileinfo *file, int sel_type, poll_table * wait);
void sequencer_init (void); void sequencer_init (void);
void sequencer_timer(unsigned long dummy); void sequencer_timer(unsigned long dummy);
int note_to_freq(int note_num); int note_to_freq(int note_num);
...@@ -61,8 +62,6 @@ unsigned long compute_finetune(unsigned long base_freq, int bend, int range, ...@@ -61,8 +62,6 @@ unsigned long compute_finetune(unsigned long base_freq, int bend, int range,
void seq_input_event(unsigned char *event, int len); void seq_input_event(unsigned char *event, int len);
void seq_copy_to_input (unsigned char *event, int len); void seq_copy_to_input (unsigned char *event, int len);
int sequencer_select(int dev, struct fileinfo *file, int sel_type, poll_table * wait);
/* /*
* System calls for the /dev/midi * System calls for the /dev/midi
*/ */
...@@ -73,19 +72,20 @@ int MIDIbuf_open (int dev, struct fileinfo *file); ...@@ -73,19 +72,20 @@ int MIDIbuf_open (int dev, struct fileinfo *file);
void MIDIbuf_release (int dev, struct fileinfo *file); void MIDIbuf_release (int dev, struct fileinfo *file);
int MIDIbuf_ioctl (int dev, struct fileinfo *file, int MIDIbuf_ioctl (int dev, struct fileinfo *file,
unsigned int cmd, caddr_t arg); unsigned int cmd, caddr_t arg);
int MIDIbuf_lseek (int dev, struct fileinfo *file, off_t offset, int orig); int MIDIbuf_select(int dev, struct fileinfo *file, int sel_type, poll_table * wait);
void MIDIbuf_bytes_received(int dev, unsigned char *buf, int count); void MIDIbuf_bytes_received(int dev, unsigned char *buf, int count);
void MIDIbuf_init(void); void MIDIbuf_init(void);
int MIDIbuf_select(int dev, struct fileinfo *file, int sel_type, poll_table * wait);
/* /*
* *
* Misc calls from various sources * Misc calls from various sources
*/ */
/* From soundcard.c */ /* From soundcard.c */
#ifndef __bsdi__
void tenmicrosec(int *osp); void tenmicrosec(int *osp);
#endif
void request_sound_timer (int count); void request_sound_timer (int count);
void sound_stop_timer(void); void sound_stop_timer(void);
int snd_set_irq_handler (int interrupt_level, void(*iproc)(int, void*, struct pt_regs *), char *name, int *osp); int snd_set_irq_handler (int interrupt_level, void(*iproc)(int, void*, struct pt_regs *), char *name, int *osp);
...@@ -205,7 +205,7 @@ void ad1848_control(int cmd, int arg); ...@@ -205,7 +205,7 @@ void ad1848_control(int cmd, int arg);
#define AD1848_REROUTE(oldctl, newctl) \ #define AD1848_REROUTE(oldctl, newctl) \
ad1848_control(AD1848_MIXER_REROUTE, ((oldctl)<<8)|(newctl)) ad1848_control(AD1848_MIXER_REROUTE, ((oldctl)<<8)|(newctl))
void ad1848_interrupt (int irq, void *dev_id, struct pt_regs * dummy); void adintr(int irq, void *dev_id, struct pt_regs * dummy);
void attach_ms_sound(struct address_info * hw_config); void attach_ms_sound(struct address_info * hw_config);
int probe_ms_sound(struct address_info *hw_config); int probe_ms_sound(struct address_info *hw_config);
void attach_pnp_ad1848(struct address_info * hw_config); void attach_pnp_ad1848(struct address_info * hw_config);
......
This diff is collapsed.
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "sound_config.h" #include "sound_config.h"
static int in_use = 0; /* Total # of open devices */ static int in_use = 0; /* Total # of open devices */
unsigned long seq_time = 0; /* Time for /dev/sequencer */
/* /*
* Table for configurable mixer volume handling * Table for configurable mixer volume handling
...@@ -167,17 +168,22 @@ init_status (void) ...@@ -167,17 +168,22 @@ init_status (void)
status_ptr = 0; status_ptr = 0;
#ifdef SOUND_UNAME_A #ifdef SOUND_UNAME_A
put_status ("Sound Driver:" SOUND_VERSION_STRING put_status ("OSS/Free" SOUND_VERSION_STRING
" (" SOUND_CONFIG_DATE " " SOUND_CONFIG_BY ",\n" " (" SOUND_CONFIG_DATE " " SOUND_CONFIG_BY ",\n"
SOUND_UNAME_A ")" SOUND_UNAME_A ")"
"\n"); "\n");
#else #else
put_status ("Sound Driver:" SOUND_VERSION_STRING put_status ("OSS/Free:" SOUND_VERSION_STRING
" (" SOUND_CONFIG_DATE " " SOUND_CONFIG_BY "@" " (" SOUND_CONFIG_DATE " " SOUND_CONFIG_BY "@"
SOUND_CONFIG_HOST "." SOUND_CONFIG_DOMAIN ")" SOUND_CONFIG_HOST "." SOUND_CONFIG_DOMAIN ")"
"\n"); "\n");
#endif #endif
#ifdef MODULE
put_status ("Load type: Driver loaded as a module.\n");
#else
put_status ("Load type: Driver compiled into kernel\n");
#endif
put_status ("Kernel: "); put_status ("Kernel: ");
put_status (system_utsname.sysname); put_status (system_utsname.sysname);
put_status (" "); put_status (" ");
...@@ -189,6 +195,9 @@ init_status (void) ...@@ -189,6 +195,9 @@ init_status (void)
put_status (" "); put_status (" ");
put_status (system_utsname.machine); put_status (system_utsname.machine);
put_status ("\n"); put_status ("\n");
#ifdef MODULE
put_status ("Driver loaded as a module\n");
#endif
if (!put_status ("Config options: ")) if (!put_status ("Config options: "))
......
...@@ -139,8 +139,8 @@ sound_release (struct inode *inode, struct file *file) ...@@ -139,8 +139,8 @@ sound_release (struct inode *inode, struct file *file)
sound_release_sw (dev, &files[dev]); sound_release_sw (dev, &files[dev]);
#ifdef MODULE #ifdef MODULE
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
#endif
return 0; return 0;
#endif
} }
static int static int
...@@ -156,7 +156,7 @@ sound_ioctl (struct inode *inode, struct file *file, ...@@ -156,7 +156,7 @@ sound_ioctl (struct inode *inode, struct file *file,
files[dev].flags = file->f_flags; files[dev].flags = file->f_flags;
if (_SIOC_DIR (cmd) != _SIOC_NONE) if (_SIOC_DIR (cmd) != _SIOC_NONE && _SIOC_DIR (cmd) != 0)
{ {
/* /*
* Have to validate the address given by the process. * Have to validate the address given by the process.
...@@ -196,7 +196,7 @@ sound_ioctl (struct inode *inode, struct file *file, ...@@ -196,7 +196,7 @@ sound_ioctl (struct inode *inode, struct file *file,
if (ptr != NULL && alloced) if (ptr != NULL && alloced)
vfree (ptr); vfree (ptr);
return err; return ((err < 0) ? err : 0);
} }
static int static int
...@@ -229,7 +229,7 @@ sound_select (struct inode *inode, struct file *file, int sel_type, poll_table * ...@@ -229,7 +229,7 @@ sound_select (struct inode *inode, struct file *file, int sel_type, poll_table *
case SND_DEV_DSP: case SND_DEV_DSP:
case SND_DEV_DSP16: case SND_DEV_DSP16:
case SND_DEV_AUDIO: case SND_DEV_AUDIO:
return audio_select (dev, &files[dev], sel_type, wait); return DMAbuf_select (dev >> 4, &files[dev], sel_type, wait);
break; break;
#endif #endif
...@@ -275,20 +275,14 @@ sound_mmap (struct inode *inode, struct file *file, struct vm_area_struct *vma) ...@@ -275,20 +275,14 @@ sound_mmap (struct inode *inode, struct file *file, struct vm_area_struct *vma)
return -EINVAL; return -EINVAL;
} }
if ((vma->vm_flags & (VM_READ | VM_WRITE)) == (VM_READ | VM_WRITE)) if (vma->vm_flags & VM_WRITE) /* Map write and read/write to the output buf */
{ {
printk ("Sound: Cannot do read/write mmap()\n"); dmap = audio_devs[dev]->dmap_out;
return -EINVAL;
} }
else if (vma->vm_flags & VM_READ)
if (vma->vm_flags & VM_READ)
{ {
dmap = audio_devs[dev]->dmap_in; dmap = audio_devs[dev]->dmap_in;
} }
else if (vma->vm_flags & VM_WRITE)
{
dmap = audio_devs[dev]->dmap_out;
}
else else
{ {
printk ("Sound: Undefined mmap() access\n"); printk ("Sound: Undefined mmap() access\n");
...@@ -379,20 +373,10 @@ soundcard_init (void) ...@@ -379,20 +373,10 @@ soundcard_init (void)
#ifdef CONFIG_AUDIO #ifdef CONFIG_AUDIO
if (num_audiodevs) /* Audio devices present */ if (num_audiodevs) /* Audio devices present */
{ {
DMAbuf_init ();
audio_init_devices (); audio_init_devices ();
} }
#endif #endif
#ifdef CONFIG_MIDI
if (num_midis)
MIDIbuf_init ();
#endif
#ifdef CONFIG_SEQUENCER
if (num_midis + num_synths)
sequencer_init ();
#endif
} }
...@@ -616,9 +600,15 @@ sound_close_dma (int chn) ...@@ -616,9 +600,15 @@ sound_close_dma (int chn)
#ifdef CONFIG_SEQUENCER #ifdef CONFIG_SEQUENCER
static void
do_sequencer_timer (unsigned long dummy)
{
sequencer_timer (0);
}
static struct timer_list seq_timer = static struct timer_list seq_timer =
{NULL, NULL, 0, 0, sequencer_timer}; {NULL, NULL, 0, 0, do_sequencer_timer};
void void
request_sound_timer (int count) request_sound_timer (int count)
...@@ -681,33 +671,31 @@ sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan) ...@@ -681,33 +671,31 @@ sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan)
dmap->raw_buf = NULL; dmap->raw_buf = NULL;
if (debugmem) dmap->buffsize = dma_buffsize;
printk ("sound: buffsize[%d] = %lu\n", dev, audio_devs[dev]->buffsize);
audio_devs[dev]->buffsize = dma_buffsize;
if (audio_devs[dev]->buffsize > dma_pagesize) if (dmap->buffsize > dma_pagesize)
audio_devs[dev]->buffsize = dma_pagesize; dmap->buffsize = dma_pagesize;
start_addr = NULL; start_addr = NULL;
/* /*
* Now loop until we get a free buffer. Try to get smaller buffer if * Now loop until we get a free buffer. Try to get smaller buffer if
* it fails. * it fails. Don't accept smaller than 8k buffer for performance
* reasons.
*/ */
while (start_addr == NULL && audio_devs[dev]->buffsize > PAGE_SIZE) while (start_addr == NULL && dmap->buffsize > PAGE_SIZE)
{ {
int sz, size; int sz, size;
for (sz = 0, size = PAGE_SIZE; for (sz = 0, size = PAGE_SIZE;
size < audio_devs[dev]->buffsize; size < dmap->buffsize;
sz++, size <<= 1); sz++, size <<= 1);
audio_devs[dev]->buffsize = PAGE_SIZE * (1 << sz); dmap->buffsize = PAGE_SIZE * (1 << sz);
if ((start_addr = (char *) __get_free_pages (GFP_ATOMIC, sz, MAX_DMA_ADDRESS)) == NULL) if ((start_addr = (char *) __get_free_pages (GFP_ATOMIC, sz, MAX_DMA_ADDRESS)) == NULL)
audio_devs[dev]->buffsize /= 2; dmap->buffsize /= 2;
} }
if (start_addr == NULL) if (start_addr == NULL)
...@@ -718,7 +706,7 @@ sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan) ...@@ -718,7 +706,7 @@ sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan)
else else
{ {
/* make some checks */ /* make some checks */
end_addr = start_addr + audio_devs[dev]->buffsize - 1; end_addr = start_addr + dmap->buffsize - 1;
if (debugmem) if (debugmem)
printk ("sound: start 0x%lx, end 0x%lx\n", printk ("sound: start 0x%lx, end 0x%lx\n",
...@@ -731,9 +719,9 @@ sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan) ...@@ -731,9 +719,9 @@ sound_alloc_dmap (int dev, struct dma_buffparms *dmap, int chan)
|| end_addr >= (char *) (MAX_DMA_ADDRESS)) || end_addr >= (char *) (MAX_DMA_ADDRESS))
{ {
printk ( printk (
"sound: Got invalid address 0x%lx for %ldb DMA-buffer\n", "sound: Got invalid address 0x%lx for %db DMA-buffer\n",
(long) start_addr, (long) start_addr,
audio_devs[dev]->buffsize); dmap->buffsize);
return -EFAULT; return -EFAULT;
} }
} }
...@@ -761,11 +749,11 @@ sound_free_dmap (int dev, struct dma_buffparms *dmap, int chan) ...@@ -761,11 +749,11 @@ sound_free_dmap (int dev, struct dma_buffparms *dmap, int chan)
return; /* Don't free mmapped buffer. Will use it next time */ return; /* Don't free mmapped buffer. Will use it next time */
for (sz = 0, size = PAGE_SIZE; for (sz = 0, size = PAGE_SIZE;
size < audio_devs[dev]->buffsize; size < dmap->buffsize;
sz++, size <<= 1); sz++, size <<= 1);
start_addr = (unsigned long) dmap->raw_buf; start_addr = (unsigned long) dmap->raw_buf;
end_addr = start_addr + audio_devs[dev]->buffsize; end_addr = start_addr + dmap->buffsize;
for (i = MAP_NR (start_addr); i <= MAP_NR (end_addr); i++) for (i = MAP_NR (start_addr); i <= MAP_NR (end_addr); i++)
{ {
...@@ -776,6 +764,33 @@ sound_free_dmap (int dev, struct dma_buffparms *dmap, int chan) ...@@ -776,6 +764,33 @@ sound_free_dmap (int dev, struct dma_buffparms *dmap, int chan)
dmap->raw_buf = NULL; dmap->raw_buf = NULL;
} }
/* Intel version !!!!!!!!! */
int
sound_start_dma (int dev, struct dma_buffparms *dmap, int chan,
unsigned long physaddr,
int count, int dma_mode, int autoinit)
{
unsigned long flags;
/* printk("Start DMA%d %d, %d\n", chan, (int)(physaddr-dmap->raw_buf_phys), count); */
if (autoinit)
dma_mode |= DMA_AUTOINIT;
save_flags (flags);
cli ();
disable_dma (chan);
clear_dma_ff (chan);
set_dma_mode (chan, dma_mode);
set_dma_addr (chan, physaddr);
set_dma_count (chan, count);
enable_dma (chan);
restore_flags (flags);
return 0;
}
#endif
void void
conf_printf (char *name, struct address_info *hw_config) conf_printf (char *name, struct address_info *hw_config)
{ {
...@@ -817,29 +832,3 @@ conf_printf2 (char *name, int base, int irq, int dma, int dma2) ...@@ -817,29 +832,3 @@ conf_printf2 (char *name, int base, int irq, int dma, int dma2)
printk ("\n"); printk ("\n");
} }
/* Intel version !!!!!!!!! */
int
sound_start_dma (int dev, struct dma_buffparms *dmap, int chan,
unsigned long physaddr,
int count, int dma_mode, int autoinit)
{
unsigned long flags;
/* printk("Start DMA %d, %d\n", (int)(physaddr-dmap->raw_buf_phys), count); */
if (autoinit)
dma_mode |= DMA_AUTOINIT;
save_flags (flags);
cli ();
disable_dma (chan);
clear_dma_ff (chan);
set_dma_mode (chan, dma_mode);
set_dma_addr (chan, physaddr);
set_dma_count (chan, count);
enable_dma (chan);
restore_flags (flags);
return 0;
}
#endif
#define SOUND_VERSION_STRING "3.8-beta9-970226" #define SOUND_VERSION_STRING "3.8a"
#define SOUND_INTERNAL_VERSION 0x030803 #define SOUND_INTERNAL_VERSION 0x030804
This diff is collapsed.
...@@ -339,9 +339,19 @@ probe_trix_sb (struct address_info *hw_config) ...@@ -339,9 +339,19 @@ probe_trix_sb (struct address_info *hw_config)
void void
attach_trix_sb (struct address_info *hw_config) attach_trix_sb (struct address_info *hw_config)
{ {
extern int sb_be_quiet;
int old_quiet;
#ifdef CONFIG_SBDSP #ifdef CONFIG_SBDSP
hw_config->driver_use_1 = SB_NO_MIDI | SB_NO_MIXER | SB_NO_RECORDING; hw_config->driver_use_1 = SB_NO_MIDI | SB_NO_MIXER | SB_NO_RECORDING;
/* Prevent false alarms */
old_quiet = sb_be_quiet;
sb_be_quiet = 1;
sb_dsp_init (hw_config); sb_dsp_init (hw_config);
sb_be_quiet = old_quiet;
#endif #endif
} }
......
...@@ -346,6 +346,7 @@ attach_uart401 (struct address_info *hw_config) ...@@ -346,6 +346,7 @@ attach_uart401 (struct address_info *hw_config)
strcpy (midi_devs[num_midis]->info.name, name); strcpy (midi_devs[num_midis]->info.name, name);
midi_devs[num_midis]->converter->id = "UART401"; midi_devs[num_midis]->converter->id = "UART401";
num_midis++; num_midis++;
sequencer_init ();
devc->opened = 0; devc->opened = 0;
} }
......
...@@ -294,6 +294,7 @@ attach_uart6850 (struct address_info *hw_config) ...@@ -294,6 +294,7 @@ attach_uart6850 (struct address_info *hw_config)
std_midi_synth.midi_dev = my_dev = num_midis; std_midi_synth.midi_dev = my_dev = num_midis;
midi_devs[num_midis++] = &uart6850_operations; midi_devs[num_midis++] = &uart6850_operations;
sequencer_init ();
} }
static int static int
......
This diff is collapsed.
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
/* Internal header file for autofs */ /* Internal header file for autofs */
#define DEBUG_WAITLIST 1
#include <linux/auto_fs.h> #include <linux/auto_fs.h>
/* This is the range of ioctl() numbers we claim as ours */ /* This is the range of ioctl() numbers we claim as ours */
...@@ -120,7 +122,10 @@ struct autofs_symlink { ...@@ -120,7 +122,10 @@ struct autofs_symlink {
#define END_OF_TIME ((time_t)((unsigned long)((time_t)(~0UL)) >> 1)) #define END_OF_TIME ((time_t)((unsigned long)((time_t)(~0UL)) >> 1))
#endif #endif
#define AUTOFS_SBI_MAGIC 0x6d4a556d
struct autofs_sb_info { struct autofs_sb_info {
u32 magic;
struct file *pipe; struct file *pipe;
pid_t oz_pgrp; pid_t oz_pgrp;
int catatonic; int catatonic;
...@@ -137,6 +142,15 @@ static inline int autofs_oz_mode(struct autofs_sb_info *sbi) { ...@@ -137,6 +142,15 @@ static inline int autofs_oz_mode(struct autofs_sb_info *sbi) {
return sbi->catatonic || current->pgrp == sbi->oz_pgrp; return sbi->catatonic || current->pgrp == sbi->oz_pgrp;
} }
/* Debug the mysteriously disappearing wait list */
#ifdef DEBUG_WAITLIST
#define CHECK_WAITLIST(S,O) autofs_check_waitlist_integrity(S,O)
void autofs_check_waitlist_integrity(struct autofs_sb_info *,char *);
#else
#define CHECK_WAITLIST(S,O)
#endif
/* Hash operations */ /* Hash operations */
autofs_hash_t autofs_hash(const char *,int); autofs_hash_t autofs_hash(const char *,int);
......
...@@ -150,6 +150,7 @@ struct super_block *autofs_read_super(struct super_block *s, void *data, ...@@ -150,6 +150,7 @@ struct super_block *autofs_read_super(struct super_block *s, void *data,
DPRINTK(("autofs: starting up, sbi = %p\n",sbi)); DPRINTK(("autofs: starting up, sbi = %p\n",sbi));
s->u.generic_sbp = sbi; s->u.generic_sbp = sbi;
sbi->magic = AUTOFS_SBI_MAGIC;
sbi->catatonic = 0; sbi->catatonic = 0;
sbi->exp_timeout = 0; sbi->exp_timeout = 0;
sbi->oz_pgrp = current->pgrp; sbi->oz_pgrp = current->pgrp;
......
This diff is collapsed.
This diff is collapsed.
...@@ -178,7 +178,7 @@ nfs_writepage_sync(struct inode *inode, struct page *page, ...@@ -178,7 +178,7 @@ nfs_writepage_sync(struct inode *inode, struct page *page,
wsize = count; wsize = count;
result = nfs_proc_write(NFS_SERVER(inode), NFS_FH(inode), result = nfs_proc_write(NFS_SERVER(inode), NFS_FH(inode),
offset, wsize, IS_SWAPFILE(inode), IS_SWAPFILE(inode), offset, wsize,
buffer, &fattr); buffer, &fattr);
if (result < 0) { if (result < 0) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -343,4 +343,3 @@ void swap_in(struct task_struct * tsk, struct vm_area_struct * vma, ...@@ -343,4 +343,3 @@ void swap_in(struct task_struct * tsk, struct vm_area_struct * vma,
swap_free(entry); swap_free(entry);
return; return;
} }
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