From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>,
virii <virii@gcecisp.com>, <linux-kernel@vger.kernel.org>
Subject: Re: cmpci sound chip lockup
Date: Fri, 18 May 2001 15:08:17 -0300 [thread overview]
Message-ID: <20010518150817.O1414@conectiva.com.br> (raw)
In-Reply-To: <20010517135808.G754@nightmaster.csn.tu-chemnitz.de> <Pine.LNX.4.33.0105181501590.5251-100000@duckman.distro.conectiva>
In-Reply-To: <Pine.LNX.4.33.0105181501590.5251-100000@duckman.distro.conectiva>; from riel@conectiva.com.br on Fri, May 18, 2001 at 03:02:18PM -0300
Em Fri, May 18, 2001 at 03:02:18PM -0300, Rik van Riel escreveu:
> On Thu, 17 May 2001, Ingo Oeser wrote:
> > On Wed, May 16, 2001 at 08:02:06PM -0300, Rik van Riel wrote:
> > > I'm seeing a similar thing on 2.4.4-pre[23], but in a far less
> > > serious way. Using xmms the music stops after anything between
> > > a few seconds and a minute, I suspect a race condition somewhere.
> > >
> > > Using mpg123 everything works fine...
> >
> > Your xmms uses esd[1]?
>
> Nope. I also get this with xmms directly to /dev/dsp.
Can you try this patch? some parts are just some cleanups, but there are
two bugs fixed, this was just a quick look, maybe there are other bugs.
- Arnaldo
--- linux-2.4.4-ac11/drivers/sound/cmpci.c Fri May 18 00:04:23 2001
+++ linux-2.4.4-ac11.acme/drivers/sound/cmpci.c Fri May 18 01:03:22 2001
@@ -70,6 +70,12 @@
* (8738 only)
* Fix bug cause x11amp cannot play.
*
+ * Fixes:
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 18/05/2001 - .bss nitpicks, fix a bug in set_dac_channels where it
+ * was calling prog_dmabuf with s->lock held, call missing
+ * unlock_kernel in cm_midi_release
+ *
*/
/*****************************************************************************/
@@ -335,9 +341,9 @@
/* --------------------------------------------------------------------- */
-static struct cm_state *devs = NULL;
-static struct cm_state *devaudio = NULL;
-static unsigned long wavetable_mem = 0;
+static struct cm_state *devs;
+static struct cm_state *devaudio;
+static unsigned long wavetable_mem;
/* --------------------------------------------------------------------- */
@@ -862,8 +868,10 @@
maskb(s->iobase + CODEC_CMI_MISC_CTRL + 2, ~0, 0xC0);
s->status |= DO_DUAL_DAC;
// prepare secondary buffer
+ spin_unlock_irqrestore(&s->lock, flags);
ret = prog_dmabuf(s, 1);
if (ret) return ret;
+ spin_lock_irqsave(&s->lock, flags);
// copy the hw state
fmtm &= ~((CM_CFMT_STEREO | CM_CFMT_16BIT) << CM_CFMT_DACSHIFT);
fmtm &= ~((CM_CFMT_STEREO | CM_CFMT_16BIT) << CM_CFMT_ADCSHIFT);
@@ -2578,6 +2586,7 @@
if (file->f_flags & O_NONBLOCK) {
remove_wait_queue(&s->midi.owait, &wait);
set_current_state(TASK_RUNNING);
+ unlock_kernel();
return -EBUSY;
}
tmo = (count * HZ) / 3100;
@@ -2710,10 +2719,8 @@
outb(5, s->iosynth+2);
outb(arg & 1, s->iosynth+3);
return 0;
-
- default:
- return -EINVAL;
}
+ return -EINVAL;
}
static int cm_dmfm_open(struct inode *inode, struct file *file)
@@ -2859,22 +2866,22 @@
#ifdef CONFIG_SOUND_CMPCI_MIDI
static int mpu_io = CONFIG_SOUND_CMPCI_MPUIO;
#else
-static int mpu_io = 0;
+static int mpu_io;
#endif
#ifdef CONFIG_SOUND_CMPCI_FM
static int fm_io = CONFIG_SOUND_CMPCI_FMIO;
#else
-static int fm_io = 0;
+static int fm_io;
#endif
#ifdef CONFIG_SOUND_CMPCI_SPDIFINVERSE
static int spdif_inverse = 1;
#else
-static int spdif_inverse = 0;
+static int spdif_inverse;
#endif
#ifdef CONFIG_SOUND_CMPCI_SPDIFLOOP
static int spdif_loop = 1;
#else
-static int spdif_loop = 0;
+static int spdif_loop;
#endif
#ifdef CONFIG_SOUND_CMPCI_SPEAKERS
static int speakers = CONFIG_SOUND_CMPCI_SPEAKERS;
@@ -2884,17 +2891,17 @@
#ifdef CONFIG_SOUND_CMPCI_LINE_REAR
static int use_line_as_rear = 1;
#else
-static int use_line_as_rear = 0;
+static int use_line_as_rear;
#endif
#ifdef CONFIG_SOUND_CMPCI_LINE_BASS
static int use_line_as_bass = 1;
#else
-static int use_line_as_bass = 0;
+static int use_line_as_bass;
#endif
#ifdef CONFIG_SOUND_CMPCI_JOYSTICK
static int joystick = 1;
#else
-static int joystick = 0;
+static int joystick;
#endif
MODULE_PARM(mpu_io, "i");
MODULE_PARM(fm_io, "i");
@@ -2935,7 +2942,8 @@
return;
if (pcidev->irq == 0)
return;
- if (!(s = kmalloc(sizeof(struct cm_state), GFP_KERNEL))) {
+ s = kmalloc(sizeof(*s), GFP_KERNEL);
+ if (!s) {
printk(KERN_WARNING "cm: out of memory\n");
return;
}
next prev parent reply other threads:[~2001-05-18 18:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-16 22:25 cmpci sound chip lockup virii
2001-05-16 23:02 ` Rik van Riel
2001-05-17 1:48 ` Steven Walter
2001-05-17 11:58 ` Ingo Oeser
2001-05-17 16:20 ` Fabian Arias
2001-05-18 18:02 ` Rik van Riel
2001-05-18 18:08 ` Arnaldo Carvalho de Melo [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-05-17 2:05 Dmitry Volkoff
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=20010518150817.O1414@conectiva.com.br \
--to=acme@conectiva.com.br \
--cc=ingo.oeser@informatik.tu-chemnitz.de \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
--cc=virii@gcecisp.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