No sound after running Windows (ALC1150)
Closed this issue · 24 comments
I know, i could uninstall the Realtek driver under Windows, but maybe the Linux fix could help too in CodecCommander? Something like this seems to solve the no audio problem with Linux:
hda-verb /dev/snd/hwC0D2 0x20 SET_COEF_INDEX 0x07
hda-verb /dev/snd/hwC0D2 0x20 SET_PROC_COEF 0x7cb0
Or is there a better place for the fix?
Read more here:
https://bugzilla.kernel.org/show_bug.cgi?id=87771
You could try the new features of the Commander implemented in commits by @robvanoostenrijk, which allow you to essentially send a verb by defining custom commands in plist. Alternatively you may use hda-verb from Commander's build to try if this would work. Please let me know if it works indeed.
Hm, i'm not sure how to do this, because the devices like in Linux does not exist in OSX. Some hints would be useful. Thank you.
What should be the command in this case, if i use commands in info.plist?
Config allows you to define custom verbs to process at certain power stat transitions. See readme.
SET_COEF_INDEX is 0x5 payload 0007
SET_PROC_COEF is 0x4 payload is 0x7cb0 (magic numbers? determine your own)
So the verbs would be
0x002050007 = 33882119
0x002047CB0 = 33848496
if I haven't messed up somewhere down the road...
Alternatively, use hda-verb binary compiled with CodecCommander:
timewalker$ ./hda-verb 0x20 SET_COEF_INDEX 0x7
nid = 0x20, verb = 0x500, param = 0x7
value = 0xffffffff
timewalker$ ./hda-verb 0x20 SET_PROC_COEF 0x7cb0
nid = 0x20, verb = 0x400, param = 0x7cb0
value = 0xffffffff
Thank you, i will try. Can i edit the info.plist in S/L/E/CodecCommander.kext directly and do i have to restart or do any other task?
Hey, it works, really cool! After i loaded the kext, i had sound. So, would i need it just on init?
<key>Custom Commands</key>
<array>
<dict>
<key>Command</key>
<integer>33882119</integer>
<key>Comment</key>
<string>SET_COEF_INDEX</string>
<key>On Init</key>
<true/>
<key>On Sleep</key>
<true/>
<key>On Wake</key>
<true/>
</dict>
<dict>
<key>Command</key>
<integer>33848496</integer>
<key>Comment</key>
<string>SET_PROC_COEF</string>
<key>On Init</key>
<true/>
<key>On Sleep</key>
<false/>
<key>On Wake</key>
<true/>
</dict>
</array>
Pretty much, just on Init.
OK, thank you for your help. I will test it and post that on tonymacx, if you agree.
Nothing against that, as @darkvoid is the man behind this feature.
On a related note, would you care to post what your actual NID=0x20 is ?
Sorry, couldn't find hda-verb in CodecCommander's code. How can i get the NID?
No sorry, i'm new to hackintosh. If you tell me what you need and how to get it, let me know. I try to compile the client.
An ALSA dump from Linux would show you what the NID is. An output of the commands you submit via hda-verb when you have no sound coming from Windows (disable the commands in config temporarily) wouldn't hurt either.
Here is the codec info. Does this help? Don't see any nid.
Codec: Realtek ALC1150
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0900
Subsystem Id: 0x10438619
Revision Id: 0x100001
No Modem Function Group found
Default PCM:
rates [0x5f0]: 32000 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
Power states: D0 D1 D2 D3 CLKSTOP EPSS
Power: setting=D0, actual=D0
GPIO: io=2, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
Processing caps: benign=0, ncoeff=32
I left what I was interested in.. Node = NID, it's just in majority of HDA relates sources node index references a node. What about trying the same thing using hda-verb, did you have any luck? If so, please post how the command response looks like when you do the GET_XXX after performing SET_XXX.
You've reminded me that I still have this mystery in mid-air on my ALC269 codec where booting after Windows would result in no audio on headphone jack.
The hda-verb tool does not seem to work. I can't get any sound. Also i tried everything with sudo before.
bash-3.2$ ./hda-verb 0x20 GET_COEF_INDEX 0x7
nid = 0x20, verb = 0xd00, param = 0x7
value = 0x0
bash-3.2$ ./hda-verb 0x20 SET_COEF_INDEX 0x7
nid = 0x20, verb = 0x500, param = 0x7
value = 0x0
bash-3.2$ ./hda-verb 0x20 GET_COEF_INDEX 0x7
nid = 0x20, verb = 0xd00, param = 0x7
value = 0x0
bash-3.2$ ./hda-verb 0x20 GET_PROC_COEF 0x7cb0
nid = 0x20, verb = 0xc00, param = 0x7cb0
value = 0x0
bash-3.2$ ./hda-verb 0x20 SET_PROC_COEF 0x7cb0
nid = 0x20, verb = 0x400, param = 0x7cb0
value = 0x0
bash-3.2$ ./hda-verb 0x20 GET_PROC_COEF 0x7cb0
nid = 0x20, verb = 0xc00, param = 0x7cb0
value = 0x0
Do i have to set a device like for the linux command?
hda-verb /dev/snd/hwC0D2 0x20 SET_COEF_INDEX 0x07
hda-verb /dev/snd/hwC0D2 0x20 SET_PROC_COEF 0x7cb0
After i added the commands back to CodecCommander, unloaded and loaded the kext, i had sound again.
Perhaps it really should be on init then. I forgot to mention that GET commands use 0 payload.
sh-3.2# ./hda-verb 0x20 GET_PROC_COEF 0
nid = 0x20, verb = 0xc00, param = 0x0
value = 0xaab8
I'm just wondering where does the magic number come from. I read through majority of patch_realtek.c and it looks like they read the value from SET_COEF_INDEX/GET_PROC_COEF first, then bitshift the value for most of the codecs and use it for proc_coef on SET_COEF_INDEX/SET_PROC_COEF.
Looks different or do i have to test, when i have no sound?
bash-3.2$ ./hda-verb 0x20 GET_PROC_COEF 0
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x0
bash-3.2$ ./hda-verb 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0x0
I don't know, where the magic numbers came from, i'm no coder :) I was just searching for a solution without uninstalling the Windows realtek driver and read about the same effect on Linux.
This solution also worked for me...Good job dolnor and the rest of the guys.
First i tried to load the kext from EFI partition (clover) and it didn't work but it did work when i installed it in S/L/E...i guess this can't work from EFI then?
I'm using Chimera boot loader, so i can't test with Clover. Maybe i will switch to Clover later, but at the moment everything is running, so: Never change a running system :D
CodecCommander won't work from EFI, yes. Don't expect it to ever wok like this because it relies on multiple things to initiate in a timely manner before it actually attaches to device node.
Thanks a lot for your response Dolnor i got 1 last question.Is it possible to get less log details? its a little bit spammy.Also if you need me to post any logs let me know...
Provided you use release compilation and not a debug build, the only messages you should be seeing are below:
4/24/15 6:19:17.000 PM kernel[0]: CodecCommander: Version 2.2.1 starting.
4/24/15 6:19:17.000 PM kernel[0]: CodecCommander::IntelHDA
4/24/15 6:19:17.000 PM kernel[0]: ....Output Streams: 1
4/24/15 6:19:17.000 PM kernel[0]: ....Input Streams: 0
4/24/15 6:19:17.000 PM kernel[0]: ....Bidi Streams: 4
4/24/15 6:19:17.000 PM kernel[0]: ....Serial Data: 2
4/24/15 6:19:17.000 PM kernel[0]: ....x64 Support: 0
4/24/15 6:19:17.000 PM kernel[0]: ....Codec Version: 1.0
4/24/15 6:19:17.000 PM kernel[0]: ....Vendor Id: 0x10ec
4/24/15 6:19:17.000 PM kernel[0]: ....Device Id: 0x0269
...
4/24/15 6:19:18.000 PM kernel[0]: CodecCommander: NID=0x14 supports EAPD, will update state after sleep
You can enclose the IOLog output on IntelHDA.cpp in
#ifdef DEBUG_MSG
#endif
and compile release (for profiling) if that's too much log for you.
i was using debug :P
Can somebody prepare the CodecCommander-Kext for the AORUS Z390 MASTER with the ALC1220-VB? I can't get it working. I have no sound after Windows.