Skip to contentSkip to conversation

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

PATCH Applied David Vrabel 2 participants 3 messages Mar 3, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

David Vrabel

Signature · 4 lines
David Vrabel, Design Engineer

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

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.

sound/pci/cs5535audio/cs5535audio.c +3 -3
Index: linux-2.6-working/sound/pci/cs5535audio/cs5535audio.c
===================================================================
@@ -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");
Applied
#1 lore raw

At Fri, 03 Mar 2006 16:09:51 +0000,

Quoted 10 lines · David Vrabel

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.

Thanks, applied to ALSA CVS tree now.

Takashi

Applied
#2 lore raw
In reply to David Vrabel

At Fri, 03 Mar 2006 16:09:51 +0000,

Quoted 10 lines · David Vrabel

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.

Thanks, applied to ALSA CVS tree now.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642