diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-12-01 07:34:25 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-12-01 07:34:25 +0000 |
commit | f66f59b79490706a63f09914c0ef4ea4d649c419 (patch) | |
tree | 17c490f9a59ebdcb85ee5899877787c7dfead4ed | |
parent | aaab2e97e4d5c86294522cb6934b2067d2093831 (diff) | |
download | FreeBSD-src-f66f59b79490706a63f09914c0ef4ea4d649c419.zip FreeBSD-src-f66f59b79490706a63f09914c0ef4ea4d649c419.tar.gz |
MFC r274918:
Don't use the synchronization endpoint unless referenced by the
isochronous endpoint descriptor used for the data transfers, hence the
synchronization feature might not be supposed to be supported [yet].
This makes seamless playback synced with the USB HOST clock work with
the DN32-USB module for Midas audio systems and possibly other similar
products from Klark Teknik.
-rw-r--r-- | sys/dev/sound/usb/uaudio.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index daedbbc..2e965c3 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -195,6 +195,7 @@ struct uaudio_chan_alt { uint8_t iface_index; uint8_t iface_alt_index; uint8_t channels; + uint8_t enable_sync; }; struct uaudio_chan { @@ -1804,6 +1805,14 @@ uaudio_chan_fill_info_sub(struct uaudio_softc *sc, struct usb_device *udev, chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; + if (UEP_HAS_SYNCADDR(ed1) && ed1->bSynchAddress != 0) { + DPRINTF("Sync endpoint will be used, if present\n"); + chan_alt->enable_sync = 1; + } else { + DPRINTF("Sync endpoint will not be used\n"); + chan_alt->enable_sync = 0; + } + usbd_set_parent_iface(sc->sc_udev, curidx, sc->sc_mixer_iface_index); @@ -2080,8 +2089,10 @@ tr_transferred: chn_intr(ch->pcm_ch); /* start SYNC transfer, if any */ - if ((ch->last_sync_time++ & 7) == 0) - usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + if (ch->usb_alt[ch->cur_alt].enable_sync != 0) { + if ((ch->last_sync_time++ & 7) == 0) + usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + } case USB_ST_SETUP: mfl = usbd_xfer_max_framelen(xfer); |