From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,7ff89ab9bcbea75,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1993-12-14 10:20:11 PST Path: gmd.de!xlink.net!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!sunic!news.funet.fi!klaava!klaava!not-for-mail From: Andrew Robinson Newsgroups: comp.os.linux.announce Subject: gus_wave patch Followup-To: comp.os.linux.misc Date: 14 Dec 1993 15:58:36 +0200 Organization: ? Sender: wirzeniu@klaava.Helsinki.FI Message-ID: <2ekgqc$eah@klaava.Helsinki.FI> NNTP-Posting-Host: klaava.helsinki.fi Keywords: GUS, sound card I have uploaded a patch to the GUS sequencer driver to the /pub/Linux/Incoming directory of sunsite.unc.edu. For those of you without ftp access, I have included the Readme and diff files below. -- Andrew This patch corrects a problem in the gus_wave.c file included with the Linux patchlevel 14 kernel. Apply the gus_wave.diff file using the 'patch' command, and re-compile the kernel. Problem description: The compute_and_set_volume function never selects the GUS voice to use, but is sometimes called without first selecting the voice. Problem fix: The compute_and_set_volume function disables interrupts, selects the proper voice, and then re-enables interrupts before returning. Patch provided by: Andrew J. Robinson robinson@cnj.digex.com -- cut here -- *** gus_wave.bak Mon Dec 13 01:26:43 1993 --- gus_wave.c Mon Dec 13 01:26:43 1993 *************** *** 927,936 **** --- 927,939 ---- compute_and_set_volume (int voice, int volume, int ramp_time) { int current, target, rate; + long int flags; compute_volume (voice, volume); voices[voice].current_volume = voices[voice].initial_volume; + DISABLE_INTR(flags); + gus_select_voice(voice); current = gus_read16 (0x09) >> 4; target = voices[voice].initial_volume; *************** *** 938,943 **** --- 941,947 ---- { gus_rampoff (); gus_voice_volume (target); + RESTORE_INTR(flags); return; } *************** *** 951,956 **** --- 955,961 ---- { gus_rampoff (); gus_voice_volume (target); + RESTORE_INTR(flags); return; } *************** *** 969,974 **** --- 974,980 ---- gus_ramp_range (target, current); gus_rampon (0x40); /* Ramp down, once, no irq */ } + RESTORE_INTR(flags); } static void -- cut here -- -- Mail submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu PLEASE remember Keywords: and a short description of the software.