Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Some more debug when selecting sample rate.



details:   https://anonhg.NetBSD.org/src/rev/7929491ac4fa
branches:  trunk
changeset: 484055:7929491ac4fa
user:      augustss <augustss%NetBSD.org@localhost>
date:      Fri Mar 24 13:02:00 2000 +0000

description:
Some more debug when selecting sample rate.

diffstat:

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

diffs (34 lines):

diff -r bc5f19aed979 -r 7929491ac4fa sys/dev/usb/uaudio.c
--- a/sys/dev/usb/uaudio.c      Fri Mar 24 11:57:14 2000 +0000
+++ b/sys/dev/usb/uaudio.c      Fri Mar 24 13:02:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uaudio.c,v 1.19 2000/02/29 21:37:00 augustss Exp $     */
+/*     $NetBSD: uaudio.c,v 1.20 2000/03/24 13:02:00 augustss Exp $     */
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -1544,7 +1544,7 @@
                    type, which, wValue, wIndex, len));
        err = usbd_do_request(sc->sc_udev, &req, &data);
        if (err) {
-               DPRINTF(("uaudio_get: err=%d\n", err));
+               DPRINTF(("uaudio_get: err=%s\n", usbd_errstr(err)));
                return (-1);
        }
        switch (len) {
@@ -2288,11 +2288,15 @@
                    p->precision ==a1d->bBitResolution &&
                    enc == sc->sc_alts[i].encoding) {
                        if (a1d->bSamFreqType == UA_SAMP_CONTNUOUS) {
+                               DPRINTFN(2,("uaudio_set_params: cont %d-%d\n",
+                                   UA_SAMP_LO(a1d), UA_SAMP_HI(a1d)));
                                if (UA_SAMP_LO(a1d) < p->sample_rate &&
                                    p->sample_rate < UA_SAMP_HI(a1d))
                                        goto found;
                        } else {
                                for (j = 0; j < a1d->bSamFreqType; j++) {
+                                       DPRINTFN(2,("uaudio_set_params: disc #"
+                                           "%d: %d\n", j, UA_GETSAMP(a1d, j)));
                                        /* XXX allow for some slack */
                                        if (UA_GETSAMP(a1d, j) ==
                                            p->sample_rate)



Home | Main Index | Thread Index | Old Index