PERFORCE change 170529 for review

Hans Petter Selasky hselasky at FreeBSD.org
Thu Nov 12 08:12:14 UTC 2009


http://p4web.freebsd.org/chv.cgi?CH=170529

Change 170529 by hselasky at 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) {


More information about the p4-projects mailing list