All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/1] sound/emu8000: replace schedule_timeout() with msleep()
@ 2005-03-05 15:37 domen
  2005-03-08 15:56 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: domen @ 2005-03-05 15:37 UTC (permalink / raw)
  To: perex; +Cc: alsa-devel, domen, nacc




Use ssleep() instead of schedule_timeout() to guarantee the task
delays as expected. The current code uses TASK_INTERRUPTIBLE, but does not check
for signals / early return, so ssleep() should be appropriate. I am fairly
certain the time conversion is ok, as well.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
---


 kj-domen/sound/isa/sb/emu8000.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN sound/isa/sb/emu8000.c~ssleep-sound_isa_sb_emu8000 sound/isa/sb/emu8000.c
--- kj/sound/isa/sb/emu8000.c~ssleep-sound_isa_sb_emu8000	2005-03-05 16:11:20.000000000 +0100
+++ kj-domen/sound/isa/sb/emu8000.c	2005-03-05 16:11:20.000000000 +0100
@@ -25,6 +25,7 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/ioport.h>
+#include <linux/delay.h>
 #include <sound/core.h>
 #include <sound/emu8000.h>
 #include <sound/emu8000_reg.h>
@@ -355,8 +356,7 @@ init_arrays(emu8000_t *emu)
 {
 	send_array(emu, init1, ARRAY_SIZE(init1)/4);
 
-	set_current_state(TASK_INTERRUPTIBLE);
-	schedule_timeout((HZ * (44099 + 1024)) / 44100); /* wait for 1024 clocks */
+	msleep(1024 * 1000 / 44100); /* wait for 1024 clocks */
 	send_array(emu, init2, ARRAY_SIZE(init2)/4);
 	send_array(emu, init3, ARRAY_SIZE(init3)/4);
 
_


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

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

end of thread, other threads:[~2005-03-09  8:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-05 15:37 [patch 1/1] sound/emu8000: replace schedule_timeout() with msleep() domen
2005-03-08 15:56 ` Takashi Iwai
2005-03-09  8:09   ` Domen Puncer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.