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_chan_open()
details: https://anonhg.NetBSD.org/src/rev/851d8e1b3a5b
branches: trunk
changeset: 570804:851d8e1b3a5b
user: kent <kent%NetBSD.org@localhost>
date: Fri Oct 29 17:12:53 2004 +0000
description:
* uaudio_chan_open()
Call uaudio_set_speed() if and only if the selected Audio Streaming
interface supports multiple sampling rates.
Address PR#27237
diffstat:
sys/dev/usb/uaudio.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diffs (45 lines):
diff -r 2f9d5324d414 -r 851d8e1b3a5b sys/dev/usb/uaudio.c
--- a/sys/dev/usb/uaudio.c Fri Oct 29 16:42:47 2004 +0000
+++ b/sys/dev/usb/uaudio.c Fri Oct 29 17:12:53 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uaudio.c,v 1.89 2004/10/29 16:42:47 kent Exp $ */
+/* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.89 2004/10/29 16:42:47 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2517,15 +2517,17 @@
if (err)
return (err);
- /* Some devices do not support this request, so ignore errors. */
-#ifdef UAUDIO_DEBUG
- err = uaudio_set_speed(sc, endpt, ch->sample_rate);
- if (err)
- DPRINTF(("uaudio_chan_open: set_speed failed err=%s\n",
- usbd_errstr(err)));
-#else
- (void)uaudio_set_speed(sc, endpt, ch->sample_rate);
-#endif
+ /*
+ * If just one sampling rate is supported,
+ * no need to call uaudio_set_speed().
+ * Roland SD-90 freezes by a SAMPLING_FREQ_CONTROL request.
+ */
+ if (as->asf1desc->bSamFreqType != 1) {
+ err = uaudio_set_speed(sc, endpt, ch->sample_rate);
+ if (err)
+ DPRINTF(("uaudio_chan_open: set_speed failed err=%s\n",
+ usbd_errstr(err)));
+ }
ch->pipe = 0;
ch->sync_pipe = 0;
Home |
Main Index |
Thread Index |
Old Index