From 5e0c8413f39ff668d42f33e32e4bd03b0304b6b5 Mon Sep 17 00:00:00 2001 From: jdolecek Date: Thu, 17 Apr 2003 16:38:02 +0000 Subject: [PATCH] uaudio_match_alt_sub(): fix the rate check in UA_SAMP_CONTNUOUS case to match if UA_SAMP_LO() == UA_SAMP_HI() == rate problem reported and fix provided in PR kern/18986 by Yasushi Oshima --- sys/dev/usb/uaudio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c index f06a20389ffa..a9293c18ba4c 100644 --- a/sys/dev/usb/uaudio.c +++ b/sys/dev/usb/uaudio.c @@ -1,4 +1,4 @@ -/* $NetBSD: uaudio.c,v 1.65 2003/03/30 04:47:13 toshii Exp $ */ +/* $NetBSD: uaudio.c,v 1.66 2003/04/17 16:38:02 jdolecek Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.65 2003/03/30 04:47:13 toshii Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.66 2003/04/17 16:38:02 jdolecek Exp $"); #include #include @@ -2271,7 +2271,7 @@ uaudio_match_alt_sub(int nalts, const struct as_info *alts, if (a1d->bSamFreqType == UA_SAMP_CONTNUOUS) { DPRINTFN(2,("uaudio_match_alt_sub: cont %d-%d\n", UA_SAMP_LO(a1d), UA_SAMP_HI(a1d))); - if (UA_SAMP_LO(a1d) < rate && rate < UA_SAMP_HI(a1d)) + if (UA_SAMP_LO(a1d) <= rate && rate <= UA_SAMP_HI(a1d)) return i; } else { for (j = 0; j < a1d->bSamFreqType; j++) {