winealsa: 6 Channel Audio

Andrew Eikum aeikum at
Mon Oct 24 08:08:58 CDT 2011

On Sun, Oct 23, 2011 at 05:57:04PM -0700, Chris Robinson wrote:
> On Sunday, October 23, 2011 8:28:45 PM Jonathan McCrohan wrote:
> > Would someone with a better knowledge of Wine and/or ALSA be able to
> > assist me in tracking down the source of this bug?
> Part of the problem is the way Wine attempts to "detect" a default format from 
> ALSA. ALSA doesn't report a default format, though, so Wine attempts to see 
> what it's capable of and reports that instead. Apparently ALSA is capable of 
> handling up to 10,000 channels, and Wine has no idea how to report that back 
> to the Windows app.
> IMO, the "fix" would be to make winealsa default to something sane, like 
> 44.1khz 16-bit stereo. 

I agree, this is a better solution than trying to detect it from the
backends. Looking at >2-channel audio setups is near the top of my
TODO list; Scott Ritchie even asked me about it at WineConf this year.
Reworking GetMixFormat() is probably going to be part of that.

Jonathan: If you are confident with the ALSA API, I would be happy to
review a patch that does this and/or fixes multichannel audio. If you
aren't confident with ALSA and value your sanity, I would suggest you
stay far, far away :)

>                        A configuration option (in winecfg/control panel) would 
> be needed to set it into a different mode. Windows has something similar to 
> this for its own audio device configuration in the control panel.

My reaction to this is "urrrrrrrghhhhhhh". I'd much rather tuck it
away in a registry entry than put it in winecfg for everyone to mess
with. I was surprised to see that option on my Win 7 VM, although the
control is actually inactive.

> But, there's an additional complication. The order Windows expects for >4 
> channels is different than what ALSA provides. For example, ALSA places the 
> front-center/lfe channels after the rear-left/right, while Windows places them 
> after front-left/right. So either Wine will need to tell ALSA to expect a 
> different order (I'm not sure if you can in an easy way), or Wine will have to 
> reorder the samples itself before writing to the device.

Yeah, remapping the channels in winealsa.drv is probably the solution,
unfortunately. I'll know more once I start investigating the various
backends' multichannel support.


More information about the wine-devel mailing list