Wine doesn't support 5.1 and 7.1 sound

Bug #344588 reported by Id2ndR
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Wine
Fix Released
Wishlist
wine1.4 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: wine

Wine currently only support stereo sound. It would be great to have more channels and get 4.0, 5.1 or more.

Revision history for this message
In , Benjamin Hodgetts (enverex) wrote :

Pretty sure Starcraft doesn't have support for actual multi-channel surround. If anything it may support "Dolby Pro Logic" or "Dolby Surround" neither of which are actual surround sound and don't require anything other than stereo from your soundcard (Pro Logic is decoded by a HiFi or amp that has that ability). Basically they are all "fake" surround.

Yeah, just checked, it's "Dolby Surround". There's nothing Wine needs to do to support this, it's already working, you just don't have the correct hardware connected to your PC.

Revision history for this message
In , Benjamin Hodgetts (enverex) wrote :

Amazingly this bug doesn't seem to have been filed before (support request for multi-channel audio) so correcting the details to make more sense. This isn't likely to be done for a while thought due to a) drivers not being that great, b) EAX missing entirely from drivers and other reasons which I'm sure the devs can give you.

Revision history for this message
In , Rbrandonstewart (rbrandonstewart) wrote :

It is my understanding that EAX (Environmental Audio Extensions) and surround support for DirectSound are two independent things. EAX is just a bunch of environmental audio presets, and has nothing to do with hearing enemies coming from behind you in 3d games.

I can select 5.1 audio output in Team Fortress 2, but there is no audio from the rear speakers and when I restart the game the sound option is reset to stereo.

Revision history for this message
In , Austin English (austinenglish) wrote :

*** Bug 14927 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Boromir (gutko) wrote :

It would be wonderfull to hear full 5.1 or 7.1 sound in games such as World of
Warcraft, Guild Wars or any other game (3D shooter for example) that allows
multichannel sound output. Difference between how those games sound in Windows
and Wine is MASSIVE.
Cheers!

Revision history for this message
In , Iuga Marian Silviu (iugamarian) wrote :

And there is a game that has a problem with sound in wine.
Please get this game from http://www.iuga.go.ro/bile.exe
and make it work on newer versions of wine.
The problem consists in that when a ball is moved on a
wider path, the bumps of each jump are not all heard,
and also, when a row of balls dissapears, the boom
sound is heard only about at 50 % chance.
Thanks in advance.

Revision history for this message
In , Liquitsnake (liquitsnake) wrote :

(In reply to comment #6)
> And there is a game that has a problem with sound in wine.
> Please get this game from http://www.iuga.go.ro/bile.exe
> and make it work on newer versions of wine.
> The problem consists in that when a ball is moved on a
> wider path, the bumps of each jump are not all heard,
> and also, when a row of balls dissapears, the boom
> sound is heard only about at 50 % chance.
> Thanks in advance.
>

How is this related to multi-channel sound not being implemented?
Open a new bug for your problem.

Revision history for this message
In , Iuga Marian Silviu (iugamarian) wrote :

(In reply to comment #7)

I filed a new bug considering this. Bug 13852 :

http://bugs.winehq.org/show_bug.cgi?id=13852

Revision history for this message
Id2ndR (id2ndr) wrote :

Binary package hint: wine

Wine currently only support stereo sound. It would be great to have more channels and get 4.0, 5.1 or more.

Changed in wine:
status: Unknown → Confirmed
Changed in wine (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
In , Andreas Allacher (ghost-zero5) wrote :

Is there any news regarding this.
Is it possible to somehow use 5.1 or any other multi-channel sound by now?

Revision history for this message
In , Austin English (austinenglish) wrote :

Still unimplemented, but with Maarten's recent work with Wine and OpenAL, it's much closer.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #10)
> Still unimplemented, but with Maarten's recent work with Wine and OpenAL, it's
> much closer.

But the sound sources of OpenAL are usually mono.

Revision history for this message
In , rusivi2 (rusivi2-deactivatedaccount) wrote :

Does this occur in newest WINE?

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for posting this bug.

What version of Ubuntu & WINE were you using?

Does this occur in newest WINE?

Changed in wine (Ubuntu):
status: Triaged → Incomplete
Changed in wine:
importance: Unknown → Wishlist
Revision history for this message
In , Adam Bolte (boltronics) wrote :

I've spent most of today looking into this. All testing was against wine 1.3.10.

My system uses a Gigabyte X58A-UD9 MB with on-board Realtek ALC889 sound connected to a Logitech Z-5500 5.1 system via analogue, and I'm running Ubuntu 10.04.

Under the Sound Preferences Hardware tab, I have selected "Analog Surround 5.1 Output".

When I run the command “speaker-test -c6 -l1 -twav” everything plays exactly as expected. I've also added the following line to my /etc/pulse/daemon.conf file to disable channel remixing:

enable-remixing = no

Otherwise it's not always immediately obvious if games are actually supporting multi-channel or not. Additionally, my bare-bones ALSA config file redirects everything to PulseAudio by default.

I've mostly tested games with ALSA selected in winecfg, but tried a couple of games with the WinePulse patches and using PulseAudio directly to see if it made a difference. It didn't.

The results:

In Portal, selecting 5.1 reverts back to stereo after freezing for a few seconds. Selecting a multi-channel sound configuration is not possible (sounds like the Team Fortress 2 report above).

StarCraft 1 certainly didn't output anything to my rear channels, as expected from previous comments here.

StarCraft II, looked promising (I can select 5.1 from the drop-down successfully) but it actually seems to do nothing (no audio was heard from the rear channels). I tested as much as the menus and game cut-scenes.

UT2004 and Killing Floor (a UT2004-based game) also didn't run multi-channel, even after adjusting some of the audio settings in-game.

Aliens Vs Predator was only stereo, and doesn't provide an option to tweak anything useful audio-related in-game.

Despite all these failures, Unreal Tournament 3 multi-channel audio actually worked effortlessly. You can clearly hear menu click sound effects in the rear speakers, and surround sound in-game appears to work perfectly (I played a few matches to test it out – using the patch for bug 6971 of course).

Given that UT3 worked, I tried Stranglehold (UT3-based), but that *didn't* work. There wasn't much in the way of in-game options there. Perhaps if I had more time I could try diff'ing the UT*.ini and Stranglehold ini files... don't know.

I've got plenty of other games I could try, but that's it for now. Very curious to know what's so special about UT3. Either way, it would be awesome to improve multi-channel sound compatibility. I personally don't care about EAX.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

wine need to implement dsound 's speaker-configuration to find out your speaker arrangement is 2.0 , 4.0 , 5.1 and 7.1 from Sound Preference and use alsa's analog front , surround40, surround51 and surround71 devices, iec958 for digital audio pass through coxial/spdif to your digital receiver, hdmi for your hdtv or hdmi receiver

This is easy for desktop with 6 audio jacks in rear panel since you don't need to change the switches of your sound card (e.g. "Smart51", "Channel mode" to retask the pink and blue jacks as output

Revision history for this message
In , Adam Bolte (boltronics) wrote :

I don't think I've ever used a sound card that required retasking the input jacks as outputs for additional channel outputs, but would assume it would entirely be taken care of in ALSA.

I suspect (as far as Windows software goes) only driver utility software would need this functionality, and WINE in general doesn't deal with drivers. Thus, I figure we only need to work with whatever is already configured in ALSA/Sound Preferences and keep things simple? Hope I understood you correctly.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

http://www.intel.com/support/motherboards/desktop/sb/cs-020642.htm

Those are motherboard with only 3 audio jacks at rear panel

Take a look at videos

For example, you can listen to one audio source through the back panel speakers and a second audio source through front panel headphones or speakers.

Revision history for this message
In , Hverbeet (hverbeet) wrote :

(In reply to comment #13)
> I've got plenty of other games I could try, but that's it for now. Very curious
> to know what's so special about UT3.
Doesn't UT3 use OpenAL?

Revision history for this message
In , Adam Bolte (boltronics) wrote :

Thanks Raymond.

> Doesn't UT3 use OpenAL?
Just took a look at the OpenAL WikiPedia page, and it does. So does UT2004 though, but that didn't work.

I noticed BioShock was on the list, so I tried a BioShock demo I downloaded ages ago. It had an option for 5.1... looked promising, but again no success. Tried restarting the app, noticed 5.1 was still selected, but still no multi-channel. Must be something else that's special about UT3...

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

according to the pdf , second audio source through front panel headphones can be accessed through dsound

does your snd-hda-intel provide this independent headphone device ?

Revision history for this message
In , Adam Bolte (boltronics) wrote :

I have no idea. I suppose I would have to load up Windows and hunt around to see if it's possible. I know the Windows configuration software that came with my motherboard doesn't look quite like the one in the picture.

Definitely under PulseAudio I can tell Xine to play to iec958 (eg. Dolby Digital DVD audio via passthrough) simultaneously to, say, having mplayer play a flac file to analogue-out channels... but I assume that's not useful to you - I think you want to know if it's possible exclusively using my front and back analogue jacks. I might get a chance to try it tomorrow night.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

The "Multistreaming" option of realtek and idt codec is similar to the "Independent Headphone" switch in snd-hda-intel if you are using VIA HDA Codec

http://www.viaarena.com/forums/showthread.php?t=41015

Revision history for this message
In , Adam Bolte (boltronics) wrote :

Created an attachment (id=32732)
Multistreaming under Windows

Windows 7 multistreaming via Realtek ALC889, as found on a Gigabyte X58A-UD9 motherboard.

Revision history for this message
In , Adam Bolte (boltronics) wrote :

As per the image attached above, I discovered that multistreaming on my motherboard is possible under Windows 7. The options only became available when I had the headphones physically connected. However, I have yet to figure out any way to achieve the same thing under my Ubuntu 10.04 system. I've been messing around with it and searching for hours without success.

I did notice in alsamixer a Headphone option. If I connect headphones to the front of my case and leave that box ticked while playing audio in mplayer, I get the same audio stream simultaneously sent to both my front speakers and my headphones.

If I leave headphones enabled but mute the front speaker channel, both stop working. If I untick the headphone checkbox, both the headphones and front speaker channel also stop working. It certainly looks like these are both sharing the same channel, and I can't see any possible way I could redirect audio to one specific set of speakers. This is all aplay shows (aside from some other "surroundXX" plugs that seem unlikely to be useful):

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    Playback/recording through the PulseAudio sound server
front:CARD=Intel,DEV=0
    HDA Intel, ALC889 Analog
    Front speakers
...
surround51:CARD=Intel,DEV=0
    HDA Intel, ALC889 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
...
iec958:CARD=Intel,DEV=0
    HDA Intel, ALC889 Digital
    IEC958 (S/PDIF) Digital Audio Output
$

Would attaching anything else in particular be useful?

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

alsa seem only implement the capture devices only

do you have additional capture device (hw:0,2) ?

arecord -l

Take a look at block diagram of alc889 datasheet and the codec-info section in the output of alsa-info.sh

Ten DAC channels support 16/20/24-bit PCM format for 7.1 sound playback, plus 2 channels of
concurrent independent stereo sound output (multiple streaming) through the front panel output

The "6stack" or "6stack-dig" model connected both HP and Line Out (Green) to the front channel [Audio Output].

you need to implement a new model "6stack-dig-fronthp" which connect your alc889's alt_dac_nid 0x25 to HP out at Ext Front and modify the driver to create stream_analog_alt_playback (device 2) and create the volume control/switches

0x02, 0x03, 0x04, 0x05 [Audio Output] connected to those four [Pin complex] Line out at Ext Rear ( Color = green, black, orange ,grey )

0x25 [Audio Output] - connect to [Pin complex] HP out at ext front

Revision history for this message
In , Adam Bolte (boltronics) wrote :

Created an attachment (id=32743)
Output of alsa-info.txt on my ALC889.

Includes "arecord -l" output under the "ARECORD" section.

Revision history for this message
In , Adam Bolte (boltronics) wrote :

...implement a new model "6stack-dig-fronthp"... how hard can it be...

I started looking through my kernel's source at sound/pci/hda/patch_realtek.c... I don't think I'm able to make those modifications. At least, not without lots of trial and error, and spending crazy amounts of time trying. I haven't attained the rank of Kernel Hacker just yet. :)

I appreciate your help, but don't fully understand the situation. Why does WINE need to get multistream functionality working, when a model in ALSA with that support doesn't appear to exist? I would have figured nobody could use such functionality yet, so it wouldn't be useful for WINE to try. UT3 works, and personally I've never actually used the front HP port before looking at this bug either - 3.5mm headphones plug into the receiver.

I would be very happy to test any patches though, if you feel up to it.

Revision history for this message
In , Iuga Marian Silviu (iugamarian) wrote :

Alsa works very well with multi-channel. I would take a look at the alsa sources for this alsa program that works out of the box:

speaker-test

I am not a c/c++ programmer so I leave it to you.

Revision history for this message
In , Adam Bolte (boltronics) wrote :

(In reply to comment #27)
> Alsa works very well with multi-channel.

Nobody has said otherwise. multi-channel != multistreaming, and multistreaming is already possible if you have multiple output devices (which I previously mentioned). Raymond is talking about multistreaming between the read analog and front analog ports of the same device through ALSA, which doesn't seem to be supported.

I'm not sure why getting this sorted out is a requirement to get multi-channel working but I'm not a WINE programmer.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #27)
> Alsa works very well with multi-channel. I would take a look at the alsa
> sources for this alsa program that works out of the box:
>
> speaker-test
>
> I am not a c/c++ programmer so I leave it to you.

ALSA require sound card to use "surround40" , "surround51" to play multi-channels

it is ok if you are using the onboard HDA with 6 audio jacks in rear panel

if you look at the above URL of intel desktop audio support

when your Micro ATX motherboard only has three audio jacks
you need to configure Configuring 6-Channel Audio and retask "Mic" and "line" for output

Item Description
A Line In [retaskable as Rear Left/Right Out]
B Line Out [Front Left/Right Out]
C Mic In [retaskable as Center/LFE (Subwoofer) Out]

the other sound cards may need to change the "channel mode" from "2" to "6" and that switch is hooked with the "surround51" device in /usr/share/alsa/cards/*.conf

but winealsa does not use those devices name

Revision history for this message
In , Raymond (superquad-vortex2) wrote :
Download full text (4.0 KiB)

(In reply to comment #18)
> Thanks Raymond.
>
> > Doesn't UT3 use OpenAL?
> Just took a look at the OpenAL WikiPedia page, and it does. So does UT2004
> though, but that didn't work.
>
> I noticed BioShock was on the list, so I tried a BioShock demo I downloaded
> ages ago. It had an option for 5.1... looked promising, but again no success.
> Tried restarting the app, noticed 5.1 was still selected, but still no
> multi-channel. Must be something else that's special about UT3...

you need to setup the parameters in .alsoftrc for those openal games if you are using openal-soft in linux

## format:
# Sets the output format. Can be one of:
# AL_FORMAT_MONO8 (8-bit mono)
# AL_FORMAT_STEREO8 (8-bit stereo)
# AL_FORMAT_QUAD8 (8-bit 4-channel)
# AL_FORMAT_51CHN8 (8-bit 5.1 output)
# AL_FORMAT_61CHN8 (8-bit 6.1 output)
# AL_FORMAT_71CHN8 (8-bit 7.1 output)
# AL_FORMAT_MONO16 (16-bit mono)
# AL_FORMAT_STEREO16 (16-bit stereo)
# AL_FORMAT_QUAD16 (16-bit 4-channel)
# AL_FORMAT_51CHN16 (16-bit 5.1 output)
# AL_FORMAT_61CHN16 (16-bit 6.1 output)
# AL_FORMAT_71CHN16 (16-bit 7.1 output)
# AL_FORMAT_MONO32 (32-bit float mono)
# AL_FORMAT_STEREO32 (32-bit float stereo)
# AL_FORMAT_QUAD32 (32-bit float 4-channel)
# AL_FORMAT_51CHN32 (32-bit float 5.1 output)
# AL_FORMAT_61CHN32 (32-bit float 6.1 output)
# AL_FORMAT_71CHN32 (32-bit float 7.1 output)
format = AL_FORMAT_STEREO16

## frequency:
# Sets the output frequency.
frequency = 44100

## drivers:
# Sets the backend driver list order, comma-seperated. Unknown backends and
# duplicated names are ignored. Unlisted backends won't be considered for use
# unless the list is ended with a comma (eg. 'oss,' will list OSS first
# followed by all other available backends, while 'oss' will list OSS only).
# An empty list means the default.
#drivers = alsa,pulse,oss,solaris,dsound,winmm,port,wave
drivers = alsa

## layout:
# Sets the virtual speaker layout. Values are specified in degrees, where 0 is
# straight in front, negative goes left, and positive goes right. Unspecified
# speakers will remain at their default positions (which are dependant on the
# output format). Available speakers are back-left(bl), side-left(sl), front-
# left(fl), front-center(fc), front-right(fr), side-right(sr), back-right(br),
# and back-center(bc).
#layout =

##
## ALSA backend stuff
##
[alsa]

## device:
# Sets the device name for the default playback device.
device = front:0

## capture:
# Sets the device name for the default capture device.
capture = hw:0,0

## mmap:
# Sets whether to try using mmap mode (helps reduce latencies and CPU
# consumption). If mmap isn't available, it will automatically fall back to
# non-mmap mode. True, yes, on, and non-0 values will attempt to use mmap. 0
# and anything else will force mmap off.
mmap = true

##
## OSS backend stuff
##
[oss]

## device:
# Sets the device name for OSS output.
device = /dev/dsp

## capture:
# Sets the device name for OSS capture.
capture = /dev/dsp

##
## PulseAudio backend stuff
##
[pulse]

## spawn-server:
# Attempts to spawn a PulseAudio server when requesting to open a PulseAudio
# device. Not...

Read more...

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #2)
> Amazingly this bug doesn't seem to have been filed before (support request for
> multi-channel audio) so correcting the details to make more sense. This isn't
> likely to be done for a while thought due to a) drivers not being that great,
> b) EAX missing entirely from drivers and other reasons which I'm sure the devs
> can give you.

http://connect.creativelabs.com/openal/OpenAL%20Wiki/Resources.aspx

There is Accelerated ALSA Library for Linux for emu10k1

and

Configuring Surround sound in Linux if you are using openal

Revision history for this message
In , Adam Bolte (boltronics) wrote :

> you need to setup the parameters in .alsoftrc for those openal games if you are
> using openal-soft in linux
I certainly did that, and I've tried various configurations. I must have got it correct if it works in UT3. Surround also works in native games like Doom 3, Quake 4, and Prey. I even get rear speaker channel audio in the oldies Majesty and Return to Castle Wolfenstein.

As an additional test to the games above, I just tried Wolfenstein under WINE. No surround there either, unfortunately (even though it's another OpenAL game).

As for the hardware-accelerated emu10k1 driver:
http://frictionalgames.com/forum/thread-3490.html

Both Urkle (from the forum thread) and yourself are probably both referring to the project here (last updated 2004!):
http://www.lost.org.uk/openal.html

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

That accelerated alsa driver for emu10k1 only provide stereo control of those hardware mixing volume controls provided by snd-emu10k1 similar to

http://git.alsa-project.org/?p=alsa-tools.git;a=blob;f=hwmixvolume/hwmixvolume

It actually playback different openal mono source through different subdevices instead of mixing those mono sources by openal

That implementation is the basis if winealsa want to provide dsound hardware secondary buffers for ds3d

you will need to enhance the openal-alsa-emu10k1 to control the rear speakers since the volume of the rear speakers is controlled by another sets of "EMU10K1 PCM Volume" , "EMU10K1 PCM Send Route" and "EMU10K1 Send Volume" of the rear device

Revision history for this message
In , Iuga Marian Silviu (iugamarian) wrote :

A lot of people still have a Realtek ALC650 sound card so please support multichannel for it too (for example I have a VIA KT333 chipset including it).

Thank you for your growing interest.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #34)
> A lot of people still have a Realtek ALC650 sound card so please support
> multichannel for it too (for example I have a VIA KT333 chipset including it).
>
> Thank you for your growing interest.

it the application does not provide 6 channels (e.g. openal only pan the front/rear speaker to provide 3D effect and don't have any signal on Subwoofer

if you want to watch movie 5.1 or DTS , why don't you use those linux media application (e.g. mplayer or vlc )

Revision history for this message
In , Iuga Marian Silviu (iugamarian) wrote :

Applications that have support 5.1 channel support, work only with Wine and I also need because they work better than GNU/Linux applications for a specific task:

-WinampAC3Filter plugin for Winamp (Winamp is the only application that has a decent playlist with perfectly optimized controls imho - I mean I can set the imput plugins to display something like "Artist - Album - string of my choosing.filetype - another string of my choosing")

-older games that rely much on multichannel to inform the player of the position of things all around like: Counter Strike, Star Trek Armada II, Homeworld 1 2, Giants - Citizen Kabuto, Command and Conquer 1 2 3

-take utorrent for example - the programmers use the Wine platform to make sure it will work very well in Windows. Programmers may (imho they already) use Wine to check games for Windows and even compiling them using Wine libraries to make them go faster and smoother and would be very happy to not have to load Windows instead of Wine just to test if multichannel sounds work properly

-I am sure I will have more and more needs to use multichannel in Wine as time passes (for example 3D max Studio or Adobe * - make movies in multichannel and view them without rendering just to check sounds)

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #36)
>
> -older games that rely much on multichannel to inform the player of the
> position of things all around like: Counter Strike, Star Trek Armada II,
> Homeworld 1 2, Giants - Citizen Kabuto, Command and Conquer 1 2 3

Those 3D game work best work with headphone when your sound card support Head Related Transfer Function , Interaural time-delay and interaural level difference

The sound signal arrive at slightly different time/level at your left and right ear when your are wearing a headphone since your left and right ears can determine the location of the sound source from the delay and level difference

if your are using 4 speakers , it will depend on whether the speakers are placed at the desired position (same distance ) and angle ( cross-talk between the speakers ) for your ear to get the same delay/level as same as in the game environment ,

Those 3D game usually use surround40 instead of surround51 unless your sound card (e.g. SB Live! emu10k1) has a treble/base control to boost the bass and specical control reverb , echo using FX chip

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #0)
> Winamp with Winamp AC3 Filter 1.01a performs better than Amarok 1.4.
> Also the very old game Starcraft has support for surround.
> Therefore please give more importance to the following:
>
> Allow DirectSound acces to Alsa, for the rear left, rear right, center and
> woofer speakers.
>
> Yes, Linux does support surround. Use "alsamixer" to deactivate the mute
> on the other speakers. Use Amarok, Totem, or their base Xine, to test surround.
> You have to go to settings, select Xine Engine and select 5.1 surround (in Xine
> you should select first "Master of the known universe" :) )
>
> I am attaching an example of a file that the Xine engine cannot play,
> but Winamp with Winamp AC3 Filter 1.01a with integrated dts support can.

did you delete the example ?

winealsa does support 6channels unoffically

http://cvs.winehq.org/patch.py?id=13407

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

To enhance the multi channels support of winealsa

you also need to enhance the mixer.c to add those "Front", "surround" , "center" , "lfe" and "side" playback volume controls

Take a look at the output

WINETEST_INTERACTIVE=1 wine winmm_test mixer

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #25)
> Created an attachment (id=32743) [details]
> Output of alsa-info.txt on my ALC889.
>
> Includes "arecord -l" output under the "ARECORD" section.

DAC5 is node 0x25

 /* FIXME: setup DAC5 */
 spec->alt_dac_nid = 0x25;
 spec->stream_analog_alt_playback = &alc880_pcm_analog_alt_playback;

you just need to add init_verb to connect 0x1b to 0x26 and create "Headphone Playback volume" at node 0x26

may be an "Independent HP switch" which allow you to switch the connection 0x1b from 0xc to 0x26

Node 0x1b [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals: [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x02214c20: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Green
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x25 [Audio Output] wcaps 0x11: Stereo
  Converter: stream=0, channel=0
  PCM:
    rates [0x5e0]: 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Node 0x26 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals: [0x00 0x00] [0x00 0x00]
  Amp-Out caps: ofs=0x3e, nsteps=0x40, stepsize=0x03, mute=0
  Amp-Out vals: [0x3e 0x3e]
  Connection: 2
     0x25 0x0b

Changed in wine (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
In , Pmidden (pmidden) wrote :

I don't know if this the right thread for this, but I think I fixed a bug in the multi-channel code:

The problem was: sound in PES 2010 only partially works: effects work, music and commentator doesn't.

Debugging the problem, I noticed that the "cp_fields" function in dlls/dsound/mixer.c is called with device->pwfx->nChannels == 8 and dsb->pwfx->nChannels == 2. Since the case 6 vs. 2 channels was already in there, I added 8 vs. 2 channels and it worked perfectly. Here's the small patch:

diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 846278e..5ed8d90 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -295,6 +295,7 @@ static inline void cp_fields(const IDirectSoundBufferImpl *dsb, const BYTE *ibuf

     if (device->pwfx->nChannels == dsb->pwfx->nChannels ||
         (device->pwfx->nChannels == 2 && dsb->pwfx->nChannels == 6) ||
+ (device->pwfx->nChannels == 8 && dsb->pwfx->nChannels == 2) ||
         (device->pwfx->nChannels == 6 && dsb->pwfx->nChannels == 2)) {
         dsb->convert(ibuf, obuf, istride, ostride, count, freqAcc, adj);
         if (device->pwfx->nChannels == 2 || dsb->pwfx->nChannels == 2)

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #41)
> I don't know if this the right thread for this, but I think I fixed a bug in
> the multi-channel code:
>
> The problem was: sound in PES 2010 only partially works: effects work, music
> and commentator doesn't.
>
> Debugging the problem, I noticed that the "cp_fields" function in
> dlls/dsound/mixer.c is called with device->pwfx->nChannels == 8 and
> dsb->pwfx->nChannels == 2. Since the case 6 vs. 2 channels was already in
> there, I added 8 vs. 2 channels and it worked perfectly. Here's the small
> patch:

Patches should be sent to <email address hidden>. See http://wiki.winehq.org/SubmittingPatches

Revision history for this message
In , Austin English (austinenglish) wrote :

(In reply to comment #41)
> I don't know if this the right thread for this, but I think I fixed a bug in
> the multi-channel code:
>
> The problem was: sound in PES 2010 only partially works: effects work, music
> and commentator doesn't.
>
> Debugging the problem, I noticed that the "cp_fields" function in
> dlls/dsound/mixer.c is called with device->pwfx->nChannels == 8 and
> dsb->pwfx->nChannels == 2. Since the case 6 vs. 2 channels was already in
> there, I added 8 vs. 2 channels and it worked perfectly. Here's the small
> patch:
>
> diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
> index 846278e..5ed8d90 100644
> --- a/dlls/dsound/mixer.c
> +++ b/dlls/dsound/mixer.c
> @@ -295,6 +295,7 @@ static inline void cp_fields(const IDirectSoundBufferImpl
> *dsb, const BYTE *ibuf
>
> if (device->pwfx->nChannels == dsb->pwfx->nChannels ||
> (device->pwfx->nChannels == 2 && dsb->pwfx->nChannels == 6) ||
> + (device->pwfx->nChannels == 8 && dsb->pwfx->nChannels == 2) ||
> (device->pwfx->nChannels == 6 && dsb->pwfx->nChannels == 2)) {
> dsb->convert(ibuf, obuf, istride, ostride, count, freqAcc, adj);
> if (device->pwfx->nChannels == 2 || dsb->pwfx->nChannels == 2)

Committed: http://source.winehq.org/git/wine.git/commit/f5721560f5530513feeed681b8303749a7bbab98

thanks!

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to comment #43)
> (In reply to comment #41)
 > patch:
> >
> > diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
> > index 846278e..5ed8d90 100644
> > --- a/dlls/dsound/mixer.c
> > +++ b/dlls/dsound/mixer.c
> > @@ -295,6 +295,7 @@ static inline void cp_fields(const IDirectSoundBufferImpl
> > *dsb, const BYTE *ibuf
> >
> > if (device->pwfx->nChannels == dsb->pwfx->nChannels ||
> > (device->pwfx->nChannels == 2 && dsb->pwfx->nChannels == 6) ||
> > + (device->pwfx->nChannels == 8 && dsb->pwfx->nChannels == 2) ||
> > (device->pwfx->nChannels == 6 && dsb->pwfx->nChannels == 2)) {
> > dsb->convert(ibuf, obuf, istride, ostride, count, freqAcc, adj);
> > if (device->pwfx->nChannels == 2 || dsb->pwfx->nChannels == 2)
>
> Committed:
> http://source.winehq.org/git/wine.git/commit/f5721560f5530513feeed681b8303749a7bbab98
>
> thanks!

Is wine implement dsound.vxd or dsound WDM ?

since dsound.vxd does not support 8 channels or float

dsound WDM , KMixer is responsible for resampling

Revision history for this message
In , Austin English (austinenglish) wrote :

*** Bug 29247 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Iuga Marian Silviu (iugamarian) wrote :

> > I am attaching an example of a file that the Xine engine cannot play,
> > but Winamp with Winamp AC3 Filter 1.01a with integrated dts support can.
>
> did you delete the example ?
>
> winealsa does support 6channels unoffically
>
> http://cvs.winehq.org/patch.py?id=13407

I did not delete the example. The file has 5 MB and was not attached when I sent the message. Now I will use a public Ubuntu One link for the example:

http://ubuntuone.com/3O64HW4V1L9LxpFbRwNkqH

The example has sounds of lighting a match on each 5.1 speaker, and a seventh match heard on all speakers.
I succesfully played this in Debian Gnu/Linux on 5.1 speakers only with Amarok with libxine1-ffmpeg installed and in Windows with Winamp having Winamp AC3 Filter plugin.

I thank you for your good work.

affects: wine (Ubuntu) → wine1.4 (Ubuntu)
Changed in wine1.4 (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
In , Cheako+winehq (cheako+winehq) wrote :

This file is not what it appears to be. It's a recording of DTS pass-through over stereo PCM... This stereo wav file contains a bunch of noise that's interpreted as DTS codec audio by a receiver and perhaps sound cards.

This is obvious by opening the file in audacity or other editor. The sound of the match is loud and then fades to quiet, but audacity shows that the audio level for this file is constant(indicating it's not PCM data at all).

There are test files here, I'm just looking at them, now.
http://www.microsoft.com/windows/windowsmedia/howto/articles/Multichannel.aspx

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

ALSA multi-channel support is implemented as of Wine 1.5.11 (d402231e3f148a30ceca15c1223a765f5a388379). The OSS and CoreAudio drivers both "support" multi-channel, but don't try to map the channels correctly.

DSound nearly works, but needs some cleanup with regard to mixing streams with different numbers of channels (5.1->2, or 2->5.1, etc.). Fixing dsound is "on my list," and I think we'll close this bug when dsound's channel handling is fixed.

Please continue to post here for now if you have trouble related to multi-channel audio support. We may split off new bugs for the OSS and CA drivers if they're found to be inadequate.

Revision history for this message
In , Win4hq (win4hq) wrote :

Nice, Andrew! Is there any documentation on how it can be used in the current wine release, or what works and what doesn't? My initial tests with a game didn't yield surround sound, but I guess that might be due to a lack of DirectSound support.

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

There shouldn't be any need to set up Wine to use multi-channel audio. Except in the case of dsound, if an application supports it and your ALSA configuration is set up correctly, it should just work. I had the best results when using PulseAudio, as PA deals with most of the ALSA configuration for you.

After dsound is repaired, I'll do a more thorough investigation of the different setups and try to find what works best. For example, many ALSA configurations define devices like "surround51" or "surround40", which might work better, but would have to be added manually with the ALSAOutputDevices registry key (see <http://wiki.winehq.org/Sound>).

Revision history for this message
In , Win4hq (win4hq) wrote :

Let me know if you want someone to help with testing. I have a surround51 device working in linux applications on an ALSA-only system. (After screwing things up so many times, Pulse is no longer welcome on my computer.) The card is an Audigy2 so I have hardware mixing, which I'm told is unusual for sound cards these days. I also happen to have a wine build environment with a recent git checkout.

FYI, I haven't witnessed working surround sound from wine yet, but then again I've only tried one game. I'm not sure what Windows applications would be likely to work.

Revision history for this message
In , Cheako+winehq (cheako+winehq) wrote :

I'm confused help me out, OSS and CoreAudio can do SS?

AFAICT CoreAudio is only available under OSx, is this the same CoreAudio?

However is seams that ALSA is also supported and can even work with PA(pulseaudio).

I've a strange setup, I've likely described it above. I'm using Spdif to a receiver for all my audio and dmix does not work in this configuration. However PA can make use of the a52 ALSA module to achieve AC3/DTS passthrough. The only drawback is that DVDs and Blu-Ray are unencoded and reencoded, but I havn't noticed an issue on this 6 core box.

Thus I'd like to use PA and currently I've got two options for PA. The winePA driver and the ALSA PA driver.

A test application would be grand!

Revision history for this message
In , Wln2qp5ozl9-nick (wln2qp5ozl9-nick) wrote :

My Microsoft® LifeCam VX-2000 worked fine and perfectly in wine 1.4 versions but in the wine 1.5 versions it does get detected like in the 1.4 but the sound comes out garbled when I test the voice in WoW.

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

<email address hidden>, please open a new bug and attach a log there with the debug channels mentioned at <http://wiki.winehq.org/Sound>.

Revision history for this message
In , Russian redneck (otaku-8) wrote :

Most of apps (incl. winecfg) produce grunting sound when there's more than 2 channels. But even so Stalker CS (using OpenAL probably) produces clear sound on 5.1 profile. Also Zandronum sounds clear (but with bug #34887) when it uses dsound, but without dsound it grunts too.

Revision history for this message
In , Russian redneck (otaku-8) wrote :

p.s. Xubuntu 13.10, Wine 1.7.6, Audigy

Revision history for this message
In , Dimesio (dimesio) wrote :

*** Bug 34887 has been marked as a duplicate of this bug. ***

Revision history for this message
Forest (foresto) wrote :

Looks like work in this is starting to take shape:
https://www.winehq.org/announce/1.7.34

"Support for surround sound in DirectSound."

I haven't been able to verify that it actually works yet, but it is encouraging.

Revision history for this message
In , Austin English (austinenglish) wrote :

This should be fixed in 1.7.34:
https://www.winehq.org/announce/1.7.34

please retest.

Revision history for this message
In , Iuga Marian Silviu (iugamarian) wrote :

Thank you very much for fixing this bug.

Revision history for this message
In , Iuga Marian Silviu (iugamarian) wrote :

Resolved. Fixed.

Revision history for this message
In , Alexandre Julliard (julliard) wrote :

Closing bugs fixed in 1.7.37.

Revision history for this message
In , Andrew Eikum (aeikum) wrote :

Thanks to Mark Harmstone for doing the dsound work. Obviously many commits went into this work, so I'm adding a Fixed By SHA1 that points to where the work was largely finished.

Changed in wine:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.