Re: [PATCH 5/5] ALSA: usb-audio: fix msleep timeout due to minimum resolution of task scheduling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> ---
>  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
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux