All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] Re: [Alsa-devel] [PATCH 26/39] sound/emu8000: replace
Date: Mon, 24 Jan 2005 14:16:06 +0000	[thread overview]
Message-ID: <s5hllai29qx.wl@alsa2.suse.de> (raw)

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

At Fri, 21 Jan 2005 11:35:00 -0800,
Nishanth Aravamudan wrote:
> 
> Hi,
> 
> Please consider applying.
> 
> Description: 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.

Oh, that's a wrong code ;)  The comment is correct, though.
It should have been:

	schedule_timeout((HZ * 1024 + 44099) / 44100);

So, more simply with msleep(),

	msleep(1024 * 1000 / 44100);


Takashi


> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> 
> --- 2.6.11-rc1-kj-v/sound/isa/sb/emu8000.c	2005-01-15 16:55:45.000000000 -0800
> +++ 2.6.11-rc1-kj/sound/isa/sb/emu8000.c	2005-01-21 11:32:38.000000000 -0800
> @@ -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 */
> +	ssleep(1);
>  	send_array(emu, init2, ARRAY_SIZE(init2)/4);
>  	send_array(emu, init3, ARRAY_SIZE(init3)/4);
>  
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

                 reply	other threads:[~2005-01-24 14:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hllai29qx.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.