From: Takashi Iwai Subject: Re: lock-up when loading desktop Date: Tue, 14 Oct 2014 09:12:13 +0200 Message-ID: References: <543B2438.1050002@internode.on.net> <543BB942.5060602@internode.on.net> <543BCDE9.7010308@internode.on.net> <543C153A.4060607@internode.on.net> <543C97EC.4040000@internode.on.net> <543CCA5C.50102@internode.on.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id C2F6A2604AE for ; Tue, 14 Oct 2014 09:12:14 +0200 (CEST) In-Reply-To: <543CCA5C.50102@internode.on.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Arthur Marsh Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 14 Oct 2014 17:31:48 +1030, Arthur Marsh wrote: > > > > Arthur Marsh wrote, on 14/10/14 13:56: > >> --- > >> diff --git a/sound/pci/emu10k1/emu10k1_callback.c > >> b/sound/pci/emu10k1/emu10k1_callback.c > >> index 3f3ef38d9b6e..874cd76c7b7f 100644 > >> --- a/sound/pci/emu10k1/emu10k1_callback.c > >> +++ b/sound/pci/emu10k1/emu10k1_callback.c > >> @@ -85,6 +85,8 @@ snd_emu10k1_ops_setup(struct snd_emux *emux) > >> * get more voice for pcm > >> * > >> * terminate most inactive voice and give it as a pcm voice. > >> + * > >> + * voice_lock is already held. > >> */ > >> int > >> snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw) > >> @@ -92,12 +94,10 @@ snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw) > >> struct snd_emux *emu; > >> struct snd_emux_voice *vp; > >> struct best_voice best[V_END]; > >> - unsigned long flags; > >> int i; > >> > >> emu = hw->synth; > >> > >> - spin_lock_irqsave(&emu->voice_lock, flags); > >> lookup_voices(emu, hw, best, 1); /* no OFF voices */ > >> for (i = 0; i < V_END; i++) { > >> if (best[i].voice >= 0) { > >> @@ -113,11 +113,9 @@ snd_emu10k1_synth_get_voice(struct snd_emu10k1 *hw) > >> vp->emu->num_voices--; > >> vp->ch = -1; > >> vp->state = SNDRV_EMUX_ST_OFF; > >> - spin_unlock_irqrestore(&emu->voice_lock, flags); > >> return ch; > >> } > >> } > >> - spin_unlock_irqrestore(&emu->voice_lock, flags); > >> > >> /* not found */ > >> return -ENOMEM; > >> > > > > I'll apply the above patch only first and report the results. > > > > Thanks again, > > > > Arthur. > > With only the above emu10k1_callback.c patch and not the pcm_native.c > patch, I experience a lock-up when running alsa-info.sh OK, good to know. I'll put proper comments about it. thanks, Takashi