From: Takashi Iwai Subject: Re: es1938 - patch trying to improve capture hw pointer reads Date: Thu, 24 Jan 2008 12:47:46 +0100 Message-ID: References: <20080123003512.GA6828@lemon.iwr.uni-heidelberg.de> 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 (ns2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id DE6631038A6 for ; Thu, 24 Jan 2008 12:47:46 +0100 (CET) In-Reply-To: <20080123003512.GA6828@lemon.iwr.uni-heidelberg.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Hermann Lauer Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 23 Jan 2008 01:35:12 +0100, Hermann Lauer wrote: > > Hello, > > with the Solo1 (es1938) I got a lot of xrun's during capture on my machine. Tracing > that down it seems to be comming from reading ocassionaly bad hw pointers from the chip. Appended > is a patch against linux-2.6.23.12 which uses more checking to avoid that false pointer reads. > > Failed reads are giving back the last good value read instead of spinning in > a tight loop, which seems more appropriate to me in an interrupt. I think I saw > this trick used in another driver. > > On my machine xruns seems to be gone with that patch. Thanks for the patch. The change look OK to me. Another idea would be to use DMAADDR only when DMACOUNT goes mad. But the back-off to the last pointer is propbably a safer solution. The patch is, however, unable to apply as is because of coding style problems. Try $LINUXKERNEL/scripts/checkpatch.pl, fix what are suggested there, and repost the patch together with your sign-off. Takashi