From owner-svn-src-stable@FreeBSD.ORG Mon Dec 1 07:36:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F79DB4A; Mon, 1 Dec 2014 07:36:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61326E98; Mon, 1 Dec 2014 07:36:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB17a1Tk076502; Mon, 1 Dec 2014 07:36:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB17a1cu076501; Mon, 1 Dec 2014 07:36:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201412010736.sB17a1cu076501@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 1 Dec 2014 07:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r275352 - stable/9/sys/dev/sound/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2014 07:36:01 -0000 Author: hselasky Date: Mon Dec 1 07:36:00 2014 New Revision: 275352 URL: https://svnweb.freebsd.org/changeset/base/275352 Log: 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. Modified: stable/9/sys/dev/sound/usb/uaudio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Mon Dec 1 07:34:25 2014 (r275351) +++ stable/9/sys/dev/sound/usb/uaudio.c Mon Dec 1 07:36:00 2014 (r275352) @@ -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_ 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);