Sound Problems with Wine/in general

Hi

A few days ago I decided to remove the dust of some older games and try to play them in wine. My system is an Alu Macbook 13.3" late 2008 with FreeBSD 8.2 Release.

First problem was the sound in general (not only wine). The System has an ALC885 Audio Chipset inside. Of course I read the handbook and searched the web but couldn't get the sound running at all. I loaded the modules sound and snd_hda via loader.conf. Because of this chipset which is known to be differently wired by the manufacturers there has to be something added to /boot/device.hints. Here was/is the problem: How to know what Options are the right ones? (I read the man pages for snd_hda) Do I really have to try all the combinations and always restart after each one? I searched the web but all I found were different advices for Macbook Pro which did not really work. Finally with the following options the headphone connector works but the Speaker does not:
Code:
hint.hdac.0.config="gpio0"
hint.hdac.0.cad0.nid21.config="as=4 seq=15"
So any idea how to figure out the correct options for the speaker other than the method of trial and error? At least I have sound so I can live with headphone connector if nobody has a better solution.

So here is the second problem regarding sound in this case connected to wine. As I wrote above I wanted to play some games and here sound almost doesn't work at all. First one is Diablo II LoD. I have sound in the intro videos but then nothing ingame. Searched the web but did not find anything but the statement on winehq.org that the sound except intro does not work so maybe no solution here possible. The second game I tried was Commandos II and here I have sound in the main menu and afterwards nothing. If I disable music in the menu there is sound at the beginning ingame (some kind of ingame sequence) then again silence. Next step was save and end game then start again with load (so skipping sequence) which brought the ingame sound at least for about 30sec. But this is not a long term solution (always saving and restarting the whole game after sound output). So to summarize it seems that every time there is new sound output (music from the menu, ingame sequence, normal ingame sound) there is no sound furthermore (only restart helps). So any tips here? I did not find anything working. (I already checked that there is no sound and not only muted via mixer in console.) Sound setting was built-in oss and emulation checked in winecfg audio. (Full hardware acceleration did not make any sound at all.)

So as a last attempt I tried to use the ossv4 from ports (audio/oss) which did not work at all. First I unloaded sound and snd_hda and installed audio/oss with a following restart. With this configuration I don't have any sound in FreeBSD. ossdetect finds my hardware but ossmix has much output:
Code:
Selected mixer 0/High Definition Audio ALC885
Known controls are:
jack.green.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.green [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.green.mute ON|OFF (currently OFF)
jack.blue.mode <front|rear|center/LFE|side|pcm4|input> (currently input)
jack.blue [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.blue.mute ON|OFF (currently OFF)
jack.int-speaker.mode1 <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.int-speaker1 [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.int-speaker.mute1 ON|OFF (currently OFF)
jack.int-mic.mode <front|rear|center/LFE|side|pcm4|input> (currently front)
jack.int-mic [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.int-mic.mute ON|OFF (currently OFF)
jack.int-speaker.mode2 <front|rear|center/LFE|side|pcm4|input> (currently rear)
jack.int-speaker2 [<leftvol>:<rightvol>] (currently 29.9:29.9 dB)
jack.int-speaker.mute2 ON|OFF (currently OFF)
record.mix.mute.int-speaker1 ON|OFF (currently OFF)
record.mix.mute.int-mic1 ON|OFF (currently OFF)
record.mix.mute.int-speaker2 ON|OFF (currently OFF)
record.mix.mute.headphone1 ON|OFF (currently OFF)
record.mix.mute.linein1 ON|OFF (currently OFF)
record.mix.mute.input-mix1 ON|OFF (currently OFF)
record.mix1 [<leftvol>:<rightvol>] (currently 37.9:37.9 dB)
record.mix.mute.int-speaker3 ON|OFF (currently OFF)
record.mix.mute.int-mic2 ON|OFF (currently OFF)
record.mix.mute.int-speaker4 ON|OFF (currently OFF)
record.mix.mute.headphone2 ON|OFF (currently OFF)
record.mix.mute.linein2 ON|OFF (currently OFF)
record.mix.mute.input-mix2 ON|OFF (currently OFF)
record.mix2 [<leftvol>:<rightvol>] (currently 37.9:37.9 dB)
record.mix.mute.int-speaker5 ON|OFF (currently OFF)
record.mix.mute.int-mic3 ON|OFF (currently OFF)
record.mix.mute.int-speaker6 ON|OFF (currently OFF)
record.mix.mute.headphone3 ON|OFF (currently OFF)
record.mix.mute.linein3 ON|OFF (currently OFF)
record.mix.mute.input-mix3 ON|OFF (currently OFF)
record.mix3 [<leftvol>:<rightvol>] (currently 37.9:37.9 dB)
misc.int-speaker1 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.int-mic [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.int-speaker2 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.headphone [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.linein [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.input-mix <int-mic|linein> (currently int-mic)
misc.front-mute ON|OFF (currently OFF)
misc.input-mix-mute1 ON|OFF (currently OFF)
misc.front1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.front2 <front|input-mix> (currently front)
misc.rear-mute ON|OFF (currently OFF)
misc.input-mix-mute2 ON|OFF (currently OFF)
misc.rear1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.rear2 <rear|input-mix> (currently rear)
misc.center/lfe-mute ON|OFF (currently OFF)
misc.input-mix-mute3 ON|OFF (currently OFF)
misc.center/lfe1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.center/lfe2 <center/LFE|input-mix> (currently center/LFE)
misc.side-mute ON|OFF (currently OFF)
misc.input-mix-mute4 ON|OFF (currently OFF)
misc.side1 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.side2 <side|input-mix> (currently side)
misc.pcm4-mute ON|OFF (currently OFF)
misc.input-mix-mute5 ON|OFF (currently OFF)
misc.pcm41 [<leftvol>:<rightvol>] (currently 51.9:51.9 dB)
misc.pcm42 <pcm4|input-mix> (currently pcm4)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 24.7 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB) ("knotify4")
vmix0.pcm11 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm12 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm13 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
Any suggestions here how to get the sound working?
 
Have you figured out a solution to get speaker sound working yet?, im dealing with the exact same issue on the exact same computer, although it seems you were running fbsd on it for a while whereas i just switched to it from slackware ( last computer of mine to migrate to fbsd ). i came upon the same quirks as you and playing with device.hints quite a bit but no luck so far, so it would be a relief if you found a solution. Just out of curiousity ( you may have done more research than me ) what exactly is nid21, dmesg spits "pcm0: <HDA Realtek ALC885 PCM #0 [Digital,Analog]> at cad 0 nid 1 on hdac0" im about to try nid1 but no idea if that will help. I remeber about 2 years ago the sound wouldnt work on linux either, untill i switched alsa channels from 2 to 4 , but i have no idea what that did or how to do this here ( i really have 0 idea about sound ). Hopefully we will find a solution soon, its terribly annoying to use headphones all the time.


On the topic of the macbook itself i have a few questions: im curious are you able to control your display backlight? if so how? and asmc doesnt support our chipset right?, i dont care but wouldnt mind have keyboard backlight aswell ... finally what keymap are you using? nothing seems to recognize my fn key
 
well as expected nid1 had no positive result.

i noticed i few things tho:
dmesg outs:
Code:
hdac0: hdac_audio_as_parse: Pin 24 has wrong direction for association 4! Disabling association.
hdac0: hdac_audio_as_parse: Pin 26 has wrong direction for association 4! Disabling association.


and

Code:
mixer out:
unknown device: speaker
 
i was playing with dev.pcm.0.play.vchanformat but no luck :(
btw your sound with wine isent working? =S for me it is, my buddy had wow on his external harddisk and turns out i was still paying for it over a year :\ i know right ssh ... so i decided to try it out and everything works, in winecfg under sound try emulation and i think i have both oss and alsa ticked off , didnt really play with anything; just defaults, but it works right.
 
Sorry for the late reply, I was a little bit busy. I didn't get the speakers working until now (btw just switched to FreeBSD, too). My problems in wine are solved now, downgrading to an older version (1.3.23 at least before the rewrite of audio support in 1.3.25) did the trick.
So speakers not working yet, uninstalled ossv4 from ports because it was not working overall (wrong mixer adjustments I think).
Regarding the display brightness and fn-key I don't have a solution, too. But I can live with that because I don't need these features really (only the eject key working would be very nice). If I'm not totally mistaken this model does not have keyboard backlight (at least mine does not have).
So all in all I'm sorry but I can't help you. Finally the sound in wine works now, the last thing that really worries me is the speaker in general. (side note: you mentioned alsa in winecfg - this shouldn't be there I think, alsa is linux stuff. Mine only shows oss which is correct I think. Are you sure you have alsa there?)
 
hrm so your speakers arent working yet either?... saying "I didn't get the speakers working until now" left me a bit confused. And yeah i realized now you said macbook whereas i have a macbook pro ( the audio chips are the same so it doesnt matter really ), but yeah thats probably why i have a keyboard backlight. the freebsd macbook wiki fails to mention anything bout sound so i wonder if this is due to the multichannel support added to snd_hda. =S still loooking into it ... if i figure something out ill tell you.

btw yeah my wine mentions alsa =S i think it should tho, since its hardcoded in right, and the freebsd version doesnt use different code does it?
http://postimage.org/image/setqc2v8/
 
Maybe my expression was a bit misleading (not a native speaker) but I couldn't get the speakers working. I don't know why, but my wine doesn't show me alsa but nevermind why yours does, it shouldn't I guess. Have you tried
Code:
hint.hdac.0.config="gpio0 ovref"
hint.hdac.0.cad0.nid21.config="as=4 seq=15"
in /boot/device.hints? (with ovref added compared to my first post) It did not work for me but I thought that these models maybe have a different wiring because I often found websites claiming that sound works (even speakers) but always for MacBook Pro. See http://www.lamaiziere.net/mbp_freebsd.html for example.
 
Hello!

I discovered sound problem with wine (oss, FreeBSD 8.2-RELEASE) starting wine 1.3.25 (there was complete sound system redesign in wine in this version).
If anybody has the same trouble as me, post reply in bug filed in wine bugzilla, please.
 
sharsch; i have sound working now, have a deep look at the hdac out ( verbose booting ).
If you see anything disabled ( even if its not speaker, change the 'as' from 15||0 to 1-14 , and during this make sure for a given 'as' there is no repetition in the 'seq'.

I added this to my device.hints, gl how you get it running aswell

Code:
hint.hdac.0.config="gpio0 ovref"
hint.hdac.0.cad0.nid20.config="as=1 seq=15"
hint.hdac.0.cad0.nid21.config="as=2 seq=15"
hint.hdac.0.cad0.nid22.config="as=1 seq=2"
hint.hdac.0.cad0.nid23.config="as=1 seq=3"
hint.hdac.0.cad0.nid24.config="as=1 seq=1"
hint.hdac.0.cad0.nid25.config="as=4"
hint.hdac.0.cad0.nid26.config="as=1 seq=0"
hint.hdac.0.cad0.nid27.config="as=1 seq=4"
hint.hdac.0.cad0.nid28.config="as=1 seq=5"

hint.pcm.0.at="isa"
hint.pcm.0.irq="5"
hint.pcm.0.drq="1"
hint.pcm.0.flags="0x0"
 
Back
Top