Jump to content
vit9696

AppleALC — dynamic AppleHDA patching

4,200 posts in this topic

Recommended Posts

22 minutes ago, headkaze said:

Okay thanks for the clarification.

 

So I have implemented this but there are some potential issues.

1. Is it okay to have G=15 / P=0 for both Headphone / Headset?

2. When clicking "Apply Fix" these two rules effect the Headset Mic entry:


8. 71e / 71f - First Microphone Port set to Internal + Jack / Connector set to Unknown (Enables DSP Noise Reduction - Rodion2010)
9. 71e - Second Microphone Device set to Line In / Connector set to Unknown (Ext Mic doesn't work on Hackintoshes - Rodion2010)

Since it's the second Microphone in the list it will change Device from Microphone to Line In / Connector to Unknown

 

Please try the attached version and please advise on solving the above issues.

PinConfigurator.zip

all is good but node 18 is unnecessary 1a is good enough

1151043070_ScreenShot2019-02-10at9_34_17PM.png.6daa93c61ab9682efc80e994c6936036.png

 

 

i'm explaining again : 

all new laptops having rebrand audio chips like alc298 aka ALC3266 , these chips can have many input outputs as chips allow but it's vendor who decide what option to give in laptops 

Now if laptop has 2 Mic also seperate Jacks then you won't see  "Headphone Mic Boost Volume" node bcoz these model don't have combojack

late 2017 laptop has combojack but in codec_dump they still has seperate node id for external mic again you won't see "Headphone Mic Boost Volume" , app is doing good you don't have to worry about 

Now come to latest laptops they have "Headphone Mic Boost Volume"  and "Headset Mic " , but we need to care for "Headphone Mic Boost Volume" only , so just ignore "Headset Mic

 

 

8. 71e / 71f - First Microphone Port set to Internal + Jack / Connector set to Unknown (Enables DSP Noise Reduction - Rodion2010)
9. 71e - Second Microphone Device set to Line In / Connector set to Unknown (Ext Mic doesn't work on Hackintoshes - Rodion2010)

 

these are essential standards so use as is 

 

 

Quote

Is it okay to have G=15 / P=0 for both Headphone / Headset?

personally speaking G has no effect on device you can have 0 for all etc , it's looks good when have 1,2,3,4,5,6 numerical order 

 

1830208923_ScreenShot2019-02-10at9_53_38PM.thumb.png.c790ac5d4b311af628dd7ce2a091dc75.png

 

 

 

Edited by insanelyDeepak

Share this post


Link to post
Share on other sites
Advertisement
2 hours ago, insanelyDeepak said:

all is good but node 18 is unnecessary 1a is good enough

 

personally speaking G has no effect on device you can have 0 for all etc , it's looks good when have 1,2,3,4,5,6 numerical order 

Okay thanks again. I've uploaded Pin Configurator v2.0.2 with these changes and I've put back all original sanitizing from verbit even if only cosmetic.

 

If you get some time please test it is working as expected.

Share this post


Link to post
Share on other sites
5 hours ago, insanelyDeepak said:

@headkaze final feature if you add generating codec_dump_dec.txt.svg  as codecgraph does, then it will be full fledge codec configurator 

 

also you add option to export text file like verbs.txt , so it will easy compare if app fails sometimes

I think it would take quite a bit of work to convert the codecgraph.py source over to Objective C. I'm not sure I can justify spending the time on it to be honest.

Share this post


Link to post
Share on other sites
On 2/8/2019 at 2:48 AM, Andres ZeroCross said:

You need CodecCommander.kext in Library/Extensions and use SSDT.aml or custom info.plist of codeccommander to set Pin Widget of your External Mic

 

Hello!

 

I have CodeCommander in L/E, I placed the SSDT-CX8200.aml in the ACPI/Patches folder int EFI. After fixing permissions and rebuilding kext cache, the mac crashes during reboot or few seconds after (tried it a few times)

 

Is there something I can do?

 

Linux Pins:

image.png.fe76f03704487776fac3ff53329f8ed8.png

 

image.png.2f120993f32de232de5118bb5c62816a.png

 

I tried replacing the ConfigData in AppleALC.kext Info Plist. After fixing permissions, rebuilding cache and rebooting, the sound options said Output is unknown and it has no controls. So actually internal speaker stopped working. After rerolling it was working again.

image.png.d9a83576f23ebcca9743bb0f5a7f1a1c.png

 

image.png.51623dc07634750435ffca7e3e55e6bb.png

Thank you in advance for your help

 

Edited by sweet

Share this post


Link to post
Share on other sites
3 hours ago, Rodion2010 said:

simple script that shows PinConfigurations from IORegistry

That script inspired me to add support for importing IORegistry data into Pin Configurator. But it's made me discover an issue. When I import my own data I have a "HDMI" node. If I click on "Apply Fix" then it will remove this port. My guess is I need this port for the DisplayPort audio out to my monitor. So it looks like I need to remove the automatic "HDMI" port removal or perhaps skip the ones that have Port marked as Internal?

IOReg.png

Edited by headkaze

Share this post


Link to post
Share on other sites
8 hours ago, headkaze said:

I think it would take quite a bit of work to convert the codecgraph.py source over to Objective C. I'm not sure I can justify spending the time on it to be honest.

i can understand , may be i could do help you in free time 

 

import verbs.txt file like verbit does will be a good option , can you do that ? 

Edited by insanelyDeepak

Share this post


Link to post
Share on other sites
4 hours ago, Rodion2010 said:

simple script that shows PinConfigurations from IORegistry

1136649198_2019-02-111_12_52.png.c3f295f10b4725b24fba67d3a4db844a.png

 

 

PinConfig-Info.zip

seems good but it shows many devices which is not present in my system , also headphone RCA instead 1/8

 

Quote

Last login: Mon Feb 11 08:51:59 on ttys000

iMac:~ deepak$ /Users/deepak/Downloads/PinConfig-Info

 

Pin     : Gr Device     Connector       Port         Location Color    Misc

 

00003340: 00 CD         ATAPI internal  Int.& Jack   N/A      Unknown  0

f0111141: f0 Speaker    1/8"            Int.& Jack   Rear     Black    1

10401191: 10 Speaker    1/8"            Int.& Jack   Rear     Green    0

f0111141: f0 Speaker    1/8"            Int.& Jack   Rear     Black    1

f0111141: f0 Speaker    1/8"            Int.& Jack   Rear     Black    1

f0111141: f0 Speaker    1/8"            Int.& Jack   Rear     Black    1

3090a191: 30 Mic In     1/8"            Int.& Jack   Rear     Pink     0

40918192: 40 Line In    1/8"            Int.& Jack   Front    Pink     1

3f308101: 3f Line In    1/8"            Jack         Rear     Blue     0

20402102: 20 HP Out     1/8"            Jack         Front    Green    0

f0111141: f0 Speaker    1/8"            Int.& Jack   Rear     Black    1

01c62440: 01 HP Out     RCA             Int.& Jack   N/A      Reserved 1

f0111141: f0 Speaker    1/8"            Int.& Jack   Rear     Black    1

f0111141: f0 Speaker    1/8"            Int.& Jack   Rear     Black    1

iMac:~ deepak$

 

 

9 hours ago, headkaze said:

Okay thanks again. I've uploaded Pin Configurator v2.0.2 with these changes and I've put back all original sanitizing from verbit even if only cosmetic.

 

If you get some time please test it is working as expected.

done , all is good now

 

1475914717_ScreenShot2019-02-11at9_01_25AM.png.a305b0e21a801f970a9f61248cdaf517.png 

 

 

Share this post


Link to post
Share on other sites
59 minutes ago, insanelyDeepak said:

seems good but it shows many devices which is not present in my system , also headphone RCA instead 1/8

 

 

it shows

ioreg -rw 0 -p IODeviceTree -n HDEF | grep PinConfigurations

in readable format

Share this post


Link to post
Share on other sites
1 minute ago, Rodion2010 said:

 

it shows


ioreg -rw 0 -p IODeviceTree -n HDEF | grep PinConfigurations

in readable format

just check that , it will be in pincofigurator readable format 

 

 

Share this post


Link to post
Share on other sites
2 hours ago, headkaze said:

My guess is I need this port for the DisplayPort audio out to my monitor. So it looks like I need to remove the automatic "HDMI" port removal or perhaps skip the ones that have Port marked as Internal?

 

HDMI and analog codec are two different devices

partial dump

HdaCodecDump start
Codec: NVIDIA (Unknown)
AFG Function Id: 0x1 (unsol 0)
Vendor ID: 0x10DE0042
Revision ID: 0x100100
Default PCM: N/A
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
Node 0x04 [Pin Complex] wcaps 0x407381: Stereo Digital
  Pincap 0x09000094: OUT Detect HBR HDMI DP
  Pin Default 0x185600F0: [Jack] Digital Out at Int Special
    Conn = Digital, Color = Unknown
    DefAssociation = 0xF, Sequence = 0x0
Pin-ctls: 0x00:
  Connection: 4
     0x08 0x09 0x0A 0x0B

———— skip ———

Codec: Analog Devices AD1988B
AFG Function Id: 0x1 (unsol 0)
Vendor ID: 0x11D4198B
Revision ID: 0x100400
Default PCM:
    rates [0x7FF]: 8000 11025 16000 22050 32000 44100 48000 88200 96000 176400 192000
    bits [0xE]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x mute=0
Default Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x mute=5
Node 0x02 [Audio Output] wcaps 0x30311: Stereo Digital
  Connection: 1
     0x1D

—— skip ——

all pinconfigurations discussed here are related with analog codec setup only

so HDMI data must be removed or ignored

Share this post


Link to post
Share on other sites
6 hours ago, Rodion2010 said:

 

HDMI and analog codec are two different devices

partial dump


HdaCodecDump start
Codec: NVIDIA (Unknown)
AFG Function Id: 0x1 (unsol 0)
Vendor ID: 0x10DE0042
Revision ID: 0x100100
Default PCM: N/A
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
Node 0x04 [Pin Complex] wcaps 0x407381: Stereo Digital
  Pincap 0x09000094: OUT Detect HBR HDMI DP
  Pin Default 0x185600F0: [Jack] Digital Out at Int Special
    Conn = Digital, Color = Unknown
    DefAssociation = 0xF, Sequence = 0x0
Pin-ctls: 0x00:
  Connection: 4
     0x08 0x09 0x0A 0x0B

———— skip ———

Codec: Analog Devices AD1988B
AFG Function Id: 0x1 (unsol 0)
Vendor ID: 0x11D4198B
Revision ID: 0x100400
Default PCM:
    rates [0x7FF]: 8000 11025 16000 22050 32000 44100 48000 88200 96000 176400 192000
    bits [0xE]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x mute=0
Default Amp-Out caps: ofs=0x27, nsteps=0x27, stepsize=0x mute=5
Node 0x02 [Audio Output] wcaps 0x30311: Stereo Digital
  Connection: 1
     0x1D

—— skip ——

all pinconfigurations discussed here are related with analog codec setup only

so HDMI data must be removed or ignored

correct

Share this post


Link to post
Share on other sites
8 hours ago, Rodion2010 said:

HDMI and analog codec are two different devices

Is there a way to differentiate between the two from the "Pin Default" value alone? When you import from IORegistry HDEF/PinConfigurations value all you have is the pin data.

 

In other words will the only way I know it's a HDMI node is by checking for "HDMI" in the "Pincap" line?

Share this post


Link to post
Share on other sites
9 hours ago, insanelyDeepak said:

i can understand , may be i could do help you in free time 

That would be great. If you can port it to C/C++ or Objective C I can easily integrate it.

9 hours ago, insanelyDeepak said:

i can understand , may be i could do help you in free time 

 

import verbs.txt file like verbit does will be a good option , can you do that ? 

Do you mean export verbs.txt? It can already import raw verb data. If you mean export this info then it shouldn't be too hard to do that.

Share this post


Link to post
Share on other sites
11 minutes ago, headkaze said:

That would be great. If you can port it to C/C++ or Objective C I can easily integrate it.

yes, i have good experience with Obj and Swift but no python yet , will give it a try 

 

11 minutes ago, headkaze said:

Do you mean export verbs.txt? It can already import raw verb data. If you mean export this info then it shouldn't be too hard to do that.

 

yeah my bad i mean export

Edited by insanelyDeepak

Share this post


Link to post
Share on other sites
1 hour ago, headkaze said:

Is there a way to differentiate between the two from the "Pin Default" value alone? When you import from IORegistry HDEF/PinConfigurations value all you have is the pin data.

 

In other words will the only way I know it's a HDMI node is by checking for "HDMI" in the "Pincap" line?

from IORegistry

 

ioreg -rw 0 -p IODeviceTree -n HDEF | grep PinConfigurations
      "PinConfigurations" = <3040210210401001f0111751219080022e308101121010012090a09122113399f011f791f0f14501f0f1c5411160100114201001>
ioreg -rw 0 -p IODeviceTree -n HDAU | grep PinConfigurations
      "PinConfigurations" = <e0005628> // it is HDMI

 

Share this post


Link to post
Share on other sites

Hi @vandroiy2012 i make new pull request for info.plist of CX20751/2 for Toshiba Kira 107. I add new revisions 0x100001 for CX20751/2 (Toshiba Kira 107).
It's tested by @rottenpants. Audio is working with add new revisions to the plist

Please check this commit https://github.com/acidanthera/AppleALC/pull/382

Share this post


Link to post
Share on other sites

I've  never really taken care of the pin configuration, in most cases it works with the default config, even the external microphone has been working here for years. See here and here.

Just for fun, add the CA0132 pin config from the AppleALC resources to the PinConfigurator and se the result.:o

 

Also see some optical glitches on HiDPI mode.

pinconfigurator.png

Share this post


Link to post
Share on other sites
3 hours ago, headkaze said:

What about a Voodoo dump?

the same

           nid: 4
           Name: pin: Digital-out (HDMI)
     Widget cap: 0x00407381
                 DIGITAL UNSOL 8CH
    Association: 0 (0x00000001)
        Pin cap: 0x09000094
                 PDC OUT HDMI DP HBR

     Pin config: 0x185600f0
    Pin control: 0x00000040 OUT
    
 

Share this post


Link to post
Share on other sites
On 2/10/2019 at 6:17 PM, insanelyDeepak said:

 

personally speaking G has no effect on device you can have 0 for all etc , it's looks good when have 1,2,3,4,5,6 numerical order 

 

are you sure it is a good idea?

it makes no difference in most cases

but vendor defined codec configuration seems more reasonable than "looks good"

 

more

the second value (P) is used in multichannel configurations to detect speakers

10 front or stereo

11 center and subwoofer

12 surround

14 surround for 7.1

i am not sure if it is really used by Apple in Audio/Midi multiSpeakers Setup

but there is no reason to delete it by default fro all users

 

PS to previous comment

maybe it will be good solution for all

two separate buttons

"Apply Fix"

and

"Rearrange Groups to 1 2 3 4 5 6 for those who want this"

Edited by Rodion2010

Share this post


Link to post
Share on other sites

I wanted to thank @Andres ZeroCross for having extreme patience of helping me out getting audio to work by creating a new revision of my codec. In the process he patched my DSDT file (battery status, brightness fix, trackpad fix, usb fixes) and my config.plist file. He wasted a couple of hours with my case and everything turned out perfect (besides bluetooth but not his fault). So again, thank you Andrez. :lol:

 

 

 

 

Share this post


Link to post
Share on other sites
1 hour ago, Rodion2010 said:

the same

Do you know where the Address value stored in a Voodoo dump? In Linux dump it's the second line called "Address: " but I can't find anything equivalent. Also what does the "Headphone Mic Boost Volume" entry look like in Voodoo?

Edited by headkaze

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×