diff --git a/sound/core/timer.c b/sound/core/timer.c index b5dc51030316ac0fdb4f1950c83cd4fb9cd6d529..abf04f016ab225fc02662117ac6729ab2e971524 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -528,6 +528,16 @@ static int snd_timer_start1(struct snd_timer_instance *timeri, goto unlock; } + /* check the actual time for the start tick; + * bail out as error if it's way too low (< 100us) + */ + if (start) { + if ((u64)snd_timer_hw_resolution(timer) * ticks < 100000) { + result = -EINVAL; + goto unlock; + } + } + if (start) timeri->ticks = timeri->cticks = ticks; else if (!timeri->cticks)