svn commit: r230537 - head/sys/dev/sound/pcm

Alexander Motin mav at FreeBSD.org
Wed Jan 25 11:45:50 UTC 2012


Author: mav
Date: Wed Jan 25 11:45:50 2012
New Revision: 230537
URL: http://svn.freebsd.org/changeset/base/230537

Log:
  Allow PASSTHROUGH (AC3) to have more then 2 channels.
  8 channels can be used to get more then 6.144Mbps bandwidth.

Modified:
  head/sys/dev/sound/pcm/channel.c

Modified: head/sys/dev/sound/pcm/channel.c
==============================================================================
--- head/sys/dev/sound/pcm/channel.c	Wed Jan 25 11:28:18 2012	(r230536)
+++ head/sys/dev/sound/pcm/channel.c	Wed Jan 25 11:45:50 2012	(r230537)
@@ -2000,9 +2000,10 @@ chn_setformat(struct pcm_channel *c, uin
 	int ret;
 
 	/* XXX force stereo */
-	if (format & AFMT_PASSTHROUGH)
+	if ((format & AFMT_PASSTHROUGH) && AFMT_CHANNEL(format) < 2) {
 		format = SND_FORMAT(format, AFMT_PASSTHROUGH_CHANNEL,
 		    AFMT_PASSTHROUGH_EXTCHANNEL);
+	}
 
 	oldformat = c->format;
 	oldspeed = c->speed;


More information about the svn-src-head mailing list