Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750827AbWJDTET (ORCPT ); Wed, 4 Oct 2006 15:04:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750817AbWJDTET (ORCPT ); Wed, 4 Oct 2006 15:04:19 -0400 Received: from ns2.suse.de ([195.135.220.15]:49332 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S1750827AbWJDTEO (ORCPT ); Wed, 4 Oct 2006 15:04:14 -0400 Date: Wed, 04 Oct 2006 21:04:04 +0200 Message-ID: From: Takashi Iwai To: Jeremy Fitzhardinge Cc: Pavel Machek , Linux Kernel Mailing List , alsa-devel@alsa-project.org, Andrew Morton Subject: Re: 2.6.18: hda_intel: azx_get_response timeout, switching to single_cmd mode... In-Reply-To: <4523D041.8000400@goop.org> References: <451834D0.40304@goop.org> <451F5A1C.2060201@goop.org> <4523D041.8000400@goop.org> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta25) (eggplant) (+CVS-20060326) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2276 Lines: 66 At Wed, 04 Oct 2006 08:16:17 -0700, Jeremy Fitzhardinge wrote: > > Takashi Iwai wrote: > > At least, you have to see a different kernel message after the > > patch... Could you confirm it? > > > > No, it looks like the same message as ever: > > hda_intel: azx_get_response timeout, switching to polling mode... > hda_intel: azx_get_response timeout, switching to single_cmd mode... A counter of RIRB pending commands could overflow the size of RIRB when a bunch of commands are sent but not synced. This may lead to the azx_get_response error, theoretically. Could you apply the patch below and check what values are shown there? thanks, Takashi diff -r 4963791e6192 sound/pci/hda/hda_intel.c --- a/sound/pci/hda/hda_intel.c Wed Oct 04 18:38:16 2006 +0200 +++ b/sound/pci/hda/hda_intel.c Wed Oct 04 20:59:57 2006 +0200 @@ -325,6 +325,7 @@ struct azx { /* CORB/RIRB */ struct azx_rb corb; struct azx_rb rirb; + int max_rirb_cmds; /* BDL, CORB/RIRB and position buffers */ struct snd_dma_buffer bdl; @@ -480,6 +481,8 @@ static int azx_corb_send_cmd(struct hda_ spin_lock_irq(&chip->reg_lock); chip->rirb.cmds++; + if (chip->rirb.cmds > chip->max_rirb_cmds) + chip->max_rirb_cmds = chip->rirb.cmds; chip->corb.buf[wp] = cpu_to_le32(val); azx_writel(chip, CORBWP, wp); spin_unlock_irq(&chip->reg_lock); @@ -538,12 +541,16 @@ static unsigned int azx_rirb_get_respons if (!chip->polling_mode) { snd_printk(KERN_WARNING "hda_intel: azx_get_response timeout, " "switching to polling mode...\n"); + snd_printk(KERN_WARNING " RIRB pending = %d, peak = %d\n", + chip->rirb.cmds, chip->max_rirb_cmds); chip->polling_mode = 1; goto again; } snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, " "switching to single_cmd mode...\n"); + snd_printk(KERN_ERR " RIRB pending = %d, peak = %d\n", + chip->rirb.cmds, chip->max_rirb_cmds); chip->rirb.rp = azx_readb(chip, RIRBWP); chip->rirb.cmds = 0; /* switch to single_cmd mode */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/