Commit 37cd23b4 authored by Linus Torvalds's avatar Linus Torvalds

Linux 2.1.105

Linux-2.1.105 is out there, and is mainly a "synch to other people and fix
silly problems" release. It has the 104 kmod and compilation problems
fixed, and updates some pending patches (notably sound and ham radio
drivers).

                Linus
parent bfe296ce
...@@ -7511,15 +7511,21 @@ CONFIG_SOUND ...@@ -7511,15 +7511,21 @@ CONFIG_SOUND
Kernel patches and programs to do that are in the pcsndrv package on Kernel patches and programs to do that are in the pcsndrv package on
sunsite.unc.edu:/pub/Linux/kernel/patches/console/. sunsite.unc.edu:/pub/Linux/kernel/patches/console/.
Support for Aztech Sound Galaxy (non-Pnp) cards
CONFIG_SOUND_SGALAXY
This module initialises the older non Plug and Play sound galaxy cards
from Aztech. It supports the Waverider Pro 32 - 3D and the Galaxy
Washington 16.
ProAudioSpectrum 16 support ProAudioSpectrum 16 support
CONFIG_PAS CONFIG_SOUND_PAS
Answer Y only if you have a Pro Audio Spectrum 16, ProAudio Studio Answer Y only if you have a Pro Audio Spectrum 16, ProAudio Studio
16 or Logitech SoundMan 16 sound card. Don't answer Y if you have 16 or Logitech SoundMan 16 sound card. Don't answer Y if you have
some other card made by Media Vision or Logitech since they are not some other card made by Media Vision or Logitech since they are not
PAS16 compatible. PAS16 compatible.
100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support
CONFIG_SB CONFIG_SOUND_SB
Answer Y if you have an original SoundBlaster card made by Answer Y if you have an original SoundBlaster card made by
Creative Labs or a 100% hardware compatible clone (like the Creative Labs or a 100% hardware compatible clone (like the
Thunderboard or SM Games). If your card was in the list of supported Thunderboard or SM Games). If your card was in the list of supported
...@@ -7534,36 +7540,28 @@ CONFIG_SB ...@@ -7534,36 +7540,28 @@ CONFIG_SB
Y here and to "Additional lowlevel drivers" and to "SB32/AWE Y here and to "Additional lowlevel drivers" and to "SB32/AWE
support" below. support" below.
Are you using the IBM Mwave "emulation" of SB ?
CONFIG_SB_MWAVE
The IBM Mwave can do what's loosely describable as emulation of an
8bit SoundBlaster card if you load the right firmware from DOS warm
boot and pray and your machine happens to like you. Say Y if you are
doing this as the IRQ test normally fails on the Mwave emulation.
Please read Documentation/sound/mwave.
Generic OPL2/OPL3 FM synthesizer support Generic OPL2/OPL3 FM synthesizer support
CONFIG_ADLIB CONFIG_SOUND_ADLIB
Answer Y if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4). Answer Y if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4).
Answering Y is usually a safe and recommended choice, however some Answering Y is usually a safe and recommended choice, however some
cards may have software (TSR) FM emulation. Enabling FM support with cards may have software (TSR) FM emulation. Enabling FM support with
these cards may cause trouble (I don't currently know of any such these cards may cause trouble (I don't currently know of any such
cards, however). If unsure, say Y. cards, however). If unsure, say Y.
#Loopback MIDI device support Loopback MIDI device support
#CONFIG_VMIDI CONFIG_VMIDI
### ###
### somebody please fill this in. ### somebody please fill this in.
### ###
#
Gravis Ultrasound support Gravis Ultrasound support
CONFIG_GUS CONFIG_SOUND_GUS
Say Y here for any type of Gravis Ultrasound card, including Say Y here for any type of Gravis Ultrasound card, including
the GUS or GUS MAX. Please read Documentation/sound/ultrasound for the GUS or GUS MAX. See also Documentation/sound/ultrasound for
more information. more information on configuring this card with modules.
MPU-401 support (NOT for SB16) MPU-401 support (NOT for SB16)
CONFIG_MPU401 CONFIG_SOUND_MPU401
Be careful with this question. The MPU401 interface is supported by Be careful with this question. The MPU401 interface is supported by
all sound cards. However, some natively supported cards have their all sound cards. However, some natively supported cards have their
own driver for MPU401. Enabling this MPU401 option with these cards own driver for MPU401. Enabling this MPU401 option with these cards
...@@ -7574,35 +7572,38 @@ CONFIG_MPU401 ...@@ -7574,35 +7572,38 @@ CONFIG_MPU401
answer Y if you have a true MPU401 MIDI interface card. answer Y if you have a true MPU401 MIDI interface card.
6850 UART Midi support 6850 UART Midi support
CONFIG_UART6850 CONFIG_SOUND_UART6850
This option enables support for MIDI interfaces based on the 6850 This option enables support for MIDI interfaces based on the 6850
UART chip. This interface is rarely found on sound cards. It's safe UART chip. This interface is rarely found on sound cards. It's safe
to answer N to this question. to answer N to this question.
PSS (AD1848, ADSP-2115, ESC614) support PSS (AD1848, ADSP-2115, ESC614) support
CONFIG_PSS CONFIG_SOUND_PSS
Answer Y only if you have Orchid SW32, Cardinal DSP16 or some other Answer Y only if you have Orchid SW32, Cardinal DSP16 or some other
card based on the PSS chipset (AD1848 codec + ADSP-2115 DSP chip + card based on the PSS chipset (AD1848 codec + ADSP-2115 DSP chip +
Echo ESC614 ASIC CHIP). Echo ESC614 ASIC CHIP).
#Enable PSS mixer (Beethoven ADSP-16 and other compatible) Have DSPxxx.LD firmware file
#CONFIG_PSS_MIXER CONFIG_PSS_HAVE_BOOT
### If you want to emulate the Sound Blaster card and you have a DSPxxx.LD
### Don't know what this is file, then answer Y here to include this file.
###
# Full pathname of DSPxxx.LD firmware file
CONFIG_PSS_BOOT_FILE
Enter the full pathname of your DSPxxx.LD file, starting from /.
16 bit sampling option of GUS (_NOT_ GUS MAX) 16 bit sampling option of GUS (_NOT_ GUS MAX)
CONFIG_GUS16 CONFIG_SOUND_GUS16
Answer Y if you have installed the 16 bit sampling daughtercard on Answer Y if you have installed the 16 bit sampling daughtercard on
your GUS. Answer N if you have a GUS MAX, since saying Y here your GUS. Answer N if you have a GUS MAX, since saying Y here
disables GUS MAX support. disables GUS MAX support.
GUS MAX support GUS MAX support
CONFIG_GUSMAX CONFIG_SOUND_GUSMAX
Answer Y only if you have a Gravis Ultrasound MAX. Answer Y only if you have a Gravis Ultrasound MAX.
Microsoft Sound System support Microsoft Sound System support
CONFIG_MSS CONFIG_SOUND_MSS
Again think carefully before answering Y to this question. It's Again think carefully before answering Y to this question. It's
safe to answer Y if you have the original Windows Sound System card safe to answer Y if you have the original Windows Sound System card
made by Microsoft or Aztech SG 16 Pro (or NX16 Pro). Also you may made by Microsoft or Aztech SG 16 Pro (or NX16 Pro). Also you may
...@@ -7628,60 +7629,81 @@ CONFIG_MSS ...@@ -7628,60 +7629,81 @@ CONFIG_MSS
conflict. conflict.
Ensoniq Soundscape support Ensoniq Soundscape support
CONFIG_SSCAPE CONFIG_SOUND_SSCAPE
Answer Y if you have a sound card based on the Ensoniq SoundScape Answer Y if you have a sound card based on the Ensoniq SoundScape
chipset. Such cards are being manufactured at least by Ensoniq, Spea chipset. Such cards are being manufactured at least by Ensoniq, Spea
and Reveal (Reveal makes also other cards). and Reveal (Reveal makes also other cards).
MediaTriX AudioTriX Pro support MediaTriX AudioTriX Pro support
CONFIG_TRIX CONFIG_SOUND_TRIX
Answer Y if you have the AudioTriX Pro sound card manufactured Answer Y if you have the AudioTriX Pro sound card manufactured
by MediaTrix. by MediaTrix.
Have TRXPRO.HEX firmware file
CONFIG_TRIX_HAVE_BOOT
The MediaTrix AudioTrix Pro has an on-board microcontroller which
needs to be initialized by downloading the code from the file
TRXPRO.HEX in the DOS driver directory. If you don't have the
TRXPRO.HEX file handy you may skip this step. However, the SB and
MPU-401 modes of AudioTrix Pro will not work without this file!
Full pathname of TRXPRO.HEX firmware file
CONFIG_TRIX_BOOT_FILE
Enter the full pathname of your TRXPRO.HEX file, starting from /.
Support for OPTi MAD16 and/or Mozart based cards Support for OPTi MAD16 and/or Mozart based cards
CONFIG_MAD16 CONFIG_SOUND_MAD16
Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi
82C928 or 82C929 or 82C931) audio interface chip. Please read 82C928 or 82C929 or 82C931) audio interface chip. For the 82C931,
Documentation/sound/MAD16. Please read Documentation/sound/Opti. For please read drivers/sound/README.C931. These chips are currently
the 82C931, additional information is in drivers/sound/README.C931. quite common so it's possible that many no-name cards have one of
These chips are currently quite common so it's possible that many them. In addition the MAD16 chip is used in some cards made by known
no-name cards have one of them. In addition the MAD16 chip is used manufacturers such as Turtle Beach (Tropez), Reveal (some models)
in some cards made by known manufacturers such as Turtle Beach and Diamond (latest ones). See also Documentation/sound/Opti for
(Tropez), Reveal (some models) and Diamond (latest ones). more information on setting these cards up as modules.
Support MIDI in older MAD16 based cards (requires SB) Support MIDI in older MAD16 based cards (requires SB)
CONFIG_MAD16_OLDCARD CONFIG_MAD16_OLDCARD
Answer Y (or M) if you have an older card based on the C928 or Answer Y (or M) if you have an older card based on the C928
Mozart chipset and you want to have MIDI support. If you enable this or Mozart chipset and you want to have MIDI support. If you
option you also need to enable support for SoundBlaster. enable this option you also need to enable support for SoundBlaster.
Support for Crystal CS4232 based (PnP) cards Support for Crystal CS4232 based (PnP) cards
CONFIG_CS4232 CONFIG_SOUND_CS4232
Say Y here if you have a card based on the Crystal CS4232 chip set, Say Y here if you have a card based on the Crystal CS4232 chip set,
which use the Plug and Play protocol. Please read which use its own Plug and Play protocol. See Documentation/sound/CS4232
Documentation/sound/CS4232 for more info. for more information on configuring this card.
Support for Turtle Beach Wave Front (Maui, Tropez) synthesizers Support for Turtle Beach Wave Front (Maui, Tropez) synthesizers
CONFIG_MAUI CONFIG_SOUND_MAUI
Say Y here if you have a Turtle Beach Wave Front, Maui, or Say Y here if you have a Turtle Beach Wave Front, Maui, or
Tropez sound card. Tropez sound card.
Have OSWF.MOT firmware file
CONFIG_MAUI_HAVE_BOOT
Turtle Beach Maui and Tropez sound cards have a microcontroller which
needs to be initialized prior to use. OSWF.MOT is a file distributed
with the card's DOS/Windows drivers. Answer Y if you have this file.
Full pathname of OSWF.MOT firmware file
CONFIG_MAUI_BOOT_FILE
Enter the full pathname of your OSWF.MOT file, starting from /.
/dev/dsp and /dev/audio support /dev/dsp and /dev/audio support
CONFIG_AUDIO CONFIG_SOUND_AUDIO
Answering N disables /dev/dsp and /dev/audio, the A/D and D/A Answering N disables /dev/dsp and /dev/audio, the A/D and D/A
converter devices. Answer N only if you know you will not need converter devices. Answer N only if you know you will not need
the option. They are usually required. Answer Y. the option. They are usually required. Answer Y.
MIDI interface support MIDI interface support
CONFIG_MIDI CONFIG_SOUND_MIDI
Answering N disables /dev/midixx devices and access to any MIDI Answering N disables /dev/midixx devices and access to any MIDI
ports using /dev/sequencer and /dev/music. This option also affects ports using /dev/sequencer and /dev/music. This option also affects
any MPU401 and/or General MIDI compatible devices. Answer Y. any MPU401 and/or General MIDI compatible devices. Answer Y.
FM synthesizer (YM3812/OPL-3) support FM synthesizer (YM3812/OPL-3) support
CONFIG_YM3812 CONFIG_SOUND_YM3812
Answer Y here, unless you know you will not need the option. For Answer Y here, unless you know you will not need the option.
OPL-3 cards, you may want to read Documentation/sound/OPL3.
Sun Audio support Sun Audio support
CONFIG_SUN_AUDIO CONFIG_SUN_AUDIO
...@@ -7695,6 +7717,11 @@ CONFIG_LOWLEVEL_SOUND ...@@ -7695,6 +7717,11 @@ CONFIG_LOWLEVEL_SOUND
affect the kernel; saying Y will simply cause this configure script affect the kernel; saying Y will simply cause this configure script
to present you with more options. If unsure, say Y. to present you with more options. If unsure, say Y.
SB32/AWE support
CONFIG_AWE32_SYNTH
Say Y here if you have a SB32 or SB AWE soundcard. See
drivers/sound/lowlevel/README.awe for more info.
ACI mixer (miroPCM12) ACI mixer (miroPCM12)
CONFIG_ACI_MIXER CONFIG_ACI_MIXER
Audio Command Interface (ACI) driver. ACI is a protocol used to Audio Command Interface (ACI) driver. ACI is a protocol used to
......
SMP on x86/Linux is now an official feature and is not exprtimental.
Experimental SMP support for other architectures is underway.
Please view linux/Documentation/smp for more information about enabling SMP.
SMP support for Linux with up to 16 processors using the Intel MP SMP support for Linux with up to 16 processors using the Intel MP
specification. specification.
WARNING:
This is experimental. Back up your disks first. Experience is that
it is basically stable in its current (inefficient form).
To fix: To fix:
o Fix sys_idle to exit/enter kernel state and do hlt's.
o Fix scheduler decisions to reschedule. Per cpu reschedule ?
o Clean up message pass.
o Test for B stepping processors.
o Clean up processor specific/independent split. o Clean up processor specific/independent split.
o Document it all. [PARTLY DONE] o Document it all. [PARTLY DONE]
o Halt other CPU's on reset/panic doesn't always work. o Halt other CPU's on reset/panic doesn't always work.
o Don't waste page at 4K - don't need it now.(watch the GDT code). o Don't waste page at 4K - don't need it now.(watch the GDT code).
o Dump bootup pages once booted somehow. o Dump bootup pages once booted somehow.
o Clean up warnings/volatiles. o Clean up warnings/volatiles.
o Fix load_TR() for non contiguous processor ids
o Iterate over the slave timer requests if one is lost (keep a count per cpu)
o Distribute IRQs (locking present just needs the 82489 to be asked
nicely).
o 486 startup code. o 486 startup code.
o How to handle mixed FPU/non FPU processors. o How to handle mixed FPU/non FPU processors.
o Test IO-APIC on various hardware.
o Seperate IO-APIC from SMP.
LINUX DRIVER FOR BAYCOM MODEMS LINUX DRIVERS FOR BAYCOM MODEMS
Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch> Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch>
This document describes the Linux Kernel Driver for simple Baycom style !!NEW!! (04/98) The drivers for the baycom modems have been split into
amateur radio modems. The driver supports the following modems: separate drivers as they did not share any code, and the driver
and device names have changed.
This document describes the Linux Kernel Drivers for simple Baycom style
amateur radio modems.
The following drivers are available:
baycom_ser_fdx:
This driver supports the SER12 modems either full or half duplex.
Its baud rate may be changed via the `baud' module parameter,
therefore it supports just about every bit bang modem on a
serial port. Its devices are called bcsf0 through bcsf3.
This is the recommended driver for SER12 type modems,
however if you have a broken UART clone that does not have working
delta status bits, you may try baycom_ser_hdx.
baycom_ser_hdx:
This is an alternative driver for SER12 type modems.
It only supports half duplex, and only 1200 baud. Its devices
are called bcsh0 through bcsh3. Use this driver only if baycom_ser_fdx
does not work with your UART.
baycom_par:
This driver supports the par96 and picpar modems.
Its devices are called bcp0 through bcp3.
baycom_epp:
This driver supports the epp modem.
Its devices are called bce0 through bce3.
This driver is work-in-progress.
The following modems are supported:
ser12: This is a very simple 1200 baud AFSK modem. The modem consists only ser12: This is a very simple 1200 baud AFSK modem. The modem consists only
of a modulator/demodulator chip, usually a TI TCM3105. The computer of a modulator/demodulator chip, usually a TI TCM3105. The computer
...@@ -28,6 +60,13 @@ picpar: This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem ...@@ -28,6 +60,13 @@ picpar: This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem
an additional power supply. Furthermore, it incorporates a carrier an additional power supply. Furthermore, it incorporates a carrier
detect circuitry. detect circuitry.
epp: This is a high speed modem adaptor that connects to an enhanced parallel port.
Its target audience is users working over a high speed hub (76.8kbit/s).
eppfpga: This is a redesign of the epp adaptor.
All of the above modems only support half duplex communications. However, All of the above modems only support half duplex communications. However,
the driver supports the KISS (see below) fullduplex command. It then simply the driver supports the KISS (see below) fullduplex command. It then simply
starts to send as soon as there's a packet to transmit and does not care starts to send as soon as there's a packet to transmit and does not care
...@@ -36,11 +75,11 @@ This command is required by some implementations of the DAMA channel ...@@ -36,11 +75,11 @@ This command is required by some implementations of the DAMA channel
access protocol. access protocol.
The Interface of the driver The Interface of the drivers
Unlike previous drivers, the driver is no longer a character device, Unlike previous drivers, these drivers are no longer character devices,
but it is now a true kernel network interface. Installation is therefore but they are now true kernel network interfaces. Installation is therefore
simple. Once installed, four interfaces named bc[0-3] are available. simple. Once installed, four interfaces named bc{sf,sh,p,e}[0-3] are available.
sethdlc from the ax25 utilities may be used to set driver states etc. sethdlc from the ax25 utilities may be used to set driver states etc.
Users of userland AX.25 stacks may use the net2kiss utility (also available Users of userland AX.25 stacks may use the net2kiss utility (also available
in the ax25 utilities package) to convert packets of a network interface in the ax25 utilities package) to convert packets of a network interface
...@@ -50,27 +89,27 @@ me for WAMPES which allows attaching a kernel network interface directly. ...@@ -50,27 +89,27 @@ me for WAMPES which allows attaching a kernel network interface directly.
Configuring the driver Configuring the driver
Every time the driver is inserted into the kernel, it has to know which Every time a driver is inserted into the kernel, it has to know which
modems it should access at which ports. This can be done with the setbaycom modems it should access at which ports. This can be done with the setbaycom
utility. If you are only using one modem, you can also configure the utility. If you are only using one modem, you can also configure the
driver from the insmod command line (or by means of an option line in driver from the insmod command line (or by means of an option line in
/etc/conf.modules). /etc/conf.modules).
Examples: Examples:
insmod baycom modem=1 iobase=0x3f8 irq=4 options=1 insmod baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
sethdlc -i bc0 -p type ser12 io 0x3f8 irq 4 options 1 sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4
Both lines configure the first port to drive a ser12 modem at the first Both lines configure the first port to drive a ser12 modem at the first
serial port (COM1 under DOS). options=1 instructs the driver to use serial port (COM1 under DOS). The * in the mode parameter instructs the driver to use
the software DCD algorithm (see below). the software DCD algorithm (see below).
insmod baycom modem=2 iobase=0x378 irq=7 options=1 insmod baycom_par mode="picpar" iobase=0x378
sethdlc -i bc0 -p type par96 io 0x378 irq 7 options 1 sethdlc -i bcp0 -p mode "picpar" io 0x378
Both lines configure the first port to drive a picpar modem at the
first parallel port (LPT1 under DOS). (Note: picpar implies
hardware DCD, par96 implies software DCD).
Both lines configure the first port to drive a par96 or par97 modem at the
first parallel port (LPT1 under DOS). options=1 instructs the driver to use
the software DCD algorithm (see below).
The channel access parameters can be set with sethdlc -a or kissparms. The channel access parameters can be set with sethdlc -a or kissparms.
Note that both utilities interpret the values slightly differently. Note that both utilities interpret the values slightly differently.
...@@ -93,25 +132,26 @@ par96: the software DCD algorithm for this type of modem is rather poor. ...@@ -93,25 +132,26 @@ par96: the software DCD algorithm for this type of modem is rather poor.
feeds the DCD input of the PAR96 modem, the use of the hardware feeds the DCD input of the PAR96 modem, the use of the hardware
DCD circuitry is recommended. DCD circuitry is recommended.
picpar: the picpar modem features builtin DCD hardware, which is highly picpar: the picpar modem features a builtin DCD hardware, which is highly
recommended. recommended.
Compatibility with the rest of the Linux kernel Compatibility with the rest of the Linux kernel
The serial driver, the line printer (lp) driver and the baycom driver compete The serial driver and the baycom serial drivers compete
for the same hardware resources. Of course only one driver can access a given for the same hardware resources. Of course only one driver can access a given
interface at a time. The serial driver grabs all interfaces it can find at interface at a time. The serial driver grabs all interfaces it can find at
startup time. Therefore the baycom driver subsequently won't be able to startup time. Therefore the baycom drivers subsequently won't be able to
access a serial port. You might therefore find it necessary to release access a serial port. You might therefore find it necessary to release
a port owned by the serial driver with 'setserial /dev/ttyS# uart none', where a port owned by the serial driver with 'setserial /dev/ttyS# uart none', where
# is the number of the interface. The baycom driver does not reserve any # is the number of the interface. The baycom drivers do not reserve any
port at startup, unless one is specified on the 'insmod' command line. Another ports at startup, unless one is specified on the 'insmod' command line. Another
method to solve the problem is to compile all three drivers as modules and method to solve the problem is to compile all drivers as modules and
leave it to kerneld to load the correct driver depending on the application. leave it to kmod to load the correct driver depending on the application.
The parallel port drivers (baycom_par, baycom_epp) now use the parport subsystem
to arbitrate the ports between different client drivers.
vy 73s de vy 73s de
Tom Sailer, sailer@ife.ee.ethz.ch Tom Sailer, sailer@ife.ee.ethz.ch
......
Documentation for the ESS1868F AudioDrive PnP sound card
The ESS1868 Sound card is a PnP ESS1688 compatible 16-bit sound card.
Notes about configuring the sound card:
* The ESS1868 does not allow use of a 16-bit DMA, thus DMA 0, 1, 2, and 3
may only be used.
* isapnptools version 1.14 does work with ESS1868. Earlier versions might
not.
* Sound support MUST be compiled as MODULES, not statically linked
into the kernel.
For configuring the sound card's I/O addresses, IRQ and DMA, here is a
sample copy of the isapnp.conf directives regarding the ESS1868:
(CONFIGURE ESS1868/-1 (LD 1
(IO 0 (BASE 0x0220))
(IO 1 (BASE 0x0388))
(IO 2 (BASE 0x0330))
(DMA 0 (CHANNEL 1))
(INT 0 (IRQ 5 (MODE +E)))
(ACT Y)
))
(for a full working isapnp.conf file, remember the
(ISOLATE)
(IDENTIFY *)
at the beginning and the
(WAITFORKEY)
at the end.)
In this setup, the main card I/O is 0x0220, FM synthesizer is 0x0388, and
the MPU-401 MIDI port is located at 0x0330. IRQ is IRQ 5, DMA is channel 1.
After configuring the sound card via isapnp, to use the card you must load
the sound modules with the proper I/O information. Here is my setup:
# ESS1868F AudioDrive initialization
/sbin/insmod sound
/sbin/insmod uart401
/sbin/insmod sb io=0x220 irq=5 dma=1 dma16=-1
/sbin/insmod mpu401 io=0x330
/sbin/insmod opl3 io=0x388
/sbin/insmod v_midi
opl3 is the FM synthesizer--I have not tried the SoftOSS wavetable
synthesizer yet, but I assume it would work as well. Also, doing:
/sbin/insmod opl3
/sbin/insmod adlib_card io=0x388
works, but I believe the sound quality is a bit distorted when playing MIDI
files.
When using the above setup, my /proc/sound gives the following:
OSS/Free:3.8s2++-971130
Load type: Driver loaded as a module
Kernel: Linux scitus.dyn.ml.org 2.1.104 #1 SMP Sun May 24 11:04:27 EDT 1998 i486
Config options: 0
Installed drivers:
Card config:
Audio devices:
0: ESS ES1688 AudioDrive (rev 11) (3.1)
Synth devices:
0: Yamaha OPL-3
Midi devices:
0: Loopback MIDI Port 1
1: Loopback MIDI Port 2
Timers:
0: System clock
Mixers:
0: Sound Blaster
VERSION = 2 VERSION = 2
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 104 SUBLEVEL = 105
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/) ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
...@@ -318,6 +318,7 @@ modules_install: ...@@ -318,6 +318,7 @@ modules_install:
if [ -f NLS_MODULES ]; then inst_mod NLS_MODULES fs; fi; \ if [ -f NLS_MODULES ]; then inst_mod NLS_MODULES fs; fi; \
if [ -f CDROM_MODULES ]; then inst_mod CDROM_MODULES cdrom; fi; \ if [ -f CDROM_MODULES ]; then inst_mod CDROM_MODULES cdrom; fi; \
if [ -f HAM_MODULES ]; then inst_mod HAM_MODULES net; fi; \ if [ -f HAM_MODULES ]; then inst_mod HAM_MODULES net; fi; \
if [ -f SOUND_MODULES ]; then inst_mod SOUND_MODULES sound; fi; \
\ \
ls *.o > .allmods; \ ls *.o > .allmods; \
echo $$MODULES | tr ' ' '\n' | sort | comm -23 .allmods - > .misc; \ echo $$MODULES | tr ' ' '\n' | sort | comm -23 .allmods - > .misc; \
......
...@@ -53,7 +53,7 @@ first_rule: sub_dirs ...@@ -53,7 +53,7 @@ first_rule: sub_dirs
%.o: %.c %.o: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -c -o $@ $< $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -c -o $@ $<
@ ( \ @ ( \
echo 'ifeq ($(strip $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@)),$$(strip $$(CFLAGS) $$(EXTRA_CFLAGS) $$(CFLAGS_$@)))' ; \ echo 'ifeq ($(strip $(subst $(comma),:,$(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@))),$$(strip $$(subst $$(comma),:,$$(CFLAGS) $$(EXTRA_CFLAGS) $$(CFLAGS_$@))))' ; \
echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \
echo 'endif' \ echo 'endif' \
) > $(dir $@)/.$(notdir $@).flags ) > $(dir $@)/.$(notdir $@).flags
...@@ -79,7 +79,7 @@ else ...@@ -79,7 +79,7 @@ else
$(AR) rcs $@ $(AR) rcs $@
endif endif
@ ( \ @ ( \
echo 'ifeq ($(strip $(EXTRA_LDFLAGS) $(ALL_O)),$$(strip $$(EXTRA_LDFLAGS) $$(ALL_O)))' ; \ echo 'ifeq ($(strip $(subst $(comma),:,$(EXTRA_LDFLAGS) $(ALL_O))),$$(strip $$(subst $$(comma),:,$$(EXTRA_LDFLAGS) $$(ALL_O))))' ; \
echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \
echo 'endif' \ echo 'endif' \
) > $(dir $@)/.$(notdir $@).flags ) > $(dir $@)/.$(notdir $@).flags
...@@ -93,7 +93,7 @@ $(L_TARGET): $(LX_OBJS) $(L_OBJS) ...@@ -93,7 +93,7 @@ $(L_TARGET): $(LX_OBJS) $(L_OBJS)
rm -f $@ rm -f $@
$(AR) $(EXTRA_ARFLAGS) rcs $@ $(LX_OBJS) $(L_OBJS) $(AR) $(EXTRA_ARFLAGS) rcs $@ $(LX_OBJS) $(L_OBJS)
@ ( \ @ ( \
echo 'ifeq ($(strip $(EXTRA_ARFLAGS) $(LX_OBJS) $(L_OBJS)),$$(strip $$(EXTRA_ARFLAGS) $$(LX_OBJS) $$(L_OBJS)))' ; \ echo 'ifeq ($(strip $(subst $(comma),:,$(EXTRA_ARFLAGS) $(LX_OBJS) $(L_OBJS))),$$(strip $$(subst $$(comma),:,$$(EXTRA_ARFLAGS) $$(LX_OBJS) $$(L_OBJS))))' ; \
echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \
echo 'endif' \ echo 'endif' \
) > $(dir $@)/.$(notdir $@).flags ) > $(dir $@)/.$(notdir $@).flags
...@@ -227,7 +227,7 @@ ifneq "$(strip $(SYMTAB_OBJS))" "" ...@@ -227,7 +227,7 @@ ifneq "$(strip $(SYMTAB_OBJS))" ""
$(SYMTAB_OBJS): $(TOPDIR)/include/linux/modversions.h $(SYMTAB_OBJS:.o=.c) $(SYMTAB_OBJS): $(TOPDIR)/include/linux/modversions.h $(SYMTAB_OBJS:.o=.c)
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DEXPORT_SYMTAB -c $(@:.o=.c) $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DEXPORT_SYMTAB -c $(@:.o=.c)
@ ( \ @ ( \
echo 'ifeq ($(strip $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DEXPORT_SYMTAB),$$(strip $$(CFLAGS) $$(EXTRA_CFLAGS) $$(CFLAGS_$@) -DEXPORT_SYMTAB))' ; \ echo 'ifeq ($(strip $(subst $(comma),:,$(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DEXPORT_SYMTAB)),$$(strip $$(subst $$(comma),:,$$(CFLAGS) $$(EXTRA_CFLAGS) $$(CFLAGS_$@) -DEXPORT_SYMTAB)))' ; \
echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \
echo 'endif' \ echo 'endif' \
) > $(dir $@)/.$(notdir $@).flags ) > $(dir $@)/.$(notdir $@).flags
...@@ -254,6 +254,9 @@ endif ...@@ -254,6 +254,9 @@ endif
# #
FILES_FLAGS_UP_TO_DATE := FILES_FLAGS_UP_TO_DATE :=
# For use in expunging commas from flags, which mung our checking.
comma = ,
FILES_FLAGS_EXIST := $(wildcard .*.flags) FILES_FLAGS_EXIST := $(wildcard .*.flags)
ifneq ($(FILES_FLAGS_EXIST),) ifneq ($(FILES_FLAGS_EXIST),)
include $(FILES_FLAGS_EXIST) include $(FILES_FLAGS_EXIST)
......
...@@ -10,17 +10,13 @@ ...@@ -10,17 +10,13 @@
NM := nm -B NM := nm -B
#LINKFLAGS = -static -T arch/alpha/vmlinux.lds
#CFLAGS := $(CFLAGS) -pipe -mno-fp-regs -ffixed-8
ifdef CONFIG_CROSSCOMPILE ifdef CONFIG_CROSSCOMPILE
# enable this for linking under OSF/1: # enable this for linking under OSF/1:
LINKFLAGS = -non_shared -T 0xfffffc0000310000 -N LINKFLAGS = -non_shared -T 0xfffffc0000310000 -N
else else
elf=$(shell if $(LD) --help | grep elf64alpha >/dev/null; then echo yes; fi) elf=$(shell if $(LD) --help | grep elf64alpha >/dev/null; then echo yes; fi)
ifeq ($(elf),yes) ifeq ($(elf),yes)
# LINKFLAGS = -static -Ttext 0xfffffc0000310000 -N LINKFLAGS = -static -T arch/alpha/vmlinux.lds
LINKFLAGS = -static -T arch/alpha/vmlinux.lds
else else
LINKFLAGS = -static -T arch/alpha/vmlinux.lds -N LINKFLAGS = -static -T arch/alpha/vmlinux.lds -N
endif endif
...@@ -28,16 +24,13 @@ LINKFLAGS = -static -T arch/alpha/vmlinux.lds ...@@ -28,16 +24,13 @@ LINKFLAGS = -static -T arch/alpha/vmlinux.lds
CFLAGS := $(CFLAGS) -pipe CFLAGS := $(CFLAGS) -pipe
endif endif
CFLAGS := $(CFLAGS) -mno-fp-regs -ffixed-8 -Wno-uninitialized CFLAGS := $(CFLAGS) -mno-fp-regs -ffixed-8
# determine if we can use the BWX instructions with GAS # determine if we can use the BWX instructions with GAS
$(shell rm -f ./GAS_VER) OLD_GAS := $(shell if $(AS) --version 2>&1 | grep 'version 2.7' > /dev/null; then echo y; else echo n; fi)
$(shell $(AS) --version >& ./GAS_VER)
OLD_GAS := $(shell if cat ./GAS_VER | grep 'version 2.7' > /dev/null; then echo yes; else echo no; fi)
$(shell rm -f ./GAS_VER)
ifneq ($(OLD_GAS),yes)
# if PYXIS, then enable use of BWIO space # if PYXIS, then enable use of BWIO space
ifneq ($(OLD_GAS),y)
ifeq ($(CONFIG_ALPHA_PYXIS),y) ifeq ($(CONFIG_ALPHA_PYXIS),y)
CFLAGS := $(CFLAGS) -Wa,-m21164a -DBWX_USABLE -DBWIO_ENABLED CFLAGS := $(CFLAGS) -Wa,-m21164a -DBWX_USABLE -DBWIO_ENABLED
endif endif
......
...@@ -189,6 +189,7 @@ CONFIG_NET_EISA=y ...@@ -189,6 +189,7 @@ CONFIG_NET_EISA=y
# CONFIG_DEC_ELCP is not set # CONFIG_DEC_ELCP is not set
# CONFIG_DGRS is not set # CONFIG_DGRS is not set
CONFIG_EEXPRESS_PRO100=y CONFIG_EEXPRESS_PRO100=y
# CONFIG_NE2K_PCI is not set
# CONFIG_NET_POCKET is not set # CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set # CONFIG_FDDI is not set
# CONFIG_DLCI is not set # CONFIG_DLCI is not set
......
...@@ -616,7 +616,7 @@ __initfunc(void setup_ExtINT_pin (unsigned int pin)) ...@@ -616,7 +616,7 @@ __initfunc(void setup_ExtINT_pin (unsigned int pin))
entry.delivery_mode = dest_ExtINT; entry.delivery_mode = dest_ExtINT;
entry.dest_mode = 1; /* logical delivery */ entry.dest_mode = 1; /* logical delivery */
entry.mask = 0; /* unmask IRQ now */ entry.mask = 0; /* unmask IRQ now */
entry.dest.logical.logical_dest = 0xff; /* all CPUs */ entry.dest.logical.logical_dest = 0x01; /* all CPUs */
entry.vector = IO_APIC_VECTOR(pin); /* it's ignored */ entry.vector = IO_APIC_VECTOR(pin); /* it's ignored */
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
# #
# Note 2! The CFLAGS definitions are now in the main makefile... # Note 2! The CFLAGS definitions are now in the main makefile...
SUB_DIRS := block char net misc #streams SUB_DIRS := block char net misc sound
MOD_SUB_DIRS := $(SUB_DIRS) sbus MOD_SUB_DIRS := $(SUB_DIRS) sbus
ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sbus sound cdrom isdn pnp macintosh ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sbus cdrom isdn pnp macintosh
ifdef CONFIG_PCI ifdef CONFIG_PCI
SUB_DIRS += pci SUB_DIRS += pci
...@@ -35,14 +35,6 @@ else ...@@ -35,14 +35,6 @@ else
endif endif
endif endif
ifeq ($(CONFIG_SOUND),y)
SUB_DIRS += sound
else
ifeq ($(CONFIG_SOUND),m)
MOD_SUB_DIRS += sound
endif
endif
ifeq ($(CONFIG_PNP),y) ifeq ($(CONFIG_PNP),y)
SUB_DIRS += pnp SUB_DIRS += pnp
MOD_SUB_DIRS += pnp MOD_SUB_DIRS += pnp
......
...@@ -110,20 +110,27 @@ bool 'Enhanced Real Time Clock Support' CONFIG_RTC ...@@ -110,20 +110,27 @@ bool 'Enhanced Real Time Clock Support' CONFIG_RTC
if [ "$CONFIG_ALPHA_BOOK1" = "y" ]; then if [ "$CONFIG_ALPHA_BOOK1" = "y" ]; then
bool 'Tadpole ANA H8 Support' CONFIG_H8 bool 'Tadpole ANA H8 Support' CONFIG_H8
fi fi
tristate 'Video For Linux' CONFIG_VIDEO_DEV tristate 'Video For Linux' CONFIG_VIDEO_DEV
if [ "$CONFIG_VIDEO_DEV" != "n" ]; then if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
dep_tristate 'AIMSlab RadioTrack (aka RadioReveal) support' CONFIG_RADIO_RTRACK $CONFIG_VIDEO_DEV
if [ "$CONFIG_RADIO_RTRACK" = "y" ]; then
hex ' RadioTrack i/o port (0x20f or 0x30f)' CONFIG_RADIO_RTRACK_PORT 20f
fi
dep_tristate 'Aztech/Packard Bell Radio' CONFIG_RADIO_AZTECH $CONFIG_VIDEO_DEV
if [ "$CONFIG_RADIO_AZTECH" = "y" ]; then
hex ' Aztech/Packard Bell I/O port (0x350 or 0x358)' CONFIG_RADIO_AZTECH_PORT 350
fi
dep_tristate 'BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV dep_tristate 'BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV
if [ "$CONFIG_PARPORT" != "n" ]; then if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate 'Quickcam BW Video For Linux' CONFIG_VIDEO_BWQCAM $CONFIG_VIDEO_DEV dep_tristate 'Quickcam BW Video For Linux' CONFIG_VIDEO_BWQCAM $CONFIG_VIDEO_DEV
dep_tristate 'Colour QuickCam Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV dep_tristate 'Colour QuickCam Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV
fi fi
dep_tristate 'Mediavision Pro Movie Studio Video For Linux' CONFIG_VIDEO_PMS $CONFIG_VIDEO_DEV dep_tristate 'Mediavision Pro Movie Studio Video For Linux' CONFIG_VIDEO_PMS $CONFIG_VIDEO_DEV
#dep_tristate 'SAA5249 Teletext processor' CONFIG_VIDEO_SAA5249 $CONFIG_VIDEO_DEV dep_tristate 'SAA5249 Teletext processor' CONFIG_VIDEO_SAA5249 $CONFIG_VIDEO_DEV
if [ "$CONFIG_VIDEO_SAA5249" != "n" ]; then dep_tristate 'SF16FMI Radio' CONFIG_RADIO_SF16FMI $CONFIG_VIDEO_DEV
define_bool CONFIG_BUS_I2C $CONFIG_VIDEO_SAA5249 if [ "$CONFIG_RADIO_SF16FMI" = "y" ]; then
fi hex ' SF16FMI I/O port (0x284 or 0x384)' CONFIG_RADIO_SF16FMI_PORT 284
if [ "$CONFIG_VIDEO_BT848" != "n" ]; then
define_bool CONFIG_BUS_I2C $CONFIG_VIDEO_BT848
fi fi
fi fi
tristate '/dev/nvram support' CONFIG_NVRAM tristate '/dev/nvram support' CONFIG_NVRAM
...@@ -132,7 +139,7 @@ bool 'Radio Device Support' CONFIG_MISC_RADIO ...@@ -132,7 +139,7 @@ bool 'Radio Device Support' CONFIG_MISC_RADIO
if [ "$CONFIG_MISC_RADIO" != "n" ]; then if [ "$CONFIG_MISC_RADIO" != "n" ]; then
bool ' AIMSlab RadioTrack (aka RadioReveal) support' CONFIG_RADIO_RTRACK bool ' AIMSlab RadioTrack (aka RadioReveal) support' CONFIG_RADIO_RTRACK
if [ "$CONFIG_RADIO_RTRACK" != "n" ]; then if [ "$CONFIG_RADIO_RTRACK" != "n" ]; then
hex ' RadioTrack i/o port (0x20f or 0x30f)' CONFIG_RADIO_RTRACK_PORT 0x20f hex ' RadioTrack i/o port (0x20f or 0x30f)' CONFIG_RADIO_RTRACK_PORT 20f
fi fi
fi fi
......
...@@ -303,26 +303,30 @@ else ...@@ -303,26 +303,30 @@ else
endif endif
ifeq ($(CONFIG_BUS_I2C),y) ifeq ($(CONFIG_BUS_I2C),y)
LX_OBJS += i2c.o L_I2C=y
else else
ifeq ($(CONFIG_BUS_I2C),m) ifeq ($(CONFIG_BUS_I2C),m)
MX_OBJS += i2c.o M_I2C=y
endif endif
endif endif
ifeq ($(CONFIG_VIDEO_BT848),y) ifeq ($(CONFIG_VIDEO_BT848),y)
L_OBJS += bttv.o msp3400.o tuner.o L_OBJS += bttv.o msp3400.o tuner.o
L_I2C=y
else else
ifeq ($(CONFIG_VIDEO_BT848),m) ifeq ($(CONFIG_VIDEO_BT848),m)
M_OBJS += bttv.o msp3400.o tuner.o M_OBJS += bttv.o msp3400.o tuner.o
M_I2C=y
endif endif
endif endif
ifeq ($(CONFIG_VIDEO_SAA5249),y) ifeq ($(CONFIG_VIDEO_SAA5249),y)
L_OBJS += saa5249.o L_OBJS += saa5249.o
L_I2C=y
else else
ifeq ($(CONFIG_VIDEO_SAA5249),m) ifeq ($(CONFIG_VIDEO_SAA5249),m)
M_OBJS += saa5249.o M_OBJS += saa5249.o
M_I2C=y
endif endif
endif endif
...@@ -350,6 +354,30 @@ else ...@@ -350,6 +354,30 @@ else
endif endif
endif endif
ifeq ($(CONFIG_RADIO_AZTECH),y)
L_OBJS += radio-aztech.o
else
ifeq ($(CONFIG_RADIO_AZTECH),m)
M_OBJS += radio-aztech.o
endif
endif
ifeq ($(CONFIG_RADIO_SF16FMI),y)
L_OBJS += radio-sf16fmi.o
else
ifeq ($(CONFIG_RADIO_SF16FMI),m)
M_OBJS += radio-sf16fmi.o
endif
endif
ifeq ($(CONFIG_RADIO_RTRACK),y)
L_OBJS += radio-aimslab.o
else
ifeq ($(CONFIG_RADIO_RTRACK),m)
M_OBJS += radio-aimslab.o
endif
endif
ifeq ($(CONFIG_MISC_RADIO),y) ifeq ($(CONFIG_MISC_RADIO),y)
L_OBJS += radio.o L_OBJS += radio.o
ifeq ($(CONFIG_RADIO_RTRACK),y) ifeq ($(CONFIG_RADIO_RTRACK),y)
...@@ -395,6 +423,14 @@ else ...@@ -395,6 +423,14 @@ else
endif endif
endif endif
ifeq ($(L_I2C),y)
LX_OBJS += i2c.o
else
ifeq ($(M_I2C),y)
MX_OBJS += i2c.o
endif
endif
ifdef CONFIG_VT ifdef CONFIG_VT
ifdef CONFIG_TGA_CONSOLE ifdef CONFIG_TGA_CONSOLE
L_OBJS += tga.o L_OBJS += tga.o
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#define BT848_DSTATUS_FIELD (1<<5) #define BT848_DSTATUS_FIELD (1<<5)
#define BT848_DSTATUS_NUML (1<<4) #define BT848_DSTATUS_NUML (1<<4)
#define BT848_DSTATUS_CSEL (1<<3) #define BT848_DSTATUS_CSEL (1<<3)
#define BT848_DSTATUS_PLOCK (1<<2)
#define BT848_DSTATUS_LOF (1<<1) #define BT848_DSTATUS_LOF (1<<1)
#define BT848_DSTATUS_COF (1<<0) #define BT848_DSTATUS_COF (1<<0)
...@@ -55,10 +56,12 @@ ...@@ -55,10 +56,12 @@
#define BT848_IFORM_XTAUTO (3<<3) #define BT848_IFORM_XTAUTO (3<<3)
#define BT848_IFORM_XTBOTH (3<<3) #define BT848_IFORM_XTBOTH (3<<3)
#define BT848_IFORM_NTSC 1 #define BT848_IFORM_NTSC 1
#define BT848_IFORM_NTSC_J 2
#define BT848_IFORM_PAL_BDGHI 3 #define BT848_IFORM_PAL_BDGHI 3
#define BT848_IFORM_PAL_M 4 #define BT848_IFORM_PAL_M 4
#define BT848_IFORM_PAL_N 5 #define BT848_IFORM_PAL_N 5
#define BT848_IFORM_SECAM 6 #define BT848_IFORM_SECAM 6
#define BT848_IFORM_PAL_NC 7
#define BT848_IFORM_AUTO 0 #define BT848_IFORM_AUTO 0
#define BT848_IFORM_NORM 7 #define BT848_IFORM_NORM 7
...@@ -114,6 +117,12 @@ ...@@ -114,6 +117,12 @@
#define BT848_SCLOOP_HFILT_QCIF (2<<3) #define BT848_SCLOOP_HFILT_QCIF (2<<3)
#define BT848_SCLOOP_HFILT_ICON (3<<3) #define BT848_SCLOOP_HFILT_ICON (3<<3)
#define BT848_SCLOOP_PEAK (1<<7)
#define BT848_SCLOOP_HFILT_MINP (1<<3)
#define BT848_SCLOOP_HFILT_MEDP (2<<3)
#define BT848_SCLOOP_HFILT_MAXP (3<<3)
#define BT848_OFORM 0x048 #define BT848_OFORM 0x048
#define BT848_OFORM_RANGE (1<<7) #define BT848_OFORM_RANGE (1<<7)
#define BT848_OFORM_CORE0 (0<<5) #define BT848_OFORM_CORE0 (0<<5)
...@@ -213,6 +222,7 @@ ...@@ -213,6 +222,7 @@
#define BT848_VBI_PACK_DEL_EXT_FRAME 2 #define BT848_VBI_PACK_DEL_EXT_FRAME 2
#define BT848_VBI_PACK_DEL_VBI_PKT_HI 1 #define BT848_VBI_PACK_DEL_VBI_PKT_HI 1
#define BT848_INT_STAT 0x100 #define BT848_INT_STAT 0x100
#define BT848_INT_MASK 0x104 #define BT848_INT_MASK 0x104
...@@ -318,4 +328,15 @@ ...@@ -318,4 +328,15 @@
#define BT848_RISC_SKIP123 (0x0a<<28) #define BT848_RISC_SKIP123 (0x0a<<28)
#define BT848_RISC_WRITE1S23 (0x0b<<28) #define BT848_RISC_WRITE1S23 (0x0b<<28)
/* Bt848A and Bt849 only !! */
#define BT848_TGLB 0x080
#define BT848_TGCTRL 0x084
#define BT848_FCAP 0x0E8
#define BT848_PLL_F_LO 0x0F0
#define BT848_PLL_F_HI 0x0F4
#define BT848_PLL_XCI 0x0F8
#endif #endif
This diff is collapsed.
...@@ -33,14 +33,7 @@ ...@@ -33,14 +33,7 @@
#define MAX_CLIPRECS 100 #define MAX_CLIPRECS 100
#define RISCMEM_LEN (32744*2) #define RISCMEM_LEN (32744*2)
#define MAX_FBUF 0x144000 #define BTTV_MAX_FBUF 0x144000
struct riscprog
{
unsigned int length;
u32 *busadr;
u32 *prog;
};
/* clipping rectangle */ /* clipping rectangle */
...@@ -51,29 +44,6 @@ struct cliprec ...@@ -51,29 +44,6 @@ struct cliprec
}; };
/* grab buffer */
struct gbuffer
{
struct gbuffer *next;
struct gbuffer *next_active;
void *adr;
int x, y;
int width, height;
unsigned int bpl;
unsigned int fmt;
int flags;
#define GBUF_ODD 1
#define GBUF_EVEN 2
#define GBUF_LFB 4
#define GBUF_INT 8
unsigned int length;
void *ro;
void *re;
u32 bro;
u32 bre;
};
#ifdef __KERNEL__ #ifdef __KERNEL__
struct bttv_window struct bttv_window
...@@ -89,6 +59,7 @@ struct bttv_window ...@@ -89,6 +59,7 @@ struct bttv_window
int norm; int norm;
int interlace; int interlace;
int color_fmt; int color_fmt;
ushort depth;
}; };
...@@ -119,7 +90,7 @@ struct bttv ...@@ -119,7 +90,7 @@ struct bttv
int type; /* card type */ int type; /* card type */
int audio; /* audio mode */ int audio; /* audio mode */
int user; int user;
int dbx; int audio_chip;
int radio; int radio;
u32 *risc_jmp; u32 *risc_jmp;
...@@ -145,12 +116,15 @@ struct bttv ...@@ -145,12 +116,15 @@ struct bttv
u32 *grisc; u32 *grisc;
unsigned long gro; unsigned long gro;
unsigned long gre; unsigned long gre;
unsigned long gro_next;
unsigned long gre_next;
char *fbuffer; char *fbuffer;
int gmode; int gmode;
int grabbing; int grabbing;
int lastgrab; int lastgrab;
int grab; int grab;
int grabcount; int grabcount;
int pll;
}; };
#endif #endif
...@@ -184,6 +158,8 @@ struct bttv ...@@ -184,6 +158,8 @@ struct bttv
#define BTTV_INTEL 0x04 #define BTTV_INTEL 0x04
#define BTTV_DIAMOND 0x05 #define BTTV_DIAMOND 0x05
#define BTTV_AVERMEDIA 0x06 #define BTTV_AVERMEDIA 0x06
#define BTTV_MATRIX_VISION 0x07
#define BTTV_FLYVIDEO 0x08
#define AUDIO_TUNER 0x00 #define AUDIO_TUNER 0x00
#define AUDIO_RADIO 0x01 #define AUDIO_RADIO 0x01
...@@ -194,8 +170,12 @@ struct bttv ...@@ -194,8 +170,12 @@ struct bttv
#define AUDIO_MUTE 0x80 #define AUDIO_MUTE 0x80
#define AUDIO_UNMUTE 0x81 #define AUDIO_UNMUTE 0x81
#define TDA9850 0x01
#define TDA8425 0x02
#define I2C_TSA5522 0xc2 #define I2C_TSA5522 0xc2
#define I2C_TDA9850 0xb6 #define I2C_TDA9850 0xb6
#define I2C_TDA8425 0x82
#define I2C_HAUPEE 0xa0 #define I2C_HAUPEE 0xa0
#define I2C_STBEE 0xae #define I2C_STBEE 0xae
...@@ -207,4 +187,12 @@ struct bttv ...@@ -207,4 +187,12 @@ struct bttv
#define TDA9850_ALI2 0x09 #define TDA9850_ALI2 0x09
#define TDA9850_ALI3 0x0a #define TDA9850_ALI3 0x0a
#define TDA8425_VL 0x00
#define TDA8425_VR 0x01
#define TDA8425_BA 0x02
#define TDA8425_TR 0x03
#define TDA8425_S1 0x08
#endif #endif
...@@ -112,7 +112,7 @@ struct lp_struct lp_table[LP_NO] = ...@@ -112,7 +112,7 @@ struct lp_struct lp_table[LP_NO] =
#ifdef LP_STATS #ifdef LP_STATS
0, 0, {0}, 0, 0, {0},
#endif #endif
NULL, 0, 0} NULL, 0, 0, 0}
}; };
/* Test if printer is ready (and optionally has no error conditions) */ /* Test if printer is ready (and optionally has no error conditions) */
......
...@@ -536,7 +536,10 @@ __initfunc(int chr_dev_init(void)) ...@@ -536,7 +536,10 @@ __initfunc(int chr_dev_init(void))
misc_init(); misc_init();
#endif #endif
#ifdef CONFIG_SOUND #ifdef CONFIG_SOUND
soundcore_init();
#ifdef CONFIG_SOUND_OSS
soundcard_init(); soundcard_init();
#endif
#endif #endif
#ifdef CONFIG_JOYSTICK #ifdef CONFIG_JOYSTICK
/* /*
......
This diff is collapsed.
...@@ -15,4 +15,9 @@ ...@@ -15,4 +15,9 @@
#define MSP_GET_DC _IOW('m',8,int) #define MSP_GET_DC _IOW('m',8,int)
#define MSP_GET_BASS _IOR('m', 9,int)
#define MSP_SET_BASS _IOW('m',10,int)
#define MSP_GET_TREBLE _IOR('m',11,int)
#define MSP_SET_TREBLE _IOW('m',12,int)
#endif /* MSP3400_H */ #endif /* MSP3400_H */
/* radiotrack (radioreveal) driver for Linux radio support
* (c) 1997 M. Kirkwood
* Coverted to new API by Alan Cox <Alan.Cox@linux.org>
*
* TODO: Allow for more than one of these foolish entities :-)
*
* Notes on the hardware (reverse engineered from other peoples'
* reverse engineering of AIMS' code :-)
*
* Frequency control is done digitally -- ie out(port,encodefreq(95.8));
*
* The signal strength query is unsurprisingly inaccurate. And it seems
* to indicate that (on my card, at least) the frequency setting isn't
* too great. (I have to tune up .025MHz from what the freq should be
* to get a report that the thing is tuned.)
*
* Volume control is (ugh) analogue:
* out(port, start_increasing_volume);
* wait(a_wee_while);
* out(port, stop_changing_the_volume);
*
*/
#include <linux/module.h> /* Modules */
#include <linux/init.h> /* Initdata */
#include <linux/ioport.h> /* check_region, request_region */
#include <linux/delay.h> /* udelay */
#include <asm/io.h> /* outb, outb_p */
#include <asm/uaccess.h> /* copy to/from user */
#include <linux/videodev.h> /* kernel radio structs */
#include <linux/config.h> /* CONFIG_RADIO_RTRACK_PORT */
#ifndef CONFIG_RADIO_RTRACK_PORT
#define CONFIG_RADIO_RTRACK_PORT -1
#endif
static int io = CONFIG_RADIO_RTRACK_PORT;
static int users = 0;
struct rt_device
{
int port;
int curvol;
unsigned long curfreq;
};
/* local things */
static void sleep_delay(int n)
{
/* Sleep nicely for 'n' uS */
int d=n/1000000/HZ;
if(!d)
udelay(n);
else
{
/* Yield CPU time */
unsigned long x=jiffies;
while((jiffies-x)<=d)
schedule();
}
}
/* Clock out data to the chip. This looks suspiciously like i2c as usual */
static void outbits(int bits, int data, int port)
{
while(bits--)
{
if(data & 1)
{
outw(5, port);
outw(5, port);
outw(7, port);
outw(7, port);
}
else
{
outw(1, port);
outw(1, port);
outw(3, port);
outw(3, port);
}
data>>=1;
}
}
static void rt_decvol(int port)
{
outb(0x48, port);
sleep_delay(100000);
outb(0xc8, port);
}
static void rt_incvol(int port)
{
outb(0x88, port);
sleep_delay(100000);
outb(0xc8, port);
}
static void rt_mute(int port)
{
outb(0, port);
outb(0xc0, port);
}
static void rt_unmute(int port)
{
outb(0, port);
outb(0xc8, port);
}
static int rt_setvol(struct rt_device *dev, int vol)
{
int i;
if(vol == dev->curvol)
return 0;
if(vol == 0)
rt_mute(dev->port);
if(vol > dev->curvol)
for(i = dev->curvol; i < vol; i++)
rt_incvol(dev->port);
else
for(i = dev->curvol; i > vol; i--)
rt_decvol(dev->port);
if(dev->curvol == 0)
rt_unmute(dev->port);
return 0;
}
static int rt_setfreq(struct rt_device *dev, unsigned long frequency)
{
int myport = dev->port;
#define RTRACK_ENCODE(x) (((((x)*2)/5)-(40*88))+0xf6c)
outbits(16, RTRACK_ENCODE(frequency), myport);
outbits(8, 0xa0, myport);
/* XXX - get rid of this once setvol is implemented properly - XXX */
/* these insist on turning the thing on. not sure I approve... */
udelay(1000);
outb(0, myport);
outb(0xc8, myport);
return 0;
}
int rt_getsigstr(struct rt_device *dev)
{
int res;
int myport = dev->port;
outb(0xf8, myport);
sleep_delay(200000);
res = (int)inb(myport);
sleep_delay(10000);
outb(0xe8, myport);
if(res == 0xfd)
return 1;
else
return 0;
}
static int rt_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
{
struct rt_device *rt=dev->priv;
switch(cmd)
{
case VIDIOCGCAP:
{
struct video_capability v;
v.type=VID_TYPE_TUNER;
v.channels=1;
v.audios=1;
/* No we don't do pictures */
v.maxwidth=0;
v.maxheight=0;
v.minwidth=0;
v.minheight=0;
if(copy_to_user(arg,&v,sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCGTUNER:
{
struct video_tuner v;
if(copy_from_user(&v, arg,sizeof(v))!=0)
return -EFAULT;
if(v.tuner) /* Only 1 tuner */
return -EINVAL;
v.rangelow=(int)(88.0*16);
v.rangehigh=(int)(108.0*16);
v.flags=0;
v.mode=VIDEO_MODE_AUTO;
v.signal=0xFFFF*rt_getsigstr(rt);
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCSTUNER:
{
struct video_tuner v;
if(copy_from_user(&v, arg, sizeof(v)))
return -EFAULT;
if(v.tuner!=0)
return -EINVAL;
/* Only 1 tuner so no setting needed ! */
return 0;
}
case VIDIOCGFREQ:
if(copy_to_user(arg, &rt->curfreq, sizeof(rt->curfreq)))
return -EFAULT;
return 0;
case VIDIOCSFREQ:
if(copy_from_user(&rt->curfreq, arg,sizeof(rt->curfreq)))
return -EFAULT;
rt_setfreq(rt, rt->curfreq);
return 0;
case VIDIOCGAUDIO:
{
struct video_audio v;
memset(&v,0, sizeof(v));
v.flags|=VIDEO_AUDIO_MUTABLE|VIDEO_AUDIO_VOLUME;
v.volume=rt->curvol;
strcpy(v.name, "Radio");
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCSAUDIO:
{
struct video_audio v;
if(copy_from_user(&v, arg, sizeof(v)))
return -EFAULT;
if(v.audio)
return -EINVAL;
rt->curvol=v.volume;
if(v.flags&VIDEO_AUDIO_MUTE)
rt_mute(rt->port);
else
rt_setvol(rt,rt->curvol/6554);
return 0;
}
default:
return -ENOIOCTLCMD;
}
}
static int rt_open(struct video_device *dev, int flags)
{
if(users)
return -EBUSY;
users++;
MOD_INC_USE_COUNT;
return 0;
}
static void rt_close(struct video_device *dev)
{
users--;
MOD_DEC_USE_COUNT;
}
static struct rt_device rtrack_unit;
static struct video_device rtrack_radio=
{
"RadioTrack radio",
VID_TYPE_TUNER,
VID_HARDWARE_RTRACK,
rt_open,
rt_close,
NULL, /* Can't read (no capture ability) */
NULL, /* Can't write */
rt_ioctl,
NULL,
NULL
};
__initfunc(int rtrack_init(struct video_init *v))
{
if (check_region(io, 2))
{
printk(KERN_ERR "rtrack: port 0x%x already in use\n", io);
return -EBUSY;
}
rtrack_radio.priv=&rtrack_unit;
if(video_register_device(&rtrack_radio, VFL_TYPE_RADIO)==-1)
return -EINVAL;
request_region(io, 2, "rtrack");
printk(KERN_INFO "AIMSlab Radiotrack/radioreveal card driver.\n");
/* mute card - prevents noisy bootups */
rt_mute(io);
return 0;
}
#ifdef MODULE
MODULE_AUTHOR("M.Kirkwood");
MODULE_DESCRIPTION("A driver for the RadioTrack/RadioReveal radio card.");
MODULE_PARM(io, "i");
MODULE_PARM_DESC(io, "I/O address of the RadioTrack card (0x20f or 0x30f)");
EXPORT_NO_SYMBOLS;
int init_module(void)
{
if(io==-1)
{
printk(KERN_ERR "You must set an I/O address with io=0x???\n");
return -EINVAL;
}
return rtrack_init(NULL);
}
void cleanup_module(void)
{
video_unregister_device(&rtrack_radio);
release_region(io,2);
}
#endif
/* aztech.c - Aztech radio card driver for Linux 2.1 by Russell Kroll
*
* Heavily modified to support the new 2.1 radio card interfaces by
* Russell Kroll (rkroll@exploits.org)
*
* Based on code by
*
* Quay Ly
* Donald Song
* Jason Lewis (jlewis@twilight.vtc.vsc.edu)
* Scott McGrath (smcgrath@twilight.vtc.vsc.edu)
* William McGrath (wmcgrath@twilight.vtc.vsc.edu)
*
* The basis for this code may be found at http://bigbang.vtc.vsc.edu/fmradio/
* along with more information on the card itself.
*
* Notable changes from the original source:
* - includes stripped down to the essentials
* - for loops used as delays replaced with udelay()
* - #defines removed, changed to static values
* - tuning structure changed - no more character arrays, other changes
*/
#include <linux/module.h> /* Modules */
#include <linux/init.h> /* Initdata */
#include <linux/ioport.h> /* check_region, request_region */
#include <linux/delay.h> /* udelay */
#include <asm/io.h> /* outb, outb_p */
#include <asm/uaccess.h> /* copy to/from user */
#include <linux/videodev.h> /* kernel radio structs */
#include <linux/config.h> /* CONFIG_RADIO_AZTECH_PORT */
/* acceptable ports: 0x350 (JP3 shorted), 0x358 (JP3 open) */
#ifndef CONFIG_RADIO_AZTECH_PORT
#define CONFIG_RADIO_AZTECH_PORT -1
#endif
static int io = CONFIG_RADIO_AZTECH_PORT;
static int radio_wait_time = 1000;
static int users = 0;
struct az_device
{
int curvol;
unsigned long curfreq;
int stereo;
};
static int volconvert(int level)
{
level>>=14; /* Map 16bits down to 2 bit */
level&=3;
/* convert to card-friendly values */
switch (level)
{
case 0:
return 0;
case 1:
return 1;
case 2:
return 4;
case 3:
return 5;
}
return 0; /* Quieten gcc */
}
static void send_0_byte (struct az_device *dev)
{
udelay(radio_wait_time);
outb_p(2+volconvert(dev->curvol), io);
outb_p(64+2+volconvert(dev->curvol), io);
}
static void send_1_byte (struct az_device *dev)
{
udelay (radio_wait_time);
outb_p(128+2+volconvert(dev->curvol), io);
outb_p(128+64+2+volconvert(dev->curvol), io);
}
static int az_setvol(struct az_device *dev, int vol)
{
outb (volconvert(vol), io);
return 0;
}
/* thanks to Michael Dwyer for giving me a dose of clues in
* the signal strength department..
*
* This card has a stereo bit - bit 0 set = mono, not set = stereo
* It also has a "signal" bit - bit 1 set = bad signal, not set = good
*
*/
static int az_getsigstr(struct az_device *dev)
{
if (inb(io) & 2) /* bit set = no signal present */
return 0;
return 1; /* signal present */
}
static int az_getstereo(struct az_device *dev)
{
if (inb(io) & 1) /* bit set = mono */
return 0;
return 1; /* stereo */
}
static int az_setfreq(struct az_device *dev, unsigned long frequency)
{
int i;
frequency = (frequency / 16.0) * 100; /* massage data a bit */
frequency += 1070; /* tuning needs 24 data bits */
frequency /= 5;
send_0_byte (dev); /* 0: LSB of frequency */
for (i = 0; i < 13; i++) /* : frequency bits (1-13) */
if (frequency & (1 << i))
send_1_byte (dev);
else
send_0_byte (dev);
send_0_byte (dev); /* 14: test bit - always 0 */
send_0_byte (dev); /* 15: test bit - always 0 */
send_0_byte (dev); /* 16: band data 0 - always 0 */
if (dev->stereo) /* 17: stereo (1 to enable) */
send_1_byte (dev);
else
send_0_byte (dev);
send_1_byte (dev); /* 18: band data 1 - unknown */
send_0_byte (dev); /* 19: time base - always 0 */
send_0_byte (dev); /* 20: spacing (0 = 25 kHz) */
send_1_byte (dev); /* 21: spacing (1 = 25 kHz) */
send_0_byte (dev); /* 22: spacing (0 = 25 kHz) */
send_1_byte (dev); /* 23: AM/FM (FM = 1, always) */
/* latch frequency */
udelay (radio_wait_time);
outb_p(128+64+volconvert(dev->curvol), io);
return 0;
}
static int az_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
{
struct az_device *az=dev->priv;
switch(cmd)
{
case VIDIOCGCAP:
{
struct video_capability v;
v.type=VID_TYPE_TUNER;
v.channels=1;
v.audios=1;
/* No we don't do pictures */
v.maxwidth=0;
v.maxheight=0;
v.minwidth=0;
v.minheight=0;
if(copy_to_user(arg,&v,sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCGTUNER:
{
struct video_tuner v;
if(copy_from_user(&v, arg,sizeof(v))!=0)
return -EFAULT;
if(v.tuner) /* Only 1 tuner */
return -EINVAL;
v.rangelow=(int)(87.9*16);
v.rangehigh=(int)(107.8*16);
v.flags=0;
v.mode=VIDEO_MODE_AUTO;
v.signal=0xFFFF*az_getsigstr(az);
if(az_getstereo(az))
v.flags|=VIDEO_TUNER_STEREO_ON;
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCSTUNER:
{
struct video_tuner v;
if(copy_from_user(&v, arg, sizeof(v)))
return -EFAULT;
if(v.tuner!=0)
return -EINVAL;
/* Only 1 tuner so no setting needed ! */
return 0;
}
case VIDIOCGFREQ:
if(copy_to_user(arg, &az->curfreq, sizeof(az->curfreq)))
return -EFAULT;
return 0;
case VIDIOCSFREQ:
if(copy_from_user(&az->curfreq, arg,sizeof(az->curfreq)))
return -EFAULT;
az_setfreq(az, az->curfreq);
return 0;
case VIDIOCGAUDIO:
{
struct video_audio v;
memset(&v,0, sizeof(v));
v.flags|=VIDEO_AUDIO_MUTABLE|VIDEO_AUDIO_VOLUME;
if(az->stereo)
v.mode=VIDEO_SOUND_STEREO;
else
v.mode=VIDEO_SOUND_MONO;
v.volume=az->curvol;
strcpy(v.name, "Radio");
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCSAUDIO:
{
struct video_audio v;
if(copy_from_user(&v, arg, sizeof(v)))
return -EFAULT;
if(v.audio)
return -EINVAL;
az->curvol=v.volume;
az->stereo=(v.mode&VIDEO_SOUND_STEREO)?1:0;
if(v.flags&VIDEO_AUDIO_MUTE)
az_setvol(az,0);
else
az_setvol(az,az->curvol);
return 0;
}
default:
return -ENOIOCTLCMD;
}
}
static int az_open(struct video_device *dev, int flags)
{
if(users)
return -EBUSY;
users++;
MOD_INC_USE_COUNT;
return 0;
}
static void az_close(struct video_device *dev)
{
users--;
MOD_DEC_USE_COUNT;
}
static struct az_device aztech_unit;
static struct video_device aztech_radio=
{
"Aztech radio",
VID_TYPE_TUNER,
VID_HARDWARE_AZTECH,
az_open,
az_close,
NULL, /* Can't read (no capture ability) */
NULL, /* Can't write */
az_ioctl,
NULL,
NULL
};
__initfunc(int aztech_init(struct video_init *v))
{
if (check_region(io, 2))
{
printk(KERN_ERR "aztech: port 0x%x already in use\n", io);
return -EBUSY;
}
aztech_radio.priv=&aztech_unit;
if(video_register_device(&aztech_radio, VFL_TYPE_RADIO)==-1)
return -EINVAL;
request_region(io, 2, "aztech");
printk(KERN_INFO "Aztech radio card driver v0.40/19980422 rkroll@exploits.org\n");
/* mute card - prevents noisy bootups */
outb (0, io);
return 0;
}
#ifdef MODULE
MODULE_AUTHOR("Russell Kroll, Quay Lu, Donald Song, Jason Lewis, Scott McGrath, William McGrath");
MODULE_DESCRIPTION("A driver for the Aztech radio card.");
MODULE_PARM(io, "i");
MODULE_PARM_DESC(io, "I/O address of the Aztech card (0x350 or 0x358)");
EXPORT_NO_SYMBOLS;
int init_module(void)
{
if(io==-1)
{
printk(KERN_ERR "You must set an I/O address with io=0x???\n");
return -EINVAL;
}
return aztech_init(NULL);
}
void cleanup_module(void)
{
video_unregister_device(&aztech_radio);
release_region(io,2);
}
#endif
/* SF16FMI radio driver for Linux radio support
* heavily based on rtrack driver...
* (c) 1997 M. Kirkwood
* (c) 1998 Petr Vandrovec, vandrove@vc.cvut.cz
*
* Fitted to new interface by Alan Cox <alan.cox@linux.org>
*
* Notes on the hardware
*
* Frequency control is done digitally -- ie out(port,encodefreq(95.8));
* No volume control - only mute/unmute - you have to use line volume
* control on SB-part of SF16FMI
*
*/
#include <linux/module.h> /* Modules */
#include <linux/init.h> /* Initdata */
#include <linux/ioport.h> /* check_region, request_region */
#include <linux/delay.h> /* udelay */
#include <asm/io.h> /* outb, outb_p */
#include <asm/uaccess.h> /* copy to/from user */
#include <linux/videodev.h> /* kernel radio structs */
#include <linux/config.h> /* CONFIG_RADIO_SF16MI_PORT */
#include "rsf16fmi.h"
struct fmi_device
{
int port;
int curvol;
unsigned long curfreq;
};
#ifndef CONFIG_RADIO_SF16FMI_PORT
#define CONFIG_RADIO_SF16FMI_PORT -1
#endif
static int io = CONFIG_RADIO_SF16FMI_PORT;
static int users = 0;
/* local things */
#define RSF16_ENCODE(x) ((x*(1000/RADIO_FM_RES)+10700)/50)
static void outbits(int bits, int data, int port)
{
while(bits--) {
if(data & 1) {
outb(5, port);
udelay(6);
outb(7, port);
udelay(6);
} else {
outb(1, port);
udelay(6);
outb(3, port);
udelay(6);
}
data>>=1;
}
}
static void fmi_mute(int port)
{
outb(0x00, port);
}
static void fmi_unmute(int port)
{
outb(0x08, port);
}
/* FREQ is in 1/16ths of a MHz so this is probably wrong atm */
static int fmi_setfreq(struct fmi_device *dev, unsigned long freq)
{
int myport = dev->port;
outbits(16, RSF16_ENCODE(freq), myport);
outbits(8, 0xC0, myport);
/* we should wait here... */
return 0;
}
static int fmi_getsigstr(struct fmi_device *dev)
{
int val;
int res;
int myport = dev->port;
val = dev->curvol ? 0x08 : 0x00; /* unmute/mute */
outb(val, myport);
outb(val | 0x10, myport);
udelay(140000);
res = (int)inb(myport+1);
outb(val, myport);
return (res & 2) ? 0 : 1;
}
static int fmi_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
{
struct fmi_device *fmi=dev->priv;
switch(cmd)
{
case VIDIOCGCAP:
{
struct video_capability v;
v.type=VID_TYPE_TUNER;
v.channels=1;
v.audios=1;
/* No we don't do pictures */
v.maxwidth=0;
v.maxheight=0;
v.minwidth=0;
v.minheight=0;
if(copy_to_user(arg,&v,sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCGTUNER:
{
struct video_tuner v;
if(copy_from_user(&v, arg,sizeof(v))!=0)
return -EFAULT;
if(v.tuner) /* Only 1 tuner */
return -EINVAL;
v.rangelow=(int)(87.5*16);
v.rangehigh=(int)(108.0*16);
v.flags=0;
v.mode=VIDEO_MODE_AUTO;
v.signal=0xFFFF*fmi_getsigstr(fmi);
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCSTUNER:
{
struct video_tuner v;
if(copy_from_user(&v, arg, sizeof(v)))
return -EFAULT;
if(v.tuner!=0)
return -EINVAL;
/* Only 1 tuner so no setting needed ! */
return 0;
}
case VIDIOCGFREQ:
if(copy_to_user(arg, &fmi->curfreq, sizeof(fmi->curfreq)))
return -EFAULT;
return 0;
case VIDIOCSFREQ:
if(copy_from_user(&fmi->curfreq, arg,sizeof(fmi->curfreq)))
return -EFAULT;
fmi_setfreq(fmi, fmi->curfreq);
return 0;
case VIDIOCGAUDIO:
{
struct video_audio v;
memset(&v,0, sizeof(v));
v.flags|=VIDEO_AUDIO_MUTABLE;
v.mode=VIDEO_SOUND_MONO;
v.volume=fmi->curvol;
strcpy(v.name, "Radio");
if(copy_to_user(arg,&v, sizeof(v)))
return -EFAULT;
return 0;
}
case VIDIOCSAUDIO:
{
struct video_audio v;
if(copy_from_user(&v, arg, sizeof(v)))
return -EFAULT;
if(v.audio)
return -EINVAL;
fmi->curvol=v.volume;
if(v.flags&VIDEO_AUDIO_MUTE)
fmi_mute(fmi->port);
else if(fmi->curvol)
fmi_unmute(fmi->port);
else
fmi_mute(fmi->port);
return 0;
}
default:
return -ENOIOCTLCMD;
}
}
static int fmi_open(struct video_device *dev, int flags)
{
if(users)
return -EBUSY;
users++;
MOD_INC_USE_COUNT;
return 0;
}
static void fmi_close(struct video_device *dev)
{
users--;
MOD_DEC_USE_COUNT;
}
static struct fmi_device fmi_unit;
static struct video_device fmi_radio=
{
"SF16FMI radio",
VID_TYPE_TUNER,
VID_HARDWARE_SF16MI,
fmi_open,
fmi_close,
NULL, /* Can't read (no capture ability) */
NULL, /* Can't write */
fmi_ioctl,
NULL,
NULL
};
__initfunc(int fmi_init(struct video_init *v))
{
if (check_region(io, 2))
{
printk(KERN_ERR "fmi: port 0x%x already in use\n", io);
return -EBUSY;
}
fmi_unit.port=io;
fmi_radio.priv=&fmi_unit;
if(video_register_device(&fmi_radio, VFL_TYPE_RADIO)==-1)
return -EINVAL;
request_region(io, 2, "fmi");
printk(KERN_INFO "SF16FMI radio card driver.\n");
printk(KERN_INFO "(c) 1998 Petr Vandrovec, vandrove@vc.cvut.cz.\n");
/* mute card - prevents noisy bootups */
fmi_mute(io);
return 0;
}
#ifdef MODULE
MODULE_AUTHOR("Petr Vandrovec, vandrove@vc.cvut.cz and M. Kirkwood");
MODULE_DESCRIPTION("A driver for the SF16MI radio.");
MODULE_PARM(io, "i");
MODULE_PARM_DESC(io, "I/O address of the SF16MI card (0x284 or 0x384)");
EXPORT_NO_SYMBOLS;
int init_module(void)
{
if(io==-1)
{
printk(KERN_ERR "You must set an I/O address with io=0x???\n");
return -EINVAL;
}
return fmi_init(NULL);
}
void cleanup_module(void)
{
video_unregister_device(&fmi_radio);
release_region(io,2);
}
#endif
/* SF16FMI FMRadio include file.
* (c) 1998 Petr Vandrovec
*
* Not in include/linux/ because there's no need for anyone
* to know about these details, I reckon.
*/
#ifndef __RSF16FMI_H
#define __RSF16FMI_H
#include <linux/radio.h>
int radiosf16fmi_init(void);
#endif /* __RSF16FMI_H */
This diff is collapsed.
...@@ -48,6 +48,15 @@ extern int init_colour_qcams(struct video_init *); ...@@ -48,6 +48,15 @@ extern int init_colour_qcams(struct video_init *);
#ifdef CONFIG_VIDEO_BWQCAM #ifdef CONFIG_VIDEO_BWQCAM
extern int init_bw_qcams(struct video_init *); extern int init_bw_qcams(struct video_init *);
#endif #endif
#ifdef CONFIG_RADIO_AZTECH
extern int aztech_init(struct video_init *);
#endif
#ifdef CONFIG_RADIO_RTRACK
extern int rtrack_init(struct video_init *);
#endif
#ifdef CONFIG_RADIO_SF16FMI
extern int fmi_init(struct video_init *);
#endif
static struct video_init video_init_list[]={ static struct video_init video_init_list[]={
#ifdef CONFIG_VIDEO_BT848 #ifdef CONFIG_VIDEO_BT848
...@@ -64,6 +73,15 @@ static struct video_init video_init_list[]={ ...@@ -64,6 +73,15 @@ static struct video_init video_init_list[]={
#endif #endif
#ifdef CONFIG_VIDEO_PMS #ifdef CONFIG_VIDEO_PMS
{"PMS", init_pms_cards}, {"PMS", init_pms_cards},
#endif
#ifdef CONFIG_RADIO_AZTECH
{"Aztech", aztech_init},
#endif
#ifdef CONFIG_RADIO_RTRACK
{"RTrack", rtrack_init},
#endif
#ifdef CONFIG_RADIO_SF16FMI
{"SF16FMI", fmi_init},
#endif #endif
{"end", NULL} {"end", NULL}
}; };
...@@ -77,7 +95,10 @@ static ssize_t video_read(struct file *file, ...@@ -77,7 +95,10 @@ static ssize_t video_read(struct file *file,
char *buf, size_t count, loff_t *ppos) char *buf, size_t count, loff_t *ppos)
{ {
struct video_device *vfl=video_device[MINOR(file->f_dentry->d_inode->i_rdev)]; struct video_device *vfl=video_device[MINOR(file->f_dentry->d_inode->i_rdev)];
return vfl->read(vfl, buf, count, file->f_flags&O_NONBLOCK); if(vfl->read)
return vfl->read(vfl, buf, count, file->f_flags&O_NONBLOCK);
else
return -EINVAL;
} }
...@@ -91,7 +112,10 @@ static ssize_t video_write(struct file *file, const char *buf, ...@@ -91,7 +112,10 @@ static ssize_t video_write(struct file *file, const char *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct video_device *vfl=video_device[MINOR(file->f_dentry->d_inode->i_rdev)]; struct video_device *vfl=video_device[MINOR(file->f_dentry->d_inode->i_rdev)];
return vfl->write(vfl, buf, count, file->f_flags&O_NONBLOCK); if(vfl->write)
return vfl->write(vfl, buf, count, file->f_flags&O_NONBLOCK);
else
return 0;
} }
/* /*
...@@ -223,12 +247,15 @@ int video_register_device(struct video_device *vfd, int type) ...@@ -223,12 +247,15 @@ int video_register_device(struct video_device *vfd, int type)
/* The init call may sleep so we book the slot out /* The init call may sleep so we book the slot out
then call */ then call */
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
err=vfd->initialize(vfd); if(vfd->initialize)
if(err<0)
{ {
video_device[i]=NULL; err=vfd->initialize(vfd);
MOD_DEC_USE_COUNT; if(err<0)
return err; {
video_device[i]=NULL;
MOD_DEC_USE_COUNT;
return err;
}
} }
return 0; return 0;
} }
......
...@@ -88,6 +88,7 @@ static struct parport_operations parport_arc_ops = ...@@ -88,6 +88,7 @@ static struct parport_operations parport_arc_ops =
NULL, /* ecp_write_block */ NULL, /* ecp_write_block */
NULL, /* epp_write_block */ NULL, /* epp_write_block */
arc_init_state,
arc_save_state, arc_save_state,
arc_restore_state, arc_restore_state,
......
...@@ -207,6 +207,13 @@ parport_ax_claim_resources(struct parport *p) ...@@ -207,6 +207,13 @@ parport_ax_claim_resources(struct parport *p)
return 0; return 0;
} }
void
parport_ax_init_state(struct parport_state *s)
{
s->u.pc.ctr = 0xc;
s->u.pc.ecr = 0x0;
}
void void
parport_ax_save_state(struct parport *p, struct parport_state *s) parport_ax_save_state(struct parport *p, struct parport_state *s)
{ {
...@@ -301,6 +308,7 @@ static struct parport_operations parport_ax_ops = ...@@ -301,6 +308,7 @@ static struct parport_operations parport_ax_ops =
parport_ax_ecp_write_block, parport_ax_ecp_write_block,
parport_ax_ecp_read_block, parport_ax_ecp_read_block,
parport_ax_init_state,
parport_ax_save_state, parport_ax_save_state,
parport_ax_restore_state, parport_ax_restore_state,
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
* Authors: Phil Blundell <Philip.Blundell@pobox.com> * Authors: Phil Blundell <Philip.Blundell@pobox.com>
* Tim Waugh <tim@cyberelk.demon.co.uk> * Tim Waugh <tim@cyberelk.demon.co.uk>
* Jose Renau <renau@acm.org> * Jose Renau <renau@acm.org>
* David Campbell <campbell@tirian.che.curtin.edu.au> * David Campbell <campbell@torque.net>
* Andrea Arcangeli <arcangeli@mbox.queen.it>
* *
* based on work by Grant Guenther <grant@torque.net> and Phil Blundell. * based on work by Grant Guenther <grant@torque.net> and Phil Blundell.
*/ */
...@@ -171,16 +172,24 @@ int parport_pc_claim_resources(struct parport *p) ...@@ -171,16 +172,24 @@ int parport_pc_claim_resources(struct parport *p)
return 0; return 0;
} }
void parport_pc_init_state(struct parport_state *s)
{
s->u.pc.ctr = 0xc;
s->u.pc.ecr = 0x0;
}
void parport_pc_save_state(struct parport *p, struct parport_state *s) void parport_pc_save_state(struct parport *p, struct parport_state *s)
{ {
s->u.pc.ctr = parport_pc_read_control(p); s->u.pc.ctr = parport_pc_read_control(p);
s->u.pc.ecr = parport_pc_read_econtrol(p); if (p->modes & PARPORT_MODE_PCECR)
s->u.pc.ecr = parport_pc_read_econtrol(p);
} }
void parport_pc_restore_state(struct parport *p, struct parport_state *s) void parport_pc_restore_state(struct parport *p, struct parport_state *s)
{ {
parport_pc_write_control(p, s->u.pc.ctr); parport_pc_write_control(p, s->u.pc.ctr);
parport_pc_write_econtrol(p, s->u.pc.ecr); if (p->modes & PARPORT_MODE_PCECR)
parport_pc_write_econtrol(p, s->u.pc.ecr);
} }
size_t parport_pc_epp_read_block(struct parport *p, void *buf, size_t length) size_t parport_pc_epp_read_block(struct parport *p, void *buf, size_t length)
...@@ -264,6 +273,7 @@ struct parport_operations parport_pc_ops = ...@@ -264,6 +273,7 @@ struct parport_operations parport_pc_ops =
parport_pc_ecp_write_block, parport_pc_ecp_write_block,
parport_pc_ecp_read_block, parport_pc_ecp_read_block,
parport_pc_init_state,
parport_pc_save_state, parport_pc_save_state,
parport_pc_restore_state, parport_pc_restore_state,
...@@ -304,7 +314,6 @@ static int epp_clear_timeout(struct parport *pb) ...@@ -304,7 +314,6 @@ static int epp_clear_timeout(struct parport *pb)
static int parport_SPP_supported(struct parport *pb) static int parport_SPP_supported(struct parport *pb)
{ {
/* Do a simple read-write test to make sure the port exists. */ /* Do a simple read-write test to make sure the port exists. */
parport_pc_write_econtrol(pb, 0xc);
parport_pc_write_control(pb, 0xc); parport_pc_write_control(pb, 0xc);
parport_pc_write_data(pb, 0xaa); parport_pc_write_data(pb, 0xaa);
if (parport_pc_read_data(pb) != 0xaa) return 0; if (parport_pc_read_data(pb) != 0xaa) return 0;
...@@ -362,12 +371,13 @@ static int parport_ECR_present(struct parport *pb) ...@@ -362,12 +371,13 @@ static int parport_ECR_present(struct parport *pb)
static int parport_ECP_supported(struct parport *pb) static int parport_ECP_supported(struct parport *pb)
{ {
int i; int i;
unsigned char oecr = parport_pc_read_econtrol(pb); unsigned char oecr;
/* If there is no ECR, we have no hope of supporting ECP. */ /* If there is no ECR, we have no hope of supporting ECP. */
if (!(pb->modes & PARPORT_MODE_PCECR)) if (!(pb->modes & PARPORT_MODE_PCECR))
return 0; return 0;
oecr = parport_pc_read_econtrol(pb);
/* /*
* Using LGS chipset it uses ECR register, but * Using LGS chipset it uses ECR register, but
* it doesn't support ECP or FIFO MODE * it doesn't support ECP or FIFO MODE
...@@ -417,11 +427,12 @@ static int parport_EPP_supported(struct parport *pb) ...@@ -417,11 +427,12 @@ static int parport_EPP_supported(struct parport *pb)
static int parport_ECPEPP_supported(struct parport *pb) static int parport_ECPEPP_supported(struct parport *pb)
{ {
int mode; int mode;
unsigned char oecr = parport_pc_read_econtrol(pb); unsigned char oecr;
if (!(pb->modes & PARPORT_MODE_PCECR)) if (!(pb->modes & PARPORT_MODE_PCECR))
return 0; return 0;
oecr = parport_pc_read_econtrol(pb);
/* Search for SMC style EPP+ECP mode */ /* Search for SMC style EPP+ECP mode */
parport_pc_write_econtrol(pb, 0x80); parport_pc_write_econtrol(pb, 0x80);
...@@ -472,11 +483,12 @@ static int parport_PS2_supported(struct parport *pb) ...@@ -472,11 +483,12 @@ static int parport_PS2_supported(struct parport *pb)
static int parport_ECPPS2_supported(struct parport *pb) static int parport_ECPPS2_supported(struct parport *pb)
{ {
int mode; int mode;
unsigned char oecr = parport_pc_read_econtrol(pb); unsigned char oecr;
if (!(pb->modes & PARPORT_MODE_PCECR)) if (!(pb->modes & PARPORT_MODE_PCECR))
return 0; return 0;
oecr = parport_pc_read_econtrol(pb);
parport_pc_write_econtrol(pb, 0x20); parport_pc_write_econtrol(pb, 0x20);
mode = parport_PS2_supported(pb); mode = parport_PS2_supported(pb);
...@@ -536,12 +548,15 @@ static int irq_probe_EPP(struct parport *pb) ...@@ -536,12 +548,15 @@ static int irq_probe_EPP(struct parport *pb)
{ {
int irqs; int irqs;
unsigned char octr = parport_pc_read_control(pb); unsigned char octr = parport_pc_read_control(pb);
unsigned char oecr = parport_pc_read_econtrol(pb); unsigned char oecr;
#ifndef ADVANCED_DETECT #ifndef ADVANCED_DETECT
return PARPORT_IRQ_NONE; return PARPORT_IRQ_NONE;
#endif #endif
if (pb->modes & PARPORT_MODE_PCECR)
oecr = parport_pc_read_econtrol(pb);
sti(); sti();
irqs = probe_irq_on(); irqs = probe_irq_on();
...@@ -560,7 +575,8 @@ static int irq_probe_EPP(struct parport *pb) ...@@ -560,7 +575,8 @@ static int irq_probe_EPP(struct parport *pb)
udelay(20); udelay(20);
pb->irq = probe_irq_off (irqs); pb->irq = probe_irq_off (irqs);
parport_pc_write_econtrol(pb, oecr); if (pb->modes & PARPORT_MODE_PCECR)
parport_pc_write_econtrol(pb, oecr);
parport_pc_write_control(pb, octr); parport_pc_write_control(pb, octr);
if (pb->irq <= 0) if (pb->irq <= 0)
...@@ -573,12 +589,14 @@ static int irq_probe_SPP(struct parport *pb) ...@@ -573,12 +589,14 @@ static int irq_probe_SPP(struct parport *pb)
{ {
int irqs; int irqs;
unsigned char octr = parport_pc_read_control(pb); unsigned char octr = parport_pc_read_control(pb);
unsigned char oecr = parport_pc_read_econtrol(pb); unsigned char oecr;
#ifndef ADVANCED_DETECT #ifndef ADVANCED_DETECT
return PARPORT_IRQ_NONE; return PARPORT_IRQ_NONE;
#endif #endif
if (pb->modes & PARPORT_MODE_PCECR)
oecr = parport_pc_read_econtrol(pb);
probe_irq_off(probe_irq_on()); /* Clear any interrupts */ probe_irq_off(probe_irq_on()); /* Clear any interrupts */
irqs = probe_irq_on(); irqs = probe_irq_on();
...@@ -602,7 +620,8 @@ static int irq_probe_SPP(struct parport *pb) ...@@ -602,7 +620,8 @@ static int irq_probe_SPP(struct parport *pb)
if (pb->irq <= 0) if (pb->irq <= 0)
pb->irq = PARPORT_IRQ_NONE; /* No interrupt detected */ pb->irq = PARPORT_IRQ_NONE; /* No interrupt detected */
parport_pc_write_econtrol(pb, oecr); if (pb->modes & PARPORT_MODE_PCECR)
parport_pc_write_econtrol(pb, oecr);
parport_pc_write_control(pb, octr); parport_pc_write_control(pb, octr);
return pb->irq; return pb->irq;
} }
...@@ -616,8 +635,6 @@ static int irq_probe_SPP(struct parport *pb) ...@@ -616,8 +635,6 @@ static int irq_probe_SPP(struct parport *pb)
*/ */
static int parport_irq_probe(struct parport *pb) static int parport_irq_probe(struct parport *pb)
{ {
unsigned char oecr = parport_pc_read_econtrol (pb);
if (pb->modes & PARPORT_MODE_PCECR) { if (pb->modes & PARPORT_MODE_PCECR) {
pb->irq = programmable_irq_support(pb); pb->irq = programmable_irq_support(pb);
if (pb->irq != PARPORT_IRQ_NONE) if (pb->irq != PARPORT_IRQ_NONE)
...@@ -628,10 +645,8 @@ static int parport_irq_probe(struct parport *pb) ...@@ -628,10 +645,8 @@ static int parport_irq_probe(struct parport *pb)
pb->irq = irq_probe_ECP(pb); pb->irq = irq_probe_ECP(pb);
if (pb->irq == PARPORT_IRQ_NONE && if (pb->irq == PARPORT_IRQ_NONE &&
(pb->modes & PARPORT_MODE_PCECPEPP)) { (pb->modes & PARPORT_MODE_PCECPEPP))
pb->irq = irq_probe_EPP(pb); pb->irq = irq_probe_EPP(pb);
parport_pc_write_econtrol(pb, oecr);
}
epp_clear_timeout(pb); epp_clear_timeout(pb);
...@@ -644,7 +659,6 @@ static int parport_irq_probe(struct parport *pb) ...@@ -644,7 +659,6 @@ static int parport_irq_probe(struct parport *pb)
pb->irq = irq_probe_SPP(pb); pb->irq = irq_probe_SPP(pb);
out: out:
parport_pc_write_econtrol (pb, oecr);
return pb->irq; return pb->irq;
} }
...@@ -708,7 +722,11 @@ static int probe_one_port(unsigned long int base, int irq, int dma) ...@@ -708,7 +722,11 @@ static int probe_one_port(unsigned long int base, int irq, int dma)
p->flags |= PARPORT_FLAG_COMA; p->flags |= PARPORT_FLAG_COMA;
/* Done probing. Now put the port into a sensible start-up state. */ /* Done probing. Now put the port into a sensible start-up state. */
parport_pc_write_econtrol(p, 0xc); if (p->modes & PARPORT_MODE_PCECR)
/*
* Put the ECP detected port in the more SPP like mode.
*/
parport_pc_write_econtrol(p, 0x0);
parport_pc_write_control(p, 0xc); parport_pc_write_control(p, 0xc);
parport_pc_write_data(p, 0); parport_pc_write_data(p, 0);
......
...@@ -210,7 +210,7 @@ struct pardevice *parport_register_device(struct parport *port, const char *name ...@@ -210,7 +210,7 @@ struct pardevice *parport_register_device(struct parport *port, const char *name
tmp->private = handle; tmp->private = handle;
tmp->flags = flags; tmp->flags = flags;
tmp->irq_func = irq_func; tmp->irq_func = irq_func;
port->ops->save_state(port, tmp->state); port->ops->init_state(tmp->state);
tmp->waiting = 0; tmp->waiting = 0;
/* Chain this onto the list */ /* Chain this onto the list */
......
...@@ -186,6 +186,9 @@ el2_probe1(struct device *dev, int ioaddr)) ...@@ -186,6 +186,9 @@ el2_probe1(struct device *dev, int ioaddr))
return ENODEV; return ENODEV;
} }
if (load_8390_module("3c503.c"))
return -ENOSYS;
/* We should have a "dev" from Space.c or the static module table. */ /* We should have a "dev" from Space.c or the static module table. */
if (dev == NULL) { if (dev == NULL) {
printk("3c503.c: Passed a NULL device.\n"); printk("3c503.c: Passed a NULL device.\n");
...@@ -346,7 +349,7 @@ el2_open(struct device *dev) ...@@ -346,7 +349,7 @@ el2_open(struct device *dev)
outb_p(0x04 << ((*irqp == 9) ? 2 : *irqp), E33G_IDCFR); outb_p(0x04 << ((*irqp == 9) ? 2 : *irqp), E33G_IDCFR);
outb_p(0x00, E33G_IDCFR); outb_p(0x00, E33G_IDCFR);
if (*irqp == autoirq_report(0) /* It's a good IRQ line! */ if (*irqp == autoirq_report(0) /* It's a good IRQ line! */
&& request_irq (dev->irq = *irqp, &ei_interrupt, 0, ei_status.name, dev) == 0) && request_irq (dev->irq = *irqp, ei_interrupt, 0, ei_status.name, dev) == 0)
break; break;
} }
} while (*++irqp); } while (*++irqp);
...@@ -355,7 +358,7 @@ el2_open(struct device *dev) ...@@ -355,7 +358,7 @@ el2_open(struct device *dev)
return -EAGAIN; return -EAGAIN;
} }
} else { } else {
if (request_irq(dev->irq, &ei_interrupt, 0, ei_status.name, dev)) { if (request_irq(dev->irq, ei_interrupt, 0, ei_status.name, dev)) {
return -EAGAIN; return -EAGAIN;
} }
} }
...@@ -658,11 +661,15 @@ init_module(void) ...@@ -658,11 +661,15 @@ init_module(void)
} }
if (register_netdev(dev) != 0) { if (register_netdev(dev) != 0) {
printk(KERN_WARNING "3c503.c: No 3c503 card found (i/o = 0x%x).\n", io[this_dev]); printk(KERN_WARNING "3c503.c: No 3c503 card found (i/o = 0x%x).\n", io[this_dev]);
if (found != 0) return 0; /* Got at least one. */ if (found != 0) { /* Got at least one. */
lock_8390_module();
return 0;
}
return -ENXIO; return -ENXIO;
} }
found++; found++;
} }
lock_8390_module();
return 0; return 0;
} }
...@@ -674,13 +681,15 @@ cleanup_module(void) ...@@ -674,13 +681,15 @@ cleanup_module(void)
for (this_dev = 0; this_dev < MAX_EL2_CARDS; this_dev++) { for (this_dev = 0; this_dev < MAX_EL2_CARDS; this_dev++) {
struct device *dev = &dev_el2[this_dev]; struct device *dev = &dev_el2[this_dev];
if (dev->priv != NULL) { if (dev->priv != NULL) {
void *priv = dev->priv;
/* NB: el2_close() handles free_irq */ /* NB: el2_close() handles free_irq */
unregister_netdev(dev);
kfree(dev->priv);
dev->priv = NULL;
release_region(dev->base_addr, EL2_IO_EXTENT); release_region(dev->base_addr, EL2_IO_EXTENT);
dev->priv = NULL;
unregister_netdev(dev);
kfree(priv);
} }
} }
unlock_8390_module();
} }
#endif /* MODULE */ #endif /* MODULE */
......
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.
...@@ -326,7 +326,8 @@ static void shaper_kick(struct shaper *shaper) ...@@ -326,7 +326,8 @@ static void shaper_kick(struct shaper *shaper)
*/ */
skb_unlink(skb); skb_unlink(skb);
shaper->recovery=jiffies+skb->shapelen; if (shaper->recovery < skb->shapeclock + skb->shapelen)
shaper->recovery = skb->shapeclock + skb->shapelen;
restore_flags(flags); restore_flags(flags);
/* /*
......
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