From owner-p4-projects@FreeBSD.ORG Thu Nov 12 08:12:14 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 31B321065693; Thu, 12 Nov 2009 08:12:14 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD328106568F for ; Thu, 12 Nov 2009 08:12:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CAFF28FC15 for ; Thu, 12 Nov 2009 08:12:13 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nAC8CDuZ013221 for ; Thu, 12 Nov 2009 08:12:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nAC8CDDa013219 for perforce@freebsd.org; Thu, 12 Nov 2009 08:12:13 GMT (envelope-from hselasky@FreeBSD.org) Date: Thu, 12 Nov 2009 08:12:13 GMT Message-Id: <200911120812.nAC8CDDa013219@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 170529 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 08:12:14 -0000 http://p4web.freebsd.org/chv.cgi?CH=170529 Change 170529 by hselasky@hselasky_laptop001 on 2009/11/12 08:11:42 USB audio: - fix initialization order Affected files ... .. //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#60 edit Differences ... ==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#60 (text+ko) ==== @@ -1318,6 +1318,11 @@ ch->pcm_cap.minspeed = ch->sample_rate; ch->pcm_cap.maxspeed = ch->sample_rate; + /* setup mutex and PCM channel */ + + ch->pcm_ch = c; + ch->pcm_mtx = c->lock; + if (ch->p_asf1d->bNrChannels >= 2) ch->pcm_cap.fmtlist[0] = SND_FORMAT(ch->p_fmt->freebsd_fmt, 2, 0); @@ -1391,8 +1396,6 @@ ch->start = ch->buf; ch->end = ch->buf + buf_size; ch->cur = ch->buf; - ch->pcm_ch = c; - ch->pcm_mtx = c->lock; ch->pcm_buf = b; if (ch->pcm_mtx == NULL) {