From: Takashi Iwai <tiwai@suse.de>
To: Lee Revell <rlrevell@joe-job.com>
Cc: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: Oops in snd_emu10k1_efx_playback_prepare
Date: Wed, 09 Mar 2005 18:21:18 +0100 [thread overview]
Message-ID: <s5his40wx9t.wl@alsa2.suse.de> (raw)
In-Reply-To: <s5h8y4x5btl.wl@alsa2.suse.de>
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
At Wed, 09 Mar 2005 11:54:30 +0100,
I wrote:
>
> At Wed, 09 Mar 2005 10:57:54 +0100,
> I wrote:
> >
> > At Wed, 09 Mar 2005 00:56:19 -0500,
> > Lee Revell wrote:
> > >
> > > I got an Oops again that seems to be caused by something in mu
> > > multichannel patch. But, I don't really know what to make of it.
> > >
> > > ksymoops seems broken for 2.6 kernels, but it was able to disassemble
> > > the offending code.
> > >
> > > Any ideas?
> >
> > In snd_emu10k1_pcm_channel_alloc(), epcm->voices[2..NUM_EFX_PLAYBACK]
> > are not freed correctly. Possibly did this hit?
>
> Or maybe I misread the code. Need more coffee now... :)
>
> Anyway, snd_emu10k1_pcm_channel_alloc() should return immediately at
> the second or later call when all voices have been already allocated.
The quick fix patch is below.
But I'm not sure whether this is really related with the given bug.
Takashi
[-- Attachment #2: Type: text/plain, Size: 1147 bytes --]
Index: alsa-kernel/pci/emu10k1/emupcm.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/emu10k1/emupcm.c,v
retrieving revision 1.45
diff -u -r1.45 emupcm.c
--- alsa-kernel/pci/emu10k1/emupcm.c 8 Mar 2005 16:07:16 -0000 1.45
+++ alsa-kernel/pci/emu10k1/emupcm.c 9 Mar 2005 17:18:09 -0000
@@ -109,14 +109,17 @@
snd_emu10k1_voice_free(epcm->emu, epcm->voices[1]);
epcm->voices[1] = NULL;
}
- if (voices == 1 && epcm->voices[0] != NULL)
- return 0; /* already allocated */
- if (voices == 2 && epcm->voices[0] != NULL && epcm->voices[1] != NULL)
- return 0;
- if (voices > 1) {
- if (epcm->voices[0] != NULL && epcm->voices[1] == NULL) {
- snd_emu10k1_voice_free(epcm->emu, epcm->voices[0]);
- epcm->voices[0] = NULL;
+ for (i = 0; i < voices; i++) {
+ if (epcm->voices[i] == NULL)
+ break;
+ }
+ if (i == voices)
+ return 0; /* already allocated */
+
+ for (i = 0; i < ARRAY_SIZE(epcm->voices); i++) {
+ if (epcm->voices[i]) {
+ snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]);
+ epcm->voices[i] = NULL;
}
}
err = snd_emu10k1_voice_alloc(epcm->emu,
next prev parent reply other threads:[~2005-03-09 17:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-09 5:56 Oops in snd_emu10k1_efx_playback_prepare Lee Revell
2005-03-09 9:57 ` Takashi Iwai
2005-03-09 10:54 ` Takashi Iwai
2005-03-09 17:21 ` Takashi Iwai [this message]
2005-03-10 21:35 ` Lee Revell
2005-03-11 16:26 ` Takashi Iwai
2005-03-19 3:30 ` Lee Revell
2005-03-19 3:37 ` Lee Revell
2005-03-23 11:35 ` Takashi Iwai
2005-03-23 20:41 ` Lee Revell
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=s5his40wx9t.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=rlrevell@joe-job.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.