summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-01-25 11:45:50 +0000
committermav <mav@FreeBSD.org>2012-01-25 11:45:50 +0000
commitf5404eec6cb788fc10fd7ddaf4c2b7a16cc23ecd (patch)
treef15a1c9c3c98513e13fe16d13e1aa166fe4c1f3f
parent68aa016a16e7c2ffa52920365c930e58d1906083 (diff)
downloadFreeBSD-src-f5404eec6cb788fc10fd7ddaf4c2b7a16cc23ecd.zip
FreeBSD-src-f5404eec6cb788fc10fd7ddaf4c2b7a16cc23ecd.tar.gz
Allow PASSTHROUGH (AC3) to have more then 2 channels.
8 channels can be used to get more then 6.144Mbps bandwidth.
-rw-r--r--sys/dev/sound/pcm/channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index 2b3b390..d45dec1 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -2000,9 +2000,10 @@ chn_setformat(struct pcm_channel *c, uint32_t format)
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;
OpenPOWER on IntegriCloud