From abdde0950d5ed479556d91fdbd4baaf1ac52026b Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 23 Nov 2007 15:20:37 -0500 Subject: [PATCH] Import 2.2.14 --- CREDITS | 4 + Documentation/Configure.help | 6 + Documentation/computone.txt | 280 ++++++++++++++++++++++----------- Documentation/sound/Maestro | 98 ++++++++++++ MAINTAINERS | 6 + Makefile | 2 +- drivers/isdn/eicon/eicon_mod.c | 3 +- drivers/misc/parport_pc.c | 14 +- drivers/scsi/seagate.c | 4 + drivers/telephony/ixj.c | 4 +- drivers/video/matroxfb.c | 5 +- 11 files changed, 324 insertions(+), 102 deletions(-) create mode 100644 Documentation/sound/Maestro diff --git a/CREDITS b/CREDITS index b365f2998235..bd0b1926a301 100644 --- a/CREDITS +++ b/CREDITS @@ -297,6 +297,10 @@ S: Bessemerstraat 21 S: Amsterdam S: The Netherlands +N: Zach Brown +E: zab@zabbo.net +D: maestro pci sound + N: Ray Burr E: ryb@nightmare.com D: Original author of Amiga FFS filesystem diff --git a/Documentation/Configure.help b/Documentation/Configure.help index fbb4cde578fa..3ee5958ffae2 100644 --- a/Documentation/Configure.help +++ b/Documentation/Configure.help @@ -10084,6 +10084,12 @@ CONFIG_SOUND_NM256 See Documentation/sound/NM256 for further information. +ESS Maestro sound chipsets +CONFIG_SOUND_MAESTRO + Say Y or M if you have a sound system driven by ESS's Maestro line + of PCI sound chips. These include the Maestro 1, Maestro 2, and + Maestro 2E. See Documentation/sound/Maestro for more details. + Are you using a crosscompiler CONFIG_CROSSCOMPILE Say Y here if you are compiling the kernel on a different diff --git a/Documentation/computone.txt b/Documentation/computone.txt index c1577ec21098..1aed714690f5 100644 --- a/Documentation/computone.txt +++ b/Documentation/computone.txt @@ -7,7 +7,7 @@ These notes are for the drivers which have already been integrated into the kernel and have been tested on Linux kernels 2.0, 2.2, and 2.3. Version: 1.2.4 -Date: 08/04/99 +Date: 12/15/99 Author: Andrew Manison Testing: larryg@computone.com Support: support@computone.com @@ -28,7 +28,7 @@ with the exception of the MicroChannel controllers. It does not support products previous to the Intelliport II. This driver was developed on the v2.0.x Linux tree and has been tested up -to v2.2.9; it will probably not work with earlier v1.X kernels,. +to v2.2.13; it will probably not work with earlier v1.X kernels,. 2. QUICK INSTALLATION @@ -204,9 +204,94 @@ does not match the standard serial port's behaviour please let us know. 7. ip2mkdev shell script -===== Cut Here ===== -#!/bin/sh - +Previously, this script was simply attached here. It is now attached as a +shar archive to make it easier to extract the script from the documentation. +To create the ip2mkdev shell script change to a convenient directory (/tmp +works just fine) and run the following command: + + unshar /usr/src/linux/Documentation/computone.txt + (This file) + +You should now have a file ip2mkdev in your current working directory with +permissions set to execute. Running that script with then create the +necessary devices for the Computone boards, interfaces, and ports which +are present on you system at the time it is run. + +#!/bin/sh +# This is a shell archive (produced by GNU sharutils 4.2). +# To extract the files from this archive, save it to some FILE, remove +# everything before the `!/bin/sh' line above, then type `sh FILE'. +# +# Made on 1999-12-17 16:06 EST by . +# Source directory was `/mnt2/src/linux-2.3.33/Documentation'. +# +# Existing files will *not* be overwritten unless `-c' is specified. +# +# This shar contains: +# length mode name +# ------ ---------- ------------------------------------------ +# 3300 -rwxr-xr-x ip2mkdev +# +save_IFS="${IFS}" +IFS="${IFS}:" +gettext_dir=FAILED +locale_dir=FAILED +first_param="$1" +for dir in $PATH +do + if test "$gettext_dir" = FAILED && test -f $dir/gettext \ + && ($dir/gettext --version >/dev/null 2>&1) + then + set `$dir/gettext --version 2>&1` + if test "$3" = GNU + then + gettext_dir=$dir + fi + fi + if test "$locale_dir" = FAILED && test -f $dir/shar \ + && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) + then + locale_dir=`$dir/shar --print-text-domain-dir` + fi +done +IFS="$save_IFS" +if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED +then + echo=echo +else + TEXTDOMAINDIR=$locale_dir + export TEXTDOMAINDIR + TEXTDOMAIN=sharutils + export TEXTDOMAIN + echo="$gettext_dir/gettext -s" +fi +touch -am 1231235999 $$.touch >/dev/null 2>&1 +if test ! -f 1231235999 && test -f $$.touch; then + shar_touch=touch +else + shar_touch=: + echo + $echo 'WARNING: not restoring timestamps. Consider getting and' + $echo "installing GNU \`touch', distributed in GNU File Utilities..." + echo +fi +rm -f 1231235999 $$.touch +# +if mkdir _sh06360; then + $echo 'x -' 'creating lock directory' +else + $echo 'failed to create lock directory' + exit 1 +fi +# ============= ip2mkdev ============== +if test -f 'ip2mkdev' && test "$first_param" != -c; then + $echo 'x -' SKIPPING 'ip2mkdev' '(file already exists)' +else + $echo 'x -' extracting 'ip2mkdev' '(text)' + sed 's/^X//' << 'SHAR_EOF' > 'ip2mkdev' && +#!/bin/sh - +X # ip2mkdev # # Make or remove devices as needed for Computone Intelliport drivers @@ -227,117 +312,134 @@ does not match the standard serial port's behaviour please let us know. # if test ! -f /proc/tty/drivers then - echo "\ +X echo "\ Unable to check driver status. Make sure proc file system is mounted." - - exit 255 +X +X exit 255 fi - +X if test ! -f /proc/tty/driver/ip2 then - echo "\ +X echo "\ Unable to locate ip2 proc file. Attempting to load driver" - - if insmod ip2 - then - if test ! -f /proc/tty/driver/ip2 - then - echo "\ +X +X if /sbin/insmod ip2 +X then +X if test ! -f /proc/tty/driver/ip2 +X then +X echo "\ Unable to locate ip2 proc file after loading driver. Driver initialization failure or driver version error. " - exit 255 - fi - else - echo "Unable to load ip2 driver." - exit 255 - fi +X exit 255 +X fi +X else +X echo "Unable to load ip2 driver." +X exit 255 +X fi fi - +X # Ok... So we got the driver loaded and we can locate the procfs files. # Next we need our major numbers. - +X TTYMAJOR=`sed -e '/^ip2/!d' -e '/\/dev\/tty/!d' -e 's/.*tty.[ ]*\([0-9]*\)[ ]*.*/\1/' < /proc/tty/drivers` CUAMAJOR=`sed -e '/^ip2/!d' -e '/\/dev\/cu/!d' -e 's/.*cu.[ ]*\([0-9]*\)[ ]*.*/\1/' < /proc/tty/drivers` BRDMAJOR=`sed -e '/^Driver: /!d' -e 's/.*IMajor=\([0-9]*\)[ ]*.*/\1/' < /proc/tty/driver/ip2` - +X echo "\ TTYMAJOR = $TTYMAJOR CUAMAJOR = $CUAMAJOR BRDMAJOR = $BRDMAJOR " - +X # Ok... Now we should know our major numbers, if appropriate... # Now we need our boards and start the device loops. - +X grep '^Board [0-9]:' /proc/tty/driver/ip2 | while read token number type alltherest do - # The test for blank "type" will catch the stats lead-in lines - # if they exist in the file - if test "$type" = "vacant" -o "$type" = "Vacant" -o "$type" = "" - then - continue - fi - - BOARDNO=`expr "$number" : '\([0-9]\):'` - PORTS=`expr "$alltherest" : '.*ports=\([0-9]*\)' | tr ',' ' '` - MINORS=`expr "$alltherest" : '.*minors=\([0-9,]*\)' | tr ',' ' '` - - if test "$BOARDNO" = "" -o "$PORTS" = "" - then +X # The test for blank "type" will catch the stats lead-in lines +X # if they exist in the file +X if test "$type" = "vacant" -o "$type" = "Vacant" -o "$type" = "" +X then +X continue +X fi +X +X BOARDNO=`expr "$number" : '\([0-9]\):'` +X PORTS=`expr "$alltherest" : '.*ports=\([0-9]*\)' | tr ',' ' '` +X MINORS=`expr "$alltherest" : '.*minors=\([0-9,]*\)' | tr ',' ' '` +X +X if test "$BOARDNO" = "" -o "$PORTS" = "" +X then # This may be a bug. We should at least get this much information - echo "Unable to process board line" - continue - fi - - if test "$MINORS" = "" - then +X echo "Unable to process board line" +X continue +X fi +X +X if test "$MINORS" = "" +X then # Silently skip this one. This board seems to have no boxes - continue - fi - - echo "board $BOARDNO: $type ports = $PORTS; port numbers = $MINORS" - - if test "$BRDMAJOR" != "" - then - BRDMINOR=`expr $BOARDNO \* 4` - STSMINOR=`expr $BRDMINOR + 1` - if test ! -c /dev/ip2ipl$BOARDNO ; then - mknod /dev/ip2ipl$BOARDNO c $BRDMAJOR $BRDMINOR - fi - if test ! -c /dev/ip2stat$BOARDNO ; then - mknod /dev/ip2stat$BOARDNO c $BRDMAJOR $STSMINOR - fi - fi - - if test "$TTYMAJOR" != "" - then - PORTNO=$BOARDBASE - - for PORTNO in $MINORS - do - if test ! -c /dev/ttyF$PORTNO ; then - # We got the harware but no device - make it - mknod /dev/ttyF$PORTNO c $TTYMAJOR $PORTNO - fi - done - fi - - if test "$CUAMAJOR" != "" - then - PORTNO=$BOARDBASE - - for PORTNO in $MINORS - do - if test ! -c /dev/cuf$PORTNO ; then - # We got the harware but no device - make it - mknod /dev/cuf$PORTNO c $CUAMAJOR $PORTNO - fi - done - fi +X continue +X fi +X +X echo "board $BOARDNO: $type ports = $PORTS; port numbers = $MINORS" +X +X if test "$BRDMAJOR" != "" +X then +X BRDMINOR=`expr $BOARDNO \* 4` +X STSMINOR=`expr $BRDMINOR + 1` +X if test ! -c /dev/ip2ipl$BOARDNO ; then +X mknod /dev/ip2ipl$BOARDNO c $BRDMAJOR $BRDMINOR +X fi +X if test ! -c /dev/ip2stat$BOARDNO ; then +X mknod /dev/ip2stat$BOARDNO c $BRDMAJOR $STSMINOR +X fi +X fi +X +X if test "$TTYMAJOR" != "" +X then +X PORTNO=$BOARDBASE +X +X for PORTNO in $MINORS +X do +X if test ! -c /dev/ttyF$PORTNO ; then +X # We got the harware but no device - make it +X mknod /dev/ttyF$PORTNO c $TTYMAJOR $PORTNO +X fi +X done +X fi +X +X if test "$CUAMAJOR" != "" +X then +X PORTNO=$BOARDBASE +X +X for PORTNO in $MINORS +X do +X if test ! -c /dev/cuf$PORTNO ; then +X # We got the harware but no device - make it +X mknod /dev/cuf$PORTNO c $CUAMAJOR $PORTNO +X fi +X done +X fi done - +X +Xexit 0 +SHAR_EOF + $shar_touch -am 1217160599 'ip2mkdev' && + chmod 0755 'ip2mkdev' || + $echo 'restore of' 'ip2mkdev' 'failed' + if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ + && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then + md5sum -c << SHAR_EOF >/dev/null 2>&1 \ + || $echo 'ip2mkdev:' 'MD5 check failed' +eccd181f4a2005e47a969fc83885df61 ip2mkdev +SHAR_EOF + else + shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'ip2mkdev'`" + test 3300 -eq "$shar_count" || + $echo 'ip2mkdev:' 'original size' '3300,' 'current size' "$shar_count!" + fi +fi +rm -fr _sh06360 exit 0 -===== Cut Here ===== diff --git a/Documentation/sound/Maestro b/Documentation/sound/Maestro new file mode 100644 index 000000000000..f3cc4ab77534 --- /dev/null +++ b/Documentation/sound/Maestro @@ -0,0 +1,98 @@ + An OSS/Lite Driver for the ESS Maestro family of sound cards + + Zach Brown, December 1999 + +Driver Status and Availability +------------------------------ + +The most recent version of this driver will hopefully always be available at + http://people.redhat.com/zab/maestro/ + +I will try and maintain the most recent stable version of the driver +in both the stable and development kernel lines. + +ESS Maestro Chip Family +----------------------- + +There are 3 main variants of the ESS Maestro PCI sound chip. The first +is the Maestro 1. It was originally produced by Platform Tech as the +'AGOGO'. It can be recognized by Platform Tech's PCI ID 0x1285 with +0x0100 as the device ID. It was put on some sound boards and a few laptops. +ESS bought the design and cleaned it up as the Maestro 2. This starts +their marking with the ESS vendor ID 0x125D and the 'year' device IDs. +The Maestro 2 claims 0x1968 while the Maestro 2e has 0x1978. + +The various families of Maestro are mostly identical as far as this +driver is concerned. It doesn't touch the DSP parts that differ (though +it could for FM synthesis) + +Driver OSS Behavior +-------------------- + +This OSS driver exports /dev/mixer and /dev/dsp to applications, which +mostly adhere to the OSS spec. This driver doesn't register itself +with /dev/sndstat, so don't expect information to appear there. + +The /dev/dsp device exported behaves almost as expected. Playback is +supported in all the various lovely formats. 8/16bit stereo/mono from +8khz to 48khz, and mmap()ing for playback behaves. Capture/recording +is limited due to oddities with the Maestro hardware. One can only +record in 16bit stereo. For recording the maestro uses non interleaved +stereo buffers so that mmap()ing the incoming data does not result in +a ring buffer of LRLR data. mmap()ing of the read buffers is therefore +disallowed until this can be cleaned up. + +/dev/mixer is an interface to the AC'97 codec on the Maestro. It is +worth noting that there are a variety of AC'97s that can be wired to +the Maestro. Which is used is entirely up to the hardware implementor. +This should only be visible to the user by the presence, or lack, of +'Bass' and 'Treble' sliders in the mixer. Not all AC'97s have them. + +The driver doesn't support MIDI or FM playback at the moment. Typically +the Maestro is wired to an MPU MIDI chip, but some hardware implementations +don't. We need to assemble a white list of hardware implementations that +have MIDI wired properly before we can claim to support it safely. + +Compiling and Installing +------------------------ + +With the drivers inclusion into the kernel, compiling and installing +is the same as most OSS/Lite modular sound drivers. Compilation +of the driver is enabled through the CONFIG_SOUND_MAESTRO variable +in the config system. + +It may be modular or statically linked. If it is modular it should be +installed with the rest of the modules for the kernel on the system. +Typically this will be in /lib/modules/ somewhere. 'alias sound maestro' +should also be added to your module configs (typically /etc/conf.modules) +if you're using modular OSS/Lite sound and want to default to using a +maestro chip. + +As this is a PCI device, the module does not need to be informed of +any IO or IRQ resources it should use, it devines these from the +system. Somtimes, on sucky PCs, the BIOS fails to allocated resources +for the maestro. This will result in a message like: + maestro: PCI subsystem reports IRQ 0, this might not be correct. +from the kernel. Should this happen the sound chip most likely will +not operate correctly. To solve this one has to dig through their BIOS +(typically entered by hitting a hot key at boot time) and figure out +what magic needs to happen so that the BIOS will reward the maestro with +an IRQ. This operation is incredibly system specific, so you're on your +own. Sometimes the magic lies in 'PNP Capable Operating System' settings. + +There are very few options to the driver. One is 'debug' which will +tell the driver to print minimal debugging information as it runs. This +can be collected with 'dmesg' or through the klogd daemon. + +The other, more interesting option, is 'dsps_order'. Typically at +install time the driver will only register one available /dev/dsp device +for its use. The 'dsps_order' module parameter allows for more devices +to be allocated, as a power of two. Up to 4 devices can be registered +( dsps_order=2 ). These devices act as fully distinct units and use +separate channels in the maestro. + +.. more details .. +----------------- + +drivers/sound/maestro.c contains comments that hopefully explain +the maestro implementation. diff --git a/MAINTAINERS b/MAINTAINERS index 93b8ddf7d9aa..06362ff2dbc4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -501,6 +501,12 @@ M: linux.LVM@ez-darmstadt.telekom.de W: http://linux.msede.com/lvm S: Maintained +MAESTRO PCI SOUND DRIVER +P: Zach Brown +M: zab@redhat.com +W: http://people.redhat.com/zab/maestro/ +S: Supported + M68K P: Jes Sorensen M: Jes.Sorensen@cern.ch diff --git a/Makefile b/Makefile index 65cb13e4fe45..199ed284c73d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 2 SUBLEVEL = 14 -EXTRAVERSION = pre18 +EXTRAVERSION = ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) diff --git a/drivers/isdn/eicon/eicon_mod.c b/drivers/isdn/eicon/eicon_mod.c index b80837426c43..d84def160d96 100644 --- a/drivers/isdn/eicon/eicon_mod.c +++ b/drivers/isdn/eicon/eicon_mod.c @@ -849,8 +849,7 @@ if_sendbuf(int id, int channel, int ack, struct sk_buff *skb) } /* jiftime() copied from HiSax */ -inline int -jiftime(char *s, long mark) +static inline int jiftime(char *s, long mark) { s += 8; diff --git a/drivers/misc/parport_pc.c b/drivers/misc/parport_pc.c index d9119e2cc4bf..14586e59e1a1 100644 --- a/drivers/misc/parport_pc.c +++ b/drivers/misc/parport_pc.c @@ -855,12 +855,12 @@ static int probe_one_port(unsigned long int base, static int parport_pc_init_pci (int irq, int dma) { struct { - unsigned int vendor; - unsigned int device; - unsigned int numports; + unsigned short vendor; + unsigned short device; + int numports; struct { - unsigned long lo; - unsigned long hi; /* -ve if not there */ + int lo; + int hi; /* -ve if not there */ } addr[4]; } cards[] = { { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_550, 1, @@ -924,8 +924,8 @@ static int parport_pc_init_pci (int irq, int dma) pcidev)) != NULL) { int n; for (n = 0; n < cards[i].numports; n++) { - unsigned long lo = cards[i].addr[n].lo; - unsigned long hi = cards[i].addr[n].hi; + int lo = cards[i].addr[n].lo; + int hi = cards[i].addr[n].hi; unsigned long io_lo, io_hi; io_lo = pcidev->base_address[lo]; io_hi = ((hi < 0) ? 0 : diff --git a/drivers/scsi/seagate.c b/drivers/scsi/seagate.c index fb691e14eb1e..8e5d86dda714 100644 --- a/drivers/scsi/seagate.c +++ b/drivers/scsi/seagate.c @@ -250,6 +250,10 @@ static unsigned char controller_type = 0; /* set to SEAGATE for ST0x boards */ static int irq = IRQ; +MODULE_PARM(base_address, "i"); +MODULE_PARM(controller_type, "b"); +MODULE_PARM(irq, "i"); + #define retcode(result) (((result) << 16) | (message << 8) | status) #define STATUS ((u8) readb(st0x_cr_sr)) #define DATA ((u8) readb(st0x_dr)) diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c index 67ea7b8a8e65..263ac5f3c90f 100644 --- a/drivers/telephony/ixj.c +++ b/drivers/telephony/ixj.c @@ -523,7 +523,7 @@ static void ixj_timeout(unsigned long ptr) } if (!j->flags.ringing) { if (ixj_hookstate(board)) { - if (j->dsp.low == 0x21 && + if ((j->dsp.low == 0x21 || j->dsp.low == 0x22 )&& j->pld_slicr.bits.state != PLD_SLIC_STATE_ACTIVE) // Internet LineJACK { @@ -539,7 +539,7 @@ static void ixj_timeout(unsigned long ptr) kill_fasync(j->async_queue, SIGIO); // Send apps notice of change } } else { - if (j->dsp.low == 0x21 && + if ((j->dsp.low == 0x21 || j->dsp.low == 0x22) && j->pld_slicr.bits.state == PLD_SLIC_STATE_ACTIVE) // Internet LineJACK { diff --git a/drivers/video/matroxfb.c b/drivers/video/matroxfb.c index b454575b0e2e..7639fe1ecef7 100644 --- a/drivers/video/matroxfb.c +++ b/drivers/video/matroxfb.c @@ -63,6 +63,9 @@ * "Mark Vojkovich" * G400 support * + * "Samuel Hocevar" + * Fixes + * * (following author is not in any relation with this code, but his code * is included in this driver) * @@ -5022,7 +5025,7 @@ static struct { int xres, yres, left, right, upper, lower, hslen, vslen, vfreq; static struct { struct fb_bitfield red, green, blue, transp; int bits_per_pixel; } colors[] __initdata = { { { 0, 8, 0}, { 0, 8, 0}, { 0, 8, 0}, { 0, 0, 0}, 8 }, { { 10, 5, 0}, { 5, 5, 0}, { 0, 5, 0}, { 15, 1, 0}, 16 }, - { { 11, 5, 0}, { 6, 5, 0}, { 0, 5, 0}, { 0, 0, 0}, 16 }, + { { 11, 5, 0}, { 5, 6, 0}, { 0, 5, 0}, { 0, 0, 0}, 16 }, { { 16, 8, 0}, { 8, 8, 0}, { 0, 8, 0}, { 24, 8, 0}, 32 }, { { 0, 8, 0}, { 0, 8, 0}, { 0, 8, 0}, { 0, 0, 0}, 4 }, { { 16, 8, 0}, { 8, 8, 0}, { 0, 8, 0}, { 0, 0, 0}, 24 }, -- 2.39.5