All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: onkel@paraair.de, alsa-devel@alsa-project.org
Subject: Re: [PATCH 5/5] ALSA: usb-audio: fix msleep timeout due to minimum resolution of task scheduling
Date: Mon, 20 Feb 2017 21:51:13 +0100	[thread overview]
Message-ID: <s5hvas4povy.wl-tiwai@suse.de> (raw)
In-Reply-To: <20170220200921.824-6-o-takashi@sakamocchi.jp>

On Mon, 20 Feb 2017 21:09:21 +0100,
Takashi Sakamoto wrote:
> 
> Depending on tick-related kernel configuration; e.g. HZ, task scheduler
> necessarily has no guarantee for its minimum resolution against ~20 msec
> msleep timeout.
> 
> This commit expands msleep timeout up to 20 msec with an optimistic view
> to packet handling capability of the target device. 'checkpatch.pl'
> generated below warning.

Well, it doesn't matter even if you set to 20.  When you use msleep(),
there is no guarantee of the minimum at all.


Takashi


> 
> WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
> +		msleep(15);
> 
> Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk")
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> ---
>  sound/usb/mixer_us16x08.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/usb/mixer_us16x08.c b/sound/usb/mixer_us16x08.c
> index d34dd1c..1c2d167 100644
> --- a/sound/usb/mixer_us16x08.c
> +++ b/sound/usb/mixer_us16x08.c
> @@ -548,7 +548,7 @@ static int snd_us16x08_eqswitch_put(struct snd_kcontrol *kcontrol,
>  		if (err < 0)
>  			break;
>  		store->val[b_idx][3][index] = val;
> -		msleep(15);
> +		msleep(20);
>  	}
>  
>  	if (err > 0) {
> -- 
> 2.9.3
> 

      reply	other threads:[~2017-02-20 20:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 20:09 [PATCH 0/5] ALSA: usb-audio: fixes for quirks of Tascam US-16x08 Takashi Sakamoto
2017-02-20 20:09 ` [PATCH 1/5] ALSA: usb-audio: localize one-referrer variable Takashi Sakamoto
2017-02-20 20:51   ` Takashi Iwai
2017-02-20 20:09 ` [PATCH 2/5] ALSA: usb-audio: purge needless variable length array Takashi Sakamoto
2017-02-20 20:51   ` Takashi Iwai
2017-02-20 21:04     ` Takashi Iwai
2017-02-21  2:23       ` Takashi Sakamoto
2017-02-20 20:09 ` [PATCH 3/5] ALSA: usb-audio: localize function without external linkage Takashi Sakamoto
2017-02-20 20:52   ` Takashi Iwai
2017-02-20 20:09 ` [PATCH 4/5] ALSA: usb-audio: deallocate memory objects in error path Takashi Sakamoto
2017-02-20 20:49   ` Takashi Iwai
2017-02-21  2:32     ` Takashi Sakamoto
2017-02-21 22:45       ` Takashi Sakamoto
2017-02-21 22:59         ` Takashi Sakamoto
2017-02-22  1:42           ` Takashi Sakamoto
2017-02-22  7:44             ` Takashi Iwai
2017-02-22  7:46               ` Takashi Iwai
2017-02-22 13:37                 ` Takashi Sakamoto
2017-02-22 14:05                   ` Takashi Iwai
2017-02-22 13:20               ` Takashi Sakamoto
2017-02-20 20:09 ` [PATCH 5/5] ALSA: usb-audio: fix msleep timeout due to minimum resolution of task scheduling Takashi Sakamoto
2017-02-20 20:51   ` Takashi Iwai [this message]

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=s5hvas4povy.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=o-takashi@sakamocchi.jp \
    --cc=onkel@paraair.de \
    /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.