Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb uaudio_match_alt_sub(): fix the rate check in UA...



details:   https://anonhg.NetBSD.org/src/rev/13a843a14bd3
branches:  trunk
changeset: 545895:13a843a14bd3
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Thu Apr 17 16:38:02 2003 +0000

description:
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

diffstat:

 sys/dev/usb/uaudio.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r cd60e82b57bd -r 13a843a14bd3 sys/dev/usb/uaudio.c
--- a/sys/dev/usb/uaudio.c      Thu Apr 17 16:15:36 2003 +0000
+++ b/sys/dev/usb/uaudio.c      Thu Apr 17 16:38:02 2003 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
 #include <sys/systm.h>
@@ -2271,7 +2271,7 @@
                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++) {



Home | Main Index | Thread Index | Old Index