From: pwaechtler@mac.com
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com
Subject: [PATCH] 6/10 sound/oss/dmasound/dmasound_atari.c
Date: Thu, 29 Aug 2002 21:56:27 +0200 [thread overview]
Message-ID: <200209091006.g89A6vZH010252@smtp-relay02.mac.com> (raw)
--- vanilla-2.5.33/sound/oss/dmasound/dmasound_atari.c Sat Aug 10 00:03:13 2002
+++ linux-2.5-cli-oss/sound/oss/dmasound/dmasound_atari.c Mon Sep 9 01:30:08 2002
@@ -19,7 +19,7 @@
#include <linux/init.h>
#include <linux/soundcard.h>
#include <linux/mm.h>
-
+#include <linux/spinlock.h>
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
#include <asm/atariints.h>
@@ -1262,7 +1262,7 @@
return;
}
#endif
-
+ spin_lock(&dmasound.lock);
if (write_sq_ignore_int && is_falcon) {
/* ++TeSche: Falcon only: ignore first irq because it comes
* immediately after starting a frame. after that, irqs come
@@ -1314,6 +1314,7 @@
/* We are not playing after AtaPlay(), so there
is nothing to play any more. Wake up a process
waiting for audio output to drain. */
+ spin_unlock(&dmasound.lock);
}
@@ -1349,14 +1350,15 @@
static int AtaMixerIoctl(u_int cmd, u_long arg)
{
int data;
+ unsigned long flags;
switch (cmd) {
case SOUND_MIXER_READ_SPEAKER:
if (is_falcon || MACH_IS_TT) {
int porta;
- cli();
+ spin_lock_irqsave(&dmasound.lock, flags);
sound_ym.rd_data_reg_sel = 14;
porta = sound_ym.rd_data_reg_sel;
- sti();
+ spin_unlock_irqrestore(&dmasound.lock, flags);
return IOCTL_OUT(arg, porta & 0x40 ? 0 : 100);
}
break;
@@ -1367,12 +1369,12 @@
if (is_falcon || MACH_IS_TT) {
int porta;
IOCTL_IN(arg, data);
- cli();
+ spin_lock_irqsave(&dmasound.lock, flags);
sound_ym.rd_data_reg_sel = 14;
porta = (sound_ym.rd_data_reg_sel & ~0x40) |
(data < 50 ? 0x40 : 0);
sound_ym.wd_data = porta;
- sti();
+ spin_unlock_irqrestore(&dmasound.lock, flags);
return IOCTL_OUT(arg, porta & 0x40 ? 0 : 100);
}
}
reply other threads:[~2002-09-09 10:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200209091006.g89A6vZH010252@smtp-relay02.mac.com \
--to=pwaechtler@mac.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).