Jump to content

Codec Commander customization for dual boot sound issues


roddie
 Share

16 posts in this topic

Recommended Posts

All,

 

I'm still fairly new to the Hackintosh world, so please forgive me if I mess up any of the terms.

 

I've built a Hackintosh using a Gigabyte GA-Z170MX-Gaming 5 MB and other support peripherals.  Everything is running very smoothly (sound, GTX 960 graphics, etc), including a dual-boot with Windows 10 on dedicated SSDs.   

 

The only problem I'm having right now is when I boot from Windows 10 back to OS X, I get no sound without doing a complete shutdown.  Some Googling over the weekend lead me to find out that the levels are being manipulated by the Windows 10 Realtek driver and that I should use Codec Commander to reset them when I boot back to OS X.  The suggestion is to use Rehabman's fork here with the following customization to info.plist:

<key>10ec_0900</key>
<string>Realtek ALC1150</string>
<key>Realtek ALC1150</key>
<dict>
  <key>Custom Commands</key>
  <array>
    <dict>
      <key>Command</key>
      <data>AgUABw==</data>
      <key>Comment</key>
      <string>0x20 SET_COEF_INDEX 0x07</string>
      <key>On Init</key>
      <true/>
      <key>On Sleep</key>
      <true/>
      <key>On Wake</key>
      <true/>
    </dict>
    <dict>
      <key>Command</key>
      <data>AgR8sA==</data>
      <key>Comment</key>
      <string>0x20 SET_PROC_COEF 0x7CB0</string>
      <key>On Init</key>
      <true/>
      <key>On Sleep</key>
      <false/>
      <key>On Wake</key>
      <true/>
    </dict>
  </array>
  <key>Update Nodes</key>
  <false/>
  <key>Sleep Nodes</key>
  <false/>
  <key>Send Delay</key>
  <integer>100</integer>
</dict>

Now, I haven't needed to deal with any kexts with my setup yet, so I'm not really 100% sure how to approach this.  At first I thought that I'd need to edit the source from the CC fork, build it, and install it, but the README.md on Rehabman's fork suggests that I can use the pre-built kext and do the customization via ACPI RMCF instead (neither of those acronyms means anything to me yet).

 

So, I've put his pre-built CodecCommander.kext in my Clover EFI "Other" directory, but I don't know what to do with the above customization to get it to take.

 

Again, forgive me if I've misused any of the terms here - I'm still learning.  I've done plenty of searching for this, but still haven't found anything that helps me.

 

Thanks!

Roddie

Link to comment
Share on other sites

All,

 

I'm still fairly new to the Hackintosh world, so please forgive me if I mess up any of the terms.

 

I've built a Hackintosh using a Gigabyte GA-Z170MX-Gaming 5 MB and other support peripherals.  Everything is running very smoothly (sound, GTX 960 graphics, etc), including a dual-boot with Windows 10 on dedicated SSDs.   

 

The only problem I'm having right now is when I boot from Windows 10 back to OS X, I get no sound without doing a complete shutdown.  Some Googling over the weekend lead me to find out that the levels are being manipulated by the Windows 10 Realtek driver and that I should use Codec Commander to reset them when I boot back to OS X.  The suggestion is to use Rehabman's fork here with the following customization to info.plist:

<key>10ec_0900</key>
<string>Realtek ALC1150</string>
<key>Realtek ALC1150</key>
<dict>
  <key>Custom Commands</key>
  <array>
    <dict>
      <key>Command</key>
      <data>AgUABw==</data>
      <key>Comment</key>
      <string>0x20 SET_COEF_INDEX 0x07</string>
      <key>On Init</key>
      <true/>
      <key>On Sleep</key>
      <true/>
      <key>On Wake</key>
      <true/>
    </dict>
    <dict>
      <key>Command</key>
      <data>AgR8sA==</data>
      <key>Comment</key>
      <string>0x20 SET_PROC_COEF 0x7CB0</string>
      <key>On Init</key>
      <true/>
      <key>On Sleep</key>
      <false/>
      <key>On Wake</key>
      <true/>
    </dict>
  </array>
  <key>Update Nodes</key>
  <false/>
  <key>Sleep Nodes</key>
  <false/>
  <key>Send Delay</key>
  <integer>100</integer>
</dict>
Now, I haven't needed to deal with any kexts with my setup yet, so I'm not really 100% sure how to approach this.  At first I thought that I'd need to edit the source from the CC fork, build it, and install it, but the README.md on Rehabman's fork suggests that I can use the pre-built kext and do the customization via ACPI RMCF instead (neither of those acronyms means anything to me yet).

 

So, I've put his pre-built CodecCommander.kext in my Clover EFI "Other" directory, but I don't know what to do with the above customization to get it to take.

 

Again, forgive me if I've misused any of the terms here - I'm still learning.  I've done plenty of searching for this, but still haven't found anything that helps me.

 

Thanks!

Roddie

 

There are several examples of SSDTs that override the Info.plist content in the repo itself. Look at SSDT*.dsl for ideas/examples.

  • Like 1
Link to comment
Share on other sites

There are several examples of SSDTs that override the Info.plist content in the repo itself. Look at SSDT*.dsl for ideas/examples.

 

Thanks, @RehabMan - I saw those, and I think I can figure out how to translate the above to an SSDT.  My question is more basic: Do I just stick them into the "Other" directory in my EFI with the kext file or do I have to link/compile them in somehow?

 

(I'm more trying to learn the structure of these patches and how to use them.)

Link to comment
Share on other sites

Thanks, @RehabMan - I saw those, and I think I can figure out how to translate the above to an SSDT.  My question is more basic: Do I just stick them into the "Other" directory in my EFI with the kext file or do I have to link/compile them in somehow?

 

(I'm more trying to learn the structure of these patches and how to use them.)

ACPI files are loaded by Clover from EFI/Clover/ACPI/patched

Link to comment
Share on other sites

ACPI files are loaded by Clover from EFI/Clover/ACPI/patched

 

Thanks again for the reply!

 

Now I just have to take a shot at the syntax and figure out how to get from SSDT to ACPI when I get home Friday.  I'm sure I'll be back here with questions. ;-)

Link to comment
Share on other sites

Correct me if I'm wrong but doesn't codeccommander need to be installed in S/L/E? Could that be the reason for the no sound upon rebooting between os?

 

Sent from my SM-G930F using Tapatalk

I say this as my system has alc1150 also on my z170x gaming 5 and I also triple boot with windows 10 without audio issues.

 

Sent from my SM-G930F using Tapatalk

Link to comment
Share on other sites

Correct me if I'm wrong but doesn't codeccommander need to be installed in S/L/E? Could that be the reason for the no sound upon rebooting between os?

My fork of CodecCommander.kext will work when injected via Clover.

But installing to /S/L/E or /L/E is preferred.

Link to comment
Share on other sites

Ok, here's my first shot at this -- I'm about 1600 miles away from my Hackintosh, so I can't test this until Friday, but I figured I'd at least try to get the SSDT built based on the above Info.plist modification:

 

// This SSDT demonstrates a custom configuration for ACL1150.
//
// It is needed to solve a problem with booting OS X after Windows.
// 
//
// See here for details:
// http://www.insanelymac.com/forum/topic/318980-codec-commander-customization-for-dual-boot-sound-issues/
// https://www.tonymacx86.com/threads/alc-1150-problem-with-dual-booting-10-10-4-windows-10.169538/page-2


DefinitionBlock ("", "SSDT", 1, "hack", "ALC1150", 0)
{
    External(_SB.PCI0.HDEF, DeviceObj)
    
    Name(_SB.PCI0.HDEF.RMCF, Package()
    {
        "CodecCommander", Package()
        {
            "Custom Commands", Package()
            {
                Package(){}, // signifies Array instead of Dictionary
                // correcting audio after dual boot from Windows
                Package()
                {
                    // 0x20 SET_COEF_INDEX 0x07
                    "Command", Buffer() { 0x02, 0x05, 0x00, 0x07 },
                    "On Init", ">y",
                    "On Sleep", ">y",
                    "On Wake", ">y",
                },
                Package()
                {
                    // 0x20 SET_PROC_COEF 0x7CB0
                    "Command", Buffer() { 0x02, 0x04, 0x7c, 0xb0 },
                    "On Init", ">y",
                    "On Sleep", ">n",
                    "On Wake", ">y",
                },
            },
            "Update Nodes", ">n",
            "Send Delay", 100,
            "Sleep Nodes", ">n",            
        },
    })
}
//EOF

So, now I just have to rename it to .aml and drop it in EFI/Clover/ACPI/patched? I saw something in the instructions about SortedOrder, so I'll need to find that when I get home, too.


I say this as my system has alc1150 also on my z170x gaming 5 and I also triple boot with windows 10 without audio issues.

Sent from my SM-G930F using Tapatalk

 

Are you using the Realtek driver in Windows 10 or the Windows driver?  The Realtek driver seems to be the trigger.

Link to comment
Share on other sites

Yes I'm using the realtek driver.

And no you don't just rename a .dsl file it needs to saved as .aml or recompiled as .aml

 

Sent from my SM-G930F using Tapatalk

 

 

My build is nearly identical to yours (I have GA-Z170MX-Gaming 5, 2 x 16GB sticks and Corsair SSDs).  A lot of others have the same problem.  When I reboot from Windows 10 to OS X, I can't hear sound.  The drivers are loaded and everything appears normal, but apparently the Realtek drivers in Windows 10 adjust some levels that aren't recovered automatically in OS X.  A cold boot fixes it.

 

Ok, I need to go learn how to do that - Thanks!

Link to comment
Share on other sites

If you open your ssdt with maciasl there is an option to save and that's where you change the extension so it saves appropriately not just rename the extension.

 

Sent from my SM-G930F using Tapatalk

 

Awesome, I'll have to do that when I get home.  Thanks!

Link to comment
Share on other sites

And yeah install codeccommander.kext in S/L/E with a kext utility and try your reboot process again before using your custom ssdt.

What method are you using for audio anyway?

 

Sent from my SM-G930F using Tapatalk

My fork of CodecCommander.kext will work when injected via Clover.

But installing to /S/L/E or /L/E is preferred.

Thanks for clarification.

I always use S/L/E for system kexts.

 

Sent from my SM-G930F using Tapatalk

Link to comment
Share on other sites

And yeah install codeccommander.kext in S/L/E with a kext utility and try your reboot process again before using your custom ssdt.

What method are you using for audio anyway?

 

Sent from my SM-G930F using Tapatalk

Thanks for clarification.

I always use S/L/E for system kexts.

 

Sent from my SM-G930F using Tapatalk

 

To get audio going, I used a tool (the name got censored, I had to go read why ;-) ) to add the ALC1150 and 110 Series Audio drivers.  I used Clover Configurator to get iMessage working, and manually edited my config.plist to get the Nvidia web drivers to load.  It's been a fun ride.

 

Through troubleshooting this process, I came across a few recent posts that said to use Clover for kext injection now instead of the direct S/L/E method.  The theory is that we should be doing any modding via the boot loader instead of patching the OS files themselves.  Not my theory, but that's what I read today.

Link to comment
Share on other sites

Ok, here's my first shot at this -- I'm about 1600 miles away from my Hackintosh, so I can't test this until Friday, but I figured I'd at least try to get the SSDT built based on the above Info.plist modification:

 

 

 

// This SSDT demonstrates a custom configuration for ACL1150.
//
// It is needed to solve a problem with booting OS X after Windows.
// 
//
// See here for details:
// http://www.insanelymac.com/forum/topic/318980-codec-commander-customization-for-dual-boot-sound-issues/
// https://www.tonymacx86.com/threads/alc-1150-problem-with-dual-booting-10-10-4-windows-10.169538/page-2


DefinitionBlock ("", "SSDT", 1, "hack", "ALC1150", 0)
{
    External(_SB.PCI0.HDEF, DeviceObj)
    
    Name(_SB.PCI0.HDEF.RMCF, Package()
    {
        "CodecCommander", Package()
        {
            "Custom Commands", Package()
            {
                Package(){}, // signifies Array instead of Dictionary
                // correcting audio after dual boot from Windows
                Package()
                {
                    // 0x20 SET_COEF_INDEX 0x07
                    "Command", Buffer() { 0x02, 0x05, 0x00, 0x07 },
                    "On Init", ">y",
                    "On Sleep", ">y",
                    "On Wake", ">y",
                },
                Package()
                {
                    // 0x20 SET_PROC_COEF 0x7CB0
                    "Command", Buffer() { 0x02, 0x04, 0x7c, 0xb0 },
                    "On Init", ">y",
                    "On Sleep", ">n",
                    "On Wake", ">y",
                },
            },
            "Update Nodes", ">n",
            "Send Delay", 100,
            "Sleep Nodes", ">n",            
        },
    })
}
//EOF

 

If it is just a problem upon restart, why On Sleep=true, On Wake=true?

 

So, now I just have to rename it to .aml and drop it in EFI/Clover/ACPI/patched?

No. A dsl must be compiled into AML using iasl or MaciASL.

 

I saw something in the instructions about SortedOrder, so I'll need to find that when I get home, too.

If you are using config.plist/ACPI/SortedOrder, only the SSDTs named there are loaded. Therefore if you want another SSDT to load, you must add it to the list.

Link to comment
Share on other sites

If it is just a problem upon restart, why On Sleep=true, On Wake=true?

 

 

The other issue that I've seen reported with the cards is that audio doesn't work upon wake, so I figured I'd try to kill two birds with one stone.  I have the energy stuff turned off for now, but I'll test it before I use it. Thanks for the sanity check.

 

No. A dsl must be compiled into AML using iasl or MaciASL.

 

If you are using config.plist/ACPI/SortedOrder, only the SSDTs named there are loaded. Therefore if you want another SSDT to load, you must add it to the list.

 

 

Awesome - I think that gives me what I need.  Thank you again for your help and for answering my follow-ups!

Link to comment
Share on other sites

 Share

×
×
  • Create New...