diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-07-09 04:13:22 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-07-28 06:22:13 -0400 |
commit | ef21ca24faf28df6d06939e77d5032a313490289 (patch) | |
tree | 1c6c719f4671b803f1288eb8cdca18587ec2eb62 /sound/pci/ali5451 | |
parent | 072c01194df6e4843582d09380b780987f642d6d (diff) |
[ALSA] sound/pci: fix-up sleeping paths
ENS1370/1+ driver,ES1968 driver,Intel8x0 driver,VIA82xx driver
VIA82xx-modem driver,AC97 Codec,ALI5451 driver,CS46xx driver
MIXART driver,RME HDSP driver,Trident driver,YMFPCI driver
Description: Fix-up sleeping in sound/pci. These changes fall under the
following two categories:
1) Replace schedule_timeout() with msleep() to guarantee the
task delays as expected. This also involved replacing/removing
custom sleep functions.
2) Do not assume jiffies will only increment by one if you
request a 1 jiffy sleep, i.e. use time_after/time_before in
while loops.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ali5451')
-rw-r--r-- | sound/pci/ali5451/ali5451.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index eb5c36d31a52..f08ae71f902d 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -399,7 +399,7 @@ static int snd_ali_codec_ready( ali_t *codec, | |||
399 | unsigned long end_time; | 399 | unsigned long end_time; |
400 | unsigned int res; | 400 | unsigned int res; |
401 | 401 | ||
402 | end_time = jiffies + 10 * (HZ >> 2); | 402 | end_time = jiffies + 10 * msecs_to_jiffies(250); |
403 | do { | 403 | do { |
404 | res = snd_ali_5451_peek(codec,port); | 404 | res = snd_ali_5451_peek(codec,port); |
405 | if (! (res & 0x8000)) | 405 | if (! (res & 0x8000)) |
@@ -422,7 +422,7 @@ static int snd_ali_stimer_ready(ali_t *codec, int sched) | |||
422 | dwChk1 = snd_ali_5451_peek(codec, ALI_STIMER); | 422 | dwChk1 = snd_ali_5451_peek(codec, ALI_STIMER); |
423 | dwChk2 = snd_ali_5451_peek(codec, ALI_STIMER); | 423 | dwChk2 = snd_ali_5451_peek(codec, ALI_STIMER); |
424 | 424 | ||
425 | end_time = jiffies + 10 * (HZ >> 2); | 425 | end_time = jiffies + 10 * msecs_to_jiffies(250); |
426 | do { | 426 | do { |
427 | dwChk2 = snd_ali_5451_peek(codec, ALI_STIMER); | 427 | dwChk2 = snd_ali_5451_peek(codec, ALI_STIMER); |
428 | if (dwChk2 != dwChk1) | 428 | if (dwChk2 != dwChk1) |