InfiniteMac OSx86  


Reply
 
Thread tools Display modes
  #1  
Old 08-23-2009, 09:46 PM
Snow's Avatar
Snow Snow is offline
Tiger
 
Join Date: Jan 2008
Posts: 263
[GUIDE] ALC889a (with analog 5.1 surround)

Hi guys,

Just wondering if anyone has 5.1 sound working in Snow (or Leo for that matter)
Not digital out but normal surround via the 3 analog ports.
If so could you share the method please (DSDT, kext)

Thx in advance

UPDATE: Solved thx to all for your input, especially Mormegil, thx a lot bro for the guidance and files!

- Update on Sep 14 2009: I'm providing my modded AppleHDA kext for comparison or it might even work for some people without re-modding to their own hardware.

http://www.mediafire.com/?f0mmm25zrja

- Update on Sept 8 2009: Mormegil has created a guide to mod your Leopard AppleHDA kext to Snow Leopard: http://www.infinitemac.com/f57/guide...a-to-sl-t3981/

- Update on Sept 4 2009: Alright, since a lot of fello ALC889a users have issues I thought it would be only fair to post my steps to get audio fully working. This is based on my rig of course.



START


First grab these files which are:

iaslme to unpack your dsdt.aml file: http://www.mediafire.com/?jnjrdtmfm3k
kextutility in case you haven't got it yet: http://www.mediafire.com/?njgtzhzwm0j

For comparison:

my dsdt.aml without the audio mod: http://www.mediafire.com/?xm2yn2xguyo
my dsdt.aml with the audio mod: http://www.mediafire.com/?zzgmmgmhdbo

Credit goes to Mormegil for patience and support, respect bro!


PART I: Patching DSDT



- Slide your dsdt.aml file over the iaslme icon to decompile it to a dsdt.dsl file.
- Open the dsl file with texteditor
- Apple + F to open the search tab and fill in AZAL
- Change AZAL into HDEF

In my case:

From

Code:
Notify (\_SB.PCI0.AZAL, 0x02)
To

Code:
Notify (\_SB.PCI0.HDEF, 0x02)
- Search again for AZAL and this time the item “Device” should show up (at least in my case)

Change this:

Code:
Device (AZAL)
            {
                Name (_ADR, 0x001B0000)
                Method (_PRW, 0, NotSerialized)
                {
                    Return (Package (0x02)
                    {
                        0x0D, 
                        0x05
                    })
                }
            }

            Name (BUFA, ResourceTemplate ()
            {
                IRQ (Level, ActiveLow, Shared, )
                    {3,4,5,6,7,9,10,11,12,14,15}
            })
            Name (BUFB, ResourceTemplate ()
            {
                IRQ (Level, ActiveLow, Shared, )
                    {}
            })
            CreateWordField (BUFB, One, IRQV)
            Device (LNKA)
            {
                Name (_HID, EisaId ("PNP0C0F"))
                Name (_UID, One)
                Method (_STA, 0, NotSerialized)
                {
                    And (PIRA, 0x80, Local0)
                    If (LEqual (Local0, 0x80))
                    {
                        Return (0x09)
                    }
                    Else
                    {
                        Return (0x0B)
                    }
                }

                Method (_PRS, 0, NotSerialized)
                {
                    Return (BUFA)
                }

                Method (_DIS, 0, NotSerialized)
                {
                    Or (PIRA, 0x80, PIRA)
                }

                Method (_CRS, 0, NotSerialized)
                {
                    And (PIRA, 0x0F, Local0)
                    ShiftLeft (One, Local0, IRQV)
                    Return (BUFB)
                }

                Method (_SRS, 1, NotSerialized)
                {
                    CreateWordField (Arg0, One, IRQ1)
                    FindSetRightBit (IRQ1, Local0)
                    Decrement (Local0)
                    Store (Local0, PIRA)
                }
            }
Into this:

Code:
Device (HDEF)
            {
                Name (_ADR, 0x001B0000)
                Method (_DSM, 4, NotSerialized)
                {
                    Store (Package (0x04)
                        {
                            "layout-id", 
                            Buffer (0x04)
                            {
                                0x0C, 0x00, 0x00, 0x00
                            }, 

                            "PinConfigurations", 
                            Buffer (Zero) {}
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }
            }

            Name (BUFA, ResourceTemplate ()
            {
                IRQ (Level, ActiveLow, Shared, )
                    {3,4,5,6,7,9,10,11,12,14,15}
            })
            Name (BUFB, ResourceTemplate ()
            {
                IRQ (Level, ActiveLow, Shared, )
                    {}
            })
            CreateWordField (BUFB, One, IRQV)
            Device (LNKA)
            {
                Name (_HID, EisaId ("PNP0C0F"))
                Name (_UID, One)
                Method (_STA, 0, NotSerialized)
                {
                    And (PIRA, 0x80, Local0)
                    If (LEqual (Local0, 0x80))
                    {
                        Return (0x09)
                    }
                    Else
                    {
                        Return (0x0B)
                    }
                }

                Method (_PRS, 0, NotSerialized)
                {
                    Return (BUFA)
                }

                Method (_DIS, 0, NotSerialized)
                {
                    Or (PIRA, 0x80, PIRA)
                }

                Method (_CRS, 0, NotSerialized)
                {
                    And (PIRA, 0x0F, Local0)
                    ShiftLeft (One, Local0, IRQV)
                    Return (BUFB)
                }

                Method (_SRS, 1, NotSerialized)
                {
                    CreateWordField (Arg0, One, IRQ1)
                    FindSetRightBit (IRQ1, Local0)
                    Decrement (Local0)
                    Store (Local0, PIRA)
                }
            }

PART II: Patching AppleHDA



- Copy your AppleHDA.kext from System/Library/Extensions to your desktop
- Right click the kext and select ShowPackage, then browse to Content/Contents/Plugins
- Right click AppleHDAHardwareConfigDriver.kext and again Show Package Contents
- Browse to Contents and replace info.plist with this one (just slide it in and confirm replace)

http://www.mediafire.com/?rttltqjqxn4

Go back to the Plugins folder and this time Show Package Content of AppleHDAPlatformDriver.kext
Browse to Contents and replace info.plist with this one

http://www.mediafire.com/?zhnmdm0izzy

- Close all windows and then slide the modded AppleHDA.kext on the Kextutility icon.
- Reboot and repair permissions again with Kextulility, Terminal or Disk Utility just to make sure.
- If SL starts to behave badly and post a kernel panic you might want to boot into 32bit safe mode (-x -x32) and then run kextutility

Audio should be working now


PART III: Configuring 5.1



- Spotlight "AUDIO/MIDI-configuration" prefs
- Click + left bottom
- Double click name and rename it to ALC889a
- In the right panel select the 3 built-in line streams
- To adjust or correct volume expand ALC889a and use the sliders in the right tab for all 3 line-outs:



In my case they were minus 12db if I remember correctly.

- Click speaker configuration bottom right
- Select Multichannel tab and next to it select 5.1 surround from the menu
- Check All streams at top and then start configuring the streams (in my case I had to switch 5 & 6 to left and right rear and 3 & 4 to center and sub respectively)
- Confirm with bottom buttons and go check a 5.1 movie in quicktimeX
- You might want to install Perian (http://perian.org/) and set Audio Output to: Mutli-Channel Output

I think that's about it, everything should be working, if not, it's probably because you have a completely different system then mine or your dsdt isn't properly patched or you just messed up on the way.

Good luck!


THE END

Snow Leopard 10.6.7  Gigabyte GA-P35-DS3P  Intel Q6600 @ 3Ghz  Corsair CM2X2048-6400DHX  Gigabyte HD5770 Silent Cell  Samsung SyncMaster 2494SW  ALC889a  Creative T5400 5.1  Maxtor 380215AS  Pioneer DVR-215D  Presonus Inspire 1394  KRK Rokit 5  Wacom Bamboo One 
 SL USB Guide => http://www.infinitemac.com/f57/guide...k-drive-t3705/ 

Last edited by Snow; 09-14-2009 at 08:05 AM.
Reply With Quote
  #2  
Old 08-24-2009, 12:11 AM
vista00's Avatar
vista00 vista00 is offline
Puma
 
Join Date: Jul 2009
Posts: 18
Hi Snow
Here an interested guide to modify your dsdt and add audio. Take a look:
http://www.mediafire.com/?sharekey=d...5965eaa7bc68bc

System: Asus M50sv Notebook
OS: Mac OS X SL10.6.4/Vanilla Kernel
Mac OS X Server10.6.4/Vanilla Kernel
Windows 7 x64
CPU::Intel Core 2 Duo T9300 @ 2.50 GHz
Memory: 3 GB DDR2 SDRAM @ 800 MHz
Graphics Chip: Nvidia Geforce 9500M GS 512mb
Audio Chip: Realtek ALC888ST
Reply With Quote
  #3  
Old 08-24-2009, 01:14 AM
DocShadow's Avatar
DocShadow DocShadow is offline
Panther
 
Join Date: May 2009
Location: Ottawa, ON, Canada
Posts: 106
Hmmmm ... very detailed.

I tried the HDEF patch in the dsdt but had no luck. I think I'll try this one out and see if I have more luck.

Thanks for the heads up.

Gigabyte EX58-UD5 - i7 920 @ 3.2 GHx - eVGA 8800GT
Asus P5Q Deluxe - E8400 @ 3.6 GHz - Asus 7900GT
iMac 2.2 GHz - 4 MB
Reply With Quote
  #4  
Old 08-24-2009, 06:54 AM
Snow's Avatar
Snow Snow is offline
Tiger
 
Join Date: Jan 2008
Posts: 263
Thx for the guide m8 but all I really want to know is if 5.1 is possible with ALC889a via analog.
I wont enable the onboard unless it's possible.
If not, I will wait for KX driver to go 64bit and use my Presonus 1394 for now (stereo)

Snow Leopard 10.6.7  Gigabyte GA-P35-DS3P  Intel Q6600 @ 3Ghz  Corsair CM2X2048-6400DHX  Gigabyte HD5770 Silent Cell  Samsung SyncMaster 2494SW  ALC889a  Creative T5400 5.1  Maxtor 380215AS  Pioneer DVR-215D  Presonus Inspire 1394  KRK Rokit 5  Wacom Bamboo One 
 SL USB Guide => http://www.infinitemac.com/f57/guide...k-drive-t3705/ 
Reply With Quote
  #5  
Old 08-25-2009, 07:34 PM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
I don't think real macs support analog 5.1 audio. So I think the only way to go is digital.

Got my onboard ALC888 running using this guide: http://www.projectosx.com/forum/inde...t=0&#entry1993

Front analog, Digital out, Mic and Line In working so far. I've a Z5500 system so it's all good. Been watching HD movies with AC3/DTS no problem.

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard
Reply With Quote
  #6  
Old 08-25-2009, 08:05 PM
Snow's Avatar
Snow Snow is offline
Tiger
 
Join Date: Jan 2008
Posts: 263
Argh ok, bad news then. KX drivers for my Audigy 2 ZS support 5.1 and with superior quality compared to ALC889a. I think it'll take a long time though for 64bit support, hence I'm hunting for ALC889a 5.1.

Snow Leopard 10.6.7  Gigabyte GA-P35-DS3P  Intel Q6600 @ 3Ghz  Corsair CM2X2048-6400DHX  Gigabyte HD5770 Silent Cell  Samsung SyncMaster 2494SW  ALC889a  Creative T5400 5.1  Maxtor 380215AS  Pioneer DVR-215D  Presonus Inspire 1394  KRK Rokit 5  Wacom Bamboo One 
 SL USB Guide => http://www.infinitemac.com/f57/guide...k-drive-t3705/ 
Reply With Quote
  #7  
Old 08-25-2009, 08:21 PM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
Yeah too bad no kx support for my X-fi I wouldn't have bothered with tweaking my onboard otherwise. I've never ever enabled it in bios since I got this motherboard and tbh I was quite surprised by the quality of the digital output.

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard
Reply With Quote
  #8  
Old 08-27-2009, 11:52 AM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
I take back my word. Got full analog 5.1 to work on my onboard alc888!

1. Tweak AppleHDA.kext to detect 3 Line Outputs: Green, Black, Orange.
2. Run Audio Midi Setup
3. Add new Aggregate Device
4. Click on the 3 check boxes corresponding to the 3 Line outs
5. Click on Configure Speakers
6. Select all 3 streams
7. Select Multichannel 5.1
8. Make sure all channels are properly mapped
9. Select Aggregate Device as output under System Preferences>Sound
10. Done



Here's my modified AppleHDA.kext as reference
Attached Images
File Type: jpg LineOuts.jpg (58.2 KB, 463 views)
File Type: jpg AggregateDevice.jpg (78.5 KB, 381 views)
File Type: jpg SpeakerConfig.jpg (59.9 KB, 373 views)
Attached Files
File Type: zip AppleHDA.kext.zip (1,007.8 KB, 1168 views)

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard
Reply With Quote
  #9  
Old 08-27-2009, 12:05 PM
Snow's Avatar
Snow Snow is offline
Tiger
 
Join Date: Jan 2008
Posts: 263
Thats great news m8!

You think I can use this one for my ALC889a?

Only kext is needed? no dsdt patching or other kexts?

This is 64bit compatible yeah?

Thx

Snow Leopard 10.6.7  Gigabyte GA-P35-DS3P  Intel Q6600 @ 3Ghz  Corsair CM2X2048-6400DHX  Gigabyte HD5770 Silent Cell  Samsung SyncMaster 2494SW  ALC889a  Creative T5400 5.1  Maxtor 380215AS  Pioneer DVR-215D  Presonus Inspire 1394  KRK Rokit 5  Wacom Bamboo One 
 SL USB Guide => http://www.infinitemac.com/f57/guide...k-drive-t3705/ 
Reply With Quote
  #10  
Old 08-27-2009, 02:40 PM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
ALC889a might have different pin configuration so I'm not sure about that. However, it looks like your codec is a variant of the ALC885 which has native OSX support so I think you don't need to do any binary patching.

You don't need HDAenabler or any audio injector. Just patch dsdt for audio injection. Then edit the two plist files:

AppleHDA.kext/Contents/Plugins/AppleHDAHardwareConfigDriver.kext/Contents/Info. plist
AppleHDA.kext/Contents/Plugins/AppleHDAPlatformDriver.kext/Contents/Info.plist

Check out the guide by THe KiNG I linked earlier. Should be able to do it yourself. I've made a quick edit for your codec (ALC885 address 3). Just rename them to Info.plist and copy to their respective kexts.

And yes, it's based on the original AppleHDA.kext which came with SL build 10a432 so it's 64bit compatible.



💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers.

Attached Files
File Type: zip Archive.zip (115.8 KB, 407 views)

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard

Last edited by mormegil; 08-27-2009 at 02:48 PM.
Reply With Quote
Reply