diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2006-01-06 11:34:09 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2006-01-06 11:34:09 +0000 |
commit | 9148fee3d052a665405e2dcd398343efcd3a621b (patch) | |
tree | fb42764dfe43a3e4d92a4e36fe4da4e45b8fc14e /sys/dev | |
parent | 6a083392a8e5aaa2084b76ca383228f2578b2da4 (diff) |
from kent@netbsd.org:
Call uaudio_set_speed() if and only if the selected Audio Streaming
interface supports multiple sampling rates.
fixed netbsd pr 27237.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/uaudio.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c index e929f7b94dd..a6d0d9f79f4 100644 --- a/sys/dev/usb/uaudio.c +++ b/sys/dev/usb/uaudio.c @@ -1,5 +1,5 @@ -/* $OpenBSD: uaudio.c,v 1.33 2006/01/06 11:13:40 fgsch Exp $ */ -/* $NetBSD: uaudio.c,v 1.87 2004/10/22 17:00:22 kent Exp $ */ +/* $OpenBSD: uaudio.c,v 1.34 2006/01/06 11:34:08 fgsch Exp $ */ +/* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -2528,15 +2528,17 @@ uaudio_chan_open(struct uaudio_softc *sc, struct chan *ch) 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; |