Allow PASSTHROUGH (AC3) to have more then 2 channels.

8 channels can be used to get more then 6.144Mbps bandwidth.
This commit is contained in:
mav 2012-01-25 11:45:50 +00:00
parent 68aa016a16
commit f5404eec6c

View File

@ -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;