Commit c2ecd6ec authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.102pre2

parent cf1748ae
......@@ -1811,9 +1811,9 @@ S: The Netherlands
N: Tim Waugh
E: tim@cyberelk.demon.co.uk
D: Co-architect of the parallel-port sharing system
S: 12 Station Road
S: Park Gate
S: Southampton SO31 7GJ
S: 110 Twyford Road
S: EASTLEIGH
S: SO50 4HN
S: United Kingdom
N: Juergen Weigert
......
......@@ -33,7 +33,7 @@ http://cyberbuzz.gatech.edu/kaboom/linux/ as well.
Also, don't forget http://www.linuxhq.com/ for all your Linux kernel
needs.
Last updated: May 9, 1998
Last updated: May 12, 1998
Current Author: Chris Ricker (kaboom@gatech.edu).
Current Minimal Requirements
......@@ -49,17 +49,17 @@ running, the suggested command should tell you.
- Linux C Library 5.4.44 ; ls -l /lib/libc.so.*
- Dynamic Linker (ld.so) 1.9.5 ; ldd --version
- Linux C++ Library 2.7.2.8 ; ls -l /usr/lib/libg++.so.*
- Procps 1.2.5 ; ps --version
- Procps 1.2.7 ; ps --version
- Procinfo 13 ; procinfo -v
- Mount 2.7l ; mount --version
- Net-tools 1.41 ; hostname -V
- Net-tools 1.45 ; hostname -V
- Loadlin 1.6a
- Sh-utils 1.16 ; basename --v
- Autofs 0.3.11 ; automount --version
- NFS 0.4.21 ; showmount --version
- Bash 1.14.7 ; bash -version
- Ncpfs 2.1.1 ; ncpmount -v
- Pcmcia-cs May 4, 1998
- Ncpfs 2.2.0 ; ncpmount -v
- Pcmcia-cs 3.0.1
- PPP 2.3.5 ; pppd -v
Upgrade notes
......@@ -78,6 +78,11 @@ the BIOS.
the corresponding ttyS* device instead (e.g., cua0 -> ttyS0, cua1 ->
ttyS1, etc.).
In addition, some software still works, but needs to be compiled
against 2.1 headers for complete functionality. Fdutils binaries
compiled under 2.0 or earlier kernels should be replaced with ones
compiled under 2.1, for example.
Libc
====
......@@ -412,7 +417,7 @@ NFS
The 0.4.21 release:
ftp://ftp.mathematik.th-darmstadt.de/pub/linux/okir/linux-nfs-0.4.21.tar.gz
ftp://linux.nrao.edu/pub/people/okir/linux-nfs-0.4.21.tar.gz
ftp://linux.nrao.edu/mirrors/fb0429.mathematik.th-darmstadt.de/pub/linux/okir/linux-nfs-0.4.21.tar.gz
Net-tools
=========
......@@ -436,14 +441,14 @@ ftp://prep.ai.mit.edu/pub/gnu/bash-1.14.7.tar.gz
Ncpfs
=====
The 2.1.1 release:
ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/ncpfs-2.1.1.tgz
The 2.2.0 release:
ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/ncpfs-2.2.0.tgz
Pcmcia-cs
=========
The May 4, 1998 release:
ftp://hyper.stanford.edu/pub/pcmcia/NEW/pcmcia-cs.04-May-98.tar.gz
The 3.0.1 release:
ftp://hyper.stanford.edu/pub/pcmcia/pcmcia-cs.3.0.1.tar.gz
PPP
===
......
This diff is collapsed.
/proc/sys/net/ipv4/* variables:
/proc/sys/net/ipv4/* Variables:
ip_forwarding - "SNMP" BOOLEAN
2 - disabled (default)
1 - enabled
ip_forward - BOOLEAN
0 - disabled (default)
not 0 - enabled
Forward Packets between interfaces.
This variable is special, its change resets all configuration
parameters to their default state (RFC1122 for hosts, RFC1812
......@@ -11,32 +13,11 @@ ip_forwarding - "SNMP" BOOLEAN
ip_default_ttl - INTEGER
default 64
ip_log_martians - BOOLEAN
log packets with strange or impossible addresses.
default TRUE (router)
FALSE (host)
ip_accept_redirects - BOOLEAN
Accept ICMP redirect messages.
default TRUE (host)
FALSE (router)
ip_secure_redirects - BOOLEAN
Accept ICMP redirect messages only for gateways,
listed in default gateway list.
default TRUE
ip_addrmask_agent - BOOLEAN
Reply to ICMP ADDRESS MASK requests.
default TRUE (router)
FALSE (host)
ip_rfc1620_redirects - BOOLEAN
Send(router) or accept(host) RFC1620 shared media redirects.
Overrides ip_secure_redirects.
default TRUE (should be FALSE for distributed version,
but I use it...)
ip_bootp_agent - BOOLEAN
Accept packets with source address of sort 0.b.c.d
and destined to this host, broadcast or multicast.
......@@ -44,46 +25,10 @@ ip_bootp_agent - BOOLEAN
default FALSE
ip_bootp_relay - BOOLEAN
Accept packets with source address 0.b.c.d destined
not to this host as local ones. It is supposed, that
BOOTP relay deamon will catch and forward such packets.
default FALSE
Not Implemented Yet.
ip_source_route - BOOLEAN
Accept packets with SRR option.
default TRUE (router)
FALSE (host)
ip_no_pmtu_disc - BOOLEAN
Disable Path MTU Discovery.
default FALSE
ip_rfc1812_filter - INTEGER
2 - do source validation by reversed path, as specified in RFC1812
Recommended option for single homed hosts and stub network
routers. Could cause troubles for complicated (not loop free)
networks running a slow unreliable protocol (sort of RIP),
or using static routes.
1 - (DEFAULT) Weaker form of RP filtering: drop all the packets
that look as sourced at a directly connected interface, but
were input from another interface.
0 - No source validation.
NOTE: do not disable this option! All BSD derived routing software
(sort of gated, routed etc. etc.) is confused by such packets,
even if they are valid.
NOTE: this option is turned on per default only when ip_forwarding
is on. For non-forwarding hosts it doesn't make much sense and
makes some legal multihoming configurations impossible.
ip_fib_model - INTEGER
0 - (DEFAULT) Standard model. All routes are in class MAIN.
1 - default routes go to class DEFAULT. This mode should
......@@ -125,6 +70,7 @@ tcp_retries2 - INTEGER
tcp_max_delay_acks - INTEGER
tcp_fin_timeout - INTEGER
tcp_max_ka_probes - INTEGER
tcp_hoe_retransmits - INTEGER
Undocumented for now.
tcp_syncookies - BOOLEAN
......@@ -143,6 +89,20 @@ tcp_syn_taildrop - BOOLEAN
tcp_max_syn_backlog - INTEGER
Undocumented (work in progress)
tcp_window_scaling - BOOLEAN
Enable window scaling as defined in RFC1323.
tcp_timestamps - BOOLEAN
Enable timestamps as defined in RFC1323.
tcp_sack - BOOLEAN
Enable select acknowledgements.
tcp_retrans_collapse - BOOLEAN
Bug-to-bug compatibility with some broken printers.
On retransmit try to send bigger packets to work around bugs in
certain TCP stacks.
ip_local_port_range - 2 INTEGERS
Defines the local port range that is used by TCP and UDP to
choose the local port. The first number is the first, the
......@@ -155,10 +115,94 @@ icmp_echo_ignore_broadcasts - BOOLEAN
ICMP ECHO requests sent to it or just those to broadcast/multicast
addresses, respectively.
icmp_destunreach_rate - INTEGER
icmp_paramprob_rate - INTEGER
icmp_timeexceed_rate - INTEGER
icmp_echoreply_rate - INTEGER (not enabled per default)
Limit the maximal rates for sending ICMP packets to specifc targets.
0 to disable any limiting, otherwise the maximal rate in jiffies(1)
See the source for more information.
(1) Jiffie: internal timeunit for the kernel. On the i386 1/100s, on the
Alpha 1/1024s. See the HZ define in /usr/include/asm/param.h for the exact
value on your system.
conf/interface/*:
conf/all/* is special and changes the settings for all interfaces.
Change special settings per interface.
log_martians - BOOLEAN
Log packets with impossible addresses to kernel log.
accept_redirects - BOOLEAN
Accept ICMP redirect messages.
default TRUE (host)
FALSE (router)
forwarding - BOOLEAN
Enable IP forwarding on this interface.
mc_forwarding - BOOLEAN
Do multicast routing. The kernel needs to be compiled with CONFIG_MROUTE
and a multicast routing daemon is required.
proxy_arp - BOOLEAN
Do proxy arp.
shared_media - BOOLEAN
undocumented.
secure_redirects - BOOLEAN
Accept ICMP redirect messages only for gateways,
listed in default gateway list.
default TRUE
redirects - BOOLEAN
Send(router) or accept(host) RFC1620 shared media redirects.
Overrides ip_secure_redirects.
default TRUE (should be FALSE for distributed version,
but I use it...)
bootp_relay - BOOLEAN
Accept packets with source address 0.b.c.d destined
not to this host as local ones. It is supposed, that
BOOTP relay deamon will catch and forward such packets.
default FALSE
Not Implemented Yet.
accept_source_route - BOOLEAN
Accept packets with SRR option.
default TRUE (router)
FALSE (host)
rp_filter - INTEGER
2 - do source validation by reversed path, as specified in RFC1812
Recommended option for single homed hosts and stub network
routers. Could cause troubles for complicated (not loop free)
networks running a slow unreliable protocol (sort of RIP),
or using static routes.
1 - (DEFAULT) Weaker form of RP filtering: drop all the packets
that look as sourced at a directly connected interface, but
were input from another interface.
0 - No source validation.
NOTE: do not disable this option! All BSD derived routing software
(sort of gated, routed etc. etc.) is confused by such packets,
even if they are valid. When enabled it also prevents ip spoofing
in some limited fashion.
NOTE: this option is turned on per default only when ip_forwarding
is on. For non-forwarding hosts it doesn't make much sense and
makes some legal multihoming configurations impossible.
Alexey Kuznetsov.
kuznet@ms2.inr.ac.ru
Updated by:
Andi Kleen
ak@muc.de
$Id: ip-sysctl.txt,v 1.5 1997/10/17 03:58:23 tdyas Exp $
$Id: ip-sysctl.txt,v 1.7 1998/05/02 12:05:00 davem Exp $
Classes
-------
"Class" is complete routing table in common sence.
"Class" is a complete routing table in common sense.
I.e. it is tree of nodes (destination prefix, tos, metric)
with attached information: gateway, device etc.
This tree is looked up as specified in RFC1812 5.2.4.3
......@@ -16,7 +16,7 @@ Classes
THROW - abort route lookup in this class.
Currently number of classes is limited by 255
Currently the number of classes is limited to 255
(0 is reserved for "not specified class")
Three classes are builtin:
......@@ -34,7 +34,7 @@ Classes
Rules
-----
Rule is record of (src prefix, src interface, tos, dst prefix)
Rule is a record of (src prefix, src interface, tos, dst prefix)
with attached information.
Rule types:
......@@ -65,15 +65,15 @@ Lookup algorithm
----------------
We scan rules list, and if a rule is matched, apply it.
If route is found, return it.
If it is not found or THROW node was matched, continue
If a route is found, return it.
If it is not found or a THROW node was matched, continue
to scan rules.
Applications
------------
1. Just ignore classes. All the routes are put to MAIN class
(and/or to DEFAULT class).
1. Just ignore classes. All the routes are put into MAIN class
(and/or into DEFAULT class).
HOWTO: iproute add PREFIX [ tos TOS ] [ gw GW ] [ dev DEV ]
[ metric METRIC ] [ reject ] ... (look at iproute utility)
......@@ -89,13 +89,13 @@ Applications
[ dev INPUTDEV] [ pref PREFERENCE ] route [ gw GATEWAY ]
[ dev OUTDEV ] .....
Warning: just now size of routing table in this approach is
limited by 256. If someone will like this model, I'll
Warning: As of now the size of the routing table in this
approach is limited to 256. If someone likes this model, I'll
relax this limitation.
3. OSPF classes (see RFC1583, RFC1812 E.3.3)
Very clean, stable and robust algorithm for OSPF routing
domains. Unfortunately, it is not used widely in the Internet.
domains. Unfortunately, it is not widely used in the Internet.
Proposed setup:
255 local addresses
......@@ -124,8 +124,8 @@ Applications
4. The Variant Router Requirements Algorithm (RFC1812 E.3.2)
Create 16 classes for different TOS values.
It is funny, but pretty useless algorithm.
I listed it just to show power of new routing code.
It is a funny, but pretty useless algorithm.
I listed it just to show the power of new routing code.
5. All the variety of combinations......
......@@ -139,10 +139,10 @@ GATED
IMPORTANT NOTE
--------------
route.c has compilation time switch CONFIG_IP_LOCAL_RT_POLICY.
route.c has a compilation time switch CONFIG_IP_LOCAL_RT_POLICY.
If it is set, locally originated packets are routed
using all the policy list. It is not very convenient and
pretty ambiguous, when used with NAT and masquerading.
using all the policy list. This is not very convenient and
pretty ambiguous when used with NAT and masquerading.
I set it to FALSE by default.
......
......@@ -27,17 +27,17 @@ NEWS for user.
- New interface addressing paradigm.
Assignment of address ranges to interface,
multiple prefixes etc. etc.
Do not bother, it is compatible with old one. Moreover:
- You more need not do "route add aaa.bbb.ccc... eth0",
Do not bother, it is compatible with the old one. Moreover:
- You don't need to do "route add aaa.bbb.ccc... eth0" anymore,
it is done automatically.
- "Abstract" UNIX sockets and security enhancements.
It is necessary to use TIRPC and TLI emulation library.
This is necessary to use TIRPC and TLI emulation library.
NEWS for hacker.
- New destination cache. Flexible, robust and just beautiful.
- Network stack is reordered, simplified, optimized, a lot of bugs fixed.
(well, and new bugs are introduced, but I haven't seen them yet 8))
(well, and new bugs were introduced, but I haven't seen them yet 8))
It is difficult to describe all the changes, look into source.
If you see this file, then this patch works 8)
......
......@@ -48,7 +48,7 @@ CONFIG_BINFMT_MISC=y
# CONFIG_PNP is not set
#
# Floppy, IDE, and other block devices
# Block devices
#
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_IDE=y
......@@ -94,7 +94,6 @@ CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_IP_ACCT is not set
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
......
......@@ -547,6 +547,6 @@ ENTRY(sys_call_table)
.long SYMBOL_NAME(sys_capget)
.long SYMBOL_NAME(sys_capset) /* 185 */
.rept NR_syscalls-184
.rept NR_syscalls-185
.long SYMBOL_NAME(sys_ni_syscall)
.endr
This diff is collapsed.
......@@ -108,7 +108,11 @@ static struct hw_interrupt_type i8259A_irq_type = {
/*
* Level and edge triggered IO-APIC interrupts need different handling,
* so we use two separate irq descriptors:
* so we use two separate irq descriptors. edge triggered IRQs can be
* handled with the level-triggered descriptor, but that one has slightly
* more overhead. Level-triggered interrupts cannot be handled with the
* edge-triggered handler, without risking IRQ storms and other ugly
* races.
*/
static void do_edge_ioapic_IRQ (unsigned int irq, int cpu,
......@@ -207,17 +211,6 @@ void set_8259A_irq_mask(unsigned int irq)
}
}
void unmask_generic_irq(unsigned int irq)
{
irq_desc[irq].status = 0;
if (IO_APIC_IRQ(irq))
enable_IO_APIC_irq(irq);
else {
cached_irq_mask &= ~(1 << irq);
set_8259A_irq_mask(irq);
}
}
/*
* This builds up the IRQ handler stubs using some ugly macros in irq.h
*
......@@ -277,6 +270,7 @@ BUILD_SMP_INTERRUPT(reschedule_interrupt)
BUILD_SMP_INTERRUPT(invalidate_interrupt)
BUILD_SMP_INTERRUPT(stop_cpu_interrupt)
BUILD_SMP_INTERRUPT(mtrr_interrupt)
BUILD_SMP_INTERRUPT(spurious_interrupt)
/*
* every pentium local APIC has two 'local interrupts', with a
......@@ -376,6 +370,7 @@ int get_irq_list(char *buf)
p += sprintf(p, "NMI: %10u\n", atomic_read(&nmi_counter));
#ifdef __SMP__
p += sprintf(p, "IPI: %10lu\n", ipi_count);
print_IO_APIC();
#endif
return p - buf;
}
......@@ -695,6 +690,16 @@ void enable_8259A_irq (unsigned int irq)
set_8259A_irq_mask(irq);
}
int i8259A_irq_pending (unsigned int irq)
{
unsigned int mask = 1<<irq;
if (irq < 8)
return (inb(0x20) & mask);
return (inb(0xA0) & (mask >> 8));
}
void make_8259A_irq (unsigned int irq)
{
io_apic_irqs &= ~(1<<irq);
......@@ -771,29 +776,20 @@ static void disable_edge_ioapic_irq(unsigned int irq)
{
}
/*
* if we enable this, why does it cause a hang in the BusLogic
* driver, when level triggered PCI IRQs are used?
*/
#define NOT_BROKEN 0
static void enable_level_ioapic_irq(unsigned int irq)
{
#if NOT_BROKEN
enable_IO_APIC_irq(irq);
#endif
self_IPI(irq);
}
static void disable_level_ioapic_irq(unsigned int irq)
{
#if NOT_BROKEN
disable_IO_APIC_irq(irq);
#endif
}
/*
* Has to be called with the irq controller locked
* Has to be called with the irq controller locked, and has to exit
* with with the lock held as well.
*/
static void handle_ioapic_event (unsigned int irq, int cpu,
struct pt_regs * regs)
......@@ -808,13 +804,18 @@ static void handle_ioapic_event (unsigned int irq, int cpu,
while (test_bit(0,&global_irq_lock)) barrier();
for (;;) {
int pending;
int pending, handler;
/* If there is no IRQ handler, exit early, leaving the irq "in progress" */
if (!handle_IRQ_event(irq, regs))
goto no_handler;
/*
* If there is no IRQ handler, exit early, leaving the irq
* "in progress"
*/
handler = handle_IRQ_event(irq, regs);
spin_lock(&irq_controller_lock);
if (!handler)
goto no_handler;
pending = desc->events;
desc->events = 0;
if (!pending)
......@@ -822,7 +823,6 @@ static void handle_ioapic_event (unsigned int irq, int cpu,
spin_unlock(&irq_controller_lock);
}
desc->status &= IRQ_DISABLED;
spin_unlock(&irq_controller_lock);
no_handler:
}
......@@ -850,6 +850,7 @@ static void do_edge_ioapic_IRQ(unsigned int irq, int cpu, struct pt_regs * regs)
}
handle_ioapic_event(irq,cpu,regs);
spin_unlock(&irq_controller_lock);
hardirq_exit(cpu);
release_irqlock(cpu);
......@@ -862,13 +863,14 @@ static void do_level_ioapic_IRQ (unsigned int irq, int cpu,
spin_lock(&irq_controller_lock);
/*
* in the level triggered case we first disable the IRQ
* In the level triggered case we first disable the IRQ
* in the IO-APIC, then we 'early ACK' the IRQ, then we
* handle it and enable the IRQ when finished.
*
* disable has to happen before the ACK, to avoid IRQ storms.
* So this all has to be within the spinlock.
*/
#if NOT_BROKEN
disable_IO_APIC_irq(irq);
#endif
ack_APIC_irq();
desc->ipi = 0;
......@@ -883,6 +885,10 @@ static void do_level_ioapic_IRQ (unsigned int irq, int cpu,
}
handle_ioapic_event(irq,cpu,regs);
/* we still have the spinlock held here */
enable_IO_APIC_irq(irq);
spin_unlock(&irq_controller_lock);
hardirq_exit(cpu);
release_irqlock(cpu);
......@@ -981,11 +987,34 @@ int setup_x86_irq(unsigned int irq, struct irqaction * new)
struct irqaction *old, **p;
unsigned long flags;
/*
* Some drivers like serial.c use request_irq() heavily,
* so we have to be careful not to interfere with a
* running system.
*/
if (new->flags & SA_SAMPLE_RANDOM) {
/*
* This function might sleep, we want to call it first,
* outside of the atomic block.
* Yes, this might clear the entropy pool if the wrong
* driver is attempted to be loaded, without actually
* installing a new handler, but is this really a problem,
* only the sysadmin is able to do this.
*/
rand_initialize_irq(irq);
}
/*
* The following block of code has to be executed atomically
*/
spin_lock_irqsave(&irq_controller_lock,flags);
p = &irq_desc[irq].action;
if ((old = *p) != NULL) {
/* Can't share interrupts unless both agree to */
if (!(old->flags & new->flags & SA_SHIRQ))
if (!(old->flags & new->flags & SA_SHIRQ)) {
spin_unlock_irqrestore(&irq_controller_lock,flags);
return -EBUSY;
}
/* add new interrupt at end of irq queue */
do {
......@@ -995,15 +1024,9 @@ int setup_x86_irq(unsigned int irq, struct irqaction * new)
shared = 1;
}
if (new->flags & SA_SAMPLE_RANDOM)
rand_initialize_irq(irq);
save_flags(flags);
cli();
*p = new;
if (!shared) {
spin_lock(&irq_controller_lock);
#ifdef __SMP__
if (IO_APIC_IRQ(irq)) {
if (IO_APIC_VECTOR(irq) > 0xfe)
......@@ -1016,14 +1039,20 @@ int setup_x86_irq(unsigned int irq, struct irqaction * new)
* First disable it in the 8259A:
*/
cached_irq_mask |= 1 << irq;
if (irq < 16)
if (irq < 16) {
set_8259A_irq_mask(irq);
/*
* transport pending ISA IRQs to
* the new descriptor
*/
if (i8259A_irq_pending(irq))
irq_desc[irq].events = 1;
}
}
#endif
unmask_generic_irq(irq);
spin_unlock(&irq_controller_lock);
irq_desc[irq].handler->enable(irq);
}
restore_flags(flags);
spin_unlock_irqrestore(&irq_controller_lock,flags);
return 0;
}
......@@ -1065,23 +1094,23 @@ void free_irq(unsigned int irq, void *dev_id)
struct irqaction * action, **p;
unsigned long flags;
if (irq >= NR_IRQS) {
printk("Trying to free IRQ%d\n",irq);
if (irq >= NR_IRQS)
return;
}
spin_lock_irqsave(&irq_controller_lock,flags);
for (p = &irq_desc[irq].action; (action = *p) != NULL; p = &action->next) {
if (action->dev_id != dev_id)
continue;
/* Found it - now free it */
save_flags(flags);
cli();
*p = action->next;
restore_flags(flags);
kfree(action);
return;
irq_desc[irq].handler->disable(irq);
goto out;
}
printk("Trying to free free IRQ%d\n",irq);
out:
spin_unlock_irqrestore(&irq_controller_lock,flags);
}
/*
......@@ -1103,7 +1132,7 @@ unsigned long probe_irq_on (void)
spin_lock_irq(&irq_controller_lock);
for (i = NR_IRQS-1; i > 0; i--) {
if (!irq_desc[i].action) {
unmask_generic_irq(i);
irq_desc[i].handler->enable(i);
irqs |= (1 << i);
}
}
......@@ -1170,8 +1199,8 @@ void init_IO_APIC_traps(void)
(IO_APIC_IRQ(i))) {
if (IO_APIC_irq_trigger(i))
irq_desc[i].handler = &ioapic_level_irq_type;
else
irq_desc[i].handler = &ioapic_edge_irq_type;
else /* edge */
irq_desc[i].handler = &ioapic_level_irq_type;
/*
* disable it in the 8259A:
*/
......@@ -1233,6 +1262,8 @@ __initfunc(void init_IRQ(void))
/* IPI for MTRR control */
set_intr_gate(0x50, mtrr_interrupt);
/* IPI vector for APIC spurious interrupts */
set_intr_gate(0xff, spurious_interrupt);
#endif
request_region(0x20,0x20,"pic1");
request_region(0xa0,0x20,"pic2");
......
......@@ -12,7 +12,8 @@ void mask_irq(unsigned int irq);
void unmask_irq(unsigned int irq);
void enable_IO_APIC_irq (unsigned int irq);
void disable_IO_APIC_irq (unsigned int irq);
void set_8259A_irq_mask(unsigned int irq);
void set_8259A_irq_mask (unsigned int irq);
int i8259A_irq_pending (unsigned int irq);
void ack_APIC_irq (void);
void setup_IO_APIC (void);
void init_IO_APIC_traps(void);
......@@ -21,6 +22,7 @@ int IO_APIC_irq_trigger (int irq);
void make_8259A_irq (unsigned int irq);
void send_IPI (int dest, int vector);
void init_pic_mode (void);
void print_IO_APIC (void);
extern unsigned int io_apic_irqs;
......
......@@ -528,8 +528,18 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
*/
p->tss.bitmap = sizeof(struct thread_struct);
/*
* This tried to copy the FPU state, but I wonder whether we really
* want this at all. It is probably nicer to just have a newly started
* process start with a clean slate wrt the fpu. - Linus
*/
#if 1
current->used_math = 0;
current->flags &= ~PF_USEDFPU;
#else
if (last_task_used_math == current)
__asm__("clts ; fnsave %0 ; frstor %0":"=m" (p->tss.i387));
#endif
return 0;
}
......
......@@ -238,6 +238,9 @@ __initfunc(static int cyrix_model(struct cpuinfo_x86 *c))
int nr = c->x86_model;
char *buf = c->x86_model_id;
/* Cyrix claims they have a TSC, but it is broken */
c->x86_capability &= ~16;
/* Note that some of the possibilities this decoding allows
* have never actually been manufactured - but those that
* do actually exist are correctly decoded.
......
......@@ -636,9 +636,16 @@ __initfunc(void enable_local_APIC(void))
value = apic_read(APIC_SPIV);
value |= (1<<8); /* Enable APIC (bit==1) */
value &= ~(1<<9); /* Enable focus processor (bit==0) */
value |= 0xff; /* Set spurious IRQ vector to 0xff */
apic_write(APIC_SPIV,value);
value = apic_read(APIC_TASKPRI);
value &= ~APIC_TPRI_MASK; /* Set Task Priority to 'accept all' */
apic_write(APIC_TASKPRI,value);
udelay(100); /* B safe */
ack_APIC_irq();
udelay(100);
}
__initfunc(void smp_callin(void))
......@@ -1152,12 +1159,6 @@ void send_IPI (int dest, int vector)
__restore_flags(flags);
}
void funny (void)
{
send_IPI(APIC_DEST_ALLBUT,0x30 /*IO_APIC_VECTOR(11)*/);
for(;;)__cli();
}
/*
* A non wait message cannot pass data or cpu source info. This current setup
* is only safe because the kernel lock owner is the only person who can send
......@@ -1474,19 +1475,18 @@ void smp_apic_timer_interrupt(struct pt_regs * regs)
}
/*
* Reschedule call back
* Reschedule call back (not used currently)
*/
asmlinkage void smp_reschedule_interrupt(void)
{
int cpu = smp_processor_id();
ack_APIC_irq();
for (;;) __cli();
/*
* This looks silly, but we actually do need to wait
* for the global interrupt lock.
*/
printk("huh, this is used, where???\n");
irq_enter(cpu, 0);
need_resched = 1;
irq_exit(cpu, 0);
......@@ -1521,6 +1521,15 @@ asmlinkage void smp_mtrr_interrupt(void)
if (mtrr_hook) (*mtrr_hook) ();
}
/*
* This interrupt should _never_ happen with our APIC/SMP architecture
*/
asmlinkage void smp_spurious_interrupt(void)
{
ack_APIC_irq ();
printk("spurious APIC interrupt, ayiee, should never happen.\n");
}
/*
* This part sets up the APIC 32 bit clock in LVTT1, with HZ interrupts
* per second. We assume that the caller has already set up the local
......
......@@ -525,10 +525,6 @@ __initfunc(void time_init(void))
xtime.tv_usec = 0;
/* If we have the CPU hardware time counters, use them */
#ifndef CONFIG_APM
/* Don't use them if a suspend/resume could
corrupt the timer value. This problem
needs more debugging. */
if (boot_cpu_data.x86_capability & 16) {
do_gettimeoffset = do_fast_gettimeoffset;
do_get_fast_time = do_x86_get_fast_time;
......@@ -551,6 +547,5 @@ __initfunc(void time_init(void))
"=d" (init_timer_cc.high));
irq0.handler = pentium_timer_interrupt;
}
#endif
setup_x86_irq(0, &irq0);
}
......@@ -106,6 +106,7 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
tristate 'Digi Intl. RightSwitch SE-X support' CONFIG_DGRS
tristate 'EtherExpressPro/100 support' CONFIG_EEXPRESS_PRO100
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'Mylex EISA LNE390A/B support (EXPERIMENTAL)' CONFIG_LNE390
tristate 'Racal-Interlan EISA ES3210 support (EXPERIMENTAL)' CONFIG_ES3210
tristate 'SMC EtherPower II (EXPERIMENTAL)' CONFIG_EPIC100
tristate 'TI ThunderLAN support (EXPERIMENTAL)' CONFIG_TLAN
......
......@@ -204,6 +204,15 @@ else
endif
endif
ifeq ($(CONFIG_LNE390),y)
L_OBJS += lne390.o
CONFIG_8390_BUILTIN = y
else
ifeq ($(CONFIG_LNE390),m)
CONFIG_8390_MODULE = y
M_OBJS += lne390.o
endif
endif
ifeq ($(CONFIG_PLIP),y)
L_OBJS += plip.o
......
......@@ -71,6 +71,7 @@ extern int elmc_probe(struct device *);
extern int elplus_probe(struct device *);
extern int ac3200_probe(struct device *);
extern int es_probe(struct device *);
extern int lne390_probe(struct device *);
extern int e2100_probe(struct device *);
extern int ni5010_probe(struct device *);
extern int ni52_probe(struct device *);
......@@ -172,6 +173,9 @@ __initfunc(static int ethif_probe(struct device *dev))
#ifdef CONFIG_ES3210
&& es_probe(dev)
#endif
#ifdef CONFIG_LNE390
&& lne390_probe(dev)
#endif
#ifdef CONFIG_E2100 /* Cabletron E21xx series. */
&& e2100_probe(dev)
#endif
......
This diff is collapsed.
......@@ -261,6 +261,7 @@ static void idescsi_end_request (byte uptodate, ide_hwgroup_t *hwgroup)
idescsi_pc_t *pc = (idescsi_pc_t *) rq->buffer;
int log = test_bit(IDESCSI_LOG_CMD, &scsi->log);
u8 *scsi_buf;
unsigned long flags;
if (rq->cmd != IDESCSI_PC_RQ) {
ide_end_request (uptodate, hwgroup);
......@@ -287,7 +288,9 @@ static void idescsi_end_request (byte uptodate, ide_hwgroup_t *hwgroup)
} else printk("\n");
}
}
spin_lock_irqsave(&io_request_lock,flags);
pc->done(pc->scsi_cmd);
spin_unlock_irqrestore(&io_request_lock,flags);
idescsi_free_bh (rq->bh);
kfree(pc); kfree(rq);
scsi->pc = NULL;
......@@ -767,7 +770,9 @@ int idescsi_queue (Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
rq->buffer = (char *) pc;
rq->bh = idescsi_dma_bh (drive, pc);
rq->cmd = IDESCSI_PC_RQ;
spin_unlock(&io_request_lock);
(void) ide_do_drive_cmd (drive, rq, ide_end);
spin_lock(&io_request_lock);
return 0;
abort:
if (pc) kfree (pc);
......
......@@ -880,6 +880,7 @@ void get_sectorsize(int i){
unsigned char *buffer;
int the_result, retries;
Scsi_Cmnd * SCpnt;
unsigned long flags;
buffer = (unsigned char *) scsi_malloc(512);
SCpnt = scsi_allocate_device(NULL, scsi_CDs[i].device, 1);
......@@ -898,10 +899,12 @@ void get_sectorsize(int i){
{
struct semaphore sem = MUTEX_LOCKED;
SCpnt->request.sem = &sem;
spin_lock_irqsave(&io_request_lock, flags);
scsi_do_cmd (SCpnt,
(void *) cmd, (void *) buffer,
512, sr_init_done, SR_TIMEOUT,
MAX_RETRIES);
spin_unlock_irqrestore(&io_request_lock, flags);
down(&sem);
}
......
......@@ -53,6 +53,7 @@ int sr_do_ioctl(int target, unsigned char * sr_cmd, void * buffer, unsigned bufl
Scsi_Cmnd * SCpnt;
Scsi_Device * SDev;
int result, err = 0, retries = 0;
unsigned long flags;
SDev = scsi_CDs[target].device;
SCpnt = scsi_allocate_device(NULL, scsi_CDs[target].device, 1);
......@@ -63,9 +64,11 @@ int sr_do_ioctl(int target, unsigned char * sr_cmd, void * buffer, unsigned bufl
{
struct semaphore sem = MUTEX_LOCKED;
SCpnt->request.sem = &sem;
spin_lock_irqsave(&io_request_lock, flags);
scsi_do_cmd(SCpnt,
(void *) sr_cmd, buffer, buflength, sr_ioctl_done,
IOCTL_TIMEOUT, IOCTL_RETRIES);
spin_unlock_irqrestore(&io_request_lock, flags);
down(&sem);
SCpnt->request.sem = NULL;
}
......
This diff is collapsed.
# This used to be a computer generated file, but it's not any more.
# Edit all you need!
ifdef CONFIG_PSS
ifneq ($(CONFIG_MPU_EMU),Y)
CONFIG_MPU_EMU=y
endif
endif
ifdef CONFIG_SSCAPE
ifneq ($(CONFIG_MPU_EMU),Y)
CONFIG_MPU_EMU=y
endif
endif
ifdef CONFIG_CS4232
ifneq ($(CONFIG_MPU_EMU),Y)
CONFIG_MPU_EMU=y
endif
endif
ifdef CONFIG_MAUI
ifneq ($(CONFIG_MPU_EMU),Y)
CONFIG_MPU_EMU=y
endif
endif
ifdef CONFIG_PSS
ifneq ($(CONFIG_AD1848),Y)
CONFIG_AD1848=y
endif
endif
ifdef CONFIG_GUS16
ifneq ($(CONFIG_AD1848),Y)
CONFIG_AD1848=y
endif
endif
ifdef CONFIG_GUSMAX
ifneq ($(CONFIG_AD1848),Y)
CONFIG_AD1848=y
endif
endif
ifdef CONFIG_MSS
ifneq ($(CONFIG_AD1848),Y)
CONFIG_AD1848=y
endif
endif
ifdef CONFIG_SSCAPE
ifneq ($(CONFIG_AD1848),Y)
CONFIG_AD1848=y
endif
endif
ifdef CONFIG_TRIX
ifneq ($(CONFIG_AD1848),Y)
CONFIG_AD1848=y
endif
endif
ifdef CONFIG_MAD16
ifneq ($(CONFIG_AD1848),Y)
CONFIG_AD1848=y
endif
endif
ifdef CONFIG_CS4232
ifneq ($(CONFIG_AD1848),Y)
CONFIG_AD1848=y
endif
endif
ifdef CONFIG_OPL3SA1
ifneq ($(CONFIG_AD1848),Y)
CONFIG_AD1848=y
endif
endif
ifdef CONFIG_SB
ifneq ($(CONFIG_SBDSP),Y)
CONFIG_SBDSP=y
endif
endif
ifdef CONFIG_TRIX
ifneq ($(CONFIG_SBDSP),Y)
CONFIG_SBDSP=y
endif
endif
ifdef CONFIG_MAD16
ifneq ($(CONFIG_SBDSP),Y)
CONFIG_SBDSP=y
endif
endif
ifdef CONFIG_SB
ifeq ($(CONFIG_SB),m)
ifneq ($(CONFIG_UART401),Y)
CONFIG_UART401=m
endif
else
ifneq ($(CONFIG_UART401),Y)
CONFIG_UART401=y
endif
endif
endif
ifdef CONFIG_TRIX
ifneq ($(CONFIG_UART401),Y)
CONFIG_UART401=y
endif
endif
ifdef CONFIG_MAD16
ifneq ($(CONFIG_UART401),Y)
CONFIG_UART401=y
endif
endif
ifdef CONFIG_OPL3SA1
ifneq ($(CONFIG_UART401),Y)
CONFIG_UART401=y
endif
endif
ifdef CONFIG_PAS
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_SB
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_ADLIB
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_GUS
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_MPU401
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_PSS
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_GUS16
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_GUSMAX
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_MSS
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_SSCAPE
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_TRIX
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_MAD16
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_CS4232
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_MAUI
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_OPL3SA1
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_SOFTOSS
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_YM3812_AUTO
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_VIDC_SOUND
ifneq ($(CONFIG_SEQUENCER),Y)
CONFIG_SEQUENCER=y
endif
endif
ifdef CONFIG_PAS
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_SB
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_GUS
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_PSS
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_GUS16
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_GUSMAX
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_MSS
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_SSCAPE
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_TRIX
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_MAD16
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_CS4232
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_OPL3SA1
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_SOFTOSS
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_VIDC_SOUND
ifneq ($(CONFIG_AUDIO),Y)
CONFIG_AUDIO=y
endif
endif
ifdef CONFIG_PAS
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_SB
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_GUS
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_MPU401
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_PSS
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_GUS16
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_GUSMAX
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_SSCAPE
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_TRIX
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_MAD16
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_CS4232
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_MAUI
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_OPL3SA1
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
ifdef CONFIG_SOFTOSS
ifneq ($(CONFIG_MIDI),Y)
CONFIG_MIDI=y
endif
endif
This diff is collapsed.
Sound Driver Configuration Notes
Michael Chastain, <mailto:mec@shout.net>
18 Apr 1998
The Linux sound driver is derived from OSS/Free, a multi-platform
Unix sound driver by Hannu Savolainen. You can find out
more about OSS/Free and the commercial version, OSS/Linux, at
<http://www.opensound.com/ossfree>.
OSS/Free comes with the configuration program 'configure.c'. We have
discarded that program in favor of a standard Linux configuration file
Config.in.
Config.in defines a set of symbols with the form CONFIG_SOUND_*.
These are the -native symbols-. Here is a description:
CONFIG_SOUND
This is the master symbol. It controls whether the basic
sound-driver code is resident, modular, or not present at all.
If the basic driver is resident, each primary and secondary
driver can be resident, modular, or not present.
If the basic driver is modular, each primary and secondary driver
can be modular or not present.
And if the basic driver is not present, all other drivers are
not present, too.
Primary drivers
These are symbols such as CONFIG_SOUND_SB, CONFIG_SOUND_SB_MODULE,
CONFIG_SOUND_TRIX, or CONFIG_SOUND_TRIX_MODULE. Each driver
that the user can directly select is a primary driver and has
the usual pair of symbols: one resident and one modular.
Each primary driver can be either resident or modular.
Secondary drivers
Primary drivers require the support of secondary drivers, such
as ad1848.o and uart401.o.
In Makefile, each primary driver has a list of required secondary
drivers. The secondary driver requirements are merged and a
single definition is emitted at the end.
For each secondary driver: if any resident primary driver
requires it, that secondary driver will be resident. If no
resident primary driver requires it but some modular primary
driver requires it, then that secondary driver will be modular.
Otherwise that secondary driver will be not present.
OSS/Free also contains tests for secondary drivers. The Makefile
defines symbols for these drivers in EXTRA_CFLAGS.
CONFIG_AUDIO, CONFIG_MIDI, CONFIG_SEQUENCER
These three drivers are like secondary drivers, but not quite.
They can not yet be separated into modules. They are always
linked into the basic sound driver, whether they are needed
or not. (This is in case a primary driver is added to the
system later, as a module, and needs these facilities. If it
were possible to modularise them, then they would get built as
additional modules at that time).
The OSS/Free code does not use the native symbols directly, primarily
because it does not know about modules. I could edit the code, but that
would make it harder to upgrade to new versions of OSS/Free. Instead,
the OSS/Free code continues to use -legacy symbols-.
legacy.h defines all the legacy symbols to 1. This is because, whenever
OSS/Free tests a symbol, the Makefile has already arranged for that
driver to be included.
......@@ -105,7 +105,7 @@ static volatile char irq2dev[17] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1
};
#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS) || defined(MODULE)
static int timer_installed = -1;
......@@ -141,7 +141,7 @@ static void ad1848_halt_input(int dev);
static void ad1848_halt_output(int dev);
static void ad1848_trigger(int dev, int bits);
#if (defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)) || defined(MODULE)
#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
static int ad1848_tmr_install(int dev);
static void ad1848_tmr_reprogram(int dev);
......@@ -1048,7 +1048,7 @@ static int ad1848_prepare_for_output(int dev, int bsize, int bcount)
restore_flags(flags);
devc->xfer_count = 0;
#if (defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)) || defined(MODULE)
#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
if (dev == timer_installed && devc->timer_running)
if ((fs & 0x01) != (old_fs & 0x01))
{
......@@ -1781,6 +1781,7 @@ int ad1848_init(char *name, int io_base, int irq, int dma_playback, int dma_capt
}
audio_devs[my_dev]->portc = portc;
audio_devs[my_dev]->mixer_dev = -1;
memset((char *) portc, 0, sizeof(*portc));
nr_ad1848_devs++;
......@@ -1828,7 +1829,7 @@ int ad1848_init(char *name, int io_base, int irq, int dma_playback, int dma_capt
} else if (irq < 0)
irq2dev[-irq] = devc->dev_no = my_dev;
#if (defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)) || defined(MODULE)
#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
if (devc->model != MD_1848 &&
devc->model != MD_C930 && devc->irq_ok)
ad1848_tmr_install(my_dev);
......@@ -2005,7 +2006,7 @@ void adintr(int irq, void *dev_id, struct pt_regs *dummy)
if (devc->model != MD_1848 && alt_stat & 0x40) /* Timer interrupt */
{
devc->timer_ticks++;
#if (defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)) || defined(MODULE)
#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
if (timer_installed == dev && devc->timer_running)
sound_timer_interrupt();
#endif
......@@ -2405,7 +2406,7 @@ void unload_ms_sound(struct address_info *hw_config)
release_region(hw_config->io_base, 4);
}
#if (defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)) || defined(MODULE)
#if defined(CONFIG_SEQUENCER) && !defined(EXCLUDE_TIMERS)
/*
* Timer stuff (for /dev/music).
......@@ -2576,5 +2577,6 @@ void cleanup_module(void)
if(loaded)
unload_ms_sound(&hw_config);
}
#endif
#endif
......@@ -16,7 +16,7 @@
#include "sound_config.h"
#include "soundmodule.h"
#if defined(CONFIG_YM3812) || defined(MODULE)
#ifdef CONFIG_YM3812
void attach_adlib_card(struct address_info *hw_config)
{
......
......@@ -25,7 +25,7 @@
#include "sound_config.h"
#if defined(CONFIG_AUDIO) || defined(MODULE)
#ifdef CONFIG_AUDIO
#include "ulaw.h"
#include "coproc.h"
......
/*
* Exported symbols for audio driver.
* __NO_VERSION__ because this is still part of sound.o.
*/
#define __NO_VERSION__
#include <linux/module.h>
char audio_syms_symbol;
#include "sound_config.h"
#include "sound_calls.h"
EXPORT_SYMBOL(DMAbuf_start_dma);
EXPORT_SYMBOL(DMAbuf_open_dma);
EXPORT_SYMBOL(DMAbuf_close_dma);
EXPORT_SYMBOL(DMAbuf_inputintr);
EXPORT_SYMBOL(DMAbuf_outputintr);
EXPORT_SYMBOL(dma_ioctl);
EXPORT_SYMBOL(audio_open);
EXPORT_SYMBOL(audio_release);
......@@ -34,7 +34,7 @@
#include "sound_config.h"
#include "soundmodule.h"
#if defined(CONFIG_CS4232) || defined (MODULE)
#ifdef CONFIG_CS4232
#define KEY_PORT 0x279 /* Same as LPT1 status port */
#define CSN_NUM 0x99 /* Just a random number */
......@@ -196,7 +196,6 @@ void attach_cs4232(struct address_info *hw_config)
{
int base = hw_config->io_base, irq = hw_config->irq;
int dma1 = hw_config->dma, dma2 = hw_config->dma2;
int old_num_mixers = num_mixers;
if (dma2 == -1)
dma2 = dma1;
......@@ -208,7 +207,8 @@ void attach_cs4232(struct address_info *hw_config)
0,
hw_config->osp);
if (num_mixers > old_num_mixers)
if (hw_config->slots[0] != -1 &&
audio_devs[hw_config->slots[0]]->mixer_dev!=-1)
{
/* Assume the mixer map is as suggested in the CS4232 databook */
AD1848_REROUTE(SOUND_MIXER_LINE1, SOUND_MIXER_LINE);
......
......@@ -379,13 +379,13 @@ int num_sound_timers = 0;
struct driver_info sound_drivers[] =
{
#if defined(CONFIG_PSS) && !defined(CONFIG_PSS_MODULE)
#ifdef CONFIG_SOUND_PSS
{"PSS", 0, SNDCARD_PSS, "Echo Personal Sound System PSS (ESC614)", attach_pss, probe_pss, unload_pss},
{"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},
#endif
#if defined(CONFIG_GUS) && !defined(CONFIG_GUS_MODULE)
#ifdef CONFIG_SOUND_GUS
#ifdef CONFIG_GUS16
{"GUS16", 0, SNDCARD_GUS16, "Ultrasound 16-bit opt.", attach_gus_db16, probe_gus_db16, unload_gus_db16},
#endif
......@@ -395,43 +395,55 @@ struct driver_info sound_drivers[] =
#endif
#endif
#if defined(CONFIG_MSS) && !defined(CONFIG_MSS_MODULE)
#ifdef CONFIG_SOUND_MSS
{"MSS", 0, SNDCARD_MSS, "MS Sound System", attach_ms_sound, probe_ms_sound, unload_ms_sound},
/* Compaq Deskpro XL */
{"DESKPROXL", 2, SNDCARD_DESKPROXL, "Compaq Deskpro XL", attach_ms_sound, probe_ms_sound, unload_ms_sound},
#endif
#ifdef CONFIG_MAD16
#ifdef CONFIG_SOUND_MAD16
{"MAD16", 0, SNDCARD_MAD16, "MAD16/Mozart (MSS)", attach_mad16, probe_mad16, unload_mad16},
{"MAD16MPU", 0, SNDCARD_MAD16_MPU, "MAD16/Mozart (MPU)", attach_mad16_mpu, probe_mad16_mpu, unload_mad16_mpu},
#endif
#ifdef CONFIG_CS4232
#ifdef CONFIG_SOUND_CS4232
{"CS4232", 0, SNDCARD_CS4232, "CS4232", attach_cs4232, probe_cs4232, unload_cs4232},
{"CS4232MPU", 0, SNDCARD_CS4232_MPU, "CS4232 MIDI", attach_cs4232_mpu, probe_cs4232_mpu, unload_cs4232_mpu},
#endif
#if defined(CONFIG_YM3812) && !defined(CONFIG_YM3812_MODULE)
#ifdef CONFIG_SGALAXY
{"SGALAXY", 0, SNDCARD_SGALAXY, "Sound Galaxy WSS", attach_sgalaxy, probe_sgalaxy, unload_sgalaxy},
#endif
#ifdef CONFIG_SOUND_YM3812
{"OPL3", 0, SNDCARD_ADLIB, "OPL-2/OPL-3 FM", attach_adlib_card, probe_adlib, unload_adlib},
#endif
#if defined(CONFIG_PAS) && !defined(CONFIG_PAS_MODULE)
#ifdef CONFIG_SOUND_PAS
{"PAS16", 0, SNDCARD_PAS, "ProAudioSpectrum", attach_pas_card, probe_pas, unload_pas},
#endif
#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI) && !defined(CONFIG_MPU401_MODULE)
#if (defined(CONFIG_SOUND_MPU401) || defined(CONFIG_SOUND_MPU_EMU)) && defined(CONFIG_MIDI)
{"MPU401", 0, SNDCARD_MPU401,"Roland MPU-401", attach_mpu401, probe_mpu401, unload_mpu401},
#endif
#if defined(CONFIG_UART401) && defined(CONFIG_MIDI) && !defined(CONFIG_UART401_MODULE)
#if defined(CONFIG_SOUND_UART401) && defined(CONFIG_MIDI)
{"UART401", 0, SNDCARD_UART401,"MPU-401 (UART)",
attach_uart401, probe_uart401, unload_uart401},
#endif
#if defined(CONFIG_MAUI) && !defined(CONFIG_MAUI_MODULE)
#if defined(CONFIG_SOUND_MAUI)
{"MAUI", 0, SNDCARD_MAUI,"TB Maui", attach_maui, probe_maui, unload_maui},
#endif
#if defined(CONFIG_UART6850) && defined(CONFIG_MIDI) && !defined(CONFIG_UART6850_MODULE)
#if defined(CONFIG_SOUND_UART6850) && defined(CONFIG_MIDI)
{"MIDI6850", 0, SNDCARD_UART6850,"6860 UART Midi", attach_uart6850, probe_uart6850, unload_uart6850},
#endif
#if defined(CONFIG_SBDSP) && !defined(CONFIG_SBDSP_MODULE)
#ifdef CONFIG_SOUND_SBDSP
{"SBLAST", 0, SNDCARD_SB, "Sound Blaster", attach_sb_card, probe_sb, unload_sb},
{"SBPNP", 6, SNDCARD_SBPNP, "Sound Blaster PnP", attach_sb_card, probe_sb, unload_sb},
......@@ -440,29 +452,29 @@ struct driver_info sound_drivers[] =
#endif
#endif
#ifdef CONFIG_SSCAPE
#ifdef CONFIG_SOUND_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},
#endif
#ifdef CONFIG_OPL3SA1
#ifdef CONFIG_SOUND_OPL3SA1
{"OPL3SA", 0, SNDCARD_OPL3SA1, "Yamaha OPL3-SA", attach_opl3sa_wss, probe_opl3sa_wss, unload_opl3sa_wss},
/* {"OPL3SASB", 0, SNDCARD_OPL3SA1_SB, "OPL3-SA (SB mode)", attach_opl3sa_sb, probe_opl3sa_sb, unload_opl3sa_sb}, */
{"OPL3SAMPU", 0, SNDCARD_OPL3SA1_MPU, "OPL3-SA MIDI", attach_opl3sa_mpu, probe_opl3sa_mpu, unload_opl3sa_mpu},
#endif
#if defined (CONFIG_TRIX) && !defined(CONFIG_TRIX_MODULE)
#ifdef CONFIG_SOUND_TRIX
{"TRXPRO", 0, SNDCARD_TRXPRO, "MediaTrix AudioTrix Pro", attach_trix_wss, probe_trix_wss, unload_trix_wss},
{"TRXPROSB", 0, SNDCARD_TRXPRO_SB, "AudioTrix (SB mode)", attach_trix_sb, probe_trix_sb, unload_trix_sb},
{"TRXPROMPU", 0, SNDCARD_TRXPRO_MPU, "AudioTrix MIDI", attach_trix_mpu, probe_trix_mpu, unload_trix_mpu},
#endif
#if defined(CONFIG_SOFTOSS) && !defined(CONFIG_SOFTOSS_MODULE)
#ifdef CONFIG_SOUND_SOFTOSS
{"SOFTSYN", 0, SNDCARD_SOFTOSS, "SoftOSS Virtual Wave Table",
attach_softsyn_card, probe_softsyn, unload_softsyn},
#endif
#if defined(CONFIG_VMIDI) && defined(CONFIG_MIDI) && !defined(CONFIG_VMIDI_MODULE)
#if defined(CONFIG_SOUND_VMIDI) && defined(CONFIG_MIDI)
{"VMIDI", 0, SNDCARD_VMIDI,"Loopback MIDI Device", attach_v_midi, probe_v_midi, unload_v_midi},
#endif
#ifdef CONFIG_VIDC_SOUND
......@@ -484,7 +496,7 @@ int num_sound_drivers = sizeof(sound_drivers) / sizeof (struct driver_info);
struct card_info snd_installed_cards[] =
{
#ifdef CONFIG_PSS
#ifdef CONFIG_SOUND_PSS
{SNDCARD_PSS, {CONFIG_PSS_BASE, 0, -1, -1}, SND_DEFAULT_ENABLE},
#ifdef CONFIG_PSS_MPU_BASE
{SNDCARD_PSS_MPU, {CONFIG_PSS_MPU_BASE, CONFIG_PSS_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
......@@ -493,7 +505,8 @@ struct card_info snd_installed_cards[] =
{SNDCARD_PSS_MSS, {CONFIG_PSS_MSS_BASE, CONFIG_PSS_MSS_IRQ, CONFIG_PSS_MSS_DMA, -1}, SND_DEFAULT_ENABLE},
#endif
#endif
#ifdef CONFIG_TRIX
#ifdef CONFIG_SOUND_TRIX
#ifndef CONFIG_TRIX_DMA2
#define CONFIG_TRIX_DMA2 CONFIG_TRIX_DMA
#endif
......@@ -506,22 +519,23 @@ struct card_info snd_installed_cards[] =
#endif
#endif
#ifdef CONFIG_OPL3SA1
#ifdef CONFIG_SOUND_OPL3SA1
{SNDCARD_OPL3SA1, {CONFIG_OPL3SA1_BASE, CONFIG_OPL3SA1_IRQ, CONFIG_OPL3SA1_DMA, CONFIG_OPL3SA1_DMA2}, SND_DEFAULT_ENABLE},
#ifdef CONFIG_OPL3SA1_MPU_BASE
{SNDCARD_OPL3SA1_MPU, {CONFIG_OPL3SA1_MPU_BASE, CONFIG_OPL3SA1_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
#endif
#endif
#ifdef CONFIG_SOFTOSS
#ifdef CONFIG_SOUND_SOFTOSS
{SNDCARD_SOFTOSS, {0, 0, -1, -1}, SND_DEFAULT_ENABLE},
#endif
#ifdef CONFIG_SSCAPE
#ifdef CONFIG_SOUND_SSCAPE
{SNDCARD_SSCAPE, {CONFIG_SSCAPE_BASE, CONFIG_SSCAPE_IRQ, CONFIG_SSCAPE_DMA, -1}, SND_DEFAULT_ENABLE},
{SNDCARD_SSCAPE_MSS, {CONFIG_SSCAPE_MSS_BASE, CONFIG_SSCAPE_MSS_IRQ, CONFIG_SSCAPE_DMA, -1}, SND_DEFAULT_ENABLE},
#endif
#ifdef CONFIG_MAD16
#ifdef CONFIG_SOUND_MAD16
#ifndef CONFIG_MAD16_DMA2
#define CONFIG_MAD16_DMA2 CONFIG_MAD16_DMA
#endif
......@@ -531,7 +545,7 @@ struct card_info snd_installed_cards[] =
#endif
#endif
#ifdef CONFIG_CS4232
#ifdef CONFIG_SOUND_CS4232
#ifndef CONFIG_CS4232_DMA2
#define CONFIG_CS4232_DMA2 CONFIG_CS4232_DMA
#endif
......@@ -541,8 +555,15 @@ struct card_info snd_installed_cards[] =
{SNDCARD_CS4232, {CONFIG_CS4232_BASE, CONFIG_CS4232_IRQ, CONFIG_CS4232_DMA, CONFIG_CS4232_DMA2}, SND_DEFAULT_ENABLE},
#endif
#ifdef CONFIG_SGALAXY
#ifndef CONFIG_SGALAXY_DMA2
#define CONFIG_SGALAXY_DMA2 CONFIG_SGALAXY_DMA
#endif
{SNDCARD_SGALAXY, {CONFIG_SGALAXY_BASE, CONFIG_SGALAXY_IRQ, CONFIG_SGALAXY_DMA, CONFIG_SGALAXY_DMA2, 0, NULL, CONFIG_SGALAXY_SGBASE}, SND_DEFAULT_ENABLE},
#endif
#ifdef CONFIG_MSS
#ifdef CONFIG_SOUND_MSS
#ifndef CONFIG_MSS_DMA2
#define CONFIG_MSS_DMA2 -1
#endif
......@@ -552,17 +573,17 @@ struct card_info snd_installed_cards[] =
#else
{SNDCARD_MSS, {CONFIG_MSS_BASE, CONFIG_MSS_IRQ, CONFIG_MSS_DMA, CONFIG_MSS_DMA2}, SND_DEFAULT_ENABLE},
#endif
#ifdef MSS2_BASE
{SNDCARD_MSS, {MSS2_BASE, MSS2_IRQ, MSS2_DMA, MSS2_DMA2}, SND_DEFAULT_ENABLE},
#endif
#endif
#ifdef CONFIG_PAS
#ifdef CONFIG_SOUND_PAS
{SNDCARD_PAS, {CONFIG_PAS_BASE, CONFIG_PAS_IRQ, CONFIG_PAS_DMA, -1}, SND_DEFAULT_ENABLE},
#endif
#ifdef CONFIG_SB
#ifdef CONFIG_SOUND_SB
#ifndef CONFIG_SB_DMA
#define CONFIG_SB_DMA 1
#endif
......@@ -574,11 +595,12 @@ struct card_info snd_installed_cards[] =
{SNDCARD_SB, {SB2_BASE, SB2_IRQ, SB2_DMA, SB2_DMA2}, SND_DEFAULT_ENABLE},
#endif
#endif
#if defined(CONFIG_MAUI)
#ifdef CONFIG_SOUND_MAUI
{SNDCARD_MAUI, {CONFIG_MAUI_BASE, CONFIG_MAUI_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
#endif
#if defined(CONFIG_MPU401) && defined(CONFIG_MIDI)
#if defined(CONFIG_SOUND_MPU401) && defined(CONFIG_MIDI)
{SNDCARD_MPU401, {CONFIG_MPU_BASE, CONFIG_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
#ifdef MPU2_BASE
{SNDCARD_MPU401, {MPU2_BASE, MPU2_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
......@@ -588,17 +610,17 @@ struct card_info snd_installed_cards[] =
#endif
#endif
#if defined(CONFIG_UART6850) && defined(CONFIG_MIDI)
#if defined(CONFIG_SOUND_UART6850) && defined(CONFIG_MIDI)
{SNDCARD_UART6850, {CONFIG_U6850_BASE, CONFIG_U6850_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
#endif
#if defined(CONFIG_SB)
#ifdef CONFIG_SOUND_SB
#if defined(CONFIG_MIDI) && defined(CONFIG_SB_MPU_BASE)
{SNDCARD_SB16MIDI,{CONFIG_SB_MPU_BASE, CONFIG_SB_MPU_IRQ, 0, -1}, SND_DEFAULT_ENABLE},
#endif
#endif
#ifdef CONFIG_GUS
#ifdef CONFIG_SOUND_GUS
#ifndef CONFIG_GUS_DMA2
#define CONFIG_GUS_DMA2 CONFIG_GUS_DMA
#endif
......@@ -608,11 +630,11 @@ struct card_info snd_installed_cards[] =
{SNDCARD_GUS, {CONFIG_GUS_BASE, CONFIG_GUS_IRQ, CONFIG_GUS_DMA, CONFIG_GUS_DMA2}, SND_DEFAULT_ENABLE},
#endif
#if defined(CONFIG_YM3812)
#ifdef CONFIG_SOUND_YM3812
{SNDCARD_ADLIB, {FM_MONO, 0, 0, -1}, SND_DEFAULT_ENABLE},
#endif
#if defined(CONFIG_VMIDI) && defined(CONFIG_MIDI)
#if defined(CONFIG_SOUND_VMIDI) && defined(CONFIG_MIDI)
{SNDCARD_VMIDI, {0, 0, 0, -1}, SND_DEFAULT_ENABLE},
#endif
......
......@@ -1131,6 +1131,12 @@ void DMAbuf_init(int dev, int dma1, int dma2)
* NOTE! This routine could be called several times.
*/
/* drag in audio_syms.o */
{
extern char audio_syms_symbol;
audio_syms_symbol = 0;
}
if (adev && adev->dmap_out == NULL) {
if (adev->d == NULL)
panic("OSS: audio_devs[%d]->d == NULL\n", dev);
......
......@@ -26,7 +26,7 @@
#include "sound_config.h"
#include "soundmodule.h"
#if defined(CONFIG_GUS) || defined(MODULE)
#ifdef CONFIG_GUS
#include "gus_hw.h"
......@@ -57,7 +57,7 @@ void attach_gus_card(struct address_info *hw_config)
if (hw_config->dma2 != -1 && hw_config->dma2 != hw_config->dma)
if (sound_alloc_dma(hw_config->dma2, "GUS(2)"))
printk(KERN_ERR "gus_card.c: Can't allocate DMA channel %d\n", hw_config->dma2);
#if defined(CONFIG_MIDI)
#ifdef CONFIG_MIDI
gus_midi_init(hw_config);
#endif
}
......@@ -152,13 +152,13 @@ void gusintr(int irq, void *dev_id, struct pt_regs *dummy)
}
if (src & (MIDI_TX_IRQ | MIDI_RX_IRQ))
{
#if defined(CONFIG_MIDI)
#ifdef CONFIG_MIDI
gus_midi_interrupt(0);
#endif
}
if (src & (GF1_TIMER1_IRQ | GF1_TIMER2_IRQ))
{
#if defined(CONFIG_SEQUENCER) || defined(CONFIG_SEQUENCER_MODULE)
#ifdef CONFIG_SEQUENCER
if (gus_timer_enabled)
sound_timer_interrupt();
gus_write8(0x45, 0); /* Ack IRQ */
......@@ -187,7 +187,7 @@ int probe_gus_db16(struct address_info *hw_config)
void attach_gus_db16(struct address_info *hw_config)
{
#if defined(CONFIG_GUS) || defined(MODULE)
#ifdef CONFIG_GUS
gus_pcm_volume = 100;
gus_wave_volume = 90;
#endif
......
......@@ -17,7 +17,8 @@
#include "gus_hw.h"
#if ( defined(CONFIG_GUS) && defined(CONFIG_MIDI) ) || defined (MODULE)
#ifdef CONFIG_GUS
#ifdef CONFIG_MIDI
static int midi_busy = 0, input_opened = 0;
static int my_dev;
......@@ -266,3 +267,4 @@ void gus_midi_interrupt(int dummy)
}
#endif
#endif
......@@ -12,7 +12,7 @@
#include <linux/config.h>
#include "sound_config.h"
#if defined(CONFIG_GUS) || defined(MODULE)
#ifdef CONFIG_GUS
#include "gus_linearvol.h"
#define GUS_VOLUME gus_wave_volume
......
......@@ -25,7 +25,7 @@
#include <linux/ultrasound.h>
#include "gus_hw.h"
#if defined(CONFIG_GUS) || defined(MODULE)
#ifdef CONFIG_GUS
#define GUS_BANK_SIZE (((iw_mode) ? 256*1024*1024 : 256*1024))
......@@ -3115,7 +3115,7 @@ void gus_wave_init(struct address_info *hw_config)
hw_config->slots[0] = sdev;
synth_devs[sdev] = &guswave_operations;
sequencer_init();
#if defined(CONFIG_SEQUENCER) || defined(MODULE)
#ifdef CONFIG_SEQUENCER
gus_tmr_install(gus_base + 8);
#endif
}
......@@ -3442,7 +3442,7 @@ void guswave_dma_irq(void)
}
}
#if defined(CONFIG_SEQUENCER) || defined(MODULE)
#ifdef CONFIG_SEQUENCER
/*
* Timer stuff
......
......@@ -81,7 +81,7 @@ int main( int argc, const char * argv [] )
fprintf(stderr,"hex2hex: [-i] filename\n");
exit(1);
}
varline = argv[1;
varline = argv[1];
l = loadhex(stdin, buf);
printf("/*\n *\t Computer generated file. Do not edit.\n */\n");
......
......@@ -17,7 +17,7 @@
#include "sound_config.h"
#if defined(CONFIG_GUS) || defined(MODULE)
#ifdef CONFIG_GUS
#include <linux/ultrasound.h>
#include "gus_hw.h"
......
#ifndef _SOUND_LEGACY_H_
#define _SOUND_LEGACY_H_
/*
* Force on additional support
*/
#define __SGNXPRO__
#define DESKPROXL
/* #define SM_GAMES */
#define SM_WAVE
/*
* Define legacy options.
*/
#define SELECTED_SOUND_OPTIONS 0x0
#define HAVE_MAUI_BOOT
#define PSS_HAVE_LD
#define INCLUDE_TRIX_BOOT
#define CONFIG_CS4232
#define CONFIG_GUS
#define CONFIG_MAD16
#define CONFIG_MAUI
#define CONFIG_MPU401
#define CONFIG_MSS
#define CONFIG_OPL3SA1
#define CONFIG_PAS
#define CONFIG_PSS
#define CONFIG_SB
#define CONFIG_SOFTOSS
#define CONFIG_SSCAPE
#define CONFIG_TRIX
#define CONFIG_VMIDI
#define CONFIG_YM3812
#define CONFIG_AUDIO
#define CONFIG_MIDI
#define CONFIG_SEQUENCER
#define CONFIG_AD1848
#define CONFIG_MPU_EMU
#define CONFIG_SBDSP
#define CONFIG_UART401
#endif /* _SOUND_LEGACY_H */
/* Computer generated file. Please don't edit! */
#include <linux/config.h>
#define KERNEL_COMPATIBLE_CONFIG
#define SELECTED_SOUND_OPTIONS 0x00000000
#if \
defined(CONFIG_PSS) || defined(CONFIG_SSCAPE) || \
defined(CONFIG_CS4232) || defined(CONFIG_MAUI) || \
defined(CONFIG_PSS_MODULE) || defined(CONFIG_SSCAPE_MODULE) || \
defined(CONFIG_CS4232_MODULE) || defined(CONFIG_MAUI_MODULE)
# define CONFIG_MPU_EMU
#endif
#if \
defined(CONFIG_PSS) || defined(CONFIG_GUS16) || \
defined(CONFIG_GUSMAX) || defined(CONFIG_MSS) || \
defined(CONFIG_SSCAPE) || defined(CONFIG_TRIX) || \
defined(CONFIG_MAD16) || defined(CONFIG_CS4232) || \
defined(CONFIG_OPL3SA1) || \
defined(CONFIG_PSS_MODULE) || defined(CONFIG_GUS16_MODULE) || \
defined(CONFIG_GUSMAX_MODULE) || defined(CONFIG_MSS_MODULE) || \
defined(CONFIG_SSCAPE_MODULE) || defined(CONFIG_TRIX_MODULE) || \
defined(CONFIG_MAD16_MODULE) || defined(CONFIG_CS4232_MODULE) || \
defined(CONFIG_OPL3SA1_MODULE)
# define CONFIG_AD1848
#endif
#if \
defined(CONFIG_PAS) || defined(CONFIG_SB) || \
defined(CONFIG_GUS) || defined(CONFIG_PSS) || \
defined(CONFIG_GUS16) || defined(CONFIG_GUSMAX) || \
defined(CONFIG_MSS) || defined(CONFIG_SSCAPE) || \
defined(CONFIG_TRIX) || defined(CONFIG_MAD16) || \
defined(CONFIG_CS4232) || defined(CONFIG_OPL3SA1) || \
defined(CONFIG_SOFTOSS) || \
defined(CONFIG_PAS_MODULE) || defined(CONFIG_SB_MODULE) || \
defined(CONFIG_GUS_MODULE) || defined(CONFIG_PSS_MODULE) || \
defined(CONFIG_GUS16_MODULE) || defined(CONFIG_GUSMAX_MODULE) || \
defined(CONFIG_MSS_MODULE) || defined(CONFIG_SSCAPE_MODULE) || \
defined(CONFIG_TRIX_MODULE) || defined(CONFIG_MAD16_MODULE) || \
defined(CONFIG_CS4232_MODULE) || defined(CONFIG_OPL3SA1_MODULE) || \
defined(CONFIG_SOFTOSS_MODULE) || defined(CONFIG_VIDC_SOUND)
# define CONFIG_AUDIO
#endif
#if \
defined(CONFIG_PAS) || defined(CONFIG_SB) || \
defined(CONFIG_GUS) || defined(CONFIG_MPU401) || \
defined(CONFIG_PSS) || defined(CONFIG_GUS16) || \
defined(CONFIG_GUSMAX) || defined(CONFIG_SSCAPE) || \
defined(CONFIG_TRIX) || defined(CONFIG_MAD16) || \
defined(CONFIG_CS4232) || defined(CONFIG_MAUI) || \
defined(CONFIG_OPL3SA1) || defined(CONFIG_SOFTOSS) || \
defined(CONFIG_PAS_MODULE) || defined(CONFIG_SB_MODULE) || \
defined(CONFIG_GUS_MODULE) || defined(CONFIG_MPU401_MODULE) || \
defined(CONFIG_PSS_MODULE) || defined(CONFIG_GUS16_MODULE) || \
defined(CONFIG_GUSMAX_MODULE) || defined(CONFIG_SSCAPE_MODULE) || \
defined(CONFIG_TRIX_MODULE) || defined(CONFIG_MAD16_MODULE) || \
defined(CONFIG_CS4232_MODULE) || defined(CONFIG_MAUI_MODULE) || \
defined(CONFIG_OPL3SA1_MODULE) || defined(CONFIG_SOFTOSS_MODULE)
# define CONFIG_MIDI
#endif
#if \
defined(CONFIG_SB) || defined(CONFIG_TRIX) || \
defined(CONFIG_MAD16) || \
defined(CONFIG_SB_MODULE) || defined(CONFIG_TRIX_MODULE) || \
defined(CONFIG_MAD16_MODULE)
# define CONFIG_SBDSP
#endif
#if \
defined(CONFIG_SB_MODULE) || defined(CONFIG_TRIX_MODULE) || \
defined(CONFIG_MAD16_MODULE)
# define CONFIG_SBDSP_MODULE
#endif
#if \
defined(CONFIG_SB) || defined(CONFIG_TRIX) || \
defined(CONFIG_MAD16) || defined(CONFIG_SB_MODULE) || \
defined(CONFIG_TRIX_MODULE) || defined(CONFIG_MAD16_MODULE)
# define CONFIG_UART401
#endif
#if \
defined(CONFIG_SB_MODULE) || defined(CONFIG_TRIX_MODULE) || \
defined(CONFIG_MAD16_MODULE)
#ifndef CONFIG_UART401_MODULE
#define CONFIG_UART401_MODULE
#endif
#endif
#if \
defined(CONFIG_PAS) || defined(CONFIG_SB) || \
defined(CONFIG_ADLIB) || defined(CONFIG_GUS) || \
defined(CONFIG_MPU401) || defined(CONFIG_PSS) || \
defined(CONFIG_SSCAPE) || defined(CONFIG_TRIX) || \
defined(CONFIG_MAD16) || defined(CONFIG_CS4232) || \
defined(CONFIG_MAUI) || defined(CONFIG_OPL3SA1) || \
defined(CONFIG_PAS_MODULE) || defined(CONFIG_SB_MODULE) || \
defined(CONFIG_ADLIB_MODULE) || defined(CONFIG_GUS_MODULE) || \
defined(CONFIG_MPU401_MODULE) || defined(CONFIG_PSS_MODULE) || \
defined(CONFIG_SSCAPE_MODULE) || defined(CONFIG_TRIX_MODULE) || \
defined(CONFIG_MAD16_MODULE) || defined(CONFIG_CS4232_MODULE) || \
defined(CONFIG_MAUI_MODULE) || defined(CONFIG_OPL3SA1_MODULE)
# define CONFIG_SEQUENCER
#endif
/*
* Force on additional support
*/
#define SM_WAVE
#define __SGNXPRO__
/* #define SM_GAMES */
#define DESKPROXL
bool 'Additional low level drivers' CONFIG_LOWLEVEL_SOUND
if [ "$CONFIG_LOWLEVEL_SOUND" = "y" ]; then
bool 'ACI mixer (miroPCM12)' CONFIG_ACI_MIXER
bool 'AWE32 synth' CONFIG_AWE32_SYNTH
bool 'Gallant Audio Cards (SC-6000 and SC-6600 based)' CONFIG_AEDSP16
if [ "$CONFIG_AEDSP16" = "y" ]; then
comment 'SC-6600 Audio Cards have no jumper switches at all'
bool 'SC-6600 based audio cards (new Audio Excel DSP 16)' CONFIG_SC6600
if [ "$CONFIG_SB" = "y" -a "$CONFIG_AEDSP16_MSS" != "y" ]; then
bool 'Audio Excel DSP 16 (SBPro emulation)' CONFIG_AEDSP16_SBPRO
if [ "$CONFIG_AEDSP16_SBPRO" = "y" ]; then
comment 'Audio Excel DSP 16 [Sound Blaster Pro]'
hex 'I/O base for Audio Excel DSP 16 220 or 240' \
CONFIG_AEDSP16_BASE $CONFIG_SB_BASE
int 'Audio Excel DSP 16 IRQ 5, 7, 9, 10, 11' \
CONFIG_AEDSP16_SB_IRQ $CONFIG_SB_IRQ
int 'Audio Excel DSP 16 DMA 0, 1 or 3' CONFIG_AEDSP16_SB_DMA $CONFIG_SB_DMA
fi
fi
if [ "$CONFIG_MSS" = "y" -a "$CONFIG_AEDSP16_SBPRO" != "y" ]; then
bool 'Audio Excel DSP 16 (MSS emulation)' CONFIG_AEDSP16_MSS
if [ "$CONFIG_AEDSP16_MSS" = "y" ]; then
comment 'Audio Excel DSP 16 [Microsoft Sound System]'
hex 'I/O base for Audio Excel DSP 16 220 or 240' CONFIG_AEDSP16_BASE 220
int 'Audio Excel DSP 16 IRQ 5, 7, 9, 10, 11' \
CONFIG_AEDSP16_MSS_IRQ $CONFIG_MSS_IRQ
int 'Audio Excel DSP 16 DMA 0, 1 or 3' CONFIG_AEDSP16_MSS_DMA $CONFIG_MSS_DMA
fi
fi
if [ "$CONFIG_MPU401" = "y" ]; then
bool 'Audio Excel DSP 16 (MPU401 emulation)' CONFIG_AEDSP16_MPU401
if [ "$CONFIG_AEDSP16_MPU401" = "y" ]; then
comment 'Audio Excel DSP 16 [MPU-401]'
if [ "$CONFIG_AEDSP16_SBPRO" != "y" \
-a "$CONFIG_AEDSP16_MSS" != "y" ]; then
hex 'I/O base for Audio Excel DSP 16 220 or 240' CONFIG_AEDSP16_BASE 220
fi
int 'MPU401 IRQ for Audio Excel DSP 16 5, 7, 9, 10 or 0 (disable)' \
CONFIG_AEDSP16_MPU_IRQ $CONFIG_MPU_IRQ
fi
fi
if [ "$CONFIG_SC6600" = "y" ]; then
comment 'SC-6600 specific configuration'
bool 'Activate SC-6600 Joystick Interface' CONFIG_SC6600_JOY
int 'SC-6600 CDROM Interface (4=None, 3=IDE, 1=Panasonic, 0=?Sony?)' \
CONFIG_SC6600_CDROM 4
hex 'SC-6600 CDROM Interface I/O Address' CONFIG_SC6600_CDROMBASE 0
fi
fi
fi
......@@ -4,10 +4,9 @@
#include "lowlevel.h"
#include <linux/config.h>
#include <linux/module.h>
#include "../soundvers.h"
#ifdef CONFIG_LOWLEVEL_SOUND
#ifdef LOWLEVEL_MODULE
char *lowlevel_version = SOUND_VERSION_STRING;
#endif
......@@ -61,4 +60,6 @@ sound_unload_lowlevel_drivers(void)
#endif
}
#endif
EXPORT_SYMBOL(sound_init_lowlevel_drivers);
EXPORT_SYMBOL(sound_unload_lowlevel_drivers);
......@@ -74,7 +74,7 @@ static int mad16_cdsel;
#endif
#if defined(CONFIG_MAD16) || defined(MODULE)
#ifdef CONFIG_MAD16
#include "sb.h"
......@@ -407,11 +407,11 @@ static int init_c930(struct address_info *hw_config)
mad_write(MC3_PORT, 0); /* Disable SB mode IRQ and DMA */
#ifdef MAD16_CDSEL
if(MAD16_CDSEL & 0x20)
mad_write(MC4_PORT, 0x66); /* opl4 */
mad_write(MC4_PORT, 0x62); /* opl4 */
else
mad_write(MC4_PORT, 0x56); /* opl3 */
mad_write(MC4_PORT, 0x52); /* opl3 */
#else
mad_write(MC4_PORT, 0x56);
mad_write(MC4_PORT, 0x52);
#endif
mad_write(MC5_PORT, 0x3C); /* Init it into mode2 */
mad_write(MC6_PORT, 0x02); /* Enable WSS, Disable MPU and SB */
......
......@@ -29,7 +29,7 @@
#include "soundmodule.h"
#include "sound_firmware.h"
#if defined(CONFIG_MAUI) || defined(MODULE)
#ifdef CONFIG_MAUI
static int maui_base = 0x330;
......@@ -50,7 +50,7 @@ static int *maui_osp;
static int (*orig_load_patch) (int dev, int format, const char *addr,
int offs, int count, int pmgr_flag) = NULL;
#ifdef CONFIG_MAUI_HAVE_BOOT
#ifdef HAVE_MAUI_BOOT
#include "maui_boot.h"
#else
static unsigned char *maui_os = NULL;
......
/*
* Exported symbols for midi driver.
* __NO_VERSION__ because this is still part of sound.o.
*/
#define __NO_VERSION__
#include <linux/module.h>
char midi_syms_symbol;
#include "sound_config.h"
#define _MIDI_SYNTH_C_
#include "midi_synth.h"
EXPORT_SYMBOL(do_midi_msg);
EXPORT_SYMBOL(midi_synth_open);
EXPORT_SYMBOL(midi_synth_close);
EXPORT_SYMBOL(midi_synth_ioctl);
EXPORT_SYMBOL(midi_synth_kill_note);
EXPORT_SYMBOL(midi_synth_start_note);
EXPORT_SYMBOL(midi_synth_set_instr);
EXPORT_SYMBOL(midi_synth_reset);
EXPORT_SYMBOL(midi_synth_hw_control);
EXPORT_SYMBOL(midi_synth_aftertouch);
EXPORT_SYMBOL(midi_synth_controller);
EXPORT_SYMBOL(midi_synth_panning);
EXPORT_SYMBOL(midi_synth_setup_voice);
EXPORT_SYMBOL(midi_synth_send_sysex);
EXPORT_SYMBOL(midi_synth_bender);
EXPORT_SYMBOL(midi_synth_load_patch);
EXPORT_SYMBOL(MIDIbuf_avail);
......@@ -20,7 +20,7 @@
#include "sound_config.h"
#if defined(CONFIG_MIDI) || defined (MODULE)
#ifdef CONFIG_MIDI
#define _MIDI_SYNTH_C_
......@@ -31,7 +31,7 @@ static int sysex_state[MAX_MIDI_DEV] =
{0};
static unsigned char prev_out_status[MAX_MIDI_DEV];
#if !defined(CONFIG_SEQUENCER) && !defined(MODULE)
#ifndef CONFIG_SEQUENCER
#define STORE(cmd)
#else
#define STORE(cmd) \
......
......@@ -411,6 +411,11 @@ unsigned int MIDIbuf_poll(int dev, struct file *file, poll_table * wait)
void MIDIbuf_init(void)
{
/* drag in midi_syms.o */
{
extern char midi_syms_symbol;
midi_syms_symbol = 0;
}
}
int MIDIbuf_avail(int dev)
......
......@@ -24,11 +24,11 @@
#include "sound_config.h"
#include "soundmodule.h"
#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI) || defined(MODULE)
#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
#include "coproc.h"
#if defined(CONFIG_SEQUENCER) || defined(MODULE)
#ifdef CONFIG_SEQUENCER
static int timer_mode = TMR_INTERNAL, timer_caps = TMR_INTERNAL;
#endif
......@@ -159,7 +159,7 @@ static unsigned char len_tab[] = /* # of data bytes following a status
0 /* Fx */
};
#if !defined(CONFIG_SEQUENCER) && !defined(MODULE)
#ifndef CONFIG_SEQUENCER
#define STORE(cmd)
#else
#define STORE(cmd) \
......@@ -1216,7 +1216,7 @@ void unload_mpu401(struct address_info *hw_config)
* Timer stuff
****************************************************/
#if defined(CONFIG_SEQUENCER) || defined(MODULE)
#if defined(CONFIG_SEQUENCER)
static volatile int timer_initialized = 0, timer_open = 0, tmr_running = 0;
static volatile int curr_tempo, curr_timebase, hw_timebase;
......
......@@ -32,7 +32,7 @@
#include "sound_config.h"
#include "soundmodule.h"
#if defined(CONFIG_YM3812) || defined(MODULE)
#ifdef CONFIG_YM3812
#include "opl3.h"
......@@ -1209,11 +1209,10 @@ void cleanup_module(void)
SOUND_LOCK_END;
}
#else
#endif
#endif
EXPORT_SYMBOL(opl3_init);
EXPORT_SYMBOL(opl3_detect);
MODULE_PARM(io, "i");
#endif
/*
* sound/Xopl3sa.c
* sound/opl3sa.c
*
* Low level driver for Yamaha YMF701B aka OPL3-SA chip
*
......@@ -19,10 +19,12 @@
*/
#include <linux/config.h>
#include <linux/module.h>
#undef SB_OK
#include "sound_config.h"
#include "soundmodule.h"
#ifdef SB_OK
#include "sb.h"
static int sb_initialized = 0;
......@@ -293,6 +295,7 @@ MODULE_PARM(mpu_irq,"i");
struct address_info cfg;
struct address_info mpu_cfg;
static int found_mpu;
int init_module(void)
{
......@@ -312,7 +315,7 @@ int init_module(void)
if (probe_opl3sa_wss(&cfg) == 0)
return -ENODEV;
found_mpu=probe_opl3_mpu(&mpu_cfg);
found_mpu=probe_opl3sa_mpu(&mpu_cfg);
attach_opl3sa_wss(&cfg);
if(found_mpu)
......@@ -325,7 +328,7 @@ void cleanup_module(void)
{
if(found_mpu)
unload_opl3sa_mpu(&mpu_cfg);
unload_opl3sa(&cfg);
unload_opl3sa_wss(&cfg);
SOUND_LOCK_END;
}
......
......@@ -9,7 +9,7 @@
#include "sound_config.h"
#include "soundmodule.h"
#if defined(CONFIG_PAS) || defined(MODULE)
#ifdef CONFIG_PAS
static unsigned char dma_bits[] = {
4, 1, 2, 3, 0, 5, 6, 7
......@@ -89,7 +89,7 @@ static void pasintr(int irq, void *dev_id, struct pt_regs *dummy)
}
if (status & 0x10)
{
#if defined(CONFIG_MIDI)
#ifdef CONFIG_MIDI
pas_midi_interrupt();
#endif
status &= ~0x10;
......@@ -219,7 +219,7 @@ static int config_pas_hw(struct address_info *hw_config)
mix_write(0x80 | 5, 0x078B);
mix_write(5, 0x078B);
#if !defined(DISABLE_SB_EMULATION) && (defined(CONFIG_SB) || defined(CONFIG_SB_MODULE))
#if !defined(DISABLE_SB_EMULATION) && defined(CONFIG_SB)
{
struct address_info *sb_config;
......@@ -322,7 +322,7 @@ void attach_pas_card(struct address_info *hw_config)
if ((pas_model = pas_read(0xFF88)))
{
char temp[100];
char temp[100];
sprintf(temp,
"%s rev %d", pas_model_names[(int) pas_model],
......@@ -335,12 +335,12 @@ void attach_pas_card(struct address_info *hw_config)
pas_pcm_init(hw_config);
#endif
#if !defined(DISABLE_SB_EMULATION) && (defined(CONFIG_SB) || defined(CONFIG_SB_MODULE))
#if !defined(DISABLE_SB_EMULATION) && defined(CONFIG_SB)
sb_dsp_disable_midi(pas_sb_base); /* No MIDI capability */
#endif
#if defined(CONFIG_MIDI)
#ifdef CONFIG_MIDI
pas_midi_init();
#endif
pas_init_mixer();
......
......@@ -15,7 +15,8 @@
#include "sound_config.h"
#if ( defined(MODULE) || defined(CONFIG_PAS) ) && defined(CONFIG_MIDI)
#ifdef CONFIG_PAS
#ifdef CONFIG_MIDI
static int midi_busy = 0, input_opened = 0;
static int my_dev;
......@@ -275,3 +276,4 @@ pas_midi_interrupt(void)
}
#endif
#endif
......@@ -19,7 +19,7 @@
#include "sound_config.h"
#if defined(CONFIG_PAS) || defined(MODULE)
#ifdef CONFIG_PAS
#ifndef DEB
#define DEB(what) /* (what) */
......
......@@ -15,7 +15,8 @@
#include "sound_config.h"
#if defined(MODULE) || ( defined(CONFIG_PAS) && defined(CONFIG_AUDIO) )
#ifdef CONFIG_PAS
#ifdef CONFIG_AUDIO
#ifndef DEB
#define DEB(WHAT)
......@@ -459,3 +460,4 @@ pas_pcm_interrupt(unsigned char status, int cause)
}
#endif
#endif
......@@ -32,7 +32,8 @@
#include "sound_firmware.h"
#include "soundmodule.h"
#if (defined(CONFIG_PSS) && defined(CONFIG_AUDIO))||defined(MODULE)
#ifdef CONFIG_PSS
#ifdef CONFIG_AUDIO
/*
* PSS registers.
......@@ -80,11 +81,12 @@
#include "coproc.h"
#ifdef CONFIG_PSS_HAVE_BOOT
#ifdef PSS_HAVE_LD
#include "pss_boot.h"
#else
static unsigned char *pss_synth = NULL;
static int pss_synthLen = 0;
static unsigned char *pss_synth =
NULL;
#endif
unsigned char pss_mixer = 1;
......@@ -1122,3 +1124,4 @@ void cleanup_module(void)
}
#endif
#endif
#endif
#include <linux/config.h>
#include "legacy.h"
#ifdef CONFIG_SBDSP
#define DSP_RESET (devc->base + 0x6)
......@@ -112,6 +113,7 @@ typedef struct sb_devc {
int input_opened;
int midi_broken;
void (*midi_input_intr) (int dev, unsigned char data);
void *midi_irq_cookie; /* IRQ cookie for the midi */
} sb_devc;
int sb_dsp_command (sb_devc *devc, unsigned char val);
......@@ -131,4 +133,5 @@ int ess_write (sb_devc *devc, unsigned char reg, unsigned char data);
int ess_read (sb_devc *devc, unsigned char reg);
extern int acer;
extern sb_devc *last_sb;
#endif
......@@ -20,7 +20,7 @@
#include <linux/config.h>
#include "sound_config.h"
#if defined(CONFIG_SBDSP) || defined(MODULE)
#ifdef CONFIG_SBDSP
#include "sb_mixer.h"
#include "sb.h"
......
......@@ -17,7 +17,7 @@
#include "sound_config.h"
#include "soundmodule.h"
#if defined(CONFIG_SBDSP) || defined (MODULE)
#ifdef CONFIG_SBDSP
#include "sb_mixer.h"
#include "sb.h"
......@@ -142,7 +142,6 @@ int acer = 1;
int acer = 0;
#endif
#endif
#endif
EXPORT_SYMBOL(sb_dsp_init);
EXPORT_SYMBOL(sb_dsp_detect);
......@@ -152,3 +151,5 @@ EXPORT_SYMBOL(attach_sb_card);
EXPORT_SYMBOL(probe_sb);
EXPORT_SYMBOL(unload_sb);
EXPORT_SYMBOL(sb_be_quiet);
#endif
......@@ -18,7 +18,7 @@
#include "sound_config.h"
#include "sound_firmware.h"
#if defined(CONFIG_SBDSP) || defined(MODULE)
#ifdef CONFIG_SBDSP
#ifndef CONFIG_AUDIO
#error You will need to configure the sound driver with CONFIG_AUDIO option.
......@@ -57,6 +57,7 @@ static int smw_ucodeLen = 0;
#endif
sb_devc *last_sb = NULL; /* Last sb loaded */
int sb_dsp_command(sb_devc * devc, unsigned char val)
{
......@@ -131,9 +132,9 @@ static void sbintr(int irq, void *dev_id, struct pt_regs *dummy)
{
src = sb_getmixer(devc, IRQ_STAT); /* Interrupt source register */
#if defined(CONFIG_MIDI)&& (defined(CONFIG_UART401)||defined(CONFIG_UART401_MODULE))
#if defined(CONFIG_MIDI)&& defined(CONFIG_UART401)
if (src & 4)
uart401intr(devc->irq, NULL, NULL); /* MPU401 interrupt */
uart401intr(devc->irq, devc->midi_irq_cookie, NULL); /* MPU401 interrupt */
#endif
if (!(src & 3))
......@@ -155,7 +156,7 @@ static void sbintr(int irq, void *dev_id, struct pt_regs *dummy)
break;
case IMODE_MIDI:
#if defined(CONFIG_MIDI)
#ifdef CONFIG_MIDI
sb_midi_interrupt(devc);
#endif
break;
......@@ -790,6 +791,8 @@ void sb_dsp_init(struct address_info *hw_config)
} /* IRQ setup */
request_region(hw_config->io_base, 16, "soundblaster");
last_sb = devc;
switch (devc->major)
{
case 1: /* SB 1.0 or 1.5 */
......@@ -851,7 +854,7 @@ void sb_dsp_init(struct address_info *hw_config)
if (devc->major == 3 || devc->major == 4)
sb_mixer_init(devc);
#if defined(CONFIG_MIDI)
#ifdef CONFIG_MIDI
if (!(devc->caps & SB_NO_MIDI))
sb_dsp_midi_init(devc);
#endif
......@@ -936,7 +939,9 @@ void sb_dsp_unload(struct address_info *hw_config)
{
free_irq(devc->irq, devc);
sound_unload_mixerdev(devc->my_mixerdev);
sound_unload_mididev(devc->my_mididev);
/* We don't have to do this bit any more the UART401 is its own
master -- Krzystof Halasa */
/* sound_unload_mididev(devc->my_mididev); */
sound_unload_audiodev(devc->my_dev);
}
kfree(devc);
......@@ -982,7 +987,7 @@ unsigned int sb_getmixer(sb_devc * devc, unsigned int port)
return val;
}
#if defined(CONFIG_MIDI)
#ifdef CONFIG_MIDI
/*
* MPU401 MIDI initialization.
......@@ -1247,14 +1252,15 @@ static int init_Jazz16_midi(sb_devc * devc, struct address_info *hw_config)
void attach_sbmpu(struct address_info *hw_config)
{
#if defined(CONFIG_MIDI) && (defined(CONFIG_UART401)||defined(CONFIG_UART401_MODULE))
#if defined(CONFIG_MIDI) && defined(CONFIG_UART401)
attach_uart401(hw_config);
last_sb->midi_irq_cookie=midi_devs[hw_config->slots[4]];
#endif
}
int probe_sbmpu(struct address_info *hw_config)
{
#if defined(CONFIG_MIDI) && (defined(CONFIG_UART401)||defined(CONFIG_UART401_MODULE))
#if defined(CONFIG_MIDI) && defined(CONFIG_UART401)
sb_devc *devc = last_devc;
if (last_devc == NULL)
......@@ -1312,7 +1318,7 @@ int probe_sbmpu(struct address_info *hw_config)
void unload_sbmpu(struct address_info *hw_config)
{
#if defined(CONFIG_MIDI) && (defined(CONFIG_UART401)||defined(CONFIG_UART401_MODULE))
#if defined(CONFIG_MIDI) && defined(CONFIG_UART401)
unload_uart401(hw_config);
#endif
}
......
......@@ -18,7 +18,7 @@
#include <linux/config.h>
#include "sound_config.h"
#if defined(CONFIG_SBDSP) || defined(MODULE)
#ifdef CONFIG_SBDSP
#define __SB_MIXER_C__
#include "sb.h"
......
......@@ -18,6 +18,7 @@
*
*/
#include <linux/config.h>
#include "legacy.h"
#ifdef CONFIG_SBDSP
......
......@@ -24,7 +24,7 @@
#define SEQUENCER_C
#include "sound_config.h"
#if defined(CONFIG_SEQUENCER) || defined(MODULE)
#ifdef CONFIG_SEQUENCER
#include "softoss.h"
int (*softsynthp) (int cmd, int parm1, int parm2, unsigned long parm3) = NULL;
......@@ -1694,6 +1694,12 @@ unsigned long compute_finetune(unsigned long base_freq, int bend, int range,
void sequencer_init(void)
{
/* drag in sequencer_syms.o */
{
extern char sequencer_syms_symbol;
sequencer_syms_symbol = 0;
}
if (sequencer_ok)
return;
#ifdef CONFIG_MIDI
......
/*
* Exported symbols for sequencer driver.
* __NO_VERSION__ because this is still part of sound.o.
*/
#define __NO_VERSION__
#include <linux/module.h>
char sequencer_syms_symbol;
#include "sound_config.h"
#include "sound_calls.h"
EXPORT_SYMBOL(note_to_freq);
EXPORT_SYMBOL(compute_finetune);
EXPORT_SYMBOL(seq_copy_to_input);
EXPORT_SYMBOL(seq_input_event);
EXPORT_SYMBOL(sequencer_init);
EXPORT_SYMBOL(sequencer_timer);
EXPORT_SYMBOL(sound_timer_init);
EXPORT_SYMBOL(sound_timer_interrupt);
EXPORT_SYMBOL(sound_timer_syncinterval);
EXPORT_SYMBOL(reprogram_timer);
#include "softoss.h"
EXPORT_SYMBOL(softsynthp);
/* Tuning */
#define _SEQUENCER_C_
#include "tuning.h"
EXPORT_SYMBOL(cent_tuning);
EXPORT_SYMBOL(semitone_tuning);
/*
* sound/sgalaxy.c
*
* Low level driver for Aztech Sound Galaxy cards.
* Copyright 1998 Artur Skawina
*
* Supported cards:
* Aztech Sound Galaxy Waverider Pro 32 - 3D
* Aztech Sound Galaxy Washington 16
*
* Based on cs4232.c by Hannu Savolainen and Alan Cox.
*/
/*
* Copyright (C) by Hannu Savolainen 1993-1997
*
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*/
#include <linux/config.h>
#include <linux/module.h>
#include "sound_config.h"
#include "soundmodule.h"
#if defined(CONFIG_SGALAXY) || defined (MODULE)
static void sleep( unsigned howlong )
{
current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + howlong;
schedule();
current->timeout = 0;
}
#define DPORT 0x80
/* Sound Blaster regs */
#define SBDSP_RESET 0x6
#define SBDSP_READ 0xA
#define SBDSP_COMMAND 0xC
#define SBDSP_STATUS SBDSP_COMMAND
#define SBDSP_DATA_AVAIL 0xE
static int sb_rst(int base)
{
int i;
outb( 1, base+SBDSP_RESET ); /* reset the DSP */
outb( 0, base+SBDSP_RESET );
for ( i=0; i<500; i++ ) /* delay */
inb(DPORT);
for ( i=0; i<100000; i++ )
{
if ( inb( base+SBDSP_DATA_AVAIL )&0x80 )
break;
}
if ( inb( base+SBDSP_READ )!=0xAA )
return 0;
return 1;
}
static int sb_cmd( int base, unsigned char val )
{
int i;
for ( i=100000; i; i-- )
{
if ( (inb( base+SBDSP_STATUS )&0x80)==0 )
{
outb( val, base+SBDSP_COMMAND );
break;
}
}
return i; /* i>0 == success */
}
#define ai_sgbase driver_use_1
int probe_sgalaxy( struct address_info *ai )
{
if ( check_region( ai->io_base, 8 ) )
{
printk(KERN_ERR "sgalaxy: WSS IO port 0x%03x not available\n", ai->io_base);
return 0;
}
if ( ad1848_detect( ai->io_base+4, NULL, ai->osp ) )
return 1; /* The card is already active */
if ( check_region( ai->ai_sgbase, 0x10 ) )
{
printk(KERN_ERR "sgalaxy: SB IO port 0x%03x not available\n", ai->ai_sgbase);
return 0;
}
/* switch to MSS/WSS mode */
sb_rst( ai->ai_sgbase );
sb_cmd( ai->ai_sgbase, 9 );
sb_cmd( ai->ai_sgbase, 0 );
sleep( HZ/10 );
if ( ad1848_detect( ai->io_base+4, NULL, ai->osp ) )
return 1;
return 0;
}
void attach_sgalaxy( struct address_info *ai )
{
int n;
request_region( ai->ai_sgbase, 0x10, "SoundGalaxy SB" );
n=attach_ms_sound( ai );
if (n!=-1 && audio_devs[n]->mixer_dev != -1 )
{
AD1848_REROUTE( SOUND_MIXER_LINE1, SOUND_MIXER_LINE ); /* Line-in */
AD1848_REROUTE( SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH ); /* FM+Wavetable*/
AD1848_REROUTE( SOUND_MIXER_LINE3, SOUND_MIXER_CD ); /* CD */
}
}
void unload_sgalaxy( struct address_info *ai )
{
unload_ms_sound( ai );
release_region( ai->ai_sgbase, 0x10 );
}
#ifdef MODULE
int io = -1;
int irq = -1;
int dma = -1;
int dma2 = -1;
int sgbase = -1;
MODULE_PARM(io,"i");
MODULE_PARM(irq,"i");
MODULE_PARM(dma,"i");
MODULE_PARM(dma2,"i");
MODULE_PARM(sgbase,"i");
EXPORT_NO_SYMBOLS;
struct address_info ai;
int init_module(void)
{
if ( io==-1 || irq==-1 || dma==-1 || sgbase==-1 )
{
printk(KERN_ERR "sgalaxy: io, irq, dma and sgbase must be set.\n");
return -EINVAL;
}
ai.io_base = io;
ai.irq = irq;
ai.dma = dma;
ai.dma2 = dma2;
ai.ai_sgbase = sgbase;
if ( probe_sgalaxy( &ai )==0 )
return -ENODEV;
attach_sgalaxy( &ai );
SOUND_LOCK;
return 0;
}
void cleanup_module(void)
{
unload_sgalaxy( &ai );
SOUND_LOCK_END;
}
#endif
#endif
......@@ -31,7 +31,7 @@
#include "sound_config.h"
#include "soundmodule.h"
#if defined(CONFIG_SOFTOSS) || defined(MODULE)
#ifdef CONFIG_SOFTOSS
#include "softoss.h"
#include <linux/ultrasound.h>
......
......@@ -18,7 +18,7 @@
#include "sound_config.h"
#if defined(CONFIG_SOFTOSS) || defined(MODULE)
#ifdef CONFIG_SOFTOSS
#include "softoss.h"
void softsynth_resample_loop(short *buf, int loops)
......
......@@ -10,14 +10,18 @@
* for more info.
*/
#include <linux/fs.h>
#include "local.h.master"
#ifndef _SOUND_CONFIG_H_
#define _SOUND_CONFIG_H_
#include <linux/config.h>
#include <linux/fs.h>
#include "legacy.h"
#include "os.h"
#include "soundvers.h"
#ifndef SND_DEFAULT_ENABLE
#define SND_DEFAULT_ENABLE 1
#endif
......@@ -181,3 +185,5 @@ extern __inline__ int translate_mode(struct file *file)
#define TIMER_ARMED 121234
#define TIMER_NOT_ARMED 1
#endif
......@@ -7,28 +7,22 @@
#include <linux/module.h>
#include "sound_config.h"
#define _MIDI_SYNTH_C_
#include "midi_synth.h"
#define _SEQUENCER_C_
#include "tuning.h"
#include <linux/notifier.h>
#include "sound_firmware.h"
extern struct notifier_block *sound_locker;
extern void sound_notifier_chain_register(struct notifier_block *);
#include "sound_calls.h"
char sound_syms_symbol;
EXPORT_SYMBOL(mixer_devs);
EXPORT_SYMBOL(audio_devs);
EXPORT_SYMBOL(num_mixers);
EXPORT_SYMBOL(num_audiodevs);
EXPORT_SYMBOL(note_to_freq);
EXPORT_SYMBOL(compute_finetune);
EXPORT_SYMBOL(seq_copy_to_input);
EXPORT_SYMBOL(seq_input_event);
EXPORT_SYMBOL(sequencer_init);
EXPORT_SYMBOL(sequencer_timer);
EXPORT_SYMBOL(midi_devs);
EXPORT_SYMBOL(num_midis);
EXPORT_SYMBOL(synth_devs);
EXPORT_SYMBOL(num_synths);
EXPORT_SYMBOL(sound_timer_devs);
EXPORT_SYMBOL(num_sound_timers);
EXPORT_SYMBOL(sound_install_audiodrv);
EXPORT_SYMBOL(sound_install_mixer);
......@@ -49,56 +43,19 @@ EXPORT_SYMBOL(sound_unload_synthdev);
EXPORT_SYMBOL(load_mixer_volumes);
EXPORT_SYMBOL(DMAbuf_start_dma);
EXPORT_SYMBOL(DMAbuf_open_dma);
EXPORT_SYMBOL(DMAbuf_close_dma);
EXPORT_SYMBOL(DMAbuf_inputintr);
EXPORT_SYMBOL(DMAbuf_outputintr);
EXPORT_SYMBOL(dma_ioctl);
EXPORT_SYMBOL(conf_printf);
EXPORT_SYMBOL(conf_printf2);
EXPORT_SYMBOL(sound_timer_init);
EXPORT_SYMBOL(sound_timer_interrupt);
EXPORT_SYMBOL(sound_timer_syncinterval);
EXPORT_SYMBOL(sound_timer_devs);
#include "sound_firmware.h"
EXPORT_SYMBOL(mod_firmware_load);
extern int softoss_dev;
EXPORT_SYMBOL(softoss_dev);
/* Locking */
#include "soundmodule.h"
EXPORT_SYMBOL(sound_locker);
EXPORT_SYMBOL(sound_notifier_chain_register);
/* MIDI symbols */
EXPORT_SYMBOL(midi_devs);
EXPORT_SYMBOL(num_midis);
EXPORT_SYMBOL(synth_devs);
EXPORT_SYMBOL(num_synths);
EXPORT_SYMBOL(do_midi_msg);
EXPORT_SYMBOL(midi_synth_open);
EXPORT_SYMBOL(midi_synth_close);
EXPORT_SYMBOL(midi_synth_ioctl);
EXPORT_SYMBOL(midi_synth_kill_note);
EXPORT_SYMBOL(midi_synth_start_note);
EXPORT_SYMBOL(midi_synth_set_instr);
EXPORT_SYMBOL(midi_synth_reset);
EXPORT_SYMBOL(midi_synth_hw_control);
EXPORT_SYMBOL(midi_synth_aftertouch);
EXPORT_SYMBOL(midi_synth_controller);
EXPORT_SYMBOL(midi_synth_panning);
EXPORT_SYMBOL(midi_synth_setup_voice);
EXPORT_SYMBOL(midi_synth_send_sysex);
EXPORT_SYMBOL(midi_synth_bender);
EXPORT_SYMBOL(midi_synth_load_patch);
/* Firmware */
EXPORT_SYMBOL(mod_firmware_load);
/* Tuning */
EXPORT_SYMBOL(cent_tuning);
EXPORT_SYMBOL(semitone_tuning);
MODULE_DESCRIPTION("Sound subsystem");
MODULE_AUTHOR("Hannu Savolainen, et al.");
......@@ -16,7 +16,7 @@
#include "sound_config.h"
#if defined(CONFIG_SEQUENCER) || defined(CONFIG_SEQUENCER_MODULE)
#if defined(CONFIG_SEQUENCER)
static volatile int initialized = 0, opened = 0, tmr_running = 0;
static volatile time_t tmr_offs, tmr_ctr;
......
This diff is collapsed.
......@@ -5,23 +5,12 @@
extern struct notifier_block *sound_locker;
extern void sound_notifier_chain_register(struct notifier_block *);
extern int lock_depth;
#ifdef MODULE
#ifdef SOUND_CORE
#define SOUND_INC_USE_COUNT do { notifier_call_chain(&sound_locker, 1, 0); lock_depth++; } while(0);
#define SOUND_DEC_USE_COUNT do { notifier_call_chain(&sound_locker, 0, 0); lock_depth--; } while(0);
#else
#define SOUND_LOCK sound_notifier_chain_register(&sound_notifier);
#define SOUND_LOCK_END notifier_chain_unregister(&sound_locker, &sound_notifier)
static int my_notifier_call(struct notifier_block *b, unsigned long foo, void *bar)
{
if(foo)
......@@ -40,4 +29,3 @@ static struct notifier_block sound_notifier=
#endif
#endif
#endif
......@@ -22,7 +22,7 @@
#include "sound_config.h"
#include "soundmodule.h"
#if defined(CONFIG_SSCAPE) || defined(MODULE)
#ifdef CONFIG_SSCAPE
#include "coproc.h"
......
......@@ -19,7 +19,7 @@
#include "sound_config.h"
#if defined(CONFIG_SEQUENCER) || defined(MODULE)
#ifdef CONFIG_SEQUENCER
static volatile int opened = 0, tmr_running = 0;
static volatile time_t tmr_offs, tmr_ctr;
......
......@@ -23,15 +23,9 @@
#include "sb.h"
#include "sound_firmware.h"
#if defined(CONFIG_TRIX) || defined (MODULE)
#ifdef CONFIG_TRIX
#if defined(CONFIG_UART401) || defined(CONFIG_UART401_MODULE)
#if defined(CONFIG_MIDI)
#define DO_MIDI
#endif
#endif
#ifdef CONFIG_TRIX_HAVE_BOOT
#ifdef INCLUDE_TRIX_BOOT
#include "trix_boot.h"
#else
static unsigned char *trix_boot = NULL;
......@@ -360,7 +354,7 @@ void attach_trix_mpu(struct address_info *hw_config)
int probe_trix_mpu(struct address_info *hw_config)
{
#ifdef DO_MIDI
#if defined(CONFIG_UART401) && defined(CONFIG_MIDI)
unsigned char conf;
static char irq_bits[] = {
-1, -1, -1, 1, 2, 3, -1, 4, -1, 5
......@@ -443,7 +437,7 @@ void unload_trix_wss(struct address_info *hw_config)
void unload_trix_mpu(struct address_info *hw_config)
{
#ifdef DO_MIDI
#if defined(CONFIG_UART401) && defined(CONFIG_MIDI)
unload_uart401(hw_config);
#endif
}
......
......@@ -25,7 +25,8 @@
#include "sound_config.h"
#include "soundmodule.h"
#if (defined(CONFIG_UART401)||defined(CONFIG_MIDI)) || defined(MODULE)
#ifdef CONFIG_UART401
#ifdef CONFIG_MIDI
typedef struct uart401_devc
{
......@@ -475,13 +476,12 @@ void cleanup_module(void)
SOUND_LOCK_END;
}
#else
#endif
#endif
EXPORT_SYMBOL(attach_uart401);
EXPORT_SYMBOL(probe_uart401);
EXPORT_SYMBOL(unload_uart401);
EXPORT_SYMBOL(uart401intr);
#endif
#endif
......@@ -24,8 +24,10 @@
*/
#include "sound_config.h"
#ifdef CONFIG_SOUND_UART6850
#ifdef CONFIG_MIDI
#include "soundmodule.h"
#if defined(CONFIG_UART6850) && defined(CONFIG_MIDI) || defined(MODULE)
static int uart6850_base = 0x330;
......@@ -353,3 +355,4 @@ void cleanup_module(void)
}
#endif
#endif
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment