linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: CS5535: shorter delays when accessing AC'97 codec registers
@ 2006-03-03 16:09 David Vrabel
  2006-03-03 18:02 ` [Alsa-devel] " Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: David Vrabel @ 2006-03-03 16:09 UTC (permalink / raw)
  To: jayakumar.alsa; +Cc: Linux Kernel, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

The 10 ms sleeps while waiting for AC'97 codec register reads/writes to
complete are excessive given the maxmium time is one AC'97 frame (~21 us).

With AC'97 codecs with integrated touchscreens (like the UCB1400) this
improves the interactive performance of the touchscreen.

David Vrabel
-- 
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/

[-- Attachment #2: alsa-cs5535-quicker-ac97-register-accesses --]
[-- Type: text/plain, Size: 1365 bytes --]

ALSA: CS5535: shorter delays when accessing AC'97 codec registers

The 10 ms sleeps while waiting for AC'97 codec register reads/writes to
complete are excessive given the maxmium time is one AC'97 frame (~21 us).

With AC'97 codecs with integrated touchscreens (like the UCB1400) this
improves the interactive performance of the touchscreen.

Signed-off-by: David Vrabel <dvrabel@arcom.com>

Index: linux-2.6-working/sound/pci/cs5535audio/cs5535audio.c
===================================================================
--- linux-2.6-working.orig/sound/pci/cs5535audio/cs5535audio.c	2006-03-02 16:12:52.000000000 +0000
+++ linux-2.6-working/sound/pci/cs5535audio/cs5535audio.c	2006-03-03 15:47:30.000000000 +0000
@@ -62,7 +62,7 @@
 		tmp = cs_readl(cs5535au, ACC_CODEC_CNTL);
 		if (!(tmp & CMD_NEW))
 			break;
-		msleep(10);
+		udelay(1);
 	} while (--timeout);
 	if (!timeout)
 		snd_printk(KERN_ERR "Failure writing to cs5535 codec\n");
@@ -80,14 +80,14 @@
 	regdata |= CMD_NEW;
 
 	cs_writel(cs5535au, ACC_CODEC_CNTL, regdata);
-	wait_till_cmd_acked(cs5535au, 500);
+	wait_till_cmd_acked(cs5535au, 50);
 
 	timeout = 50;
 	do {
 		val = cs_readl(cs5535au, ACC_CODEC_STATUS);
 		if ((val & STS_NEW) && reg == (val >> 24))
 			break;
-		msleep(10);
+		udelay(1);
 	} while (--timeout);
 	if (!timeout)
 		snd_printk(KERN_ERR "Failure reading cs5535 codec\n");

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Alsa-devel] [PATCH] ALSA: CS5535: shorter delays when accessing AC'97 codec registers
  2006-03-03 16:09 [PATCH] ALSA: CS5535: shorter delays when accessing AC'97 codec registers David Vrabel
@ 2006-03-03 18:02 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2006-03-03 18:02 UTC (permalink / raw)
  To: David Vrabel; +Cc: jayakumar.alsa, Linux Kernel, alsa-devel

At Fri, 03 Mar 2006 16:09:51 +0000,
David Vrabel wrote:
> 
> ALSA: CS5535: shorter delays when accessing AC'97 codec registers
> 
> The 10 ms sleeps while waiting for AC'97 codec register reads/writes to
> complete are excessive given the maxmium time is one AC'97 frame (~21 us).
> 
> With AC'97 codecs with integrated touchscreens (like the UCB1400) this
> improves the interactive performance of the touchscreen.
> 
> Signed-off-by: David Vrabel <dvrabel@arcom.com>

Thanks, applied to ALSA CVS tree now.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-03 18:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-03 16:09 [PATCH] ALSA: CS5535: shorter delays when accessing AC'97 codec registers David Vrabel
2006-03-03 18:02 ` [Alsa-devel] " Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).