From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268159AbUHXR3r (ORCPT ); Tue, 24 Aug 2004 13:29:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268160AbUHXR3r (ORCPT ); Tue, 24 Aug 2004 13:29:47 -0400 Received: from cantor.suse.de ([195.135.220.2]:7577 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S268159AbUHXR3c (ORCPT ); Tue, 24 Aug 2004 13:29:32 -0400 Date: Tue, 24 Aug 2004 19:27:29 +0200 Message-ID: From: Takashi Iwai To: karl.vogel@seagha.com Cc: linux-kernel@vger.kernel.org, Lee Revell Subject: Re: [patch] intel8x0 latency fix In-Reply-To: References: <20040816033623.GA12157@elte.hu> <1092627691.867.150.camel@krustophenia.net> <20040816034618.GA13063@elte.hu> <1092628493.810.3.camel@krustophenia.net> <20040816040515.GA13665@elte.hu> <1092654819.5057.18.camel@localhost> <20040816113131.GA30527@elte.hu> <20040816120933.GA4211@elte.hu> <1092716644.876.1.camel@krustophenia.net> <20040817080512.GA1649@elte.hu> <20040819073247.GA1798@elte.hu> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 15) (Security Through Obscurity) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Fri, 20 Aug 2004 18:19:12 +0200, karl.vogel@seagha.com wrote: > > karl.vogel@seagha.com writes: > > > # lspci -s 00:06.0 > > 00:06.0 Multimedia audio controller: nVidia Corporation nForce3 Audio (rev a2) > > > > latency: 50752 us, entries: 267 (267) > > > Following patch fixes it for 2 channel devices (like my notebook). Although I'm > not sure if this is all that useful... if there are workloads other than audio > work that need low latency, then this might be useful. > In the recent version (linux-sound tree), we can use msleep() (that is more latency friendely) in that callback. The following patch was applied to the current version. Takashi --- linux/sound/pci/intel8x0.c 17 Aug 2004 17:09:19 -0000 1.158 +++ linux/sound/pci/intel8x0.c 23 Aug 2004 13:57:52 -0000 @@ -1024,8 +1024,10 @@ /* reset to 2ch once to keep the 6 channel data in alignment, * to start from Front Left always */ - iputdword(chip, ICHREG(GLOB_CNT), (cnt & 0xcfffff)); - mdelay(50); /* grrr... */ + if (cnt & ICH_PCM_246_MASK) { + iputdword(chip, ICHREG(GLOB_CNT), cnt & ~ICH_PCM_246_MASK); + msleep(50); + } } else if (chip->device_type == DEVICE_INTEL_ICH4) { if (sample_bits > 16) cnt |= ICH_PCM_20BIT;