Re: [patch] intel8x0 latency fix

Takashi Iwai
2004-08-24T17:29:47Z

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;