aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDavid Vrabel <dvrabel@arcom.com>2006-03-03 12:01:57 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:34:45 -0500
commit1037593c8be9551d5a7835703bcaf6073ffb7ec2 (patch)
treec2eef278415b13c2854b8bcff9868efb7a321e4f /sound
parentae6b813a4dbba2713df497c032798b845289653f (diff)
[ALSA] CS5535: shorter delays when accessing AC'97 codec registers
Modules: CS5535 driver 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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/cs5535audio/cs5535audio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c
index 02e3721030b7..9fc7f3827461 100644
--- a/sound/pci/cs5535audio/cs5535audio.c
+++ b/sound/pci/cs5535audio/cs5535audio.c
@@ -62,7 +62,7 @@ static void wait_till_cmd_acked(struct cs5535audio *cs5535au, unsigned long time
62 tmp = cs_readl(cs5535au, ACC_CODEC_CNTL); 62 tmp = cs_readl(cs5535au, ACC_CODEC_CNTL);
63 if (!(tmp & CMD_NEW)) 63 if (!(tmp & CMD_NEW))
64 break; 64 break;
65 msleep(10); 65 udelay(1);
66 } while (--timeout); 66 } while (--timeout);
67 if (!timeout) 67 if (!timeout)
68 snd_printk(KERN_ERR "Failure writing to cs5535 codec\n"); 68 snd_printk(KERN_ERR "Failure writing to cs5535 codec\n");
@@ -80,14 +80,14 @@ static unsigned short snd_cs5535audio_codec_read(struct cs5535audio *cs5535au,
80 regdata |= CMD_NEW; 80 regdata |= CMD_NEW;
81 81
82 cs_writel(cs5535au, ACC_CODEC_CNTL, regdata); 82 cs_writel(cs5535au, ACC_CODEC_CNTL, regdata);
83 wait_till_cmd_acked(cs5535au, 500); 83 wait_till_cmd_acked(cs5535au, 50);
84 84
85 timeout = 50; 85 timeout = 50;
86 do { 86 do {
87 val = cs_readl(cs5535au, ACC_CODEC_STATUS); 87 val = cs_readl(cs5535au, ACC_CODEC_STATUS);
88 if ((val & STS_NEW) && reg == (val >> 24)) 88 if ((val & STS_NEW) && reg == (val >> 24))
89 break; 89 break;
90 msleep(10); 90 udelay(1);
91 } while (--timeout); 91 } while (--timeout);
92 if (!timeout) 92 if (!timeout)
93 snd_printk(KERN_ERR "Failure reading cs5535 codec\n"); 93 snd_printk(KERN_ERR "Failure reading cs5535 codec\n");