Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Nov 2009 08:12:13 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 170529 for review
Message-ID:  <200911120812.nAC8CDDa013219@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911120812.nAC8CDDa013219>